Allows to read XS file in the MCNP ACE format.
More...
#include <ReadXSFile.hxx >
ReadXSFile (ifstream *inputfile, int start_record, int table_length, int record_length, int nrecord_per_entry, string FN)
ReadXSFile (ifstream *inputfile, int start_record, int table_length, string FN)
ReadXSFile (const ReadXSFile &XSF)
copy constructor
~ReadXSFile ()
destructor
Real GetInterpolXS (int MT, Real E)
returns linear in (log-log) interpol of XS for reaction MT at energy E
Real GetXS (int MT, Real E)
returns XS for reaction MT at energy E
Real GetXS (int MT, int BinE)
returns XS for reaction MT at energy GetEnergy(BinE)
double SumXS (int MT)
returns
Real * GetEnergy ()
returns the Energy array where XS are defined
Real GetEnergy (int i)
returns the ith energy of the Energy array
int GetNEnergy ()
int GetXSMinEnergyBin (int MT)
returns the lower energy bin for the XS(MT)
int GetXSMaxEnergyBin (int MT)
returns the upper energy bin for the XS(MT)
int FindEnergyBin (double E, int N, float *Ephi)
returns the bin for energy E in array Ephi
int FindEnergyBin (Real E, int N, Real *Earray)
returns the bin for energy E in array Earray
int FindEnergyBin (Real E)
returns the bin for energy E
bool IsXSFound ()
Real * GetTotalNuBar (int &NE, Real *&E, bool &Todelete)
returns the total mean nu (fission neutron yield)
Real GetTotalInterpolateNuBar (Real E)
returns the total mean nu at E (fission neutron yield)
Real * GetPromptNuBar (int &NE, Real *&E)
returns the prompt mean nu (fission neutron yield)
ValErr_t SigmaPhi (int N, vector< ValErr_t > &Phi, float *Ephi, int MT, double emin=0, double emax=1e40)
return
ValErr_t NuSigmaFisPhi (int N, vector< ValErr_t > &Phi, float *Ephi)
return
ifstream * OriginalFile
Original MCNP ENDF Data File.
int fNXS [16]
Array of NXS (size, ...)
int fJXS [32]
Array of JXS (address of XS)
Real * fReactionType
Array [fNReaction] of ENDF reaction type.
int fNReaction
Number of reaction (ONLY neutrons)
Real * fEnergy
Energy grid [0..fNEnergy-1].
int fNEnergy
Number of Energy point.
Real * fTotalXS
Total cross-section [0..fNEnergy-1].
Real * fAbsorptionXS
Total Absorption cross-section [0..fNEnergy-1].
Real * fElasticXS
Elastic scattering cross-section [0..fNEnergy-1].
Real ** fXS
Cross-section array[fNReaction][...].
Real * XXS
XXS array (all the 2nd block of the Library)
int fNXXS
Size of this array.
Real * fLocXS
Address number for some reaction cross-sections.
bool fXSFound
whether a XS is found or not
Allows to read XS file in the MCNP ACE format.
All that numbers needed to read XS file are given in the xsdir. WARNING: UNITS ARE MCNP UNITS, i.e. [ENERGY]=MeV and [XS]=barns WARNING: For binary data:
use the correct compilation flag (mcnp4 or mcnp5)
the binary data MUST have been generated with a makexsf compiled with the "-assume byterecl" flag of Intel Fortran
Author PTO
Version 0.9
◆ ReadXSFile() [1/3]
ReadXSFile::ReadXSFile
(
ifstream *
inputfile ,
int
start_record ,
int
table_length ,
int
record_length ,
int
nrecord_per_entry ,
string
FN
)
Normal Constructor for Binary Cross-section libraries. Read the XS file.
Parameters
inputfile : the XS file where to find data
start_record : the address of the first record of the first block in inputfile
table_length : the table length of the 2nd block
record_length : the record length
nrecord_per_entry : the number of record per entries
FN : Base File Name (only for output error)
◆ ReadXSFile() [2/3]
ReadXSFile::ReadXSFile
(
ifstream *
inputfile ,
int
start_record ,
int
table_length ,
string
FN
)
Normal Constructor for ASCII Cross-section libraries. Read the XS file.
Parameters
inputfile : the XS file where to find data
start_record : the address (line number) of the first record of the first block in inputfile
table_length : the table length of the 2nd block
FN : Base File Name (only for output error)
◆ ReadXSFile() [3/3]
◆ ~ReadXSFile()
ReadXSFile::~ReadXSFile
(
)
◆ AffectPointer()
void ReadXSFile::AffectPointer
(
)
private
decomposed all global arrays in user understandable one
◆ FindEnergyBin() [1/3]
int ReadXSFile::FindEnergyBin
(
double
E ,
int
N ,
float *
Ephi
)
returns the bin for energy E in array Ephi
◆ FindEnergyBin() [2/3]
int ReadXSFile::FindEnergyBin
(
Real
E )
returns the bin for energy E
◆ FindEnergyBin() [3/3]
int ReadXSFile::FindEnergyBin
(
Real
E ,
int
N ,
Real *
Earray
)
returns the bin for energy E in array Earray
◆ GetEnergy() [1/2]
Real * ReadXSFile::GetEnergy
(
)
returns the Energy array where XS are defined
◆ GetEnergy() [2/2]
Real ReadXSFile::GetEnergy
(
int
i )
returns the ith energy of the Energy array
◆ GetFissionXS()
Real ReadXSFile::GetFissionXS
(
int
binE )
private
◆ GetInterpolXS()
Real ReadXSFile::GetInterpolXS
(
int
MT ,
Real
E
)
returns linear in (log-log) interpol of XS for reaction MT at energy E
◆ GetNEnergy()
int ReadXSFile::GetNEnergy
(
)
inline
< returns the size of the Energy array
◆ GetPromptNuBar()
Real * ReadXSFile::GetPromptNuBar
(
int &
NE ,
Real *&
E
)
returns the prompt mean nu (fission neutron yield)
◆ GetStartEndEnergyBin()
int ReadXSFile::GetStartEndEnergyBin
(
int
MT ,
int
min
)
private
helper funtion for GetXSMinMaxEnergyBin
◆ GetTotalFissionXS()
Real ReadXSFile::GetTotalFissionXS
(
Real
E )
private
◆ GetTotalInterpolateNuBar()
Real ReadXSFile::GetTotalInterpolateNuBar
(
Real
E )
returns the total mean nu at E (fission neutron yield)
◆ GetTotalNuBar()
Real * ReadXSFile::GetTotalNuBar
(
int &
NE ,
Real *&
E ,
bool &
Todelete
)
returns the total mean nu (fission neutron yield)
◆ GetXS() [1/3]
Real * ReadXSFile::GetXS
(
int
MT )
private
returns the XS array of reaction MT
◆ GetXS() [2/3]
Real ReadXSFile::GetXS
(
int
MT ,
int
BinE
)
returns XS for reaction MT at energy GetEnergy(BinE)
◆ GetXS() [3/3]
Real ReadXSFile::GetXS
(
int
MT ,
Real
E
)
returns XS for reaction MT at energy E
◆ GetXSMaxEnergyBin()
int ReadXSFile::GetXSMaxEnergyBin
(
int
MT )
returns the upper energy bin for the XS(MT)
◆ GetXSMinEnergyBin()
int ReadXSFile::GetXSMinEnergyBin
(
int
MT )
returns the lower energy bin for the XS(MT)
◆ GetXSMinMaxEnergyBin()
int ReadXSFile::GetXSMinMaxEnergyBin
(
int
MT ,
int
min
)
private
find the lower(min=0) or upper (min=1) Energy bin for reaction MT
◆ IsXSFound()
bool ReadXSFile::IsXSFound
(
)
inline
< whether a XS is found in the file
◆ NuSigmaFisPhi()
ValErr_t ReadXSFile::NuSigmaFisPhi
(
int
N ,
vector< ValErr_t > &
Phi ,
float *
Ephi
)
return
◆ ReadAsciiJXS()
void ReadXSFile::ReadAsciiJXS
(
)
private
read the JXS array (Ascii)
◆ ReadAsciiNXS()
void ReadXSFile::ReadAsciiNXS
(
)
private
read the NXS array (Ascii)
◆ ReadJXS()
void ReadXSFile::ReadJXS
(
)
private
read the JXS array (Binary)
◆ ReadNXS()
void ReadXSFile::ReadNXS
(
)
private
read the NXS array (Binary)
◆ SigmaPhi()
ValErr_t ReadXSFile::SigmaPhi
(
int
N ,
vector< ValErr_t > &
Phi ,
float *
Ephi ,
int
MT ,
double
emin = 0
,
double
emax = 1e40
)
return
◆ SumXS()
double ReadXSFile::SumXS
(
int
MT )
returns
◆ XSFound()
void ReadXSFile::XSFound
(
)
inline private
◆ fAbsorptionXS
Real * ReadXSFile::fAbsorptionXS
private
Total Absorption cross-section [0..fNEnergy-1].
◆ fElasticXS
Real * ReadXSFile::fElasticXS
private
Elastic scattering cross-section [0..fNEnergy-1].
◆ fEnergy
Real * ReadXSFile::fEnergy
private
Energy grid [0..fNEnergy-1].
◆ fJXS
Array of JXS (address of XS)
◆ fLocXS
Address number for some reaction cross-sections.
◆ fNEnergy
◆ fNReaction
int ReadXSFile::fNReaction
private
Number of reaction (ONLY neutrons)
◆ fNXS
◆ fNXXS
◆ fReactionType
Real * ReadXSFile::fReactionType
private
Array [fNReaction] of ENDF reaction type.
◆ fTotalXS
Real * ReadXSFile::fTotalXS
private
Total cross-section [0..fNEnergy-1].
◆ fXS
Cross-section array[fNReaction][...].
◆ fXSFound
bool ReadXSFile::fXSFound
private
whether a XS is found or not
◆ OriginalFile
ifstream* ReadXSFile::OriginalFile
private
Original MCNP ENDF Data File.
◆ XXS
XXS array (all the 2nd block of the Library)
The documentation for this class was generated from the following files: