54 material_cache = NULL;
64 delete theCrossSections;
86 if ( dp->
GetKineticEnergy() == ke_cache && element == element_cache && material == material_cache )
return xs_cache;
89 element_cache = element;
110 throw G4HadronicException(__FILE__, __LINE__,
"Attempt to use NeutronHP data for particles other than neutrons!!!");
113 if ( getenv(
"G4NEUTRONHP_NEGLECT_DOPPLER" ) )
115 G4cout <<
"Find environment variable of \"G4NEUTRONHP_NEGLECT_DOPPLER\"." <<
G4endl;
116 G4cout <<
"On the fly Doppler broadening will be neglect in the cross section calculation of inelastic scattering of neutrons (<20MeV)." <<
G4endl;
125 if ( theCrossSections == NULL )
133 for(
size_t i=0; i<numberOfElements; ++i )
144 throw G4HadronicException(__FILE__, __LINE__,
"Attempt to use NeutronHP data for particles other than neutrons!!!");
155 G4cout <<
"Inelastic Cross Section of Neutron HP"<<
G4endl;
156 G4cout <<
"(Pointwise cross-section at 0 Kelvin.)" <<
G4endl;
165 for (
size_t i = 0 ; i < numberOfElements ; ++i )
172 for ( ie = 0 ; ie < 130 ; ie++ )
174 G4double eKinetic = 1.0e-5 * std::pow ( 10.0 , ie/10.0 ) *
eV;
175 G4bool outOfRange =
false;
177 if ( eKinetic < 20*
MeV )
179 G4cout << eKinetic/
eV <<
" " << (*((*theCrossSections)(i))).GetValue(eKinetic, outOfRange)/
barn <<
G4endl;
215 return ( (*((*theCrossSections)(index))).GetValue(eKinetic, outOfRange) )* factor;
220 theNeutron.SetKineticEnergy( eKinetic );
242 while(counter == 0 || std::abs(buffer-result/std::max(1,counter)) > 0.01*buffer)
244 if(counter) buffer = result/counter;
249 boosted.
Lorentz(theNeutron, aThermalNuc);
251 aXsection = (*((*theCrossSections)(
index))).GetValue(theEkin, outOfRange);
267 aXsection *= (targetVelocity-neutronVelocity).mag()/neutronVMag;