34#define INCLXX_IN_GEANT4_MODE 1
58 namespace NuclearPotential {
60 const G4double INuclearPotential::vPionDefault = 30.6;
61 const G4double INuclearPotential::vKPlusDefault = -25.;
62 const G4double INuclearPotential::vKMinusDefault = 60.;
66 G4ThreadLocal std::map<long,INuclearPotential const *> *nuclearPotentialCache = NULL;
71 if(!nuclearPotentialCache)
72 nuclearPotentialCache =
new std::map<long,INuclearPotential const *>;
74 const long nuclideID = (pionPotential ? 1 : -1) * (1000*theZ + theA + 1000000*type);
75 const std::map<long,INuclearPotential const *>::const_iterator mapEntry = nuclearPotentialCache->find(nuclideID);
76 if(mapEntry == nuclearPotentialCache->end()) {
92 INCL_FATAL(
"Unrecognized potential type at Nucleus creation." <<
'\n');
95 (*nuclearPotentialCache)[nuclideID] = thePotential;
98 return mapEntry->second;
103 if(nuclearPotentialCache) {
104 for(std::map<long,INuclearPotential const *>::const_iterator i = nuclearPotentialCache->begin(), e=nuclearPotentialCache->end(); i!=e; ++i)
106 nuclearPotentialCache->clear();
107 delete nuclearPotentialCache;
108 nuclearPotentialCache = NULL;
Abstract interface to the nuclear potential.
Isospin- and energy-independent nuclear potential.
Isospin- and energy-dependent nuclear potential.
Isospin- and energy-dependent nuclear potential.
Isospin-dependent nuclear potential.
void clearCache()
Clear the INuclearPotential cache.
INuclearPotential const * createPotential(const PotentialType type, const G4int theA, const G4int theZ, const G4bool pionPotential)
Create an INuclearPotential object.
@ IsospinEnergySmoothPotential