59 const G4int G4NeutronCaptureXS::amin[] = {
 
   61   0, 0, 6, 0,10,12,14,16, 0, 0, 
 
   62   0, 0, 0,28, 0, 0, 0,36, 0,40, 
 
   63   0, 0, 0, 0, 0,54, 0,58,63,64, 
 
   64   0,70, 0, 0, 0, 0, 0, 0, 0,90, 
 
   65   0, 0, 0, 0, 0, 0,107,106, 0,112, 
 
   66   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
 
   67   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
 
   68   0, 0, 0,180, 0, 0, 0, 0, 0, 0, 
 
   69   0,204, 0, 0, 0, 0, 0, 0, 0, 0, 
 
   71 const G4int G4NeutronCaptureXS::amax[] = {
 
   73   0, 0, 7, 0,11,13,15,18, 0, 0, 
 
   74   0, 0, 0,30, 0, 0, 0,40, 0,48, 
 
   75   0, 0, 0, 0, 0,58, 0,64,65,70, 
 
   76   0,76, 0, 0, 0, 0, 0, 0, 0,96, 
 
   77   0, 0, 0, 0, 0, 0,109,116, 0,124, 
 
   78   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
 
   79   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
 
   80   0, 0, 0,186, 0, 0, 0, 0, 0, 0, 
 
   81   0,208, 0, 0, 0, 0, 0, 0, 0, 0, 
 
   92     G4cout  << 
"G4NeutronCaptureXS::G4NeutronCaptureXS: Initialise for Z < " 
  100   if(isMaster) { 
delete data; 
data = 0; }
 
  105   outFile << 
"G4NeutronCaptureXS calculates the neutron capture cross sections\n" 
  106           << 
"on nuclei using data from the high precision neutron database.\n" 
  107           << 
"These data are simplified and smoothed over the resonance region\n" 
  108           << 
"in order to reduce CPU time.  G4NeutronCaptureXS is valid up to\n" 
  109           << 
"20 MeV for all targets through U.\n";
 
  133   if(ekin > emax || Z < 1 || Z >= 
MAXZCAPTURE) { 
return xs; }
 
  134   if(ekin < elimit) { ekin = elimit; }
 
  140     pv = 
data->GetElementData(Z);
 
  141     if(!pv) { 
return xs; }
 
  145   if(ekin < e1) { xs = (*pv)[0]*std::sqrt(e1/ekin); }
 
  146   else if(ekin <= pv->GetMaxEnergy()) { xs = pv->
Value(ekin); }
 
  163     xs = IsoCrossSection(ekin, Z, A); 
 
  171   if(ekin < elimit) { ekin = elimit; }
 
  177     pv = 
data->GetElementData(Z);
 
  181   if(pv && amin[Z] > 0 && A >= amin[Z] && A <= amax[Z]) {
 
  182     pv  = 
data->GetComponentDataByID(Z, A - amin[Z]);
 
  186       if(ekin < e1) { xs = (*pv)[1]*std::sqrt(e1/ekin); }
 
  187       else if(ekin <= pv->GetMaxEnergy()) { xs = pv->
Value(ekin); }
 
  191     G4cout  << 
"G4NeutronCaptureXS::IsoCrossSection: Ekin(MeV)= " << ekin/
MeV  
  192         << 
"  xs(b)= " << xs/
barn  
  193         << 
"  Z= " << Z << 
"  A= " << A << 
G4endl;
 
  216       for (j = 0; j<
nIso; ++j) {
 
  217     sum += abundVector[j];
 
  219       iso = (*isoVector)[j];
 
  226       if(!
data->GetElementData(Z)) { Initialise(Z); }
 
  227       size_t nn = temp.size();
 
  228       if(nn < nIso) { temp.resize(nIso, 0.); }
 
  230       for (j=0; j<
nIso; ++j) {
 
  231         sum += abundVector[j]*IsoCrossSection(kinEnergy, Z, 
 
  232                           (*isoVector)[j]->GetN());
 
  236       for (j = 0; j<
nIso; ++j) {
 
  238           iso = (*isoVector)[j];
 
  251     G4cout << 
"G4NeutronCaptureXS::BuildPhysicsTable for "  
  257        << 
" only neutron is allowed";
 
  258     G4Exception(
"G4NeutronCaptureXS::BuildPhysicsTable(..)",
"had012",
 
  266     data->SetName(
"NeutronCapture");
 
  275     char* path = getenv(
"G4NEUTRONXSDATA");
 
  281       for(
size_t i=0; i<numOfElm; ++i) {
 
  287     if(!
data->GetElementData(Z)) { Initialise(Z, path); }
 
  294 G4NeutronCaptureXS::Initialise(
G4int Z, 
const char* 
p)
 
  297   const char* path = 
p;
 
  301     path = getenv(
"G4NEUTRONXSDATA");
 
  304                   "Environment variable G4NEUTRONXSDATA is not defined");
 
  310   std::ostringstream ost;
 
  311   ost << path << 
"/cap" << 
Z ;
 
  313   data->InitialiseForElement(Z, v);
 
  317     size_t nmax = (size_t)(amax[Z]-amin[Z]+1);
 
  318     data->InitialiseForComponent(Z, nmax);
 
  320     for(
G4int A=amin[Z]; A<=amax[
Z]; ++
A) {
 
  321       std::ostringstream ost1;
 
  322       ost1 << path << 
"/cap" << Z << 
"_" << 
A;
 
  323       v = RetrieveVector(ost1, 
false);
 
  324       data->AddComponent(Z, A, v); 
 
  330 G4NeutronCaptureXS::RetrieveVector(std::ostringstream& ost, 
G4bool warn)
 
  333   std::ifstream filein(ost.str().c_str());
 
  337       ed << 
"Data file <" << ost.str().c_str()
 
  338      << 
"> is not opened!";
 
  339       G4Exception(
"G4NeutronCaptureXS::RetrieveVector(..)",
"had014",
 
  344       G4cout << 
"File " << ost.str() 
 
  345          << 
" is opened by G4NeutronCaptureXS" << 
G4endl;
 
  351       ed << 
"Data file <" << ost.str().c_str()
 
  352      << 
"> is not retrieved!";
 
  353       G4Exception(
"G4NeutronCaptureXS::RetrieveVector(..)",
"had015",
 
size_t GetNumberOfIsotopes() const 
virtual ~G4NeutronCaptureXS()
std::vector< G4Isotope * > G4IsotopeVector
virtual G4double GetElementCrossSection(const G4DynamicParticle *, G4int Z, const G4Material *mat=0)
std::ostringstream G4ExceptionDescription
G4double GetKineticEnergy() const 
virtual G4double GetIsoCrossSection(const G4DynamicParticle *, G4int Z, G4int A, const G4Isotope *iso, const G4Element *elm, const G4Material *mat)
virtual G4bool IsElementApplicable(const G4DynamicParticle *, G4int Z, const G4Material *)
const G4String & GetParticleName() const 
const XML_Char const XML_Char * data
virtual void BuildPhysicsTable(const G4ParticleDefinition &)
G4GLOB_DLL std::ostream G4cout
double A(double temperature)
static size_t GetNumberOfElements()
virtual G4bool Retrieve(std::ifstream &fIn, G4bool ascii) final
G4double * GetRelativeAbundanceVector() const 
static constexpr double eV
G4double Energy(size_t index) const 
G4double Value(G4double theEnergy, size_t &lastidx) const 
virtual void CrossSectionDescription(std::ostream &) const 
virtual G4Isotope * SelectIsotope(const G4Element *, G4double kinEnergy)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
static const G4double emax
virtual G4bool IsIsoApplicable(const G4DynamicParticle *, G4int Z, G4int A, const G4Element *, const G4Material *)
G4IsotopeVector * GetIsotopeVector() const 
#define G4_DECLARE_XS_FACTORY(cross_section)
static constexpr double MeV
std::vector< G4Element * > G4ElementTable
static constexpr double barn
static G4ElementTable * GetElementTable()