MURE
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ReadXSFile Class Reference

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 $ \int\sigma^{MT}(E)d\log E $ More...
 
RealGetEnergy ()
 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...
 
RealGetTotalNuBar (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...
 
RealGetPromptNuBar (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 $\int \phi \sigma^{MT}(E)dE $ More...
 
ValErr_t NuSigmaFisPhi (int N, vector< ValErr_t > &Phi, float *Ephi)
 return $\int \phi \nu(E)\sigma^{f}(E)dE$ 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...
 
RealGetXS (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...
 
RealfReactionType
 Array [fNReaction] of ENDF reaction type. More...
 
int fNReaction
 Number of reaction (ONLY neutrons) More...
 
RealfEnergy
 Energy grid [0..fNEnergy-1]. More...
 
int fNEnergy
 Number of Energy point. More...
 
RealfTotalXS
 Total cross-section [0..fNEnergy-1]. More...
 
RealfAbsorptionXS
 Total Absorption cross-section [0..fNEnergy-1]. More...
 
RealfElasticXS
 Elastic scattering cross-section [0..fNEnergy-1]. More...
 
Real ** fXS
 Cross-section array[fNReaction][...]. More...
 
RealXXS
 XXS array (all the 2nd block of the Library) More...
 
int fNXXS
 Size of this array. More...
 
RealfLocXS
 Address number for some reaction cross-sections. More...
 
bool fXSFound
 Wether a XS is found or not. More...
 

Detailed Description

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)
Author
PTO
Version
0.9

Constructor & Destructor Documentation

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::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::ReadXSFile ( const ReadXSFile XSF)

copy constructor

ReadXSFile::~ReadXSFile ( )

destructor

Member Function Documentation

void ReadXSFile::AffectPointer ( )
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

int ReadXSFile::FindEnergyBin ( Real  E,
int  N,
Real Earray 
)

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

Real ReadXSFile::GetFissionXS ( int  binE)
private

returns total fission XS

Real ReadXSFile::GetInterpolXS ( int  MT,
Real  E 
)

returns linear in (log-log) interpol of XS for reaction MT at energy E

int ReadXSFile::GetNEnergy ( )
inline

returns the size of the Energy array

Real * ReadXSFile::GetPromptNuBar ( int &  NE,
Real *&  E 
)

returns the prompt mean nu (fission neutron yield)

Real ReadXSFile::GetTotalFissionXS ( Real  E)
private

returns total fission XS (prefer GetFissionXS())

Real ReadXSFile::GetTotalInterpolateNuBar ( Real  E)

returns the total mean nu at E (fission neutron yield)

Real * ReadXSFile::GetTotalNuBar ( int &  NE,
Real *&  E,
bool &  Todelete 
)

returns the total mean nu (fission neutron yield)

Real ReadXSFile::GetXS ( int  MT,
Real  E 
)

returns XS for reaction MT at energy E

Real ReadXSFile::GetXS ( int  MT,
int  BinE 
)

returns XS for reaction MT at energy GetEnergy(BinE)

Real * ReadXSFile::GetXS ( int  MT)
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)

int ReadXSFile::GetXSMinMaxEnergyBin ( int  MT,
int  min 
)
private

find the lower(min=0) or upper (min=1) Energy bin for reaction MT

bool ReadXSFile::IsXSFound ( )
inline

whether a XS is found in the file

ValErr_t ReadXSFile::NuSigmaFisPhi ( int  N,
vector< ValErr_t > &  Phi,
float *  Ephi 
)

return $\int \phi \nu(E)\sigma^{f}(E)dE$

void ReadXSFile::ReadAsciiJXS ( )
private

read the JXS array (Ascii)

void ReadXSFile::ReadAsciiNXS ( )
private

read the NXS array (Ascii)

void ReadXSFile::ReadJXS ( )
private

read the JXS array (Binary)

void ReadXSFile::ReadNXS ( )
private

read the NXS array (Binary)

ValErr_t ReadXSFile::SigmaPhi ( int  N,
vector< ValErr_t > &  Phi,
float *  Ephi,
int  MT 
)

return $\int \phi \sigma^{MT}(E)dE $

double ReadXSFile::SumXS ( int  MT)

returns $ \int\sigma^{MT}(E)d\log E $

void ReadXSFile::XSFound ( )
inlineprivate

XS is found.

Member Data Documentation

Real* ReadXSFile::fAbsorptionXS
private

Total Absorption cross-section [0..fNEnergy-1].

Real* ReadXSFile::fElasticXS
private

Elastic scattering cross-section [0..fNEnergy-1].

Real* ReadXSFile::fEnergy
private

Energy grid [0..fNEnergy-1].

int ReadXSFile::fJXS[32]
private

Array of JXS (address of XS)

Real* ReadXSFile::fLocXS
private

Address number for some reaction cross-sections.

int ReadXSFile::fNEnergy
private

Number of Energy point.

int ReadXSFile::fNReaction
private

Number of reaction (ONLY neutrons)

int ReadXSFile::fNXS[16]
private

Array of NXS (size, ...)

int ReadXSFile::fNXXS
private

Size of this array.

Real* ReadXSFile::fReactionType
private

Array [fNReaction] of ENDF reaction type.

Real* ReadXSFile::fTotalXS
private

Total cross-section [0..fNEnergy-1].

Real** ReadXSFile::fXS
private

Cross-section array[fNReaction][...].

bool ReadXSFile::fXSFound
private

Wether a XS is found or not.

ifstream* ReadXSFile::OriginalFile
private

Original MCNP ENDF Data File.

Real* ReadXSFile::XXS
private

XXS array (all the 2nd block of the Library)


The documentation for this class was generated from the following files:

MURE Project, documentation generated by Doxygen 1.8.5 - Mon Nov 17 2014