Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooMathCoreReg.cxx
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * Package: RooFitCore *
4 * File: $Id$
5 * Authors: *
6 * WV, Wouter Verkerke, NIKHEF, verkerke@nikhef.nl *
7 * *
8 * Copyright (c) 2000-2008, NIKHEF, Regents of the University of California *
9 * and Stanford University. All rights reserved. *
10 * *
11 *****************************************************************************/
12
13/** \class RooMathCoreReg
14 \ingroup Roofit
15
16**/
17
18#include "Riostream.h"
19#include "RooMathCoreReg.h"
26
27namespace {
28
29RooMathCoreReg dummy ;
30
31}
32
34{
35 // Import MathCore 'special' functions from ROOT::Math namespace
36 RooCFunction1Ref<double,double>::fmap().add("ROOT::Math::erf",ROOT::Math::erf,"x") ;
37 RooCFunction1Ref<double,double>::fmap().add("ROOT::Math::erfc",ROOT::Math::erfc,"x") ;
38 RooCFunction1Ref<double,double>::fmap().add("ROOT::Math::tgamma",ROOT::Math::tgamma,"x") ;
39 RooCFunction1Ref<double,double>::fmap().add("ROOT::Math::lgamma",ROOT::Math::lgamma,"x") ;
40 RooCFunction2Ref<double,double,double>::fmap().add("ROOT::Math::inc_gamma",ROOT::Math::inc_gamma,"a","x") ;
41 RooCFunction2Ref<double,double,double>::fmap().add("ROOT::Math::inc_gamma_c",ROOT::Math::inc_gamma_c,"a","x") ;
42 RooCFunction2Ref<double,double,double>::fmap().add("ROOT::Math::beta",ROOT::Math::beta,"x","y") ;
43 RooCFunction3Ref<double,double,double,double>::fmap().add("ROOT::Math::inc_beta",ROOT::Math::inc_beta,"x","a","b") ;
44
45 // MathCore pdf functions from ROOT::Math namespace
46 RooCFunction2Ref<double,unsigned int,double>::fmap().add("ROOT::Math::poisson_pdf",ROOT::Math::poisson_pdf, "n","mu") ;
47 RooCFunction3Ref<double,double,double,double>::fmap().add("ROOT::Math::beta_pdf",ROOT::Math::beta_pdf,"x","a","b") ;
48 RooCFunction3Ref<double,double,double,double>::fmap().add("ROOT::Math::breitwigner_pdf",ROOT::Math::breitwigner_pdf,"x","gamma","x0") ;
49 RooCFunction3Ref<double,double,double,double>::fmap().add("ROOT::Math::cauchy_pdf",ROOT::Math::cauchy_pdf,"x","b","x0") ;
50 RooCFunction3Ref<double,double,double,double>::fmap().add("ROOT::Math::chisquared_pdf",ROOT::Math::chisquared_pdf,"x","r","x0") ;
51 RooCFunction3Ref<double,double,double,double>::fmap().add("ROOT::Math::exponential_pdf",ROOT::Math::exponential_pdf,"x","lambda","x0") ;
52 RooCFunction3Ref<double,double,double,double>::fmap().add("ROOT::Math::gaussian_pdf",ROOT::Math::gaussian_pdf,"x","sigma","x0") ;
53 RooCFunction3Ref<double,double,double,double>::fmap().add("ROOT::Math::landau_pdf",ROOT::Math::landau_pdf,"x","sigma","x0.") ;
54 RooCFunction3Ref<double,double,double,double>::fmap().add("ROOT::Math::normal_pdf",ROOT::Math::normal_pdf,"x","sigma","x0") ;
55 RooCFunction3Ref<double,double,double,double>::fmap().add("ROOT::Math::tdistribution_pdf",ROOT::Math::tdistribution_pdf,"x","r","x0") ;
56 RooCFunction3Ref<double,unsigned int,double,unsigned int>::fmap().add("ROOT::Math::binomial_pdf",ROOT::Math::binomial_pdf,"int","double","unsigned") ;
57 RooCFunction4Ref<double,double,double,double,double>::fmap().add("ROOT::Math::fdistribution_pdf",ROOT::Math::fdistribution_pdf,"x","n","m","x0") ;
58 RooCFunction4Ref<double,double,double,double,double>::fmap().add("ROOT::Math::gamma_pdf",ROOT::Math::gamma_pdf,"x","alpha","theta","x0") ;
59 RooCFunction4Ref<double,double,double,double,double>::fmap().add("ROOT::Math::lognormal_pdf",ROOT::Math::lognormal_pdf,"x","m","s","x0") ;
60 RooCFunction4Ref<double,double,double,double,double>::fmap().add("ROOT::Math::uniform_pdf",ROOT::Math::uniform_pdf,"x","a","b","x0") ;
61
62 // MathCore cdf functions from ROOT::Math namespace uint
63 RooCFunction2Ref<double,unsigned int,double>::fmap().add("ROOT::Math::poisson_cdf_c",ROOT::Math::poisson_cdf_c, "n","mu") ;
64 RooCFunction2Ref<double,unsigned int,double>::fmap().add("ROOT::Math::poisson_cdf",ROOT::Math::poisson_cdf, "n","mu") ;
65 RooCFunction3Ref<double,double,double,double>::fmap().add("ROOT::Math::beta_cdf_c",ROOT::Math::beta_cdf_c,"x","a","b") ;
66 RooCFunction3Ref<double,double,double,double>::fmap().add("ROOT::Math::beta_cdf",ROOT::Math::beta_cdf,"x","a","b") ;
67 RooCFunction3Ref<double,double,double,double>::fmap().add("ROOT::Math::breitwigner_cdf_c",ROOT::Math::breitwigner_cdf_c,"x","gamma","x0") ;
68 RooCFunction3Ref<double,double,double,double>::fmap().add("ROOT::Math::breitwigner_cdf",ROOT::Math::breitwigner_cdf,"x","gamma","x0") ;
69 RooCFunction3Ref<double,double,double,double>::fmap().add("ROOT::Math::cauchy_cdf_c",ROOT::Math::cauchy_cdf_c,"x","b","x0") ;
70 RooCFunction3Ref<double,double,double,double>::fmap().add("ROOT::Math::cauchy_cdf",ROOT::Math::cauchy_cdf,"x","b","x0") ;
71 RooCFunction3Ref<double,double,double,double>::fmap().add("ROOT::Math::chisquared_cdf_c",ROOT::Math::chisquared_cdf_c,"x","r","x0") ;
72 RooCFunction3Ref<double,double,double,double>::fmap().add("ROOT::Math::chisquared_cdf",ROOT::Math::chisquared_cdf,"x","r","x0") ;
73 RooCFunction3Ref<double,double,double,double>::fmap().add("ROOT::Math::exponential_cdf_c",ROOT::Math::exponential_cdf_c,"x","lambda","x0") ;
74 RooCFunction3Ref<double,double,double,double>::fmap().add("ROOT::Math::exponential_cdf",ROOT::Math::exponential_cdf,"x","lambda","x0") ;
75 RooCFunction3Ref<double,double,double,double>::fmap().add("ROOT::Math::landau_cdf",ROOT::Math::landau_cdf,"x","sigma","x0") ;
76 RooCFunction3Ref<double,double,double,double>::fmap().add("ROOT::Math::normal_cdf_c",ROOT::Math::normal_cdf_c,"x","sigma","x0") ;
77 RooCFunction3Ref<double,double,double,double>::fmap().add("ROOT::Math::normal_cdf",ROOT::Math::normal_cdf,"x","sigma","x0") ;
78 RooCFunction3Ref<double,double,double,double>::fmap().add("ROOT::Math::tdistribution_cdf_c",ROOT::Math::tdistribution_cdf_c,"x","r","x0") ;
79 RooCFunction3Ref<double,double,double,double>::fmap().add("ROOT::Math::tdistribution_cdf",ROOT::Math::tdistribution_cdf,"x","r","x0") ;
80 RooCFunction3Ref<double,unsigned int,double,unsigned int>::fmap().add("ROOT::Math::binomial_cdf_c",ROOT::Math::binomial_cdf_c,"int","double","unsigned") ;
81 RooCFunction3Ref<double,unsigned int,double,unsigned int>::fmap().add("ROOT::Math::binomial_cdf",ROOT::Math::binomial_cdf,"int","double","unsigned") ;
82 RooCFunction4Ref<double,double,double,double,double>::fmap().add("ROOT::Math::fdistribution_cdf_c",ROOT::Math::fdistribution_cdf_c,"x","n","m","x0") ;
83 RooCFunction4Ref<double,double,double,double,double>::fmap().add("ROOT::Math::fdistribution_cdf",ROOT::Math::fdistribution_cdf,"x","n","m","x0") ;
84 RooCFunction4Ref<double,double,double,double,double>::fmap().add("ROOT::Math::gamma_cdf_c",ROOT::Math::gamma_cdf_c,"x","alpha","theta","x0") ;
85 RooCFunction4Ref<double,double,double,double,double>::fmap().add("ROOT::Math::gamma_cdf",ROOT::Math::gamma_cdf,"x","alpha","theta","x0") ;
86 RooCFunction4Ref<double,double,double,double,double>::fmap().add("ROOT::Math::lognormal_cdf_c",ROOT::Math::lognormal_cdf_c,"x","m","s","x0") ;
87 RooCFunction4Ref<double,double,double,double,double>::fmap().add("ROOT::Math::lognormal_cdf",ROOT::Math::lognormal_cdf,"x","m","s","x0") ;
88 RooCFunction4Ref<double,double,double,double,double>::fmap().add("ROOT::Math::uniform_cdf_c",ROOT::Math::uniform_cdf_c,"x","a","b","x0") ;
89 RooCFunction4Ref<double,double,double,double,double>::fmap().add("ROOT::Math::uniform_cdf",ROOT::Math::uniform_cdf,"x","a","b","x0") ;
90
91 // MathCore quantile functions from ROOT::Math namespace
92 RooCFunction2Ref<double,double,double>::fmap().add("ROOT::Math::cauchy_quantile_c",ROOT::Math::cauchy_quantile_c, "z", "b") ;
93 RooCFunction2Ref<double,double,double>::fmap().add("ROOT::Math::cauchy_quantile",ROOT::Math::cauchy_quantile, "z", "b") ;
94 RooCFunction2Ref<double,double,double>::fmap().add("ROOT::Math::breitwigner_quantile_c",ROOT::Math::breitwigner_quantile_c, "z", "gamma") ;
95 RooCFunction2Ref<double,double,double>::fmap().add("ROOT::Math::breitwigner_quantile",ROOT::Math::breitwigner_quantile, "z", "gamma") ;
96 RooCFunction2Ref<double,double,double>::fmap().add("ROOT::Math::chisquared_quantile_c",ROOT::Math::chisquared_quantile_c, "z", "r") ;
97 RooCFunction2Ref<double,double,double>::fmap().add("ROOT::Math::exponential_quantile_c",ROOT::Math::exponential_quantile_c, "z", "lambda") ;
98 RooCFunction2Ref<double,double,double>::fmap().add("ROOT::Math::exponential_quantile",ROOT::Math::exponential_quantile, "z", "lambda") ;
99 RooCFunction2Ref<double,double,double>::fmap().add("ROOT::Math::gaussian_quantile_c",ROOT::Math::gaussian_quantile_c, "z", "sigma") ;
100 RooCFunction2Ref<double,double,double>::fmap().add("ROOT::Math::gaussian_quantile",ROOT::Math::gaussian_quantile, "z", "sigma") ;
101 RooCFunction2Ref<double,double,double>::fmap().add("ROOT::Math::normal_quantile_c",ROOT::Math::normal_quantile_c, "z", "sigma") ;
102 RooCFunction2Ref<double,double,double>::fmap().add("ROOT::Math::normal_quantile",ROOT::Math::normal_quantile, "z", "sigma") ;
103 //RooCFunction2Ref<double,double,double>::fmap().add("ROOT::Math::chisquared_quantile",ROOT::Math::chisquared_quantile, "z", "r") ;
104 RooCFunction3Ref<double,double,double,double>::fmap().add("ROOT::Math::beta_quantile",ROOT::Math::beta_quantile,"x","a","b") ;
105 RooCFunction3Ref<double,double,double,double>::fmap().add("ROOT::Math::beta_quantile_c",ROOT::Math::beta_quantile_c,"x","a","b") ;
106 RooCFunction3Ref<double,double,double,double>::fmap().add("ROOT::Math::fdistribution_quantile",ROOT::Math::fdistribution_quantile,"z","n","m") ;
107 RooCFunction3Ref<double,double,double,double>::fmap().add("ROOT::Math::fdistribution_quantile_c",ROOT::Math::fdistribution_quantile_c,"z","n","m") ;
108 RooCFunction3Ref<double,double,double,double>::fmap().add("ROOT::Math::gamma_quantile_c",ROOT::Math::gamma_quantile_c,"z","alpha","theta") ;
109 RooCFunction3Ref<double,double,double,double>::fmap().add("ROOT::Math::lognormal_quantile_c",ROOT::Math::lognormal_quantile_c,"x","m","s") ;
110 RooCFunction3Ref<double,double,double,double>::fmap().add("ROOT::Math::lognormal_quantile",ROOT::Math::lognormal_quantile,"x","m","s") ;
111 RooCFunction3Ref<double,double,double,double>::fmap().add("ROOT::Math::uniform_quantile_c",ROOT::Math::uniform_quantile_c,"z","a","b") ;
112 RooCFunction3Ref<double,double,double,double>::fmap().add("ROOT::Math::uniform_quantile",ROOT::Math::uniform_quantile,"z","a","b") ;
113 //RooCFunction3Ref<double,double,double,double>::fmap().add("ROOT::Math::gamma_quantile",ROOT::Math::gamma_quantile,"z","alpha","theta") ;
114 RooCFunction3Ref<double,double,double,double>::fmap().add("ROOT::Math::gamma_quantile_c",ROOT::Math::gamma_quantile_c,"z","alpha","theta") ;
115
116}
static RooCFunction1Map< VO, VI > & fmap()
static RooCFunction2Map< VO, VI1, VI2 > & fmap()
static RooCFunction3Map< VO, VI1, VI2, VI3 > & fmap()
static RooCFunction4Map< VO, VI1, VI2, VI3, VI4 > & fmap()
double uniform_pdf(double x, double a, double b, double x0=0)
Probability density function of the uniform (flat) distribution.
double normal_pdf(double x, double sigma=1, double x0=0)
Probability density function of the normal (Gaussian) distribution.
double lognormal_pdf(double x, double m, double s, double x0=0)
Probability density function of the lognormal distribution.
double binomial_pdf(unsigned int k, double p, unsigned int n)
Probability density function of the binomial distribution.
double fdistribution_pdf(double x, double n, double m, double x0=0)
Probability density function of the F-distribution.
double gamma_pdf(double x, double alpha, double theta, double x0=0)
Probability density function of the gamma distribution.
double landau_pdf(double x, double xi=1, double x0=0)
Probability density function of the Landau distribution:
double exponential_pdf(double x, double lambda, double x0=0)
Probability density function of the exponential distribution.
double gaussian_pdf(double x, double sigma=1, double x0=0)
Probability density function of the normal (Gaussian) distribution.
double chisquared_pdf(double x, double r, double x0=0)
Probability density function of the distribution with degrees of freedom.
double breitwigner_pdf(double x, double gamma, double x0=0)
Probability density function of Breit-Wigner distribution, which is similar, just a different definit...
double beta_pdf(double x, double a, double b)
Probability density function of the beta distribution.
double poisson_pdf(unsigned int n, double mu)
Probability density function of the Poisson distribution.
double cauchy_pdf(double x, double b=1, double x0=0)
Probability density function of the Cauchy distribution which is also called Lorentzian distribution.
double tdistribution_pdf(double x, double r, double x0=0)
Probability density function of Student's t-distribution.
double poisson_cdf(unsigned int n, double mu)
Cumulative distribution function of the Poisson distribution Lower tail of the integral of the poisso...
double uniform_cdf(double x, double a, double b, double x0=0)
Cumulative distribution function of the uniform (flat) distribution (lower tail).
double binomial_cdf_c(unsigned int k, double p, unsigned int n)
Complement of the cumulative distribution function of the Binomial distribution.
double lognormal_cdf(double x, double m, double s, double x0=0)
Cumulative distribution function of the lognormal distribution (lower tail).
double cauchy_cdf_c(double x, double b, double x0=0)
Complement of the cumulative distribution function (upper tail) of the Cauchy distribution which is a...
double fdistribution_cdf(double x, double n, double m, double x0=0)
Cumulative distribution function of the F-distribution (lower tail).
double binomial_cdf(unsigned int k, double p, unsigned int n)
Cumulative distribution function of the Binomial distribution Lower tail of the integral of the binom...
double landau_cdf(double x, double xi=1, double x0=0)
Cumulative distribution function of the Landau distribution (lower tail).
double lognormal_cdf_c(double x, double m, double s, double x0=0)
Complement of the cumulative distribution function of the lognormal distribution (upper tail).
double uniform_cdf_c(double x, double a, double b, double x0=0)
Complement of the cumulative distribution function of the uniform (flat) distribution (upper tail).
double fdistribution_cdf_c(double x, double n, double m, double x0=0)
Complement of the cumulative distribution function of the F-distribution (upper tail).
double normal_cdf_c(double x, double sigma=1, double x0=0)
Complement of the cumulative distribution function of the normal (Gaussian) distribution (upper tail)...
double chisquared_cdf(double x, double r, double x0=0)
Cumulative distribution function of the distribution with degrees of freedom (lower tail).
double gamma_cdf_c(double x, double alpha, double theta, double x0=0)
Complement of the cumulative distribution function of the gamma distribution (upper tail).
double beta_cdf(double x, double a, double b)
Cumulative distribution function of the beta distribution Upper tail of the integral of the beta_pdf.
double breitwigner_cdf_c(double x, double gamma, double x0=0)
Complement of the cumulative distribution function (upper tail) of the Breit_Wigner distribution and ...
double normal_cdf(double x, double sigma=1, double x0=0)
Cumulative distribution function of the normal (Gaussian) distribution (lower tail).
double breitwigner_cdf(double x, double gamma, double x0=0)
Cumulative distribution function (lower tail) of the Breit_Wigner distribution and it is similar (jus...
double exponential_cdf_c(double x, double lambda, double x0=0)
Complement of the cumulative distribution function of the exponential distribution (upper tail).
double tdistribution_cdf(double x, double r, double x0=0)
Cumulative distribution function of Student's t-distribution (lower tail).
double beta_cdf_c(double x, double a, double b)
Complement of the cumulative distribution function of the beta distribution.
double poisson_cdf_c(unsigned int n, double mu)
Complement of the cumulative distribution function of the Poisson distribution.
double chisquared_cdf_c(double x, double r, double x0=0)
Complement of the cumulative distribution function of the distribution with degrees of freedom (upp...
double cauchy_cdf(double x, double b, double x0=0)
Cumulative distribution function (lower tail) of the Cauchy distribution which is also Lorentzian dis...
double tdistribution_cdf_c(double x, double r, double x0=0)
Complement of the cumulative distribution function of Student's t-distribution (upper tail).
double gamma_cdf(double x, double alpha, double theta, double x0=0)
Cumulative distribution function of the gamma distribution (lower tail).
double exponential_cdf(double x, double lambda, double x0=0)
Cumulative distribution function of the exponential distribution (lower tail).
double fdistribution_quantile_c(double z, double n, double m)
Inverse ( ) of the cumulative distribution function of the upper tail of the f distribution (fdistrib...
double breitwigner_quantile(double z, double gamma)
Inverse ( ) of the cumulative distribution function of the lower tail of the Breit_Wigner distributio...
double uniform_quantile_c(double z, double a, double b)
Inverse ( ) of the cumulative distribution function of the upper tail of the uniform (flat) distribut...
double chisquared_quantile_c(double z, double r)
Inverse ( ) of the cumulative distribution function of the upper tail of the distribution with degr...
double normal_quantile(double z, double sigma)
Inverse ( ) of the cumulative distribution function of the lower tail of the normal (Gaussian) distri...
double exponential_quantile_c(double z, double lambda)
Inverse ( ) of the cumulative distribution function of the upper tail of the exponential distribution...
double gamma_quantile_c(double z, double alpha, double theta)
Inverse ( ) of the cumulative distribution function of the upper tail of the gamma distribution (gamm...
double gaussian_quantile_c(double z, double sigma)
Inverse ( ) of the cumulative distribution function of the upper tail of the normal (Gaussian) distri...
double fdistribution_quantile(double z, double n, double m)
Inverse ( ) of the cumulative distribution function of the lower tail of the f distribution (fdistrib...
double cauchy_quantile_c(double z, double b)
Inverse ( ) of the cumulative distribution function of the upper tail of the Cauchy distribution (cau...
double uniform_quantile(double z, double a, double b)
Inverse ( ) of the cumulative distribution function of the lower tail of the uniform (flat) distribut...
double normal_quantile_c(double z, double sigma)
Inverse ( ) of the cumulative distribution function of the upper tail of the normal (Gaussian) distri...
double beta_quantile_c(double x, double a, double b)
Inverse ( ) of the cumulative distribution function of the lower tail of the beta distribution (beta_...
double exponential_quantile(double z, double lambda)
Inverse ( ) of the cumulative distribution function of the lower tail of the exponential distribution...
double lognormal_quantile(double x, double m, double s)
Inverse ( ) of the cumulative distribution function of the lower tail of the lognormal distribution (...
double cauchy_quantile(double z, double b)
Inverse ( ) of the cumulative distribution function of the lower tail of the Cauchy distribution (cau...
double beta_quantile(double x, double a, double b)
Inverse ( ) of the cumulative distribution function of the upper tail of the beta distribution (beta_...
double gaussian_quantile(double z, double sigma)
Inverse ( ) of the cumulative distribution function of the lower tail of the normal (Gaussian) distri...
double lognormal_quantile_c(double x, double m, double s)
Inverse ( ) of the cumulative distribution function of the upper tail of the lognormal distribution (...
double breitwigner_quantile_c(double z, double gamma)
Inverse ( ) of the cumulative distribution function of the upper tail of the Breit-Wigner distributio...
double inc_gamma_c(double a, double x)
Calculates the normalized (regularized) upper incomplete gamma function (upper integral)
double beta(double x, double y)
Calculates the beta function.
double inc_beta(double x, double a, double b)
Calculates the normalized (regularized) incomplete beta function.
double erfc(double x)
Complementary error function.
double tgamma(double x)
The gamma function is defined to be the extension of the factorial to real numbers.
double lgamma(double x)
Calculates the logarithm of the gamma function.
double inc_gamma(double a, double x)
Calculates the normalized (regularized) lower incomplete gamma function (lower integral)
double erf(double x)
Error function encountered in integrating the normal distribution.