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; }
std::vector< G4Element * > G4ElementTable
CLHEP::Hep3Vector G4ThreeVector
G4DLLIMPORT std::ostream G4cout
G4double GetKineticEnergy() const
void SetKineticEnergy(G4double aEnergy)
static size_t GetNumberOfElements()
static const G4ElementTable * GetElementTable()
virtual G4double GetIsoCrossSection(const G4DynamicParticle *, G4int Z, G4int A, const G4Isotope *iso=0, const G4Element *elm=0, const G4Material *mat=0)
G4double GetInelasticGlauberGribovXsc()
G4double GetHadronNucleonXscPDG(const G4DynamicParticle *, const G4ParticleDefinition *)
G4double GetInelasticHadronNucleonXsc()
virtual void CrossSectionDescription(std::ostream &) const
virtual G4bool IsElementApplicable(const G4DynamicParticle *, G4int Z, const G4Material *)
virtual void BuildPhysicsTable(const G4ParticleDefinition &)
virtual G4bool IsIsoApplicable(const G4DynamicParticle *, G4int Z, G4int A, const G4Element *, const G4Material *)
virtual ~G4NeutronInelasticXS()
virtual G4double GetElementCrossSection(const G4DynamicParticle *, G4int Z, const G4Material *mat=0)
static G4Neutron * Neutron()
static G4NistManager * Instance()
const G4String & GetParticleName() const
G4double Value(G4double theEnergy)
size_t GetVectorLength() const
G4double Energy(size_t index) const