00001 #ifndef REACTORNEUTRONS_HH
00002 #define REACTORNEUTRONS_HH
00003 #include <math.h>
00004 #include <iostream.h>
00005 #include <fstream.h>
00006 #include <string.h>
00007 #include "ReactorNeutrons.hh"
00008 #include "ReactorConstants.hh"
00009
00010 class ReactorNeutrons{
00011
00012 public:
00013
00014
00015
00016
00017 ReactorNeutrons();
00018 ReactorNeutrons(int option);
00019 ~ReactorNeutrons();
00020 ReactorNeutrons(const ReactorNeutrons& N);
00021 ReactorNeutrons& operator=(const ReactorNeutrons& rhs);
00022
00023 double GetTotalXC(int Z,int A,double KE){return GetXC(Z,A,KE,'T');}
00024 double GetElastXC(int Z,int A,double KE){return GetXC(Z,A,KE,'E');}
00025 double GetGammaXC(int Z,int A,double KE){return GetXC(Z,A,KE,'G');}
00026 int GetTotalSize(int Z,int A);
00027 int GetElastSize(int Z,int A);
00028 int GetGammaSize(int Z,int A);
00029 double* GetTotalKE(int Z,int A);
00030 double* GetTotalXC(int Z,int A);
00031 double* GetElastKE(int Z,int A);
00032 double* GetElastXC(int Z,int A);
00033 double* GetGammaKE(int Z,int A);
00034 double* GetGammaXC(int Z,int A);
00035
00036 void AddHdata(char* file1="data/001001total.endfbvi300k",
00037 char* file2="data/001001elast.endfbvi300k",
00038 char* file3="data/001001gamma.endfbvi300k")
00039 {AddData(file1,file2,file3);}
00040 void AddCdata(char* file1="data/006012total.endfbvi300k",
00041 char* file2="data/006012elast.endfbvi300k",
00042 char* file3="data/006012gamma.endfbvi300k")
00043 {AddData(file1,file2,file3);}
00044 void AddGd155data(char* file1="data/064155total.endfbvi300k",
00045 char* file2="data/064155elast.endfbvi300k",
00046 char* file3="data/064155gamma.endfbvi300k")
00047 {AddData(file1,file2,file3);}
00048 void AddGd157data(char* file1="data/064157total.endfbvi300k",
00049 char* file2="data/064157elast.endfbvi300k",
00050 char* file3="data/064157gamma.endfbvi300k")
00051 {AddData(file1,file2,file3);}
00052
00053
00054 private:
00055
00056 static const int DataSize = 12;
00057 void AddData(char* file1,char* file2,char* file3);
00058
00059 double GetXC(int Z,int A,double KE,char option);
00060 double* GetLastKE(int Z,int A,char option);
00061 double* GetLastXC(int Z,int A,char option);
00062 void SetLastData(int Z,int A,char option,double* lastKE,double* lastXC);
00063
00064 class XCdata{
00065
00066 public:
00067 XCdata();
00068 XCdata(char* filename);
00069 ~XCdata();
00070 XCdata(const XCdata& X);
00071 XCdata& operator=(const XCdata& rhs);
00072
00073 int GetA() {return A;}
00074 int GetZ() {return Z;}
00075 int GetSize() {return Size;}
00076 double* GetKE() {return KE;}
00077 double* GetXC() {return XC;}
00078 double* GetLastKE() {return LastKE;}
00079 double* GetLastXC() {return LastXC;}
00080 void SetLastKE(double* lastKE){LastKE+=(lastKE-LastKE);}
00081 void SetLastXC(double* lastXC) {LastXC+=(lastXC-LastXC);}
00082 bool Elastic() {return strcmp(Process,"elast")==0;}
00083 bool Total() {return strcmp(Process,"total")==0;}
00084 bool Gamma() {return strcmp(Process,"gamma")==0;}
00085
00086 private:
00087 int A;
00088 int Z;
00089 int Size;
00090 double* KE;
00091 double* XC;
00092 double* LastKE;
00093 double* LastXC;
00094 char Process[6];
00095 char FileName[80];
00096
00097 void GetData(const char* file,int& size,double* e,double* xc);
00098 static const int MaxSize = 10000;
00099 };
00100
00101 XCdata* Data;
00102 XCdata* DataPtr;
00103 };
00104 #endif