66 G4cout <<
"G4NeutronInelasticXS::G4NeutronInelasticXS Initialise for Z < "
69 data.resize(maxZ+1, 0);
70 coeff.resize(maxZ+1, 1.0);
73 isInitialized =
false;
79 for(
G4int i=0; i<=maxZ; ++i) {
86 outFile <<
"G4NeutronInelasticXS calculates the neutron inelastic scattering\n"
87 <<
"cross section on nuclei using data from the high precision\n"
88 <<
"neutron database. These data are simplified and smoothed over\n"
89 <<
"the resonance region in order to reduce CPU time.\n"
90 <<
"G4NeutronInelasticXS is valid for energies up to 20 MeV, for\n"
91 <<
"nuclei through U.\n";
116 if(Z < 1 || Z > maxZ) {
return xs; }
125 if(!pv) {
return xs; }
129 if(ekin <= e1) {
return xs; }
134 xs = pv->
Value(ekin);
144 G4cout <<
"ekin= " << ekin <<
", XSinel= " << xs <<
G4endl;
231 if(isInitialized) {
return; }
233 G4cout <<
"G4NeutronCaptureXS::BuildPhysicsTable for "
240 isInitialized =
true;
244 char* path = getenv(
"G4NEUTRONXSDATA");
247 "G4NEUTRONXSDATA environment variable not defined");
258 for(
size_t i=0; i<numOfElm; ++i) {
261 else if(Z > maxZ) { Z = maxZ; }
264 if(!
data[Z]) { Initialise(Z, dynParticle, path); }
274 if(
data[Z]) {
return; }
275 const char* path =
p;
279 path = getenv(
"G4NEUTRONXSDATA");
282 "G4NEUTRONXSDATA environment variable not defined");
297 std::ostringstream ost;
298 ost << path <<
"/inelast" <<
Z ;
299 std::ifstream filein(ost.str().c_str());
306 G4cout <<
"file " << ost.str()
307 <<
" is opened by G4NeutronInelasticXS" <<
G4endl;
311 data[
Z]->Retrieve(filein,
true);
314 size_t n =
data[
Z]->GetVectorLength() - 1;
326 if(sig2 > 0.) { coeff[
Z] = sig1/sig2; }
328 if(!dp) {
delete dynParticle; }