Logo ROOT   6.08/07
Reference Guide
RooTMathReg.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 /**
14 \file RooTMathReg.cxx
15 \class RooTMathReg
16 \ingroup Roofit
17 
18 **/
19 
20 #include "Riostream.h"
21 #include "RooTMathReg.h"
22 #include "RooCFunction1Binding.h"
23 #include "RooCFunction2Binding.h"
24 #include "RooCFunction3Binding.h"
25 #include "RooCFunction4Binding.h"
26 #include "TMath.h"
27 
29 
31 {
32 
33  // Import function from TMath namespace
34  RooCFunction1Ref<double,double>::fmap().add("TMath::Abs",TMath::Abs,"d") ;
36  RooCFunction1Ref<double,double>::fmap().add("TMath::ACosH",TMath::ACosH,"t") ;
38  RooCFunction1Ref<double,double>::fmap().add("TMath::ASinH",TMath::ASinH,"t") ;
40  RooCFunction1Ref<double,double>::fmap().add("TMath::ATanH",TMath::ATanH,"t") ;
41  RooCFunction1Ref<double,double>::fmap().add("TMath::BesselI0",TMath::BesselI0) ;
42  RooCFunction1Ref<double,double>::fmap().add("TMath::BesselI1",TMath::BesselI1) ;
43  RooCFunction1Ref<double,double>::fmap().add("TMath::BesselJ0",TMath::BesselJ0) ;
44  RooCFunction1Ref<double,double>::fmap().add("TMath::BesselJ1",TMath::BesselJ1) ;
45  RooCFunction1Ref<double,double>::fmap().add("TMath::BesselK0",TMath::BesselK0) ;
46  RooCFunction1Ref<double,double>::fmap().add("TMath::BesselK1",TMath::BesselK1) ;
47  RooCFunction1Ref<double,double>::fmap().add("TMath::BesselY0",TMath::BesselY0) ;
48  RooCFunction1Ref<double,double>::fmap().add("TMath::BesselY1",TMath::BesselY1) ;
54  RooCFunction1Ref<double,double>::fmap().add("TMath::ErfcInverse",TMath::ErfcInverse) ;
55  RooCFunction1Ref<double,double>::fmap().add("TMath::ErfInverse",TMath::ErfInverse) ;
58  RooCFunction1Ref<double,double>::fmap().add("TMath::Gamma",TMath::Gamma,"z") ;
59  RooCFunction1Ref<double,double>::fmap().add("TMath::KolmogorovProb",TMath::KolmogorovProb,"z") ;
60  RooCFunction1Ref<double,double>::fmap().add("TMath::LandauI",TMath::LandauI) ;
61  RooCFunction1Ref<double,double>::fmap().add("TMath::LnGamma",TMath::LnGamma,"z") ;
65  RooCFunction1Ref<double,double>::fmap().add("TMath::NormQuantile",TMath::NormQuantile,"p") ;
69  RooCFunction1Ref<double,double>::fmap().add("TMath::StruveH0",TMath::StruveH0) ;
70  RooCFunction1Ref<double,double>::fmap().add("TMath::StruveH1",TMath::StruveH1) ;
71  RooCFunction1Ref<double,double>::fmap().add("TMath::StruveL0",TMath::StruveL0) ;
72  RooCFunction1Ref<double,double>::fmap().add("TMath::StruveL1",TMath::StruveL1) ;
75  RooCFunction1Ref<double,int>::fmap().add("TMath::Factorial",TMath::Factorial,"i") ;
76 
77  RooCFunction2Ref<double,double,double>::fmap().add("TMath::ATan2",TMath::ATan2, "y", "x") ;
78  RooCFunction2Ref<double,double,double>::fmap().add("TMath::Beta",TMath::Beta, "p", "q") ;
79  RooCFunction2Ref<double,double,double>::fmap().add("TMath::ChisquareQuantile",TMath::ChisquareQuantile, "p", "ndf") ;
80  RooCFunction2Ref<double,double,double>::fmap().add("TMath::Gamma",TMath::Gamma, "a", "x") ;
81  RooCFunction2Ref<double,double,double>::fmap().add("TMath::Hypot",TMath::Hypot, "x", "y") ;
82  RooCFunction2Ref<double,double,double>::fmap().add("TMath::Poisson",TMath::Poisson, "x", "par") ;
83  RooCFunction2Ref<double,double,double>::fmap().add("TMath::PoissonI",TMath::PoissonI, "x", "par") ;
84  RooCFunction2Ref<double,double,double>::fmap().add("TMath::Power",TMath::Power, "x", "y") ;
85  RooCFunction2Ref<double,double,double>::fmap().add("TMath::Sign",TMath::Sign, "a", "b") ;
86  RooCFunction2Ref<double,double,double>::fmap().add("TMath::Student",TMath::Student, "T", "ndf") ;
87  RooCFunction2Ref<double,double,double>::fmap().add("TMath::StudentI",TMath::StudentI, "T", "ndf") ;
88  RooCFunction2Ref<double,int,double>::fmap().add("TMath::BesselI",TMath::BesselI, "n","x") ;
89  RooCFunction2Ref<double,int,double>::fmap().add("TMath::BesselK",TMath::BesselK, "n", "x") ;
90  RooCFunction2Ref<double,double,int>::fmap().add("TMath::Prob",TMath::Prob,"chi2","ndf") ;
91  RooCFunction2Ref<double,double,int>::fmap().add("TMath::Ldexp",TMath::Ldexp,"x","exp") ;
92  RooCFunction2Ref<double,int,int>::fmap().add("TMath::Binomial",TMath::Binomial,"n","k") ;
93 
94  RooCFunction3Ref<double,double,double,double>::fmap().add("TMath::BetaCf",TMath::BetaCf,"x","a","b") ;
95  RooCFunction3Ref<double,double,double,double>::fmap().add("TMath::BetaDist",TMath::BetaDist,"x","p","q") ;
96  RooCFunction3Ref<double,double,double,double>::fmap().add("TMath::BetaDistI",TMath::BetaDistI,"x","p","q") ;
97  RooCFunction3Ref<double,double,double,double>::fmap().add("TMath::BetaIncomplete",TMath::BetaIncomplete,"x","a","b") ;
98  RooCFunction3Ref<double,double,double,double>::fmap().add("TMath::BreitWigner",TMath::BreitWigner,"x","mean","gamma") ;
99  RooCFunction3Ref<double,double,double,double>::fmap().add("TMath::CauchyDist",TMath::CauchyDist,"x","t","s") ;
100  RooCFunction3Ref<double,double,double,double>::fmap().add("TMath::FDist",TMath::FDist,"F","N","M") ;
101  RooCFunction3Ref<double,double,double,double>::fmap().add("TMath::FDistI",TMath::FDistI,"F","N","M") ;
102  RooCFunction3Ref<double,double,double,double>::fmap().add("TMath::LaplaceDist",TMath::LaplaceDist,"x","alpha","beta") ;
103  RooCFunction3Ref<double,double,double,double>::fmap().add("TMath::LaplaceDistI",TMath::LaplaceDistI,"x","alpha","beta") ;
104  RooCFunction3Ref<double,double,double,double>::fmap().add("TMath::Vavilov",TMath::Vavilov,"x","kappa","beta2") ;
105  RooCFunction3Ref<double,double,double,double>::fmap().add("TMath::VavilovI",TMath::VavilovI,"x","kappa","beta2") ;
106  RooCFunction3Ref<double,double,double,bool>::fmap().add("TMath::StudentQuantile",TMath::StudentQuantile,"p","ndf","lower_tail") ;
107  RooCFunction3Ref<double,double,int,int>::fmap().add("TMath::BinomialI",TMath::BinomialI,"p","n","k") ;
108 
109  RooCFunction4Ref<double,double,double,double,double>::fmap().add("TMath::GammaDist",TMath::GammaDist,"x","gamma","mu","beta") ;
110  RooCFunction4Ref<double,double,double,double,double>::fmap().add("TMath::LogNormal",TMath::LogNormal,"x","sigma","theta","m") ;
111  RooCFunction4Ref<double,double,double,double,int>::fmap().add("TMath::Voigt",TMath::Voigt,"x","sigma","lg","R") ;
112  RooCFunction4Ref<double,double,double,double,bool>::fmap().add("TMath::Gaus",TMath::Gaus,"x","mean","sigma","norm") ;
113  RooCFunction4Ref<double,double,double,double,bool>::fmap().add("TMath::Landau",TMath::Landau,"x","mpv","sigma","norm") ;
114 
115 }
Double_t ACosH(Double_t)
Definition: TMath.cxx:80
Double_t BesselI(Int_t n, Double_t x)
Compute the Integer Order Modified Bessel function I_n(x) for n=0,1,2,...
Definition: TMath.cxx:1557
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:2228
Double_t Landau(Double_t x, Double_t mpv=0, Double_t sigma=1, Bool_t norm=kFALSE)
The LANDAU function.
Definition: TMath.cxx:472
Double_t ErfInverse(Double_t x)
returns the inverse error function x must be <-1<x<1
Definition: TMath.cxx:206
Double_t BreitWigner(Double_t x, Double_t mean=0, Double_t gamma=1)
Calculate a Breit Wigner function with mean and gamma.
Definition: TMath.cxx:441
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:2246
Double_t PoissonI(Double_t x, Double_t par)
compute the Poisson distribution function for (x,par) This is a non-smooth function.
Definition: TMath.cxx:602
Double_t TanH(Double_t)
Definition: TMath.h:436
T1 Sign(T1 a, T2 b)
Definition: TMathBase.h:155
Double_t Log(Double_t x)
Definition: TMath.h:526
Double_t KolmogorovProb(Double_t z)
Calculates the Kolmogorov distribution function,.
Definition: TMath.cxx:665
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:2327
Double_t StudentQuantile(Double_t p, Double_t ndf, Bool_t lower_tail=kTRUE)
Computes quantiles of the Student&#39;s t-distribution 1st argument is the probability, at which the quantile is computed 2nd argument - the number of degrees of freedom of the Student distribution When the 3rd argument lower_tail is kTRUE (default)- the algorithm returns such x0, that P(x < x0)=p upper tail (lower_tail is kFALSE)- the algorithm returns such x0, that P(x > x0)=p the algorithm was taken from G.W.Hill, "Algorithm 396, Student&#39;s t-quantiles" "Communications of the ACM", 13(10), October 1970.
Definition: TMath.cxx:2611
Double_t NormQuantile(Double_t p)
Computes quantiles for standard normal distribution N(0, 1) at probability p ALGORITHM AS241 APPL...
Definition: TMath.cxx:2400
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:2037
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:2311
Double_t Log2(Double_t x)
Definition: TMath.cxx:104
Double_t StruveH1(Double_t x)
Struve Functions of Order 1.
Definition: TMath.cxx:1813
Double_t Gamma(Double_t z)
Computation of gamma(z) for all z.
Definition: TMath.cxx:352
Double_t BesselJ1(Double_t x)
Returns the Bessel function J1(x) for any real x.
Definition: TMath.cxx:1636
Short_t Abs(Short_t d)
Definition: TMathBase.h:110
static RooCFunction1Map< VO, VI > & fmap()
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:624
Double_t StudentI(Double_t T, Double_t ndf)
Calculates the cumulative distribution function of Student&#39;s t-distribution second parameter stands f...
Definition: TMath.cxx:2587
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
Definition: TMath.h:501
Double_t Ldexp(Double_t x, Int_t exp)
Definition: TMath.h:498
Double_t BesselY1(Double_t x)
Returns the Bessel function Y1(x) for positive x.
Definition: TMath.cxx:1706
Double_t ChisquareQuantile(Double_t p, Double_t ndf)
Evaluate the quantiles of the chi-squared probability distribution function.
Definition: TMath.cxx:2145
Double_t ASinH(Double_t)
Definition: TMath.cxx:67
Double_t Log10(Double_t x)
Definition: TMath.h:529
Double_t BesselI1(Double_t x)
Compute the modified Bessel function I_1(x) for any real x.
Definition: TMath.cxx:1461
Double_t Freq(Double_t x)
Computation of the normal frequency function freq(x).
Definition: TMath.cxx:268
Double_t ATan2(Double_t, Double_t)
Definition: TMath.h:454
Double_t Erfc(Double_t x)
Compute the complementary error function erfc(x).
Definition: TMath.cxx:197
static RooCFunction2Map< VO, VI1, VI2 > & fmap()
Double_t DiLog(Double_t x)
The DiLogarithm function Code translated by R.Brun from CERNLIB DILOG function C332.
Definition: TMath.cxx:113
static RooTMathReg dummy
Definition: RooTMathReg.cxx:28
Double_t VavilovI(Double_t x, Double_t kappa, Double_t beta2)
Returns the value of the Vavilov distribution function Parameters: 1st - the point were the density f...
Definition: TMath.cxx:2736
Double_t BesselY0(Double_t x)
Returns the Bessel function Y0(x) for positive x.
Definition: TMath.cxx:1672
Double_t Erf(Double_t x)
Computation of the error function erf(x).
Definition: TMath.cxx:187
Double_t BetaDistI(Double_t x, Double_t p, Double_t q)
Computes the distribution function of the Beta distribution.
Definition: TMath.cxx:2055
Double_t StruveL1(Double_t x)
Modified Struve Function of Order 1.
Definition: TMath.cxx:1936
Double_t Voigt(Double_t x, Double_t sigma, Double_t lg, Int_t r=4)
Computation of Voigt function (normalised).
Definition: TMath.cxx:879
Double_t StruveL0(Double_t x)
Modified Struve Function of Order 0.
Definition: TMath.cxx:1890
Double_t Binomial(Int_t n, Int_t k)
Calculate the binomial coefficient n over k.
Definition: TMath.cxx:2076
Double_t LandauI(Double_t x)
Returns the value of the Landau distribution function at point x.
Definition: TMath.cxx:2765
Double_t ACos(Double_t)
Definition: TMath.h:445
Double_t BesselJ0(Double_t x)
Returns the Bessel function J0(x) for any real x.
Definition: TMath.cxx:1601
Double_t ErfcInverse(Double_t x)
Definition: TMath.cxx:233
static RooCFunction4Map< VO, VI1, VI2, VI3, VI4 > & fmap()
Double_t Poisson(Double_t x, Double_t par)
Compute the Poisson distribution function for (x,par) The Poisson PDF is implemented by means of Eule...
Definition: TMath.cxx:571
Double_t Student(Double_t T, Double_t ndf)
Computes density function for Student&#39;s t- distribution (the probability function (integral of densit...
Definition: TMath.cxx:2566
Double_t Beta(Double_t p, Double_t q)
Calculates Beta-function Gamma(p)*Gamma(q)/Gamma(p+q).
Definition: TMath.cxx:1977
Double_t Cos(Double_t)
Definition: TMath.h:424
Double_t Gaus(Double_t x, Double_t mean=0, Double_t sigma=1, Bool_t norm=kFALSE)
Calculate a gaussian function with mean and sigma.
Definition: TMath.cxx:452
Double_t BesselI0(Double_t x)
Compute the modified Bessel function I_0(x) for any real x.
Definition: TMath.cxx:1393
Double_t BesselK(Int_t n, Double_t x)
Compute the Integer Order Modified Bessel function K_n(x) for n=0,1,2,...
Definition: TMath.cxx:1528
Double_t Exp(Double_t x)
Definition: TMath.h:495
static RooCFunction3Map< VO, VI1, VI2, VI3 > & fmap()
Double_t StruveH0(Double_t x)
Struve Functions of Order 0.
Definition: TMath.cxx:1744
Double_t Hypot(Double_t x, Double_t y)
Definition: TMath.cxx:60
Double_t BesselK0(Double_t x)
Compute the modified Bessel function K_0(x) for positive real x.
Definition: TMath.cxx:1427
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:2101
Double_t BetaCf(Double_t x, Double_t a, Double_t b)
Continued fraction evaluation by modified Lentz&#39;s method used in calculation of incomplete Beta funct...
Definition: TMath.cxx:1986
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:2294
Double_t Factorial(Int_t i)
Compute factorial(n).
Definition: TMath.cxx:250
Double_t Sin(Double_t)
Definition: TMath.h:421
Double_t ASin(Double_t)
Definition: TMath.h:439
Double_t BesselK1(Double_t x)
Compute the modified Bessel function K_1(x) for positive real x.
Definition: TMath.cxx:1496
Double_t LnGamma(Double_t z)
Computation of ln[gamma(z)] for all z.
Definition: TMath.cxx:489
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:2382
Double_t SinH(Double_t)
Definition: TMath.h:430
Double_t Sqrt(Double_t x)
Definition: TMath.h:464
Double_t BetaIncomplete(Double_t x, Double_t a, Double_t b)
Calculates the incomplete Beta-function.
Definition: TMath.cxx:2068
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:2129
Double_t ATanH(Double_t)
Definition: TMath.cxx:93
Double_t CosH(Double_t)
Definition: TMath.h:433
Double_t Tan(Double_t)
Definition: TMath.h:427
Double_t Vavilov(Double_t x, Double_t kappa, Double_t beta2)
Returns the value of the Vavilov density function Parameters: 1st - the point were the density functi...
Definition: TMath.cxx:2708
Double_t ATan(Double_t)
Definition: TMath.h:451