Logo ROOT   6.14/05
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 /** \class RooTMathReg
14  \ingroup Roofit
15 
16 **/
17 
18 #include "Riostream.h"
19 #include "RooTMathReg.h"
20 #include "RooCFunction1Binding.h"
21 #include "RooCFunction2Binding.h"
22 #include "RooCFunction3Binding.h"
23 #include "RooCFunction4Binding.h"
24 #include "TMath.h"
25 
27 
29 {
30 
31  // Import function from TMath namespace
32  RooCFunction1Ref<double,double>::fmap().add("TMath::Abs",TMath::Abs,"d") ;
34  RooCFunction1Ref<double,double>::fmap().add("TMath::ACosH",TMath::ACosH,"t") ;
36  RooCFunction1Ref<double,double>::fmap().add("TMath::ASinH",TMath::ASinH,"t") ;
38  RooCFunction1Ref<double,double>::fmap().add("TMath::ATanH",TMath::ATanH,"t") ;
52  RooCFunction1Ref<double,double>::fmap().add("TMath::ErfcInverse",TMath::ErfcInverse) ;
53  RooCFunction1Ref<double,double>::fmap().add("TMath::ErfInverse",TMath::ErfInverse) ;
56  RooCFunction1Ref<double,double>::fmap().add("TMath::Gamma",TMath::Gamma,"z") ;
57  RooCFunction1Ref<double,double>::fmap().add("TMath::KolmogorovProb",TMath::KolmogorovProb,"z") ;
59  RooCFunction1Ref<double,double>::fmap().add("TMath::LnGamma",TMath::LnGamma,"z") ;
63  RooCFunction1Ref<double,double>::fmap().add("TMath::NormQuantile",TMath::NormQuantile,"p") ;
73  RooCFunction1Ref<double,int>::fmap().add("TMath::Factorial",TMath::Factorial,"i") ;
74 
75  RooCFunction2Ref<double,double,double>::fmap().add("TMath::ATan2",TMath::ATan2, "y", "x") ;
76  RooCFunction2Ref<double,double,double>::fmap().add("TMath::Beta",TMath::Beta, "p", "q") ;
77  RooCFunction2Ref<double,double,double>::fmap().add("TMath::ChisquareQuantile",TMath::ChisquareQuantile, "p", "ndf") ;
78  RooCFunction2Ref<double,double,double>::fmap().add("TMath::Gamma",TMath::Gamma, "a", "x") ;
79  RooCFunction2Ref<double,double,double>::fmap().add("TMath::Hypot",TMath::Hypot, "x", "y") ;
80  RooCFunction2Ref<double,double,double>::fmap().add("TMath::Poisson",TMath::Poisson, "x", "par") ;
81  RooCFunction2Ref<double,double,double>::fmap().add("TMath::PoissonI",TMath::PoissonI, "x", "par") ;
82  RooCFunction2Ref<double,double,double>::fmap().add("TMath::Power",TMath::Power, "x", "y") ;
83  RooCFunction2Ref<double,double,double>::fmap().add("TMath::Sign",TMath::Sign, "a", "b") ;
84  RooCFunction2Ref<double,double,double>::fmap().add("TMath::Student",TMath::Student, "T", "ndf") ;
85  RooCFunction2Ref<double,double,double>::fmap().add("TMath::StudentI",TMath::StudentI, "T", "ndf") ;
86  RooCFunction2Ref<double,int,double>::fmap().add("TMath::BesselI",TMath::BesselI, "n","x") ;
87  RooCFunction2Ref<double,int,double>::fmap().add("TMath::BesselK",TMath::BesselK, "n", "x") ;
88  RooCFunction2Ref<double,double,int>::fmap().add("TMath::Prob",TMath::Prob,"chi2","ndf") ;
89  RooCFunction2Ref<double,double,int>::fmap().add("TMath::Ldexp",TMath::Ldexp,"x","exp") ;
90  RooCFunction2Ref<double,int,int>::fmap().add("TMath::Binomial",TMath::Binomial,"n","k") ;
91 
92  RooCFunction3Ref<double,double,double,double>::fmap().add("TMath::BetaCf",TMath::BetaCf,"x","a","b") ;
93  RooCFunction3Ref<double,double,double,double>::fmap().add("TMath::BetaDist",TMath::BetaDist,"x","p","q") ;
94  RooCFunction3Ref<double,double,double,double>::fmap().add("TMath::BetaDistI",TMath::BetaDistI,"x","p","q") ;
95  RooCFunction3Ref<double,double,double,double>::fmap().add("TMath::BetaIncomplete",TMath::BetaIncomplete,"x","a","b") ;
96  RooCFunction3Ref<double,double,double,double>::fmap().add("TMath::BreitWigner",TMath::BreitWigner,"x","mean","gamma") ;
97  RooCFunction3Ref<double,double,double,double>::fmap().add("TMath::CauchyDist",TMath::CauchyDist,"x","t","s") ;
98  RooCFunction3Ref<double,double,double,double>::fmap().add("TMath::FDist",TMath::FDist,"F","N","M") ;
99  RooCFunction3Ref<double,double,double,double>::fmap().add("TMath::FDistI",TMath::FDistI,"F","N","M") ;
100  RooCFunction3Ref<double,double,double,double>::fmap().add("TMath::LaplaceDist",TMath::LaplaceDist,"x","alpha","beta") ;
101  RooCFunction3Ref<double,double,double,double>::fmap().add("TMath::LaplaceDistI",TMath::LaplaceDistI,"x","alpha","beta") ;
102  RooCFunction3Ref<double,double,double,double>::fmap().add("TMath::Vavilov",TMath::Vavilov,"x","kappa","beta2") ;
103  RooCFunction3Ref<double,double,double,double>::fmap().add("TMath::VavilovI",TMath::VavilovI,"x","kappa","beta2") ;
104  RooCFunction3Ref<double,double,double,bool>::fmap().add("TMath::StudentQuantile",TMath::StudentQuantile,"p","ndf","lower_tail") ;
105  RooCFunction3Ref<double,double,int,int>::fmap().add("TMath::BinomialI",TMath::BinomialI,"p","n","k") ;
106 
107  RooCFunction4Ref<double,double,double,double,double>::fmap().add("TMath::GammaDist",TMath::GammaDist,"x","gamma","mu","beta") ;
108  RooCFunction4Ref<double,double,double,double,double>::fmap().add("TMath::LogNormal",TMath::LogNormal,"x","sigma","theta","m") ;
109  RooCFunction4Ref<double,double,double,double,int>::fmap().add("TMath::Voigt",TMath::Voigt,"x","sigma","lg","R") ;
110  RooCFunction4Ref<double,double,double,double,bool>::fmap().add("TMath::Gaus",TMath::Gaus,"x","mean","sigma","norm") ;
111  RooCFunction4Ref<double,double,double,double,bool>::fmap().add("TMath::Landau",TMath::Landau,"x","mpv","sigma","norm") ;
112 
113 }
Double_t ACosH(Double_t)
Definition: TMath.cxx:77
Double_t BesselI(Int_t n, Double_t x)
Double_t FDist(Double_t F, Double_t N, Double_t M)
Double_t Landau(Double_t x, Double_t mpv=0, Double_t sigma=1, Bool_t norm=kFALSE)
The LANDAU function.
Definition: TMath.cxx:469
Double_t ErfInverse(Double_t x)
returns the inverse error function x must be <-1<x<1
Definition: TMath.cxx:203
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:437
Double_t FDistI(Double_t F, Double_t N, Double_t M)
Double_t PoissonI(Double_t x, Double_t par)
Double_t TanH(Double_t)
Definition: TMath.h:656
T1 Sign(T1 a, T2 b)
Definition: TMathBase.h:153
Double_t Log(Double_t x)
Definition: TMath.h:759
Double_t KolmogorovProb(Double_t z)
Double_t LaplaceDistI(Double_t x, Double_t alpha=0, Double_t beta=1)
Double_t StudentQuantile(Double_t p, Double_t ndf, Bool_t lower_tail=kTRUE)
Double_t NormQuantile(Double_t p)
Double_t BetaDist(Double_t x, Double_t p, Double_t q)
Double_t LaplaceDist(Double_t x, Double_t alpha=0, Double_t beta=1)
Double_t Log2(Double_t x)
Definition: TMath.cxx:101
Double_t StruveH1(Double_t x)
Struve functions of order 0.
Double_t Gamma(Double_t z)
Computation of gamma(z) for all z.
Definition: TMath.cxx:348
Double_t BesselJ1(Double_t x)
Bessel function J0(x) for any real x.
Short_t Abs(Short_t d)
Definition: TMathBase.h:108
static RooCFunction1Map< VO, VI > & fmap()
Double_t Prob(Double_t chi2, Int_t ndf)
Double_t StudentI(Double_t T, Double_t ndf)
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
Definition: TMath.h:734
Double_t Ldexp(Double_t x, Int_t exp)
Definition: TMath.h:730
Double_t BesselY1(Double_t x)
Bessel function Y0(x) for positive x.
Double_t ChisquareQuantile(Double_t p, Double_t ndf)
Double_t ASinH(Double_t)
Definition: TMath.cxx:64
Double_t Log10(Double_t x)
Definition: TMath.h:763
Double_t BesselI1(Double_t x)
modified Bessel function K_0(x)
Double_t Freq(Double_t x)
Computation of the normal frequency function freq(x).
Definition: TMath.cxx:265
Double_t ATan2(Double_t, Double_t)
Definition: TMath.h:678
Double_t Erfc(Double_t x)
Compute the complementary error function erfc(x).
Definition: TMath.cxx:194
static RooCFunction2Map< VO, VI1, VI2 > & fmap()
Double_t DiLog(Double_t x)
Modified Struve functions of order 1.
Definition: TMath.cxx:110
static RooTMathReg dummy
Definition: RooTMathReg.cxx:26
Double_t VavilovI(Double_t x, Double_t kappa, Double_t beta2)
Double_t BesselY0(Double_t x)
Bessel function J1(x) for any real x.
Double_t Erf(Double_t x)
Computation of the error function erf(x).
Definition: TMath.cxx:184
Double_t BetaDistI(Double_t x, Double_t p, Double_t q)
Double_t StruveL1(Double_t x)
Modified Struve functions of order 0.
Double_t Voigt(Double_t x, Double_t sigma, Double_t lg, Int_t r=4)
Double_t StruveL0(Double_t x)
Struve functions of order 1.
Double_t Binomial(Int_t n, Int_t k)
Double_t LandauI(Double_t x)
Double_t ACos(Double_t)
Definition: TMath.h:667
Double_t BesselJ0(Double_t x)
modified Bessel function K_1(x)
Double_t ErfcInverse(Double_t x)
returns the inverse of the complementary error function x must be 0<x<2 implement using the quantile ...
Definition: TMath.cxx:237
static RooCFunction4Map< VO, VI1, VI2, VI3, VI4 > & fmap()
Double_t Poisson(Double_t x, Double_t par)
Double_t Student(Double_t T, Double_t ndf)
Double_t Beta(Double_t p, Double_t q)
Double_t Cos(Double_t)
Definition: TMath.h:640
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:448
Double_t BesselI0(Double_t x)
integer order modified Bessel function K_n(x)
Double_t BesselK(Int_t n, Double_t x)
integer order modified Bessel function I_n(x)
Double_t Exp(Double_t x)
Definition: TMath.h:726
static RooCFunction3Map< VO, VI1, VI2, VI3 > & fmap()
Double_t StruveH0(Double_t x)
Bessel function Y1(x) for positive x.
Double_t Hypot(Double_t x, Double_t y)
Definition: TMath.cxx:57
Double_t BesselK0(Double_t x)
modified Bessel function I_0(x)
Double_t BinomialI(Double_t p, Int_t n, Int_t k)
Double_t BetaCf(Double_t x, Double_t a, Double_t b)
Double_t GammaDist(Double_t x, Double_t gamma, Double_t mu=0, Double_t beta=1)
Double_t Factorial(Int_t i)
Compute factorial(n).
Definition: TMath.cxx:247
Double_t Sin(Double_t)
Definition: TMath.h:636
Double_t ASin(Double_t)
Definition: TMath.h:660
Double_t BesselK1(Double_t x)
modified Bessel function I_1(x)
Double_t LnGamma(Double_t z)
Computation of ln[gamma(z)] for all z.
Definition: TMath.cxx:486
Double_t LogNormal(Double_t x, Double_t sigma, Double_t theta=0, Double_t m=1)
Double_t SinH(Double_t)
Definition: TMath.h:648
Double_t Sqrt(Double_t x)
Definition: TMath.h:690
Double_t BetaIncomplete(Double_t x, Double_t a, Double_t b)
Double_t CauchyDist(Double_t x, Double_t t=0, Double_t s=1)
Double_t ATanH(Double_t)
Definition: TMath.cxx:90
Double_t CosH(Double_t)
Definition: TMath.h:652
Double_t Tan(Double_t)
Definition: TMath.h:644
Double_t Vavilov(Double_t x, Double_t kappa, Double_t beta2)
Double_t ATan(Double_t)
Definition: TMath.h:674