Logo ROOT  
Reference Guide
Go to the documentation of this file.
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 *****************************************************************************/
13/** \class RooTMathReg
14 \ingroup Roofit
18#include "Riostream.h"
19#include "RooTMathReg.h"
24#include "TMath.h"
26namespace {
28RooTMathReg dummy ;
35 // Import function from TMath namespace
38 RooCFunction1Ref<double,double>::fmap().add("TMath::ACosH",TMath::ACosH,"t") ;
40 RooCFunction1Ref<double,double>::fmap().add("TMath::ASinH",TMath::ASinH,"t") ;
42 RooCFunction1Ref<double,double>::fmap().add("TMath::ATanH",TMath::ATanH,"t") ;
60 RooCFunction1Ref<double,double>::fmap().add("TMath::Gamma",TMath::Gamma,"z") ;
61 RooCFunction1Ref<double,double>::fmap().add("TMath::KolmogorovProb",TMath::KolmogorovProb,"z") ;
63 RooCFunction1Ref<double,double>::fmap().add("TMath::LnGamma",TMath::LnGamma,"z") ;
67 RooCFunction1Ref<double,double>::fmap().add("TMath::NormQuantile",TMath::NormQuantile,"p") ;
77 RooCFunction1Ref<double,int>::fmap().add("TMath::Factorial",TMath::Factorial,"i") ;
79 RooCFunction2Ref<double,double,double>::fmap().add("TMath::ATan2",TMath::ATan2, "y", "x") ;
80 RooCFunction2Ref<double,double,double>::fmap().add("TMath::Beta",TMath::Beta, "p", "q") ;
81 RooCFunction2Ref<double,double,double>::fmap().add("TMath::ChisquareQuantile",TMath::ChisquareQuantile, "p", "ndf") ;
82 RooCFunction2Ref<double,double,double>::fmap().add("TMath::Gamma",TMath::Gamma, "a", "x") ;
83 RooCFunction2Ref<double,double,double>::fmap().add("TMath::Hypot",TMath::Hypot, "x", "y") ;
84 RooCFunction2Ref<double,double,double>::fmap().add("TMath::Poisson",TMath::Poisson, "x", "par") ;
85 RooCFunction2Ref<double,double,double>::fmap().add("TMath::PoissonI",TMath::PoissonI, "x", "par") ;
86 RooCFunction2Ref<double,double,double>::fmap().add("TMath::Power",TMath::Power, "x", "y") ;
87 RooCFunction2Ref<double,double,double>::fmap().add("TMath::Sign",TMath::Sign, "a", "b") ;
88 RooCFunction2Ref<double,double,double>::fmap().add("TMath::Student",TMath::Student, "T", "ndf") ;
89 RooCFunction2Ref<double,double,double>::fmap().add("TMath::StudentI",TMath::StudentI, "T", "ndf") ;
90 RooCFunction2Ref<double,int,double>::fmap().add("TMath::BesselI",TMath::BesselI, "n","x") ;
91 RooCFunction2Ref<double,int,double>::fmap().add("TMath::BesselK",TMath::BesselK, "n", "x") ;
92 RooCFunction2Ref<double,double,int>::fmap().add("TMath::Prob",TMath::Prob,"chi2","ndf") ;
93 RooCFunction2Ref<double,double,int>::fmap().add("TMath::Ldexp",TMath::Ldexp,"x","exp") ;
94 RooCFunction2Ref<double,int,int>::fmap().add("TMath::Binomial",TMath::Binomial,"n","k") ;
97 RooCFunction3Ref<double,double,double,double>::fmap().add("TMath::BetaDist",TMath::BetaDist,"x","p","q") ;
98 RooCFunction3Ref<double,double,double,double>::fmap().add("TMath::BetaDistI",TMath::BetaDistI,"x","p","q") ;
99 RooCFunction3Ref<double,double,double,double>::fmap().add("TMath::BetaIncomplete",TMath::BetaIncomplete,"x","a","b") ;
100 RooCFunction3Ref<double,double,double,double>::fmap().add("TMath::BreitWigner",TMath::BreitWigner,"x","mean","gamma") ;
101 RooCFunction3Ref<double,double,double,double>::fmap().add("TMath::CauchyDist",TMath::CauchyDist,"x","t","s") ;
102 RooCFunction3Ref<double,double,double,double>::fmap().add("TMath::FDist",TMath::FDist,"F","N","M") ;
103 RooCFunction3Ref<double,double,double,double>::fmap().add("TMath::FDistI",TMath::FDistI,"F","N","M") ;
104 RooCFunction3Ref<double,double,double,double>::fmap().add("TMath::LaplaceDist",TMath::LaplaceDist,"x","alpha","beta") ;
105 RooCFunction3Ref<double,double,double,double>::fmap().add("TMath::LaplaceDistI",TMath::LaplaceDistI,"x","alpha","beta") ;
106 RooCFunction3Ref<double,double,double,double>::fmap().add("TMath::Vavilov",TMath::Vavilov,"x","kappa","beta2") ;
107 RooCFunction3Ref<double,double,double,double>::fmap().add("TMath::VavilovI",TMath::VavilovI,"x","kappa","beta2") ;
108 RooCFunction3Ref<double,double,double,bool>::fmap().add("TMath::StudentQuantile",TMath::StudentQuantile,"p","ndf","lower_tail") ;
109 RooCFunction3Ref<double,double,int,int>::fmap().add("TMath::BinomialI",TMath::BinomialI,"p","n","k") ;
111 RooCFunction4Ref<double,double,double,double,double>::fmap().add("TMath::GammaDist",TMath::GammaDist,"x","gamma","mu","beta") ;
112 RooCFunction4Ref<double,double,double,double,double>::fmap().add("TMath::LogNormal",TMath::LogNormal,"x","sigma","theta","m") ;
113 RooCFunction4Ref<double,double,double,double,int>::fmap().add("TMath::Voigt",TMath::Voigt,"x","sigma","lg","R") ;
114 RooCFunction4Ref<double,double,double,double,bool>::fmap().add("TMath::Gaus",TMath::Gaus,"x","mean","sigma","norm") ;
115 RooCFunction4Ref<double,double,double,double,bool>::fmap().add("TMath::Landau",TMath::Landau,"x","mpv","sigma","norm") ;
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_t FDistI(Double_t F, Double_t N, Double_t M)
Calculates the cumulative distribution function of F-distribution, this function occurs in the statis...
Definition: TMath.cxx:2274
Double_t LogNormal(Double_t x, Double_t sigma, Double_t theta=0, Double_t m=1)
Computes the density of LogNormal distribution at point x.
Definition: TMath.cxx:2414
Double_t CosH(Double_t)
Returns the hyperbolic cosine of x.
Definition: TMath.h:609
Double_t DiLog(Double_t x)
Modified Struve functions of order 1.
Definition: TMath.cxx:116
Double_t BetaDist(Double_t x, Double_t p, Double_t q)
Computes the probability density function of the Beta distribution (the distribution function is comp...
Definition: TMath.cxx:2053
Double_t ACos(Double_t)
Returns the principal value of the arc cosine of x, expressed in radians.
Definition: TMath.h:629
Double_t BesselI(Int_t n, Double_t x)
Computes the Integer Order Modified Bessel function I_n(x) for n=0,1,2,... and any real x.
Definition: TMath.cxx:1572
Double_t Gaus(Double_t x, Double_t mean=0, Double_t sigma=1, Bool_t norm=kFALSE)
Calculates a gaussian function with mean and sigma.
Definition: TMath.cxx:453
Double_t Factorial(Int_t i)
Computes factorial(n).
Definition: TMath.cxx:252
Double_t BinomialI(Double_t p, Int_t n, Int_t k)
Suppose an event occurs with probability p per trial Then the probability P of its occurring k or mor...
Definition: TMath.cxx:2119
Double_t Vavilov(Double_t x, Double_t kappa, Double_t beta2)
Returns the value of the Vavilov density function.
Definition: TMath.cxx:2751
Double_t Binomial(Int_t n, Int_t k)
Calculates the binomial coefficient n over k.
Definition: TMath.cxx:2092
Double_t Prob(Double_t chi2, Int_t ndf)
Computation of the probability for a certain Chi-squared (chi2) and number of degrees of freedom (ndf...
Definition: TMath.cxx:619
Double_t ASin(Double_t)
Returns the principal value of the arc sine of x, expressed in radians.
Definition: TMath.h:621
Double_t Log2(Double_t x)
Returns the binary (base-2) logarithm of x.
Definition: TMath.cxx:107
Double_t BesselK1(Double_t x)
Modified Bessel function I_1(x)
Definition: TMath.cxx:1511
Double_t Exp(Double_t x)
Returns the base-e exponential function of x, which is e raised to the power x.
Definition: TMath.h:706
Double_t BesselI1(Double_t x)
Modified Bessel function K_0(x)
Definition: TMath.cxx:1476
Double_t Erf(Double_t x)
Computation of the error function erf(x).
Definition: TMath.cxx:190
Double_t PoissonI(Double_t x, Double_t par)
Computes the Discrete Poisson distribution function for (x,par).
Definition: TMath.cxx:597
Double_t CauchyDist(Double_t x, Double_t t=0, Double_t s=1)
Computes the density of Cauchy distribution at point x by default, standard Cauchy distribution is us...
Definition: TMath.cxx:2153
Double_t ATan(Double_t)
Returns the principal value of the arc tangent of x, expressed in radians.
Definition: TMath.h:637
Double_t StruveL1(Double_t x)
Modified Struve functions of order 0.
Definition: TMath.cxx:1952
Double_t ASinH(Double_t)
Returns the area hyperbolic sine of x.
Definition: TMath.cxx:67
Double_t LaplaceDistI(Double_t x, Double_t alpha=0, Double_t beta=1)
Computes the distribution function of Laplace distribution at point x, with location parameter alpha ...
Definition: TMath.cxx:2357
Double_t BreitWigner(Double_t x, Double_t mean=0, Double_t gamma=1)
Calculates a Breit Wigner function with mean and gamma.
Definition: TMath.cxx:442
T1 Sign(T1 a, T2 b)
Returns a value with the magnitude of a and the sign of b.
Definition: TMathBase.h:175
Double_t Landau(Double_t x, Double_t mpv=0, Double_t sigma=1, Bool_t norm=kFALSE)
The LANDAU function.
Definition: TMath.cxx:474
Double_t Voigt(Double_t x, Double_t sigma, Double_t lg, Int_t r=4)
Computation of Voigt function (normalised).
Definition: TMath.cxx:880
Double_t Student(Double_t T, Double_t ndf)
Computes density function for Student's t- distribution (the probability function (integral of densit...
Definition: TMath.cxx:2600
Double_t BetaDistI(Double_t x, Double_t p, Double_t q)
Computes the distribution function of the Beta distribution.
Definition: TMath.cxx:2071
Double_t TanH(Double_t)
Returns the hyperbolic tangent of x.
Definition: TMath.h:615
Double_t ACosH(Double_t)
Returns the nonnegative area hyperbolic cosine of x.
Definition: TMath.cxx:81
Double_t BesselK0(Double_t x)
Modified Bessel function I_0(x)
Definition: TMath.cxx:1442
Double_t BesselY0(Double_t x)
Bessel function J1(x) for any real x.
Definition: TMath.cxx:1687
Double_t ATan2(Double_t y, Double_t x)
Returns the principal value of the arc tangent of y/x, expressed in radians.
Definition: TMath.h:643
Double_t BetaCf(Double_t x, Double_t a, Double_t b)
Continued fraction evaluation by modified Lentz's method used in calculation of incomplete Beta funct...
Definition: TMath.cxx:2002
Double_t ErfInverse(Double_t x)
Returns the inverse error function.
Definition: TMath.cxx:208
Double_t LaplaceDist(Double_t x, Double_t alpha=0, Double_t beta=1)
Computes the probability density function of Laplace distribution at point x, with location parameter...
Definition: TMath.cxx:2341
Double_t Log(Double_t x)
Returns the natural logarithm of x.
Definition: TMath.h:753
Double_t Erfc(Double_t x)
Computes the complementary error function erfc(x).
Definition: TMath.cxx:199
Double_t VavilovI(Double_t x, Double_t kappa, Double_t beta2)
Returns the value of the Vavilov distribution function.
Definition: TMath.cxx:2784
Double_t Beta(Double_t p, Double_t q)
Calculates Beta-function Gamma(p)*Gamma(q)/Gamma(p+q).
Definition: TMath.cxx:1993
Double_t Poisson(Double_t x, Double_t par)
Computes the Poisson distribution function for (x,par).
Definition: TMath.cxx:569
Double_t Sqrt(Double_t x)
Returns the square root of x.
Definition: TMath.h:659
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
Returns x raised to the power y.
Definition: TMath.h:718
Double_t Ldexp(Double_t x, Int_t exp)
Returns the result of multiplying x (the significant) by 2 raised to the power of exp (the exponent).
Definition: TMath.h:712
Double_t BesselJ0(Double_t x)
Modified Bessel function K_1(x)
Definition: TMath.cxx:1616
Double_t Gamma(Double_t z)
Computation of gamma(z) for all z.
Definition: TMath.cxx:353
Double_t StruveL0(Double_t x)
Struve functions of order 1.
Definition: TMath.cxx:1905
Double_t NormQuantile(Double_t p)
Computes quantiles for standard normal distribution N(0, 1) at probability p.
Definition: TMath.cxx:2433
Double_t Hypot(Double_t x, Double_t y)
Returns sqrt(x*x + y*y)
Definition: TMath.cxx:59
Double_t Cos(Double_t)
Returns the cosine of an angle of x radians.
Definition: TMath.h:591
Double_t StruveH0(Double_t x)
Bessel function Y1(x) for positive x.
Definition: TMath.cxx:1759
Double_t LnGamma(Double_t z)
Computation of ln[gamma(z)] for all z.
Definition: TMath.cxx:491
Double_t KolmogorovProb(Double_t z)
Calculates the Kolmogorov distribution function,.
Definition: TMath.cxx:661
Double_t ChisquareQuantile(Double_t p, Double_t ndf)
Evaluate the quantiles of the chi-squared probability distribution function.
Definition: TMath.cxx:2171
Double_t Sin(Double_t)
Returns the sine of an angle of x radians.
Definition: TMath.h:585
Double_t FDist(Double_t F, Double_t N, Double_t M)
Computes the density function of F-distribution (probability function, integral of density,...
Definition: TMath.cxx:2255
Double_t BesselK(Int_t n, Double_t x)
Integer order modified Bessel function I_n(x)
Definition: TMath.cxx:1543
Double_t BesselJ1(Double_t x)
Bessel function J0(x) for any real x.
Definition: TMath.cxx:1651
Double_t BetaIncomplete(Double_t x, Double_t a, Double_t b)
Calculates the incomplete Beta-function.
Definition: TMath.cxx:2084
Double_t StruveH1(Double_t x)
Struve functions of order 0.
Definition: TMath.cxx:1828
Double_t Freq(Double_t x)
Computation of the normal frequency function freq(x).
Definition: TMath.cxx:270
Double_t Tan(Double_t)
Returns the tangent of an angle of x radians.
Definition: TMath.h:597
Double_t LandauI(Double_t x)
Returns the value of the Landau distribution function at point x.
Definition: TMath.cxx:2813
Double_t ATanH(Double_t)
Returns the area hyperbolic tangent of x.
Definition: TMath.cxx:95
Double_t BesselI0(Double_t x)
Integer order modified Bessel function K_n(x)
Definition: TMath.cxx:1408
Double_t Log10(Double_t x)
Returns the common (base-10) logarithm of x.
Definition: TMath.h:759
Double_t StudentI(Double_t T, Double_t ndf)
Calculates the cumulative distribution function of Student's t-distribution second parameter stands f...
Definition: TMath.cxx:2622
Double_t StudentQuantile(Double_t p, Double_t ndf, Bool_t lower_tail=kTRUE)
Computes quantiles of the Student's t-distribution 1st argument is the probability,...
Definition: TMath.cxx:2650
Double_t BesselY1(Double_t x)
Bessel function Y0(x) for positive x.
Definition: TMath.cxx:1721
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.
Definition: TMathBase.h:123
Double_t GammaDist(Double_t x, Double_t gamma, Double_t mu=0, Double_t beta=1)
Computes the density function of Gamma distribution at point x.
Definition: TMath.cxx:2324
Double_t ErfcInverse(Double_t x)
Returns the inverse of the complementary error function.
Definition: TMath.cxx:242
Double_t SinH(Double_t)
Returns the hyperbolic sine of `x.
Definition: TMath.h:603