Import Geant4 7.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 11:11:55 +02:00
parent e083ffb441
commit 516dbf1a58
5914 changed files with 202605 additions and 71141 deletions
@@ -22,7 +22,7 @@
//
//
// $Id: G4ChebyshevApproximation.hh,v 1.4 2001/07/11 10:00:39 gunter Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
// Class description:
//
@@ -22,7 +22,7 @@
//
//
// $Id: G4DataInterpolation.hh,v 1.4 2001/07/11 10:00:39 gunter Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
// Class description:
//
@@ -22,7 +22,7 @@
//
//
// $Id: G4GaussChebyshevQ.hh,v 1.4 2001/07/11 10:00:39 gunter Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
// Class description:
//
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4GaussHermiteQ.hh,v 1.4 2001/07/11 10:00:39 gunter Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// $Id: G4GaussHermiteQ.hh,v 1.5 2004/11/12 17:38:20 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-00-cand-03 $
//
// Class description:
//
@@ -41,7 +41,7 @@
//
// ----------------------------------------------------------------------------
//
// Gauss-Hermite method for integration of exp(-x*x)*nFunction(x) from minus infinity
// Gauss-Hermite method for integration of std::exp(-x*x)*nFunction(x) from minus infinity
// to plus infinity .
//
// G4double Integral() const
@@ -22,7 +22,7 @@
//
//
// $Id: G4GaussJacobiQ.hh,v 1.4 2001/07/11 10:00:39 gunter Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
// Class description:
//
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4GaussLaguerreQ.hh,v 1.4 2001/07/11 10:00:39 gunter Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// $Id: G4GaussLaguerreQ.hh,v 1.5 2004/11/12 17:38:29 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-00-cand-03 $
//
// Class description:
//
@@ -36,7 +36,7 @@
// ---------------------------------------------------------------------------
//
// Constructor for Gauss-Laguerre quadrature method: integral from zero to
// infinity of pow(x,alpha)*exp(-x)*f(x). The value of nLaguerre sets the accuracy.
// infinity of std::pow(x,alpha)*std::exp(-x)*f(x). The value of nLaguerre sets the accuracy.
// The constructor creates arrays fAbscissa[0,..,nLaguerre-1] and
// fWeight[0,..,nLaguerre-1] . The function GaussLaguerre(f) should be called
// then with any f .
@@ -48,7 +48,7 @@
//
// -------------------------------------------------------------------------
//
// Gauss-Laguerre method for integration of pow(x,alpha)*exp(-x)*pFunction(x)
// Gauss-Laguerre method for integration of std::pow(x,alpha)*std::exp(-x)*pFunction(x)
// from zero up to infinity. pFunction is evaluated in fNumber points for which
// fAbscissa[i] and fWeight[i] arrays were created in constructor
//
@@ -22,7 +22,7 @@
//
//
// $Id: G4GaussLegendreQ.hh,v 1.4 2001/07/11 10:00:39 gunter Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
// Class description:
//
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4Integrator.hh,v 1.5 2001/07/11 10:00:39 gunter Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// $Id: G4Integrator.hh,v 1.6 2004/11/12 16:25:33 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-00-cand-03 $
//
// Class description:
//
@@ -39,8 +39,8 @@
#ifndef G4INTEGRATOR_HH
#define G4INTEGRATOR_HH 1
#include "globals.hh"
#include <math.h>
#include "G4Types.hh"
#include <cmath>
template <class T, class F>
class G4Integrator
File diff suppressed because it is too large Load Diff
@@ -22,7 +22,7 @@
//
//
// $Id: G4PolynomialSolver.hh,v 1.3 2001/07/11 10:00:40 gunter Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
// class G4PolynomialSolver
//
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4PolynomialSolver.icc,v 1.6 2001/07/11 10:00:40 gunter Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// $Id: G4PolynomialSolver.icc,v 1.7 2004/11/12 17:38:29 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-00-cand-03 $
//
// class G4PolynomialSolver
//
@@ -100,7 +100,7 @@ G4PolynomialSolver<T,F>::BezierClipping(/*T* typeF,F func,F deriv,*/
P[0][1] = (FunctionClass->*Function)(*IntervalMin);
if (fabs(P[0][1]) < Precision) {
if (std::fabs(P[0][1]) < Precision) {
return 1;
}
@@ -192,7 +192,7 @@ G4double G4PolynomialSolver<T,F>::Newton (G4double IntervalMin,
Value = (FunctionClass->*Function)(Lambda);
// while ((fabs(Value) > Precision)) {
// while ((std::fabs(Value) > Precision)) {
while (j != -1) {
Value = (FunctionClass->*Function)(Lambda);
@@ -201,7 +201,7 @@ G4double G4PolynomialSolver<T,F>::Newton (G4double IntervalMin,
Lambda = Lambda - Value/Gradient ;
if (fabs(Value) <= Precision) {
if (std::fabs(Value) <= Precision) {
j ++;
if (j == 2) {
j = -1;
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4SimpleIntegration.hh,v 1.3 2001/07/11 10:00:40 gunter Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// $Id: G4SimpleIntegration.hh,v 1.4 2004/11/12 16:25:33 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-00-cand-03 $
//
// Class description:
//
@@ -55,7 +55,7 @@
#ifndef G4SIMPLEINTEGRATION_HH
#define G4SIMPLEINTEGRATION_HH
#include "globals.hh"
#include "G4Types.hh"
typedef G4double (*function)(G4double) ;
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4VGaussianQuadrature.hh,v 1.4 2001/07/11 10:00:40 gunter Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// $Id: G4VGaussianQuadrature.hh,v 1.5 2004/11/12 17:38:29 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-00-cand-03 $
//
// Class description:
//
@@ -44,7 +44,7 @@
//
// ----------------------------------------------------------------------
//
// Auxiliary function which returns the value of log(gamma-function(x))
// Auxiliary function which returns the value of std::log(gamma-function(x))
//
// G4double
// GammaLogarithm(G4double xx)
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4ChebyshevApproximation.cc,v 1.3 2001/07/11 10:00:41 gunter Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// $Id: G4ChebyshevApproximation.cc,v 1.4 2004/11/12 17:38:32 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-00-cand-03 $
//
#include "G4ChebyshevApproximation.hh"
@@ -55,7 +55,7 @@ G4ChebyshevApproximation::G4ChebyshevApproximation( function pFunction,
for (i=0;i<fNumber;i++)
{
rootSum = cos(cof*(i+0.5)) ;
rootSum = std::cos(cof*(i+0.5)) ;
tempFunction[i]= fFunction(rootSum*fDiff+fMean) ;
}
for (j=0;j<fNumber;j++)
@@ -65,7 +65,7 @@ G4ChebyshevApproximation::G4ChebyshevApproximation( function pFunction,
for (i=0;i<fNumber;i++)
{
rootSum += tempFunction[i]*cos(cofj*(i+0.5)) ;
rootSum += tempFunction[i]*std::cos(cofj*(i+0.5)) ;
}
fChebyshevCof[j] = weight*rootSum ;
}
@@ -108,7 +108,7 @@ G4ChebyshevApproximation( function pFunction,
for (i=0;i<fNumber;i++)
{
rootSum = cos(cof*(i+0.5)) ;
rootSum = std::cos(cof*(i+0.5)) ;
tempFunction[i] = fFunction(rootSum*fDiff+fMean) ;
}
for (j=0;j<fNumber;j++)
@@ -118,7 +118,7 @@ G4ChebyshevApproximation( function pFunction,
for (i=0;i<fNumber;i++)
{
rootSum += tempFunction[i]*cos(cofj*(i+0.5)) ;
rootSum += tempFunction[i]*std::cos(cofj*(i+0.5)) ;
}
fChebyshevCof[j] = weight*rootSum ; // corresponds to pFunction
}
@@ -162,7 +162,7 @@ G4ChebyshevApproximation::G4ChebyshevApproximation( function pFunction,
for (i=0;i<fNumber;i++)
{
rootSum = cos(cof*(i+0.5)) ;
rootSum = std::cos(cof*(i+0.5)) ;
tempFunction[i]= fFunction(rootSum*fDiff+fMean) ;
}
for (j=0;j<fNumber;j++)
@@ -172,7 +172,7 @@ G4ChebyshevApproximation::G4ChebyshevApproximation( function pFunction,
for (i=0;i<fNumber;i++)
{
rootSum += tempFunction[i]*cos(cofj*(i+0.5)) ;
rootSum += tempFunction[i]*std::cos(cofj*(i+0.5)) ;
}
fChebyshevCof[j] = weight*rootSum ; // corresponds to pFunction
}
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4DataInterpolation.cc,v 1.5 2004/04/23 06:52:57 grichine Exp $
// GEANT4 tag $Name: geant4-06-02 $
// $Id: G4DataInterpolation.cc,v 1.6 2004/11/12 17:38:32 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-00-cand-03 $
//
#include "G4DataInterpolation.hh"
@@ -149,10 +149,10 @@ G4DataInterpolation::PolynomInterpolation(G4double pX,
G4double mult, diff, difi, deltaLow, deltaUp, cd, y ;
G4double* c = new G4double[fNumber] ;
G4double* d = new G4double[fNumber] ;
diff = fabs(pX-fArgument[0]) ;
diff = std::fabs(pX-fArgument[0]) ;
for(i=0;i<fNumber;i++)
{
difi = fabs(pX-fArgument[i]) ;
difi = std::fabs(pX-fArgument[i]) ;
if(difi <diff)
{
k = i ;
@@ -253,10 +253,10 @@ G4DataInterpolation::RationalPolInterpolation(G4double pX,
G4double mult, difi, diff, cd, y, cof ;
G4double* c = new G4double[fNumber] ;
G4double* d = new G4double[fNumber] ;
diff = fabs(pX-fArgument[0]) ;
diff = std::fabs(pX-fArgument[0]) ;
for(i=0;i<fNumber;i++)
{
difi = fabs(pX-fArgument[i]) ;
difi = std::fabs(pX-fArgument[i]) ;
if(difi == 0.0)
{
y = fFunction[i] ;
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4GaussChebyshevQ.cc,v 1.3 2001/07/11 10:00:41 gunter Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// $Id: G4GaussChebyshevQ.cc,v 1.4 2004/11/12 17:38:32 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-00-cand-03 $
//
#include "G4GaussChebyshevQ.hh"
@@ -41,8 +41,8 @@ G4GaussChebyshevQ::G4GaussChebyshevQ( function pFunction ,
fWeight = new G4double[fNumber] ;
for(i=0;i<fNumber;i++)
{
fAbscissa[i] = cos(cof*(i + 0.5)) ;
fWeight[i] = cof*sqrt(1 - fAbscissa[i]*fAbscissa[i]) ;
fAbscissa[i] = std::cos(cof*(i + 0.5)) ;
fWeight[i] = cof*std::sqrt(1 - fAbscissa[i]*fAbscissa[i]) ;
}
}
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4GaussHermiteQ.cc,v 1.4 2001/07/11 10:00:41 gunter Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// $Id: G4GaussHermiteQ.cc,v 1.5 2004/11/12 17:38:33 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-00-cand-03 $
//
#include "G4GaussHermiteQ.hh"
@@ -41,7 +41,7 @@ G4GaussHermiteQ::G4GaussHermiteQ( function pFunction,
G4int i, j, k ;
G4double newton=0.;
G4double newton1, temp1, temp2, temp3, temp ;
G4double piInMinusQ = pow(pi,-0.25) ; // 1.0/sqrt(sqrt(pi)) ??
G4double piInMinusQ = std::pow(pi,-0.25) ; // 1.0/std::sqrt(std::sqrt(pi)) ??
fNumber = (nHermite +1)/2 ;
fAbscissa = new G4double[fNumber] ;
@@ -51,12 +51,12 @@ G4GaussHermiteQ::G4GaussHermiteQ( function pFunction,
{
if(i == 1)
{
newton = sqrt((G4double)(2*nHermite + 1)) -
1.85575001*pow((G4double)(2*nHermite + 1),-0.16666999) ;
newton = std::sqrt((G4double)(2*nHermite + 1)) -
1.85575001*std::pow((G4double)(2*nHermite + 1),-0.16666999) ;
}
else if(i == 2)
{
newton -= 1.14001*pow((G4double)nHermite,0.425999)/newton ;
newton -= 1.14001*std::pow((G4double)nHermite,0.425999)/newton ;
}
else if(i == 3)
{
@@ -78,12 +78,12 @@ G4GaussHermiteQ::G4GaussHermiteQ( function pFunction,
{
temp3 = temp2 ;
temp2 = temp1 ;
temp1 = newton*sqrt(2.0/j)*temp2 - sqrt(((G4double)(j - 1))/j)*temp3 ;
temp1 = newton*std::sqrt(2.0/j)*temp2 - std::sqrt(((G4double)(j - 1))/j)*temp3 ;
}
temp = sqrt((G4double)2*nHermite)*temp2 ;
temp = std::sqrt((G4double)2*nHermite)*temp2 ;
newton1 = newton ;
newton = newton1 - temp1/temp ;
if(fabs(newton - newton1) <= tolerance)
if(std::fabs(newton - newton1) <= tolerance)
{
break ;
}
@@ -100,7 +100,7 @@ G4GaussHermiteQ::G4GaussHermiteQ( function pFunction,
// ----------------------------------------------------------
//
// Gauss-Hermite method for integration of exp(-x*x)*nFunction(x) from minus infinity
// Gauss-Hermite method for integration of std::exp(-x*x)*nFunction(x) from minus infinity
// to plus infinity .
G4double
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4GaussJacobiQ.cc,v 1.4 2001/07/11 10:00:41 gunter Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// $Id: G4GaussJacobiQ.cc,v 1.5 2004/11/12 17:38:33 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-00-cand-03 $
//
#include "G4GaussJacobiQ.hh"
@@ -66,7 +66,7 @@ G4GaussJacobiQ::G4GaussJacobiQ( function pFunction,
{
root1=(4.1002+alpha)/((1.0+alpha)*(1.0+0.155998*alpha)) ;
root2=1.0+0.06*(nJacobi-8.0)*(1.0+0.12*alpha)/nJacobi ;
root3=1.0+0.012002*beta*(1.0+0.24997*fabs(alpha))/nJacobi ;
root3=1.0+0.012002*beta*(1.0+0.24997*std::fabs(alpha))/nJacobi ;
root -= (1.0-root)*root1*root2*root3 ;
}
else if (i == 3)
@@ -115,7 +115,7 @@ G4GaussJacobiQ::G4GaussJacobiQ( function pFunction,
(temp*(1.0 - root*root)) ;
rootTemp = root ;
root = rootTemp - newton1/newton ;
if (fabs(root-rootTemp) <= tolerance)
if (std::fabs(root-rootTemp) <= tolerance)
{
break ;
}
@@ -125,11 +125,11 @@ G4GaussJacobiQ::G4GaussJacobiQ( function pFunction,
G4Exception("Too many iterations in G4GaussJacobiQ::G4GaussJacobiQ") ;
}
fAbscissa[i-1] = root ;
fWeight[i-1] = exp(GammaLogarithm((G4double)(alpha+nJacobi)) +
fWeight[i-1] = std::exp(GammaLogarithm((G4double)(alpha+nJacobi)) +
GammaLogarithm((G4double)(beta+nJacobi)) -
GammaLogarithm((G4double)(nJacobi+1.0)) -
GammaLogarithm((G4double)(nJacobi + alphaBeta + 1.0)))
*temp*pow(2.0,alphaBeta)/(newton*newton2) ;
*temp*std::pow(2.0,alphaBeta)/(newton*newton2) ;
}
}
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4GaussLaguerreQ.cc,v 1.4 2001/07/11 10:00:41 gunter Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// $Id: G4GaussLaguerreQ.cc,v 1.5 2004/11/12 17:38:33 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-00-cand-03 $
//
#include "G4GaussLaguerreQ.hh"
@@ -31,7 +31,7 @@
// ------------------------------------------------------------
//
// Constructor for Gauss-Laguerre quadrature method: integral from zero to
// infinity of pow(x,alpha)*exp(-x)*f(x). The value of nLaguerre sets the accuracy.
// infinity of std::pow(x,alpha)*std::exp(-x)*f(x). The value of nLaguerre sets the accuracy.
// The constructor creates arrays fAbscissa[0,..,nLaguerre-1] and
// fWeight[0,..,nLaguerre-1] .
//
@@ -80,7 +80,7 @@ G4GaussLaguerreQ::G4GaussLaguerreQ( function pFunction,
temp = (fNumber*temp1 - (fNumber +alpha)*temp2)/newton ;
newton1 = newton ;
newton = newton1 - temp1/temp ;
if(fabs(newton - newton1) <= tolerance)
if(std::fabs(newton - newton1) <= tolerance)
{
break ;
}
@@ -91,14 +91,14 @@ G4GaussLaguerreQ::G4GaussLaguerreQ( function pFunction,
}
fAbscissa[i-1] = newton ;
fWeight[i-1] = -exp(GammaLogarithm(alpha + fNumber) -
fWeight[i-1] = -std::exp(GammaLogarithm(alpha + fNumber) -
GammaLogarithm((G4double)fNumber))/(temp*fNumber*temp2) ;
}
}
// -----------------------------------------------------------------
//
// Gauss-Laguerre method for integration of pow(x,alpha)*exp(-x)*pFunction(x)
// Gauss-Laguerre method for integration of std::pow(x,alpha)*std::exp(-x)*pFunction(x)
// from zero up to infinity. pFunction is evaluated in fNumber points for which
// fAbscissa[i] and fWeight[i] arrays were created in
// G4VGaussianQuadrature(double,int) constructor
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4GaussLegendreQ.cc,v 1.3 2001/07/11 10:00:41 gunter Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// $Id: G4GaussLegendreQ.cc,v 1.4 2004/11/12 17:38:33 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-00-cand-03 $
//
#include "G4GaussLegendreQ.hh"
@@ -62,7 +62,7 @@ G4GaussLegendreQ::G4GaussLegendreQ( function pFunction,
for(i=1;i<=fNumber;i++) // Loop over the desired roots
{
newton = cos(pi*(i - 0.25)/(k + 0.5)) ; // Initial root approximation
newton = std::cos(pi*(i - 0.25)/(k + 0.5)) ; // Initial root approximation
do
{ // loop of Newton's method
temp1 = 1.0 ;
@@ -77,7 +77,7 @@ G4GaussLegendreQ::G4GaussLegendreQ( function pFunction,
newton1 = newton ;
newton = newton1 - temp1/temp ; // Newton's method
}
while(fabs(newton - newton1) > tolerance) ;
while(std::fabs(newton - newton1) > tolerance) ;
fAbscissa[fNumber-i] = newton ;
fWeight[fNumber-i] = 2.0/((1.0 - newton*newton)*temp*temp) ;
@@ -21,12 +21,13 @@
// ********************************************************************
//
//
// $Id: G4SimpleIntegration.cc,v 1.3 2001/07/11 10:00:42 gunter Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// $Id: G4SimpleIntegration.cc,v 1.5 2004/11/12 17:38:33 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-00-cand-03 $
//
// Implementation file for simple integration methods
//
#include "globals.hh"
#include "G4SimpleIntegration.hh"
@@ -94,7 +95,7 @@ G4SimpleIntegration::Gauss(G4double xInitial,
{
G4int i ;
G4double x ;
static G4double root = 1.0/sqrt(3.0) ;
static G4double root = 1.0/std::sqrt(3.0) ;
G4double Step = (xFinal - xInitial)/(2.0*iterationNumber) ;
G4double delta = Step*root ;
G4double mean = 0.0 ;
@@ -147,7 +148,7 @@ G4double
G4SimpleIntegration::Gauss( G4double xInitial,
G4double xFinal )
{
static G4double root = 1.0/sqrt(3.0) ;
static G4double root = 1.0/std::sqrt(3.0) ;
G4double xMean = (xInitial + xFinal)/2.0 ;
G4double Step = (xFinal - xInitial)/2.0 ;
@@ -172,7 +173,7 @@ G4SimpleIntegration::AdaptGauss( G4double xInitial,
G4double leftHalf = Gauss(xInitial,xMean) ;
G4double rightHalf = Gauss(xMean,xFinal) ;
G4double full = Gauss(xInitial,xFinal) ;
if(fabs(leftHalf+rightHalf-full) < fTolerance)
if(std::fabs(leftHalf+rightHalf-full) < fTolerance)
{
sum += full ;
}
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4VGaussianQuadrature.cc,v 1.3 2001/07/11 10:00:42 gunter Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// $Id: G4VGaussianQuadrature.cc,v 1.5 2004/11/12 17:38:33 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-00-cand-03 $
//
// Implementation file for G4VGaussianQuadrature virtual base class
//
@@ -70,7 +70,7 @@ G4VGaussianQuadrature::GetWeight(G4int index) const
// ----------------------------------------------------------------------------
//
// Auxiliary function which returns the value of log(gamma-function(x))
// Auxiliary function which returns the value of std::log(gamma-function(x))
//
G4double
@@ -84,10 +84,10 @@ G4VGaussianQuadrature::GammaLogarithm(G4double xx)
static G4double cof[6] = { 76.18009172947146, -86.50532032941677,
24.01409824083091, -1.231739572450155,
0.1208650973866179e-2, -0.5395239384953e-5 } ;
register HepInt j;
register G4int j;
G4double x = xx - 1.0;
G4double tmp = x + 5.5;
tmp -= (x + 0.5) * log(tmp);
tmp -= (x + 0.5) * std::log(tmp);
G4double ser = 1.000000000190015;
for ( j = 0; j <= 5; j++ )
@@ -95,7 +95,7 @@ G4VGaussianQuadrature::GammaLogarithm(G4double xx)
x += 1.0;
ser += cof[j]/x;
}
return -tmp + log(2.5066282746310005*ser);
return -tmp + std::log(2.5066282746310005*ser);
}