CMS 3D CMS Logo

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

◆ ln()

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

Definition at line 22 of file IncompleteGammaComplement.cc.

22  {
23  if (x < 0.0 || a <= 0.0)
24  edm::LogInfo("IncompleteGammaComplement") << "IncompleteGammaComplement::invalid arguments";
25  if (x < (a + 1.0))
26  // take the complement of the series representation
27  return log(1. - GammaSeries(a, x) * (exp(-x + a * log(x) - GammaLn(a))));
28  else
29  // use the continued fraction representation
30  return log(GammaContinuedFraction(a, x)) - x + a * log(x) - GammaLn(a);
31 }

References a, JetChargeProducer_cfi::exp, GammaContinuedFraction(), GammaLn(), GammaSeries(), dqm-mbProfile::log, and x.

Referenced by LnChiSquaredProbability().

◆ value()

float IncompleteGammaComplement::value ( float  a,
float  x 
)
static
GammaSeries
float GammaSeries(float a, float x)
Definition: GammaSeries.cc:8
DDAxes::x
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
a
double a
Definition: hdecay.h:119
GammaLn
float GammaLn(float z)
Definition: GammaLn.cc:4
dqm-mbProfile.log
log
Definition: dqm-mbProfile.py:17
JetChargeProducer_cfi.exp
exp
Definition: JetChargeProducer_cfi.py:6
GammaContinuedFraction
float GammaContinuedFraction(float a, float x)
Definition: GammaContinuedFraction.cc:9