MURE
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
ReadXSFile.hxx
Go to the documentation of this file.
1 #ifndef _ReadXSFile_
2 #define _ReadXSFile_
3 
9 #include<fstream>
10 #include<iostream>
11 #include <string>
12 using namespace std;
13 
14 #ifdef MCNP5
15  typedef double Real;
16 #else
17  typedef float Real;
18 #endif
19 
23 enum ENDFMT
24  {
26  kN2N=16,kN3N,
35  };
36 
38 
50 {
51  public:
62  ReadXSFile(ifstream *inputfile,int start_record,int table_length,int record_length,int nrecord_per_entry,string FN);
71  ReadXSFile(ifstream *inputfile,int start_record,int table_length,string FN);
72  ReadXSFile(const ReadXSFile & XSF);
73  ~ReadXSFile();
74 
75  Real GetInterpolXS(int MT,Real E);
76  Real GetXS(int MT,Real E);
77  Real GetXS(int MT,int BinE);
78  double SumXS(int MT);
79  Real* GetEnergy();
80  Real GetEnergy(int i);
81  int GetNEnergy(){return fNEnergy;}
82  int GetXSMinEnergyBin(int MT);
83  int GetXSMaxEnergyBin(int MT);
84  int FindEnergyBin(double E,int N, float *Ephi );
85  int FindEnergyBin(Real E,int N, Real *Earray);
86  int FindEnergyBin(Real E);
87  bool IsXSFound(){return fXSFound;}
88  Real* GetTotalNuBar(int &NE,Real* &E,bool &Todelete);
89  Real GetTotalInterpolateNuBar(Real E);
90  Real* GetPromptNuBar(int &NE,Real* &E);
91  ValErr_t SigmaPhi(int N, vector<ValErr_t> &Phi,float *Ephi, int MT);
92  ValErr_t NuSigmaFisPhi(int N, vector<ValErr_t> &Phi,float *Ephi);
93 
94  private:
95  void ReadNXS();
96  void ReadJXS();
97  void ReadAsciiNXS();
98  void ReadAsciiJXS();
99  void AffectPointer();
100  Real* GetXS(int MT);
101  Real GetTotalFissionXS(Real E);
102  Real GetFissionXS(int binE);
103  void XSFound(){fXSFound=true;}
104  int GetXSMinMaxEnergyBin(int MT,int min);
105 
106  ifstream *OriginalFile;
107  int fNXS[16];
108  int fJXS[32];
112  int fNEnergy;
116  Real **fXS;
118  int fNXXS;
120  bool fXSFound;
121 
122 };
123 
124 #endif
Definition: ReadXSFile.hxx:29
Definition: ReadXSFile.hxx:34
Real * fLocXS
Address number for some reaction cross-sections.
Definition: ReadXSFile.hxx:119
Definition: ReadXSFile.hxx:34
Definition: ReadXSFile.hxx:34
Definition: ReadXSFile.hxx:28
Definition: ReadXSFile.hxx:31
Definition: ReadXSFile.hxx:33
void XSFound()
XS is found.
Definition: ReadXSFile.hxx:103
Definition: ReadXSFile.hxx:34
Real * fElasticXS
Elastic scattering cross-section [0..fNEnergy-1].
Definition: ReadXSFile.hxx:115
Definition: ReadXSFile.hxx:29
Definition: ReadXSFile.hxx:32
Definition: ReadXSFile.hxx:25
Real * fEnergy
Energy grid [0..fNEnergy-1].
Definition: ReadXSFile.hxx:111
Real * XXS
XXS array (all the 2nd block of the Library)
Definition: ReadXSFile.hxx:117
Definition: ReadXSFile.hxx:30
Definition: ReadXSFile.hxx:28
ifstream * OriginalFile
Original MCNP ENDF Data File.
Definition: ReadXSFile.hxx:106
Real * fAbsorptionXS
Total Absorption cross-section [0..fNEnergy-1].
Definition: ReadXSFile.hxx:114
int GetNEnergy()
returns the size of the Energy array
Definition: ReadXSFile.hxx:81
Definition: ReadXSFile.hxx:28
bool IsXSFound()
whether a XS is found in the file
Definition: ReadXSFile.hxx:87
Definition: ReadXSFile.hxx:27
Definition: ReadXSFile.hxx:26
Definition: ReadXSFile.hxx:29
Allows to read XS file in the MCNP ACE format.
Definition: ReadXSFile.hxx:49
int fNXXS
Size of this array.
Definition: ReadXSFile.hxx:118
Definition: ReadXSFile.hxx:31
Real * fReactionType
Array [fNReaction] of ENDF reaction type.
Definition: ReadXSFile.hxx:109
Definition: ReadXSFile.hxx:26
Real * fTotalXS
Total cross-section [0..fNEnergy-1].
Definition: ReadXSFile.hxx:113
ENDFMT
Definition: ReadXSFile.hxx:23
Definition: ReadXSFile.hxx:31
Real ** fXS
Cross-section array[fNReaction][...].
Definition: ReadXSFile.hxx:116
Definition: ReadXSFile.hxx:31
Definition: ReadXSFile.hxx:25
Definition: ReadXSFile.hxx:34
int fNEnergy
Number of Energy point.
Definition: ReadXSFile.hxx:112
float Real
in MCNP4 and under binary cross-section are stored in float
Definition: ReadXSFile.hxx:17
int fNReaction
Number of reaction (ONLY neutrons)
Definition: ReadXSFile.hxx:110
Definition: ReadXSFile.hxx:29
bool fXSFound
Wether a XS is found or not.
Definition: ReadXSFile.hxx:120

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