00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef G4NeutronHPIsoData_h
00030 #define G4NeutronHPIsoData_h 1
00031
00032
00033
00034
00035
00036 #include "globals.hh"
00037 #include "G4ios.hh"
00038 #include <fstream>
00039
00040 #include <stdlib.h>
00041 #include "G4NeutronHPVector.hh"
00042 #include "G4NeutronHPNames.hh"
00043
00044 class G4NeutronHPIsoData
00045 {
00046 public:
00047
00048 G4NeutronHPIsoData()
00049 {
00050 theChannelData = 0;
00051 theFissionData = 0;
00052 theCaptureData = 0;
00053 theElasticData = 0;
00054 theInelasticData = 0;
00055 }
00056
00057 ~G4NeutronHPIsoData(){if(theChannelData!=0) delete theChannelData;}
00058
00059 inline G4double GetXsec(G4double energy)
00060 {
00061 return std::max(0., theChannelData->GetXsec(energy));
00062 }
00063
00064
00065 G4bool Init(G4int A, G4int Z, G4double abun, G4String dirName, G4String aFSType){ G4int M = 0 ; return Init( A, Z, M, abun, dirName, aFSType); };
00066 G4bool Init(G4int A, G4int Z, G4int M, G4double abun, G4String dirName, G4String aFSType);
00067
00068
00069 void Init(G4int A, G4int Z, G4double abun) { G4int M =0;
00070 Init( A, Z, M, abun); };
00071 void Init(G4int A, G4int Z, G4int M, G4double abun);
00072
00073 inline G4NeutronHPVector * MakeElasticData()
00074 {return theElasticData;}
00075 inline G4NeutronHPVector * MakeFissionData()
00076 {return theFissionData;}
00077 inline G4NeutronHPVector * MakeCaptureData()
00078 {return theCaptureData;}
00079 inline G4NeutronHPVector * MakeInelasticData()
00080 {return theInelasticData;}
00081 inline G4NeutronHPVector * MakeChannelData()
00082 {return theChannelData;}
00083
00084 G4String GetName(G4int A, G4int Z, G4String base, G4String rest);
00085
00086 inline void FillChannelData(G4NeutronHPVector * aBuffer)
00087 {
00088 if(theChannelData!=0) throw G4HadronicException(__FILE__, __LINE__, "IsoData has channel full already!!!");
00089 theChannelData = new G4NeutronHPVector;
00090 for(G4int i=0; i<aBuffer->GetVectorLength(); i++)
00091 {
00092 theChannelData->SetPoint(i, aBuffer->GetPoint(i));
00093 }
00094 }
00095
00096 inline void ThinOut(G4double precision)
00097 {
00098 if(theFissionData) theFissionData->ThinOut(precision);
00099 if(theCaptureData) theCaptureData->ThinOut(precision);
00100 if(theElasticData) theElasticData->ThinOut(precision);
00101 if(theInelasticData) theInelasticData->ThinOut(precision);
00102 }
00103
00104 private:
00105
00106 G4NeutronHPVector * theFissionData;
00107 G4NeutronHPVector * theCaptureData;
00108 G4NeutronHPVector * theElasticData;
00109 G4NeutronHPVector * theInelasticData;
00110 G4NeutronHPVector * theChannelData;
00111
00112 G4String theFileName;
00113 G4NeutronHPNames theNames;
00114 };
00115
00116 #endif