Geant4-11
Functions
G4INCL::HFB Namespace Reference

Functions

G4double getRadiusParameterHFB (const ParticleType t, const G4int A, const G4int Z)
 Get the radius and diffuseness parameters from HFB calculations. More...
 
G4double getSurfaceDiffusenessHFB (const ParticleType t, const G4int A, const G4int Z)
 
void initialize ()
 

Function Documentation

◆ getRadiusParameterHFB()

G4double G4INCL::HFB::getRadiusParameterHFB ( const ParticleType  t,
const G4int  A,
const G4int  Z 
)

Get the radius and diffuseness parameters from HFB calculations.

Definition at line 130 of file G4INCLHFB.cc.

130 {
131 // HFB calculations
132 G4double r0=0.;
133 if(t==Neutron)
134 if(radiusN[Z][A]>0.)r0=radiusN[Z][A];
135 if(t==Proton)
136 if(radiusP[Z][A]>0.)r0=radiusP[Z][A];
137 return r0;
138 }
double G4double
Definition: G4Types.hh:83
const G4int Z[17]
const G4double A[17]
G4ThreadLocal G4double radiusN[TableZSize][TableASize]
Definition: G4INCLHFB.cc:57
G4ThreadLocal G4double radiusP[TableZSize][TableASize]
Definition: G4INCLHFB.cc:56

References A, G4INCL::Neutron, G4INCL::Proton, G4INCL::anonymous_namespace{G4INCLHFB.cc}::radiusN, G4INCL::anonymous_namespace{G4INCLHFB.cc}::radiusP, and Z.

Referenced by G4INCL::ParticleTable::getRadiusParameter(), and G4INCL::ParticleTable::getSurfaceDiffuseness().

◆ getSurfaceDiffusenessHFB()

G4double G4INCL::HFB::getSurfaceDiffusenessHFB ( const ParticleType  t,
const G4int  A,
const G4int  Z 
)

Definition at line 140 of file G4INCLHFB.cc.

140 {
141 // HFB calculations
142 G4double a=0.;
143 if(t==Neutron)
144 if(diffusenessN[Z][A]>0.)a=diffusenessN[Z][A];
145 if(t==Proton)
146 if(diffusenessP[Z][A]>0.)a=diffusenessP[Z][A];
147 return a;
148 }
G4ThreadLocal G4double diffusenessN[TableZSize][TableASize]
Definition: G4INCLHFB.cc:59
G4ThreadLocal G4double diffusenessP[TableZSize][TableASize]
Definition: G4INCLHFB.cc:58

References A, G4INCL::anonymous_namespace{G4INCLHFB.cc}::diffusenessN, G4INCL::anonymous_namespace{G4INCLHFB.cc}::diffusenessP, G4INCL::Neutron, G4INCL::Proton, and Z.

Referenced by G4INCL::ParticleTable::getRadiusParameter(), and G4INCL::ParticleTable::getSurfaceDiffuseness().

◆ initialize()

void G4INCL::HFB::initialize ( )

Definition at line 81 of file G4INCLHFB.cc.

81 {
82#else
83 void initialize(const std::string &path) {
84#endif
85
86 // Clear the existing tables, if any
87 cleanTable();
88
89#ifdef INCLXX_IN_GEANT4_MODE
90 if(!std::getenv("G4INCLDATA")) {
92 ed << " Data missing: set environment variable G4INCLDATA\n"
93 << " to point to the directory containing data files needed\n"
94 << " by the INCL++ model" << G4endl;
95 G4Exception("G4INCLDataFile::readData()","table_radius_hfb.dat",
96 FatalException, ed);
97 }
98 G4String dataPath0(std::getenv("G4INCLDATA"));
99 G4String dataPath(dataPath0 + "/table_radius_hfb.dat");
100#else
101 // File name
102 std::string dataPath(path + "/table_radius_hfb.dat");
103 INCL_DEBUG("Reading radius and diffuseness parameters from file " << dataPath << '\n');
104#endif
105
106 // Open the file stream
107 std::ifstream hfbTableIn(dataPath.c_str());
108 if(!hfbTableIn.good()) {
109 std::cerr << "Cannot open " << dataPath << " data file." << '\n';
110 std::abort();
111 return;
112 }
113
114 // read the file
115 G4int z, a, nbnuclei=0;
116 G4double rp, rn, dp, dn;
117 while(hfbTableIn.good()) { /* Loop checking, 22.01.2018, J.L. Rodriguez */
118 hfbTableIn >> z >> a >> rp >> rn >> dp >> dn;
119 radiusP[z][a] = rp;
120 radiusN[z][a] = rn;
121 diffusenessP[z][a] = dp;
122 diffusenessN[z][a] = dn;
123 nbnuclei++;
124 }
125 hfbTableIn.close();
126 INCL_DEBUG("Read " << nbnuclei << " nuclei" << '\n');
127
128 }
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:35
std::ostringstream G4ExceptionDescription
Definition: G4Exception.hh:40
#define INCL_DEBUG(x)
int G4int
Definition: G4Types.hh:85
#define G4endl
Definition: G4ios.hh:57
void initialize(Config const *const theConfig)
Initialize the clustering model based on the Config object.

References G4INCL::anonymous_namespace{G4INCLHFB.cc}::cleanTable(), G4INCL::anonymous_namespace{G4INCLHFB.cc}::diffusenessN, G4INCL::anonymous_namespace{G4INCLHFB.cc}::diffusenessP, FatalException, G4endl, G4Exception(), INCL_DEBUG, initialize(), G4INCL::anonymous_namespace{G4INCLHFB.cc}::radiusN, and G4INCL::anonymous_namespace{G4INCLHFB.cc}::radiusP.

Referenced by initialize(), and G4INCL::ParticleTable::initialize().