00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #define INCLXX_IN_GEANT4_MODE 1
00034
00035 #include "globals.hh"
00036
00044 #ifndef G4INCLNDFWOODSSAXON_HH_
00045 #define G4INCLNDFWOODSSAXON_HH_
00046
00047 #include "G4INCLIFunction1D.hh"
00048 #include <cmath>
00049
00050 namespace G4INCL {
00051
00052 namespace NuclearDensityFunctions {
00053
00054 class WoodsSaxonRP : public IFunction1D {
00055 public:
00056 WoodsSaxonRP(G4double radiusParameter, G4double maximumRadius, G4double diffusenessParameter) :
00057 IFunction1D(0., maximumRadius),
00058 theRadiusParameter(radiusParameter),
00059 theDiffusenessParameter(diffusenessParameter)
00060 {}
00061
00062 inline G4double operator()(const G4double r) const {
00063 G4double wsax = std::pow(r,3)
00064 *std::exp((r - theRadiusParameter)/theDiffusenessParameter)
00065 /std::pow((1.0 + std::exp((r - theRadiusParameter)/theDiffusenessParameter)),2);
00066 return wsax/theDiffusenessParameter;
00067 }
00068
00069 inline G4double getRadiusParameter() { return theRadiusParameter; };
00070 inline G4double getDiffusenessParameter() { return theDiffusenessParameter; };
00071
00072 inline void setRadiusParameter(G4double r) { theRadiusParameter = r; };
00073 inline void setDiffusenessParameter(G4double a) { theDiffusenessParameter = a; };
00074
00075 protected:
00076 G4double theRadiusParameter, theDiffusenessParameter;
00077 };
00078
00079 class WoodsSaxon : public IFunction1D {
00080 public:
00081 WoodsSaxon(G4double radiusParameter, G4double maximumRadius, G4double diffusenessParameter) :
00082 IFunction1D(0., maximumRadius),
00083 theRadiusParameter(radiusParameter),
00084 theDiffusenessParameter(diffusenessParameter)
00085 {}
00086
00087 inline G4double operator()(const G4double r) const {
00088 return r * r / (1.0 + std::exp((r - theRadiusParameter)/theDiffusenessParameter));
00089 }
00090
00091 inline G4double getRadiusParameter() { return theRadiusParameter; };
00092 inline G4double getDiffusenessParameter() { return theDiffusenessParameter; };
00093
00094 inline void setRadiusParameter(G4double r) { theRadiusParameter = r; };
00095 inline void setDiffusenessParameter(G4double a) { theDiffusenessParameter = a; };
00096
00097 protected:
00098 G4double theRadiusParameter, theDiffusenessParameter;
00099 };
00100
00101 }
00102
00103 }
00104
00105 #endif // G4INCLNDFWOODSSAXON_HH_