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 499 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 860 of file MathFuncs.h.
|
inline |
Definition at line 111 of file MathFuncs.h.
|
inline |
Definition at line 551 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 211 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 479 of file MathFuncs.h.
|
inline |
Definition at line 795 of file MathFuncs.h.
| 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.
| double RooFit::Detail::MathFuncs::chebychevIntegral | ( | DoubleArray | coeffs, |
| unsigned int | nCoeffs, | ||
| double | xMin, | ||
| double | xMax, | ||
| double | xMinFull, | ||
| double | xMaxFull ) |
Definition at line 661 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 435 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 406 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 420 of file MathFuncs.h.
| double RooFit::Detail::MathFuncs::constraintSum | ( | DoubleArray | comp, |
| unsigned int | compSize ) |
Definition at line 180 of file MathFuncs.h.
|
inline |
Definition at line 120 of file MathFuncs.h.
Definition at line 397 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 570 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 578 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 597 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 615 of file MathFuncs.h.
use fast FMA if available, fall back to normal arithmetic if not
Definition at line 646 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 369 of file MathFuncs.h.
|
inline |
Definition at line 254 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 516 of file MathFuncs.h.
| double RooFit::Detail::MathFuncs::interpolate1d | ( | double | low, |
| double | high, | ||
| double | val, | ||
| unsigned int | numBins, | ||
| DoubleArray | vals ) |
Definition at line 219 of file MathFuncs.h.
Definition at line 380 of file MathFuncs.h.
Definition at line 387 of file MathFuncs.h.
|
inline |
Definition at line 774 of file MathFuncs.h.
|
inline |
Definition at line 784 of file MathFuncs.h.
Definition at line 392 of file MathFuncs.h.
| double RooFit::Detail::MathFuncs::multipdf | ( | int | idx, |
| DoubleArray | pdfs ) |
Definition at line 169 of file MathFuncs.h.
| double RooFit::Detail::MathFuncs::multiVarGaussian | ( | int | n, |
| XArray | x, | ||
| MuArray | mu, | ||
| CovArray | covI ) |
Definition at line 887 of file MathFuncs.h.
|
inline |
Definition at line 449 of file MathFuncs.h.
Definition at line 239 of file MathFuncs.h.
|
inline |
Definition at line 727 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 133 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 627 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 199 of file MathFuncs.h.
| double RooFit::Detail::MathFuncs::recursiveFraction | ( | DoubleArray | a, |
| unsigned int | n ) |
Definition at line 468 of file MathFuncs.h.
| double RooFit::Detail::MathFuncs::stepFunctionIntegral | ( | double | xmin, |
| double | xmax, | ||
| std::size_t | nBins, | ||
| DoubleArray | boundaries, | ||
| DoubleArray | coefs ) |
Definition at line 904 of file MathFuncs.h.