Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 ( function  pFunction)
explicit

Definition at line 36 of file G4VGaussianQuadrature.cc.

G4VGaussianQuadrature::~G4VGaussianQuadrature ( )
virtual

Definition at line 46 of file G4VGaussianQuadrature.cc.

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

Member Function Documentation

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 const 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 }
tuple x
Definition: test.py:50
double G4double
Definition: G4Types.hh:76

Here is the caller graph for this function:

G4double G4VGaussianQuadrature::GetAbscissa ( G4int  index) const

Definition at line 55 of file G4VGaussianQuadrature.cc.

56 {
57  return fAbscissa[index] ;
58 }
G4int G4VGaussianQuadrature::GetNumber ( ) const

Definition at line 66 of file G4VGaussianQuadrature.cc.

67 {
68  return fNumber ;
69 }
G4double G4VGaussianQuadrature::GetWeight ( G4int  index) const

Definition at line 61 of file G4VGaussianQuadrature.cc.

62 {
63  return fWeight[index] ;
64 }

Member Data Documentation

G4double* G4VGaussianQuadrature::fAbscissa
protected

Definition at line 88 of file G4VGaussianQuadrature.hh.

function G4VGaussianQuadrature::fFunction
protected

Definition at line 87 of file G4VGaussianQuadrature.hh.

G4int G4VGaussianQuadrature::fNumber
protected

Definition at line 90 of file G4VGaussianQuadrature.hh.

G4double* G4VGaussianQuadrature::fWeight
protected

Definition at line 89 of file G4VGaussianQuadrature.hh.


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