Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
MyGamma Class Reference

#include <Gamma.hh>

Public Member Functions

 MyGamma ()
 
 ~MyGamma ()
 
double Gamma (double z)
 
double Gamma (double a, double x)
 

Detailed Description

Definition at line 45 of file Gamma.hh.

Constructor & Destructor Documentation

◆ MyGamma()

MyGamma::MyGamma ( )

Definition at line 36 of file Gamma.cc.

36{}

◆ ~MyGamma()

MyGamma::~MyGamma ( )

Definition at line 38 of file Gamma.cc.

38{}

Member Function Documentation

◆ Gamma() [1/2]

double MyGamma::Gamma ( double a,
double x )

Definition at line 50 of file Gamma.cc.

51{
52 // Computation of the incomplete gamma function P(a,x)
53 //
54 // The algorithm is based on the formulas and code as denoted in
55 // Numerical Recipes 2nd ed. on p. 210-212 (W.H.Press et al.).
56 //
57 //--- Nve 14-nov-1998 UU-SAP Utrecht
58
59 if (a <= 0 || x <= 0) return 0;
60
61 if (x < (a+1)) return GamSer(a,x);
62 else return GamCf(a,x);
63}

◆ Gamma() [2/2]

double MyGamma::Gamma ( double z)

Definition at line 41 of file Gamma.cc.

42{
43 if (z <= 0)
44 return 0;
45
46 return std::tgamma(z);
47}

Referenced by GVFlashShowerParameterisation::gam().


The documentation for this class was generated from the following files: