Import Geant4 10.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-10 11:51:14 +02:00
parent e2d2f9810a
commit 286caacf06
12421 changed files with 730077 additions and 502383 deletions
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id$
// $Id: G4AnalyticalPolSolver.hh 67970 2013-03-13 10:10:06Z gcosmo $
//
// Class description:
//
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id$
// $Id: G4ChebyshevApproximation.hh 67970 2013-03-13 10:10:06Z gcosmo $
//
// Class description:
//
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id$
// $Id: G4ConvergenceTester.hh 74256 2013-10-02 14:24:02Z gcosmo $
//
// Class description:
//
@@ -59,7 +59,7 @@ class G4ConvergenceTester
{
public:
G4ConvergenceTester();
G4ConvergenceTester( G4String theName="NONAME" );
~G4ConvergenceTester();
G4ConvergenceTester( G4double );
@@ -67,8 +67,9 @@ class G4ConvergenceTester
void AddScore( G4double );
void ShowHistory();
void ShowResult();
// default to G4cout but can redirected to another ostream
void ShowHistory(std::ostream& out = G4cout);
void ShowResult(std::ostream& out = G4cout);
inline G4double GetValueOfMinimizingFunction( std::vector<G4double> x )
{ return slope_fitting_function( x ); }
@@ -76,21 +77,32 @@ class G4ConvergenceTester
private:
void calStat();
// boolean value of “statsAreUpdated” is set to TRUE at end of calStat
// and set to FALSE at end of AddScore
// NOTE : A thread lock for Geant4-MT needs to be put in AddScore so calStat is not
// executed in one thread while AddScore is modifying/adding data
void CheckIsUpdated() { if(!statsAreUpdated) { calStat(); } }
public:
// Public function to explicitly calculate statistics
void ComputeStatistics() { calStat(); }
// All “Get” functions check to make sure value is current before returning
G4double GetMean() { CheckIsUpdated(); return mean; }
G4double GetStandardDeviation() { CheckIsUpdated(); return sd; }
G4double GetVariance() { CheckIsUpdated(); return var; }
G4double GetR() { CheckIsUpdated(); return r; }
G4double GetEfficiency() { CheckIsUpdated(); return efficiency; }
G4double GetR2eff() { CheckIsUpdated(); return r2eff; }
G4double GetR2int() { CheckIsUpdated(); return r2int; }
G4double GetShift() { CheckIsUpdated(); return shift; }
G4double GetVOV() { CheckIsUpdated(); return vov; }
G4double GetFOM() { CheckIsUpdated(); return fom; }
G4double GetMean() { return mean; }
G4double GetStandardDeviation() { return sd; }
G4double GetVariance() { return var; }
G4double GetR() { return r; }
G4double GetEfficiency() { return efficiency; }
G4double GetR2eff() { return r2eff; }
G4double GetR2int() { return r2int; }
G4double GetShift() { return shift; }
G4double GetVOV() { return vov; }
G4double GetFOM() { return fom; }
private:
void calc_grid_point_of_history();
void calc_stat_history();
void check_stat_history();
void check_stat_history(std::ostream& out = G4cout);
G4double calc_Pearson_r( G4int, std::vector<G4double>,
std::vector<G4double> );
G4bool is_monotonically_decrease( std::vector<G4double> );
@@ -99,6 +111,7 @@ class G4ConvergenceTester
private:
G4String name;
std::map< G4int , G4double > nonzero_histories;
// (ith-history , score value)
G4int n;
@@ -153,6 +166,7 @@ class G4ConvergenceTester
G4int noPass;
G4int noTotal; // Total number of tests
G4bool statsAreUpdated;
};
#endif
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id$
// $Id: G4DataInterpolation.hh 67970 2013-03-13 10:10:06Z gcosmo $
//
// Class description:
//
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id$
// $Id: G4GaussChebyshevQ.hh 67970 2013-03-13 10:10:06Z gcosmo $
//
// Class description:
//
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id$
// $Id: G4GaussHermiteQ.hh 67970 2013-03-13 10:10:06Z gcosmo $
//
// Class description:
//
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id$
// $Id: G4GaussJacobiQ.hh 67970 2013-03-13 10:10:06Z gcosmo $
//
// Class description:
//
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id$
// $Id: G4GaussLaguerreQ.hh 67970 2013-03-13 10:10:06Z gcosmo $
//
// Class description:
//
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id$
// $Id: G4GaussLegendreQ.hh 67970 2013-03-13 10:10:06Z gcosmo $
//
// Class description:
//
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id$
// $Id: G4Integrator.hh 67970 2013-03-13 10:10:06Z gcosmo $
//
// Class description:
//
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id$
// $Id: G4Integrator.icc 69546 2013-05-08 09:50:34Z gcosmo $
//
// Implementation of G4Integrator methods.
//
@@ -138,8 +138,8 @@ template <class T, class F>
G4double G4Integrator<T,F>::Gauss( T& typeT, F f,
G4double xInitial, G4double xFinal )
{
static G4double root = 1.0/std::sqrt(3.0) ;
static const G4double root = 1.0/std::sqrt(3.0) ;
G4double xMean = (xInitial + xFinal)/2.0 ;
G4double Step = (xFinal - xInitial)/2.0 ;
G4double delta = Step*root ;
@@ -167,8 +167,8 @@ template <class T, class F>
G4double G4Integrator<T,F>::Gauss( G4double (*f)(G4double),
G4double xInitial, G4double xFinal)
{
static G4double root = 1.0/std::sqrt(3.0) ;
static const G4double root = 1.0/std::sqrt(3.0) ;
G4double xMean = (xInitial + xFinal)/2.0 ;
G4double Step = (xFinal - xInitial)/2.0 ;
G4double delta = Step*root ;
@@ -473,13 +473,13 @@ G4double G4Integrator<T,F>::Legendre10( T& typeT, F f,G4double a, G4double b)
// From Abramowitz M., Stegan I.A. 1964 , Handbook of Math... , p. 916
static G4double abscissa[] = { 0.148874338981631, 0.433395394129247,
0.679409568299024, 0.865063366688985,
0.973906528517172 } ;
static const G4double abscissa[] = { 0.148874338981631, 0.433395394129247,
0.679409568299024, 0.865063366688985,
0.973906528517172 } ;
static G4double weight[] = { 0.295524224714753, 0.269266719309996,
0.219086362515982, 0.149451349150581,
0.066671344308688 } ;
static const G4double weight[] = { 0.295524224714753, 0.269266719309996,
0.219086362515982, 0.149451349150581,
0.066671344308688 } ;
xMean = 0.5*(a + b) ;
xDiff = 0.5*(b - a) ;
integral = 0.0 ;
@@ -514,13 +514,13 @@ G4double G4Integrator<T,F>::Legendre10( G4double (*f)(G4double),
// From Abramowitz M., Stegan I.A. 1964 , Handbook of Math... , p. 916
static G4double abscissa[] = { 0.148874338981631, 0.433395394129247,
0.679409568299024, 0.865063366688985,
0.973906528517172 } ;
static const G4double abscissa[] = { 0.148874338981631, 0.433395394129247,
0.679409568299024, 0.865063366688985,
0.973906528517172 } ;
static G4double weight[] = { 0.295524224714753, 0.269266719309996,
0.219086362515982, 0.149451349150581,
0.066671344308688 } ;
static const G4double weight[] = { 0.295524224714753, 0.269266719309996,
0.219086362515982, 0.149451349150581,
0.066671344308688 } ;
xMean = 0.5*(a + b) ;
xDiff = 0.5*(b - a) ;
integral = 0.0 ;
@@ -549,7 +549,7 @@ G4double G4Integrator<T,F>::Legendre96( T& typeT, F f,G4double a, G4double b)
// From Abramowitz M., Stegan I.A. 1964 , Handbook of Math... , p. 919
static G4double
static const G4double
abscissa[] = {
0.016276744849602969579, 0.048812985136049731112,
0.081297495464425558994, 0.113695850110665920911,
@@ -584,7 +584,7 @@ G4double G4Integrator<T,F>::Legendre96( T& typeT, F f,G4double a, G4double b)
0.998364375863181677724, 0.999689503883230766828 // 48
} ;
static G4double
static const G4double
weight[] = {
0.032550614492363166242, 0.032516118713868835987,
0.032447163714064269364, 0.032343822568575928429,
@@ -652,7 +652,7 @@ G4double G4Integrator<T,F>::Legendre96( G4double (*f)(G4double),
// From Abramowitz M., Stegan I.A. 1964 , Handbook of Math... , p. 919
static G4double
static const G4double
abscissa[] = {
0.016276744849602969579, 0.048812985136049731112,
0.081297495464425558994, 0.113695850110665920911,
@@ -687,7 +687,7 @@ G4double G4Integrator<T,F>::Legendre96( G4double (*f)(G4double),
0.998364375863181677724, 0.999689503883230766828 // 48
} ;
static G4double
static const G4double
weight[] = {
0.032550614492363166242, 0.032516118713868835987,
0.032447163714064269364, 0.032343822568575928429,
@@ -1015,9 +1015,9 @@ G4Integrator<T,F>::Laguerre( G4double (*f)(G4double),
template <class T, class F>
G4double G4Integrator<T,F>::GammaLogarithm(G4double xx)
{
static G4double cof[6] = { 76.18009172947146, -86.50532032941677,
24.01409824083091, -1.231739572450155,
0.1208650973866179e-2, -0.5395239384953e-5 } ;
static const G4double cof[6] = { 76.18009172947146, -86.50532032941677,
24.01409824083091, -1.231739572450155,
0.1208650973866179e-2, -0.5395239384953e-5 };
register G4int j;
G4double x = xx - 1.0 ;
G4double tmp = x + 5.5 ;
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id$
// $Id: G4JTPolynomialSolver.hh 67970 2013-03-13 10:10:06Z gcosmo $
//
// Class description:
//
@@ -90,11 +90,11 @@ class G4JTPolynomialSolver
G4double si;
G4double u,v;
G4double a,b,c,d;
G4double a1,a2,a3,a6,a7;
G4double a1,a3,a7;
G4double e,f,g,h;
G4double szr,szi;
G4double lzr,lzi;
G4int n,nmi;
G4int n;
/* The following statements set machine constants */
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id$
// $Id: G4PolynomialSolver.hh 67970 2013-03-13 10:10:06Z gcosmo $
//
// class G4PolynomialSolver
//
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id$
// $Id: G4PolynomialSolver.icc 67970 2013-03-13 10:10:06Z gcosmo $
//
// class G4PolynomialSolver
//
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id$
// $Id: G4SimpleIntegration.hh 69546 2013-05-08 09:50:34Z gcosmo $
//
// Class description:
//
@@ -114,7 +114,7 @@ class G4SimpleIntegration
function fFunction ;
G4double fTolerance ;
static G4int fMaxDepth ;
const G4int fMaxDepth ;
};
#endif
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id$
// $Id: G4SimplexDownhill.hh 67970 2013-03-13 10:10:06Z gcosmo $
//
// Class description:
//
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id$
// $Id: G4SimplexDownhill.icc 67970 2013-03-13 10:10:06Z gcosmo $
//
// Author: Tatsumi Koi (SLAC/SCCS), 2007
// --------------------------------------------------------------------------
@@ -25,7 +25,6 @@
//
//
// $Id:$
// GEANT4 tag $Name: not supported by cvs2svn $
//
//
// ----------------------------------------------------------------------
@@ -67,6 +66,9 @@ class G4StatDouble
G4double rms(G4double ext_sum_w, G4int ext_n);
// RMS scaled to sum of weights
void add(G4StatDouble*);
// merge 2 statistics
inline G4int n() const { return m_n; }
inline G4double sum_w() const { return m_sum_w; }
inline G4double sum_w2() const { return m_sum_w2; }
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id$
// $Id: G4VGaussianQuadrature.hh 67970 2013-03-13 10:10:06Z gcosmo $
//
// Class description:
//