#include <G4NeutronHPIsoData.hh>
Public Member Functions | |
G4NeutronHPIsoData () | |
~G4NeutronHPIsoData () | |
G4double | GetXsec (G4double energy) |
G4bool | Init (G4int A, G4int Z, G4double abun, G4String dirName, G4String aFSType) |
G4bool | Init (G4int A, G4int Z, G4int M, G4double abun, G4String dirName, G4String aFSType) |
void | Init (G4int A, G4int Z, G4double abun) |
void | Init (G4int A, G4int Z, G4int M, G4double abun) |
G4NeutronHPVector * | MakeElasticData () |
G4NeutronHPVector * | MakeFissionData () |
G4NeutronHPVector * | MakeCaptureData () |
G4NeutronHPVector * | MakeInelasticData () |
G4NeutronHPVector * | MakeChannelData () |
G4String | GetName (G4int A, G4int Z, G4String base, G4String rest) |
void | FillChannelData (G4NeutronHPVector *aBuffer) |
void | ThinOut (G4double precision) |
Definition at line 44 of file G4NeutronHPIsoData.hh.
G4NeutronHPIsoData::G4NeutronHPIsoData | ( | ) | [inline] |
Definition at line 48 of file G4NeutronHPIsoData.hh.
00049 { 00050 theChannelData = 0; 00051 theFissionData = 0; 00052 theCaptureData = 0; 00053 theElasticData = 0; 00054 theInelasticData = 0; 00055 }
G4NeutronHPIsoData::~G4NeutronHPIsoData | ( | ) | [inline] |
void G4NeutronHPIsoData::FillChannelData | ( | G4NeutronHPVector * | aBuffer | ) | [inline] |
Definition at line 86 of file G4NeutronHPIsoData.hh.
References G4NeutronHPVector::GetPoint(), G4NeutronHPVector::GetVectorLength(), and G4NeutronHPVector::SetPoint().
Referenced by G4NeutronHPChannel::UpdateData().
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 }
Definition at line 127 of file G4NeutronHPIsoData.cc.
References G4NeutronHPNames::GetName().
00128 { 00129 G4bool dbool; 00130 return (theNames.GetName(A, Z, base, rest, dbool)).GetName(); 00131 }
Definition at line 59 of file G4NeutronHPIsoData.hh.
References G4NeutronHPVector::GetXsec().
Referenced by G4NeutronHPChannel::GetWeightedXsec().
00060 { 00061 return std::max(0., theChannelData->GetXsec(energy)); 00062 }
Definition at line 77 of file G4NeutronHPIsoData.cc.
References Init().
00078 { 00079 G4String dirName; 00080 if(!getenv("G4NEUTRONHPDATA")) 00081 throw G4HadronicException(__FILE__, __LINE__, "Please setenv G4NEUTRONHPDATA to point to the neutron cross-section files."); 00082 G4String baseName = getenv("G4NEUTRONHPDATA"); 00083 dirName = baseName+"/Fission"; 00084 //if(Z>89) 00085 if(Z>87) //TK Modifed for ENDF VII.0 00086 { 00087 //Init(A, Z, abun, dirName, "/CrossSection/"); 00088 Init(A, Z, M, abun, dirName, "/CrossSection"); 00089 } 00090 else 00091 { 00092 theChannelData = new G4NeutronHPVector; 00093 } 00094 theFissionData = theChannelData; 00095 theChannelData = 0; // fast fix for double delete; revisit later. @@@@@@@ 00096 dirName = baseName+"/Capture"; 00097 //Init(A, Z, abun, dirName, "/CrossSection/"); 00098 Init(A, Z, M, abun, dirName, "/CrossSection"); 00099 theCaptureData = theChannelData; 00100 theChannelData = 0; 00101 dirName = baseName+"/Elastic"; 00102 //Init(A, Z, abun, dirName, "/CrossSection/"); 00103 Init(A, Z, M, abun, dirName, "/CrossSection"); 00104 theElasticData = theChannelData; 00105 theChannelData = 0; 00106 dirName = baseName+"/Inelastic"; 00107 //Init(A, Z, abun, dirName, "/CrossSection/"); 00108 Init(A, Z, M, abun, dirName, "/CrossSection"); 00109 theInelasticData = theChannelData; 00110 theChannelData = 0; 00111 00112 // if(theInelasticData!=0) G4cout << "Inelastic Data Statistics: "<<theInelasticData->GetVectorLength()<<G4endl; 00113 // if(theElasticData!=0) G4cout << "Elastic Data Statistics: "<<theElasticData->GetVectorLength()<<G4endl; 00114 // if(theCaptureData!=0) G4cout << "Capture Data Statistics: "<<theCaptureData->GetVectorLength()<<G4endl; 00115 // if(theFissionData!=0) G4cout << "Fission Data Statistics: "<<theFissionData->GetVectorLength()<<G4endl; 00116 // G4cout << "Inelastic data"<<G4endl; 00117 // if(theInelasticData!=0) theInelasticData->Dump(); 00118 // G4cout << "Elastic data"<<G4endl; 00119 // if(theElasticData!=0) theElasticData->Dump(); 00120 // G4cout << "Capture data"<<G4endl; 00121 // if(theCaptureData!=0) theCaptureData->Dump(); 00122 // G4cout << "Fission data"<<G4endl; 00123 // if(theFissionData!=0) theFissionData->Dump(); 00124 00125 }
G4bool G4NeutronHPIsoData::Init | ( | G4int | A, | |
G4int | Z, | |||
G4int | M, | |||
G4double | abun, | |||
G4String | dirName, | |||
G4String | aFSType | |||
) |
Definition at line 37 of file G4NeutronHPIsoData.cc.
References G4cout, G4endl, G4NeutronHPDataUsed::GetA(), G4NeutronHPDataUsed::GetName(), G4NeutronHPNames::GetName(), G4NeutronHPDataUsed::GetZ(), and G4NeutronHPVector::Init().
00038 { 00039 theChannelData = 0; 00040 G4double abundance = abun/100.; 00041 G4String filename; 00042 G4bool result = true; 00043 //G4NeutronHPDataUsed aFile = theNames.GetName(A, Z, dirName, aFSType, result); 00044 G4NeutronHPDataUsed aFile = theNames.GetName(A, Z, M, dirName, aFSType, result); 00045 filename = aFile.GetName(); 00046 // if(filename=="") return false; 00047 std::ifstream theChannel(filename); 00048 00049 if(Z==1 && (aFile.GetZ()!=Z || std::abs(aFile.GetA()-A)>0.0001) ) 00050 { 00051 if(getenv("NeutronHPNamesLogging")) G4cout << "Skipped = "<< filename <<" "<<A<<" "<<Z<<G4endl; 00052 //080901 TKDB No more necessary below protection, cross sections set to 0 in G4NeutronHPNames 00053 //And below two lines causes trouble with G4PhysicsVector 00054 //theChannel.close(); 00055 //return false; 00056 } 00057 if(!theChannel) {theChannel.close(); return false;} 00058 // accommodating deficiencie of some compilers 00059 if(theChannel.eof()) {theChannel.close(); return false;} 00060 if(!theChannel) {theChannel.close(); return false;} 00061 G4int dummy; 00062 theChannel >> dummy >> dummy; 00063 theChannelData = new G4NeutronHPVector; 00064 G4int nData; 00065 theChannel >> nData; 00066 theChannelData->Init(theChannel, nData, eV, abundance*barn); 00067 // G4cout << "Channel Data Statistics: "<<theChannelData->GetVectorLength()<<G4endl; 00068 // G4cout << "Channel data"<<G4endl; 00069 // G4int hpw; 00070 // G4cin >> hpw; 00071 // theChannelData->Dump(); 00072 theChannel.close(); 00073 return result; 00074 }
G4bool G4NeutronHPIsoData::Init | ( | G4int | A, | |
G4int | Z, | |||
G4double | abun, | |||
G4String | dirName, | |||
G4String | aFSType | |||
) | [inline] |
Definition at line 65 of file G4NeutronHPIsoData.hh.
Referenced by Init(), G4NeutronHPElementData::UpdateData(), and G4NeutronHPChannel::UpdateData().
G4NeutronHPVector* G4NeutronHPIsoData::MakeCaptureData | ( | ) | [inline] |
Definition at line 77 of file G4NeutronHPIsoData.hh.
Referenced by G4NeutronHPElementData::UpdateData().
G4NeutronHPVector* G4NeutronHPIsoData::MakeChannelData | ( | ) | [inline] |
Definition at line 81 of file G4NeutronHPIsoData.hh.
Referenced by G4NeutronHPChannel::UpdateData().
G4NeutronHPVector* G4NeutronHPIsoData::MakeElasticData | ( | ) | [inline] |
Definition at line 73 of file G4NeutronHPIsoData.hh.
Referenced by G4NeutronHPElementData::UpdateData().
G4NeutronHPVector* G4NeutronHPIsoData::MakeFissionData | ( | ) | [inline] |
Definition at line 75 of file G4NeutronHPIsoData.hh.
Referenced by G4NeutronHPElementData::UpdateData().
G4NeutronHPVector* G4NeutronHPIsoData::MakeInelasticData | ( | ) | [inline] |
Definition at line 79 of file G4NeutronHPIsoData.hh.
Referenced by G4NeutronHPElementData::UpdateData().
void G4NeutronHPIsoData::ThinOut | ( | G4double | precision | ) | [inline] |
Definition at line 96 of file G4NeutronHPIsoData.hh.
References G4NeutronHPVector::ThinOut().
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 }