66 G4cout <<
"G4NeutronInelasticXS::G4NeutronInelasticXS Initialise for Z < "
81 outFile <<
"G4NeutronInelasticXS calculates the neutron inelastic scattering\n"
82 <<
"cross section on nuclei using data from the high precision\n"
83 <<
"neutron database. These data are simplified and smoothed over\n"
84 <<
"the resonance region in order to reduce CPU time.\n"
85 <<
"For high energy Glauber-Gribov cross section model is used\n";
113 if(pv ==
nullptr) {
return xs; }
117 if(ekin <= pv->GetMaxEnergy()) {
157 if(pv ==
nullptr) {
return xs; }
167 G4cout <<
"G4NeutronInelasticXS::IsoXS: Ekin(MeV)= "
170 <<
" Z= " <<
Z <<
" A= " <<
A <<
G4endl;
179 xs = pv->LogVectorValue(ekin, logekin);
187 G4cout <<
"G4NeutronInelasticXS::IsoXS: Z= " <<
Z <<
" A= " <<
A
202 if(1 == nIso) {
return iso; }
215 for (j=0; j<nIso; ++j) {
216 sum += abundVector[j];
227 if(
nn < nIso) {
temp.resize(nIso, 0.); }
229 for (j=0; j<nIso; ++j) {
237 for (j = 0; j<nIso; ++j) {
250 G4cout <<
"G4NeutronInelasticXS::BuildPhysicsTable for "
256 <<
" only neutron is allowed";
257 G4Exception(
"G4NeutronInelasticXS::BuildPhysicsTable(..)",
"had012",
262 if(
nullptr ==
data) {
263#ifdef G4MULTITHREADED
265 if(
nullptr ==
data) {
271#ifdef G4MULTITHREADED
281 for (
auto & elm : *table ) {
287 size_t nIso =
temp.size();
288 for (
auto & elm : *table ) {
289 size_t n = elm->GetNumberOfIsotopes();
290 if(
n > nIso) { nIso =
n; }
292 temp.resize(nIso, 0.0);
300 char* path = std::getenv(
"G4PARTICLEXSDATA");
301 if (
nullptr != path) {
302 std::ostringstream ost;
303 ost << path <<
"/neutron/inel";
306 G4Exception(
"G4NeutronInelasticXS::Initialise(..)",
"had013",
308 "Environment variable G4PARTICLEXSDATA is not defined");
316#ifdef G4MULTITHREADED
321#ifdef G4MULTITHREADED
332 std::ostringstream ost;
347 std::ostringstream ost1;
359 coeff[
Z] = (sig2 > 0.) ? sig1/sig2 : 1.0;
366 std::ifstream filein(ost.str().c_str());
367 if (!filein.is_open()) {
370 ed <<
"Data file <" << ost.str().c_str()
371 <<
"> is not opened!";
372 G4Exception(
"G4NeutronInelasticXS::RetrieveVector(..)",
"had014",
377 G4cout <<
"File " << ost.str()
378 <<
" is opened by G4NeutronInelasticXS" <<
G4endl;
384 ed <<
"Data file <" << ost.str().c_str()
385 <<
"> is not retrieved!";
386 G4Exception(
"G4NeutronInelasticXS::RetrieveVector(..)",
"had015",
static const G4double emax
std::vector< G4Element * > G4ElementTable
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
static const G4int amax[]
static const G4double aeff[]
static const G4int amin[]
#define G4MUTEX_INITIALIZER
#define G4MUTEXLOCK(mutex)
#define G4MUTEXUNLOCK(mutex)
G4GLOB_DLL std::ostream G4cout
G4VComponentCrossSection * GetComponentCrossSection(const G4String &name)
static G4CrossSectionDataSetRegistry * Instance()
G4double GetLogKineticEnergy() const
G4double GetKineticEnergy() const
G4PhysicsVector * GetComponentDataByIndex(G4int Z, G4int idx)
void InitialiseForComponent(G4int Z, G4int nComponents=0)
void InitialiseForElement(G4int Z, G4PhysicsVector *v)
G4PhysicsVector * GetElementData(G4int Z)
void AddComponent(G4int Z, G4int id, G4PhysicsVector *v)
void SetName(const G4String &nam)
static G4ElementTable * GetElementTable()
G4double * GetRelativeAbundanceVector() const
const G4Isotope * GetIsotope(G4int iso) const
size_t GetNumberOfIsotopes() const
static G4ElementData * data
const G4String & FindDirectoryPath()
static const G4int MAXZINEL
G4double IsoCrossSection(G4double ekin, G4double logekin, G4int Z, G4int A)
G4bool IsElementApplicable(const G4DynamicParticle *, G4int Z, const G4Material *) final
std::vector< G4double > temp
const G4ParticleDefinition * neutron
void BuildPhysicsTable(const G4ParticleDefinition &) final
G4bool IsIsoApplicable(const G4DynamicParticle *, G4int Z, G4int A, const G4Element *, const G4Material *) final
G4VComponentCrossSection * ggXsection
~G4NeutronInelasticXS() final
void CrossSectionDescription(std::ostream &) const final
const G4PhysicsVector * GetPhysicsVector(G4int Z)
void InitialiseOnFly(G4int Z)
G4PhysicsVector * RetrieveVector(std::ostringstream &in, G4bool warn)
const G4Isotope * SelectIsotope(const G4Element *, G4double kinEnergy, G4double logE) final
static G4String gDataDirectory
static G4double coeff[MAXZINEL]
G4double GetElementCrossSection(const G4DynamicParticle *, G4int Z, const G4Material *) final
G4double GetIsoCrossSection(const G4DynamicParticle *, G4int Z, G4int A, const G4Isotope *iso, const G4Element *elm, const G4Material *mat) final
const G4String & GetParticleName() const
G4double GetMaxEnergy() const
G4double LogVectorValue(const G4double energy, const G4double theLogEnergy) const
G4bool Retrieve(std::ifstream &fIn, G4bool ascii=false)
std::size_t GetVectorLength() const
G4double GetInelasticElementCrossSection(const G4ParticleDefinition *, G4double kinEnergy, const G4Element *)
void SetForAllAtomsAndEnergies(G4bool val)
static constexpr double barn
static constexpr double MeV
T max(const T t1, const T t2)
brief Return the largest of the two arguments
T min(const T t1, const T t2)
brief Return the smallest of the two arguments