MURE
Loading...
Searching...
No Matches
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
 
 ~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 $ \int\sigma^{MT}(E)d\log E $
 
RealGetEnergy ()
 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 ()
 
RealGetTotalNuBar (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)
 
RealGetPromptNuBar (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 $\int \phi \sigma^{MT}(E)dE $
 
ValErr_t NuSigmaFisPhi (int N, vector< ValErr_t > &Phi, float *Ephi)
 return $\int \phi \nu(E)\sigma^{f}(E)dE$
 

Private Member Functions

void ReadNXS ()
 read the NXS array (Binary)
 
void ReadJXS ()
 read the JXS array (Binary)
 
void ReadAsciiNXS ()
 read the NXS array (Ascii)
 
void ReadAsciiJXS ()
 read the JXS array (Ascii)
 
void AffectPointer ()
 decomposed all global arrays in user understandable one
 
RealGetXS (int MT)
 returns the XS array of reaction MT
 
Real GetTotalFissionXS (Real E)
 returns total fission XS (prefer GetFissionXS())
 
Real GetFissionXS (int binE)
 returns total fission XS
 
void XSFound ()
 
int GetXSMinMaxEnergyBin (int MT, int min)
 find the lower(min=0) or upper (min=1) Energy bin for reaction MT
 
int GetStartEndEnergyBin (int MT, int min)
 helper funtion for GetXSMinMaxEnergyBin
 

Private Attributes

ifstream * OriginalFile
 Original MCNP ENDF Data File.
 
int fNXS [16]
 Array of NXS (size, ...)
 
int fJXS [32]
 Array of JXS (address of XS)
 
RealfReactionType
 Array [fNReaction] of ENDF reaction type.
 
int fNReaction
 Number of reaction (ONLY neutrons)
 
RealfEnergy
 Energy grid [0..fNEnergy-1].
 
int fNEnergy
 Number of Energy point.
 
RealfTotalXS
 Total cross-section [0..fNEnergy-1].
 
RealfAbsorptionXS
 Total Absorption cross-section [0..fNEnergy-1].
 
RealfElasticXS
 Elastic scattering cross-section [0..fNEnergy-1].
 
Real ** fXS
 Cross-section array[fNReaction][...].
 
RealXXS
 XXS array (all the 2nd block of the Library)
 
int fNXXS
 Size of this array.
 
RealfLocXS
 Address number for some reaction cross-sections.
 
bool fXSFound
 whether a XS is found or not
 

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:

Author
PTO
Version
0.9

Constructor & Destructor Documentation

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

copy constructor

◆ ~ReadXSFile()

ReadXSFile::~ReadXSFile ( )

destructor

Member Function Documentation

◆ 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

returns total fission XS

◆ 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

returns total fission XS (prefer GetFissionXS())

◆ 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 $\int \phi \nu(E)\sigma^{f}(E)dE$

◆ 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 $\int \phi \sigma^{MT}(E)dE $

◆ SumXS()

double ReadXSFile::SumXS ( int  MT)

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

◆ XSFound()

void ReadXSFile::XSFound ( )
inlineprivate

< XS is found

Member Data Documentation

◆ 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

int ReadXSFile::fJXS[32]
private

Array of JXS (address of XS)

◆ fLocXS

Real* ReadXSFile::fLocXS
private

Address number for some reaction cross-sections.

◆ fNEnergy

int ReadXSFile::fNEnergy
private

Number of Energy point.

◆ fNReaction

int ReadXSFile::fNReaction
private

Number of reaction (ONLY neutrons)

◆ fNXS

int ReadXSFile::fNXS[16]
private

Array of NXS (size, ...)

◆ fNXXS

int ReadXSFile::fNXXS
private

Size of this array.

◆ fReactionType

Real* ReadXSFile::fReactionType
private

Array [fNReaction] of ENDF reaction type.

◆ fTotalXS

Real* ReadXSFile::fTotalXS
private

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

◆ fXS

Real** ReadXSFile::fXS
private

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

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.9.7 - Fri Jan 19 2024