Allows to read XS file in the MCNP ACE format. More...
#include <ReadXSFile.hxx>
Public Member Functions | |
| 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 More... | |
| ~ReadXSFile () | |
| destructor More... | |
| Real | GetInterpolXS (int MT, Real E) |
| returns linear in (log-log) interpol of XS for reaction MT at energy E More... | |
| Real | GetXS (int MT, Real E) |
| returns XS for reaction MT at energy E More... | |
| Real | GetXS (int MT, int BinE) |
| returns XS for reaction MT at energy GetEnergy(BinE) More... | |
| double | SumXS (int MT) |
returns More... | |
| Real * | GetEnergy () |
| returns the Energy array where XS are defined More... | |
| Real | GetEnergy (int i) |
| returns the ith energy of the Energy array More... | |
| int | GetNEnergy () |
| returns the size of the Energy array More... | |
| int | GetXSMinEnergyBin (int MT) |
| returns the lower energy bin for the XS(MT) More... | |
| int | GetXSMaxEnergyBin (int MT) |
| returns the upper energy bin for the XS(MT) More... | |
| int | FindEnergyBin (double E, int N, float *Ephi) |
| returns the bin for energy E in array Ephi More... | |
| int | FindEnergyBin (Real E, int N, Real *Earray) |
| returns the bin for energy E in array Earray More... | |
| int | FindEnergyBin (Real E) |
| returns the bin for energy E More... | |
| bool | IsXSFound () |
| whether a XS is found in the file More... | |
| Real * | GetTotalNuBar (int &NE, Real *&E, bool &Todelete) |
| returns the total mean nu (fission neutron yield) More... | |
| Real | GetTotalInterpolateNuBar (Real E) |
| returns the total mean nu at E (fission neutron yield) More... | |
| Real * | GetPromptNuBar (int &NE, Real *&E) |
| returns the prompt mean nu (fission neutron yield) More... | |
| ValErr_t | SigmaPhi (int N, vector< ValErr_t > &Phi, float *Ephi, int MT) |
return More... | |
| ValErr_t | NuSigmaFisPhi (int N, vector< ValErr_t > &Phi, float *Ephi) |
return More... | |
Private Member Functions | |
| void | ReadNXS () |
| read the NXS array (Binary) More... | |
| void | ReadJXS () |
| read the JXS array (Binary) More... | |
| void | ReadAsciiNXS () |
| read the NXS array (Ascii) More... | |
| void | ReadAsciiJXS () |
| read the JXS array (Ascii) More... | |
| void | AffectPointer () |
| decomposed all global arrays in user understandable one More... | |
| Real * | GetXS (int MT) |
| returns the XS array of reaction MT More... | |
| Real | GetTotalFissionXS (Real E) |
| returns total fission XS (prefer GetFissionXS()) More... | |
| Real | GetFissionXS (int binE) |
| returns total fission XS More... | |
| void | XSFound () |
| XS is found. More... | |
| int | GetXSMinMaxEnergyBin (int MT, int min) |
| find the lower(min=0) or upper (min=1) Energy bin for reaction MT More... | |
Private Attributes | |
| ifstream * | OriginalFile |
| Original MCNP ENDF Data File. More... | |
| int | fNXS [16] |
| Array of NXS (size, ...) More... | |
| int | fJXS [32] |
| Array of JXS (address of XS) More... | |
| Real * | fReactionType |
| Array [fNReaction] of ENDF reaction type. More... | |
| int | fNReaction |
| Number of reaction (ONLY neutrons) More... | |
| Real * | fEnergy |
| Energy grid [0..fNEnergy-1]. More... | |
| int | fNEnergy |
| Number of Energy point. More... | |
| Real * | fTotalXS |
| Total cross-section [0..fNEnergy-1]. More... | |
| Real * | fAbsorptionXS |
| Total Absorption cross-section [0..fNEnergy-1]. More... | |
| Real * | fElasticXS |
| Elastic scattering cross-section [0..fNEnergy-1]. More... | |
| Real ** | fXS |
| Cross-section array[fNReaction][...]. More... | |
| Real * | XXS |
| XXS array (all the 2nd block of the Library) More... | |
| int | fNXXS |
| Size of this array. More... | |
| Real * | fLocXS |
| Address number for some reaction cross-sections. More... | |
| bool | fXSFound |
| Wether a XS is found or not. More... | |
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)
| 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.
| 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::ReadXSFile | ( | ifstream * | inputfile, |
| int | start_record, | ||
| int | table_length, | ||
| string | FN | ||
| ) |
Normal Constructor for ASCII Cross-section libraries. Read the XS file.
| 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::ReadXSFile | ( | const ReadXSFile & | XSF | ) |
copy constructor
| ReadXSFile::~ReadXSFile | ( | ) |
destructor
|
private |
decomposed all global arrays in user understandable one
| int ReadXSFile::FindEnergyBin | ( | double | E, |
| int | N, | ||
| float * | Ephi | ||
| ) |
returns the bin for energy E in array Ephi
returns the bin for energy E in array Earray
| int ReadXSFile::FindEnergyBin | ( | Real | E | ) |
returns the bin for energy E
| Real * ReadXSFile::GetEnergy | ( | ) |
returns the Energy array where XS are defined
| Real ReadXSFile::GetEnergy | ( | int | i | ) |
returns the ith energy of the Energy array
|
private |
returns total fission XS
returns linear in (log-log) interpol of XS for reaction MT at energy E
|
inline |
returns the size of the Energy array
returns the prompt mean nu (fission neutron yield)
returns total fission XS (prefer GetFissionXS())
returns the total mean nu at E (fission neutron yield)
returns the total mean nu (fission neutron yield)
| Real ReadXSFile::GetXS | ( | int | MT, |
| int | BinE | ||
| ) |
returns XS for reaction MT at energy GetEnergy(BinE)
|
private |
returns the XS array of reaction MT
| int ReadXSFile::GetXSMaxEnergyBin | ( | int | MT | ) |
returns the upper energy bin for the XS(MT)
| int ReadXSFile::GetXSMinEnergyBin | ( | int | MT | ) |
returns the lower energy bin for the XS(MT)
|
private |
find the lower(min=0) or upper (min=1) Energy bin for reaction MT
|
inline |
whether a XS is found in the file
| ValErr_t ReadXSFile::NuSigmaFisPhi | ( | int | N, |
| vector< ValErr_t > & | Phi, | ||
| float * | Ephi | ||
| ) |
return
|
private |
read the JXS array (Ascii)
|
private |
read the NXS array (Ascii)
|
private |
read the JXS array (Binary)
|
private |
read the NXS array (Binary)
| ValErr_t ReadXSFile::SigmaPhi | ( | int | N, |
| vector< ValErr_t > & | Phi, | ||
| float * | Ephi, | ||
| int | MT | ||
| ) |
return
| double ReadXSFile::SumXS | ( | int | MT | ) |
returns
|
inlineprivate |
XS is found.
|
private |
Total Absorption cross-section [0..fNEnergy-1].
|
private |
Elastic scattering cross-section [0..fNEnergy-1].
|
private |
Energy grid [0..fNEnergy-1].
|
private |
Array of JXS (address of XS)
|
private |
Address number for some reaction cross-sections.
|
private |
Number of Energy point.
|
private |
Number of reaction (ONLY neutrons)
|
private |
Array of NXS (size, ...)
|
private |
Size of this array.
|
private |
Array [fNReaction] of ENDF reaction type.
|
private |
Total cross-section [0..fNEnergy-1].
|
private |
Cross-section array[fNReaction][...].
|
private |
Wether a XS is found or not.
|
private |
Original MCNP ENDF Data File.
|
private |
XXS array (all the 2nd block of the Library)