CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Static Public Member Functions
IncompleteGammaComplement Class Reference

#include <IncompleteGammaComplement.h>

Static Public Member Functions

static float ln (float a, float x)
 
static float value (float a, float x)
 

Detailed Description

Computes the complement Q(a,x)=1-P(a,x) of the incomplete gamma function. Computes its natural logarithm, useful for comparing very small values. source: Numerical Recipes

Definition at line 9 of file IncompleteGammaComplement.h.

Member Function Documentation

float IncompleteGammaComplement::ln ( float  a,
float  x 
)
static

Definition at line 25 of file IncompleteGammaComplement.cc.

References create_public_lumi_plots::exp, GammaContinuedFraction(), GammaLn(), GammaSeries(), and log.

Referenced by LnChiSquaredProbability().

26 {
27  if( x < 0.0 || a <= 0.0 )
28 edm::LogInfo("IncompleteGammaComplement")<< "IncompleteGammaComplement::invalid arguments";
29  if( x < (a+1.0) )
30  // take the complement of the series representation
31  return log(1.-GammaSeries(a,x)*(exp(-x + a*log(x) - GammaLn(a))));
32  else
33  // use the continued fraction representation
34  return log(GammaContinuedFraction(a,x)) -x + a*log(x) - GammaLn(a);
35 }
static std::vector< std::string > checklist log
float GammaLn(float z)
Definition: GammaLn.cc:5
float GammaContinuedFraction(float a, float x)
double a
Definition: hdecay.h:121
float GammaSeries(float a, float x)
Definition: GammaSeries.cc:8
Definition: DDAxes.h:10
float IncompleteGammaComplement::value ( float  a,
float  x 
)
static

Definition at line 12 of file IncompleteGammaComplement.cc.

References create_public_lumi_plots::exp, GammaContinuedFraction(), GammaLn(), GammaSeries(), and log.

Referenced by Types.int32::__nonzero__(), Types.uint32::__nonzero__(), Types.int64::__nonzero__(), Types.uint64::__nonzero__(), Types.double::__nonzero__(), Types.bool::__nonzero__(), Types.string::__nonzero__(), Vispa.Views.PropertyView.FileProperty::buttonClicked(), ChiSquaredProbability(), Types.string::configValue(), Types.FileInPath::configValue(), Mixins.UsingBlock::dumpPython(), Types.int32::insertInto(), Types.uint32::insertInto(), Types.int64::insertInto(), Types.uint64::insertInto(), Mixins.UsingBlock::insertInto(), Types.double::insertInto(), Types.bool::insertInto(), Types.string::insertInto(), Types.FileInPath::insertInto(), Types.vint32::insertInto(), Types.vuint32::insertInto(), Types.vint64::insertInto(), Types.vuint64::insertInto(), Types.vdouble::insertInto(), Types.vbool::insertInto(), Types.vstring::insertInto(), and Vispa.Views.PropertyView.FileProperty::labelDoubleClicked().

13 {
14  if( x < 0.0 || a <= 0.0 )
15  edm::LogInfo("IncompleteGammaComplement")<< "IncompleteGammaComplement::invalid arguments";
16  if( x < (a+1.0) )
17  // take the complement of the series representation
18  return 1.-GammaSeries(a,x)*(exp(-x + a*log(x) - GammaLn(a)));
19  else
20  // use the continued fraction representation
21  return GammaContinuedFraction(a,x)*(exp(-x + a*log(x) - GammaLn(a)));
22 }
static std::vector< std::string > checklist log
float GammaLn(float z)
Definition: GammaLn.cc:5
float GammaContinuedFraction(float a, float x)
double a
Definition: hdecay.h:121
float GammaSeries(float a, float x)
Definition: GammaSeries.cc:8
Definition: DDAxes.h:10