65 #ifdef G4MULTITHREADED
77 G4cout <<
"G4NeutronElasticXS::G4NeutronElasticXS Initialise for Z < "
98 outFile <<
"G4NeutronElasticXS calculates the neutron elastic scattering\n"
99 <<
"cross section on nuclei using data from the high precision\n"
100 <<
"neutron database. These data are simplified and smoothed over\n"
101 <<
"the resonance region in order to reduce CPU time.\n"
102 <<
"For high energies Glauber-Gribiv cross section is used.\n";
129 if(!pv) {
return xs; }
133 if(ekin <= pv->Energy(0)) {
135 }
else if(ekin <= pv->GetMaxEnergy()) {
177 if(!pv) {
return xs; }
179 if(ekin <= pv->Energy(0)) {
181 }
else if(ekin <= pv->GetMaxEnergy()) {
182 xs = pv->LogVectorValue(ekin, logekin);
189 G4cout <<
"G4NeutronElasticXS::IsoXS: Z= " << Z <<
" A= " << A
203 if(1 == nIso) {
return iso; }
216 for (j=0; j<nIso; ++j) {
217 sum += abundVector[j];
228 if(nn < nIso) {
temp.resize(nIso, 0.); }
230 for (j=0; j<nIso; ++j) {
238 for (j = 0; j<nIso; ++j) {
251 G4cout <<
"G4NeutronElasticXS::BuildPhysicsTable for "
257 <<
" only neutron is allowed";
258 G4Exception(
"G4NeutronElasticXS::BuildPhysicsTable(..)",
"had012",
263 #ifdef G4MULTITHREADED
269 #ifdef G4MULTITHREADED
280 size_t numOfCouples = theCoupleTable->GetTableSize();
281 for(
size_t j=0; j<numOfCouples; ++j) {
282 auto mat = theCoupleTable->GetMaterialCutsCouple(j)->GetMaterial();
283 auto elmVec =
mat->GetElementVector();
284 size_t numOfElem =
mat->GetNumberOfElements();
285 for (
size_t ie = 0; ie < numOfElem; ++ie) {
304 char* path = std::getenv(
"G4PARTICLEXSDATA");
306 std::ostringstream ost;
307 ost << path <<
"/neutron/el";
310 G4Exception(
"G4NeutronElasticXS::Initialise(..)",
"had013",
312 "Environment variable G4PARTICLEXSDATA is not defined");
320 #ifdef G4MULTITHREADED
325 #ifdef G4MULTITHREADED
333 if(
data[Z]) {
return; }
338 std::ostringstream ost;
340 std::ifstream filein(ost.str().c_str());
343 ed <<
"Data file <" << ost.str().c_str()
344 <<
"> is not opened!";
345 G4Exception(
"G4NeutronElasticXS::Initialise(..)",
"had014",
350 G4cout <<
"file " << ost.str()
351 <<
" is opened by G4NeutronElasticXS" <<
G4endl;
355 if(!
data[Z]->Retrieve(filein,
true)) {
357 ed <<
"Data file <" << ost.str().c_str()
358 <<
"> is not retrieved!";
359 G4Exception(
"G4NeutronElasticXS::Initialise(..)",
"had015",
369 if(sig2 > 0.) {
coeff[
Z] = sig1/sig2; }