Import Geant4 4.1.0 source tree
This commit is contained in:
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4NuclearFermiDensity.cc,v 1.8 2001/08/01 17:09:30 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// $Id: G4NuclearFermiDensity.cc,v 1.9 2002/04/24 13:10:50 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
|
||||
#include "G4NuclearFermiDensity.hh"
|
||||
@@ -40,18 +40,18 @@ G4NuclearFermiDensity::G4NuclearFermiDensity(G4double anA, G4double aZ)
|
||||
|
||||
G4NuclearFermiDensity::~G4NuclearFermiDensity() {}
|
||||
|
||||
G4double G4NuclearFermiDensity::GetRelativeDensity(G4ThreeVector aPosition)
|
||||
G4double G4NuclearFermiDensity::GetRelativeDensity(const G4ThreeVector & aPosition) const
|
||||
{
|
||||
return 1./(1.+exp((aPosition.mag()-theR)/a));
|
||||
}
|
||||
|
||||
G4double G4NuclearFermiDensity::GetRadius(const G4double maxRelativeDensity)
|
||||
G4double G4NuclearFermiDensity::GetRadius(const G4double maxRelativeDensity) const
|
||||
{
|
||||
return (maxRelativeDensity>0 && maxRelativeDensity <= 1 ) ?
|
||||
(theR + a*log((1-maxRelativeDensity+exp(-1*theR/a))/maxRelativeDensity)) : DBL_MAX;
|
||||
}
|
||||
|
||||
G4double G4NuclearFermiDensity::GetDeriv(const G4ThreeVector & aPosition)
|
||||
G4double G4NuclearFermiDensity::GetDeriv(const G4ThreeVector & aPosition) const
|
||||
{
|
||||
return -exp((aPosition.mag()-theR)/a) * sqr(GetDensity(aPosition)) / (a*Getrho0());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user