Import Geant4 2.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 15:42:07 +02:00
parent 103bda00c8
commit e7d7193284
3106 changed files with 171117 additions and 90550 deletions
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4NuclearFermiDensity.cc,v 1.1.10.1 1999/12/07 20:52:01 gunter Exp $
// GEANT4 tag $Name: geant4-01-01 $
// $Id: G4NuclearFermiDensity.cc,v 1.6 2000/05/23 13:41:42 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
#include "G4NuclearFermiDensity.hh"
@@ -14,11 +14,12 @@
G4NuclearFermiDensity::G4NuclearFermiDensity(G4double anA, G4double aZ)
: a(0.545 * fermi)
{
const G4double r0=1.14*fermi;
theA = anA;
theZ = aZ;
// const G4double r0=1.14*fermi;
const G4double r0=1.16 * ( 1. - 1.16 * pow(anA, -2./3.)) * fermi;
theA = G4int(anA);
theZ = G4int(aZ);
theR= r0 * pow(theA, 1./3. );
Setrho0(3./4./pi/pow(r0,3.)/theA * ( 1. + sqr(a/theR)*pi2 ));
Setrho0(3./ (4. * pi * pow(r0,3.) * theA * ( 1. + sqr(a/theR)*pi2 )));
}
G4NuclearFermiDensity::~G4NuclearFermiDensity() {}
@@ -33,4 +34,8 @@ G4double G4NuclearFermiDensity::GetRadius(const G4double maxRelativeDensity)
return (maxRelativeDensity>0 && maxRelativeDensity <= 1 ) ?
(theR + a*log((1-maxRelativeDensity+exp(-1*theR/a))/maxRelativeDensity)) : DBL_MAX;
}
G4double G4NuclearFermiDensity::GetDeriv(const G4ThreeVector & aPosition)
{
return -exp((aPosition.mag()-theR)/a) * sqr(GetDensity(aPosition)) / (a*Getrho0());
}