Geant4 11.1.1
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 ()
 
 G4VGaussianQuadrature (const G4VGaussianQuadrature &)=delete
 
G4VGaussianQuadratureoperator= (const G4VGaussianQuadrature &)=delete
 
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 = nullptr
 
G4doublefWeight = nullptr
 
G4int fNumber = 0
 

Detailed Description

Definition at line 47 of file G4VGaussianQuadrature.hh.

Constructor & Destructor Documentation

◆ G4VGaussianQuadrature() [1/2]

G4VGaussianQuadrature::G4VGaussianQuadrature ( function  pFunction)
explicit

Definition at line 35 of file G4VGaussianQuadrature.cc.

36 : fFunction(pFunction)
37{}

◆ ~G4VGaussianQuadrature()

G4VGaussianQuadrature::~G4VGaussianQuadrature ( )
virtual

Definition at line 44 of file G4VGaussianQuadrature.cc.

45{
46 delete[] fAbscissa;
47 delete[] fWeight;
48}

◆ G4VGaussianQuadrature() [2/2]

G4VGaussianQuadrature::G4VGaussianQuadrature ( const G4VGaussianQuadrature )
delete

Member Function Documentation

◆ GammaLogarithm()

G4double G4VGaussianQuadrature::GammaLogarithm ( G4double  xx)
protected

Definition at line 70 of file G4VGaussianQuadrature.cc.

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

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

◆ GetAbscissa()

G4double G4VGaussianQuadrature::GetAbscissa ( G4int  index) const

Definition at line 53 of file G4VGaussianQuadrature.cc.

54{
55 return fAbscissa[index];
56}

◆ GetNumber()

G4int G4VGaussianQuadrature::GetNumber ( ) const

Definition at line 63 of file G4VGaussianQuadrature.cc.

◆ GetWeight()

G4double G4VGaussianQuadrature::GetWeight ( G4int  index) const

Definition at line 58 of file G4VGaussianQuadrature.cc.

59{
60 return fWeight[index];
61}

◆ operator=()

G4VGaussianQuadrature & G4VGaussianQuadrature::operator= ( const G4VGaussianQuadrature )
delete

Member Data Documentation

◆ fAbscissa

◆ fFunction

◆ fNumber

◆ fWeight


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