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

#include <G4VGaussianQuadrature.hh>

+ Inheritance diagram for G4VGaussianQuadrature:

Public Member Functions

 G4VGaussianQuadrature (function pFunction)
 
virtual ~G4VGaussianQuadrature ()
 
G4double GetAbscissa (G4int index) const
 
G4double GetWeight (G4int index) const
 
G4int GetNumber () const
 

Protected Member Functions

G4double GammaLogarithm (G4double xx)
 

Protected Attributes

function fFunction
 
G4doublefAbscissa
 
G4doublefWeight
 
G4int fNumber
 

Detailed Description

Definition at line 66 of file G4VGaussianQuadrature.hh.

Constructor & Destructor Documentation

◆ G4VGaussianQuadrature()

G4VGaussianQuadrature::G4VGaussianQuadrature ( function  pFunction)
explicit

◆ ~G4VGaussianQuadrature()

G4VGaussianQuadrature::~G4VGaussianQuadrature ( )
virtual

Definition at line 46 of file G4VGaussianQuadrature.cc.

47{
48 delete[] fAbscissa ;
49 delete[] fWeight ;
50}

Member Function Documentation

◆ GammaLogarithm()

G4double G4VGaussianQuadrature::GammaLogarithm ( G4double  xx)
protected

Definition at line 77 of file G4VGaussianQuadrature.cc.

78{
79
80// Returns the value ln(Gamma(xx) for xx > 0. Full accuracy is obtained for
81// xx > 1. For 0 < xx < 1. the reflection formula (6.1.4) can be used first.
82// (Adapted from Numerical Recipes in C)
83
84 static G4double cof[6] = { 76.18009172947146, -86.50532032941677,
85 24.01409824083091, -1.231739572450155,
86 0.1208650973866179e-2, -0.5395239384953e-5 } ;
87 G4double x = xx - 1.0;
88 G4double tmp = x + 5.5;
89 tmp -= (x + 0.5) * std::log(tmp);
90 G4double ser = 1.000000000190015;
91
92 for ( size_t j = 0; j <= 5; j++ )
93 {
94 x += 1.0;
95 ser += cof[j]/x;
96 }
97 return -tmp + std::log(2.5066282746310005*ser);
98}
double G4double
Definition: G4Types.hh:64

Referenced by G4GaussJacobiQ::G4GaussJacobiQ(), and G4GaussLaguerreQ::G4GaussLaguerreQ().

◆ GetAbscissa()

G4double G4VGaussianQuadrature::GetAbscissa ( G4int  index) const

Definition at line 55 of file G4VGaussianQuadrature.cc.

56{
57 return fAbscissa[index] ;
58}

◆ GetNumber()

G4int G4VGaussianQuadrature::GetNumber ( ) const

Definition at line 66 of file G4VGaussianQuadrature.cc.

67{
68 return fNumber ;
69}

◆ GetWeight()

G4double G4VGaussianQuadrature::GetWeight ( G4int  index) const

Definition at line 61 of file G4VGaussianQuadrature.cc.

62{
63 return fWeight[index] ;
64}

Member Data Documentation

◆ fAbscissa

◆ fFunction

◆ fNumber

◆ fWeight


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