Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4INCL::HFB Namespace Reference

Functions

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

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 123 of file G4INCLHFB.cc.

123 {
124 // HFB calculations
125 G4double r0=0.;
126 if(t==Neutron)
127 if(radiusN[Z][A]>0.)r0=radiusN[Z][A];
128 if(t==Proton)
129 if(radiusP[Z][A]>0.)r0=radiusP[Z][A];
130 return r0;
131 }
double A(double temperature)
double G4double
Definition: G4Types.hh:83

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 133 of file G4INCLHFB.cc.

133 {
134 // HFB calculations
135 G4double a=0.;
136 if(t==Neutron)
137 if(diffusenessN[Z][A]>0.)a=diffusenessN[Z][A];
138 if(t==Proton)
139 if(diffusenessP[Z][A]>0.)a=diffusenessP[Z][A];
140 return a;
141 }

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

◆ initialize()

void G4INCL::HFB::initialize ( )

Definition at line 74 of file G4INCLHFB.cc.

74 {
75#else
76 void initialize(const std::string &path) {
77#endif
78
79 // Clear the existing tables, if any
80 cleanTable();
81
82#ifdef INCLXX_IN_GEANT4_MODE
83 if(!std::getenv("G4INCLDATA")) {
85 ed << " Data missing: set environment variable G4INCLDATA\n"
86 << " to point to the directory containing data files needed\n"
87 << " by the INCL++ model" << G4endl;
88 G4Exception("G4INCLDataFile::readData()","table_radius_hfb.dat",
89 FatalException, ed);
90 }
91 G4String dataPath0(std::getenv("G4INCLDATA"));
92 G4String dataPath(dataPath0 + "/table_radius_hfb.dat");
93#else
94 // File name
95 std::string dataPath(path + "/table_radius_hfb.dat");
96 INCL_DEBUG("Reading radius and diffuseness parameters from file " << dataPath << '\n');
97#endif
98
99 // Open the file stream
100 std::ifstream hfbTableIn(dataPath.c_str());
101 if(!hfbTableIn.good()) {
102 std::cerr << "Cannot open " << dataPath << " data file." << '\n';
103 std::abort();
104 return;
105 }
106
107 // read the file
108 G4int z, a, nbnuclei=0;
109 G4double rp, rn, dp, dn;
110 while(hfbTableIn.good()) { /* Loop checking, 22.01.2018, J.L. Rodriguez */
111 hfbTableIn >> z >> a >> rp >> rn >> dp >> dn;
112 radiusP[z][a] = rp;
113 radiusN[z][a] = rn;
114 diffusenessP[z][a] = dp;
115 diffusenessN[z][a] = dn;
116 nbnuclei++;
117 }
118 hfbTableIn.close();
119 INCL_DEBUG("Read " << nbnuclei << " nuclei" << '\n');
120
121 }
@ 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

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