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

#include <G4GaussChebyshevQ.hh>

Inheritance diagram for G4GaussChebyshevQ:

Public Member Functions

 G4GaussChebyshevQ (function pFunction, G4int nChebyshev)
 ~G4GaussChebyshevQ () override=default
 G4GaussChebyshevQ (const G4GaussChebyshevQ &)=delete
G4GaussChebyshevQoperator= (const G4GaussChebyshevQ &)=delete
G4double Integral (G4double a, G4double b) const
Public Member Functions inherited from G4VGaussianQuadrature
 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

Additional Inherited Members

Protected Member Functions inherited from G4VGaussianQuadrature
G4double GammaLogarithm (G4double xx)
Protected Attributes inherited from G4VGaussianQuadrature
function fFunction
G4doublefAbscissa = nullptr
G4doublefWeight = nullptr
G4int fNumber = 0

Detailed Description

Definition at line 44 of file G4GaussChebyshevQ.hh.

Constructor & Destructor Documentation

◆ G4GaussChebyshevQ() [1/2]

G4GaussChebyshevQ::G4GaussChebyshevQ ( function pFunction,
G4int nChebyshev )

Definition at line 38 of file G4GaussChebyshevQ.cc.

39 : G4VGaussianQuadrature(pFunction)
40{
41 fNumber = nChebyshev; // Try to reduce fNumber twice ??
42 G4double cof = pi / fNumber;
45 for(G4int i = 0; i < fNumber; ++i)
46 {
47 fAbscissa[i] = std::cos(cof * (i + 0.5));
48 fWeight[i] = cof * std::sqrt(1 - fAbscissa[i] * fAbscissa[i]);
49 }
50}
double G4double
Definition G4Types.hh:83
int G4int
Definition G4Types.hh:85
G4VGaussianQuadrature(function pFunction)
const G4double pi

Referenced by G4GaussChebyshevQ(), and operator=().

◆ ~G4GaussChebyshevQ()

G4GaussChebyshevQ::~G4GaussChebyshevQ ( )
overridedefault

◆ G4GaussChebyshevQ() [2/2]

G4GaussChebyshevQ::G4GaussChebyshevQ ( const G4GaussChebyshevQ & )
delete

Member Function Documentation

◆ Integral()

G4double G4GaussChebyshevQ::Integral ( G4double a,
G4double b ) const

Definition at line 57 of file G4GaussChebyshevQ.cc.

58{
59 G4double xDiff = 0.5 * (b - a), xMean = 0.5 * (a + b), dx = 0.0,
60 integral = 0.0;
61
62 for(G4int i = 0; i < fNumber; ++i)
63 {
64 dx = xDiff * fAbscissa[i];
65 integral += fWeight[i] * fFunction(xMean + dx);
66 }
67 return integral *= xDiff;
68}

◆ operator=()

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

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