#include <G4NeutronHPElementData.hh>
Inheritance diagram for G4NeutronHPElementData:
Definition at line 53 of file G4NeutronHPElementData.hh.
G4NeutronHPElementData::G4NeutronHPElementData | ( | ) |
Definition at line 35 of file G4NeutronHPElementData.cc.
00036 { 00037 precision = 0.02; 00038 theFissionData = new G4NeutronHPVector; 00039 theCaptureData = new G4NeutronHPVector; 00040 theElasticData = new G4NeutronHPVector; 00041 theInelasticData = new G4NeutronHPVector; 00042 theIsotopeWiseData = 0; 00043 }
G4NeutronHPElementData::~G4NeutronHPElementData | ( | ) |
Definition at line 45 of file G4NeutronHPElementData.cc.
00046 { 00047 delete theFissionData; 00048 delete theCaptureData; 00049 delete theElasticData; 00050 delete theInelasticData; 00051 delete [] theIsotopeWiseData; 00052 }
G4NeutronHPVector* G4NeutronHPElementData::GetData | ( | G4NeutronHPInelasticData * | ) | [inline] |
G4NeutronHPVector* G4NeutronHPElementData::GetData | ( | G4NeutronHPElasticData * | ) | [inline] |
G4NeutronHPVector* G4NeutronHPElementData::GetData | ( | G4NeutronHPCaptureData * | ) | [inline] |
G4NeutronHPVector* G4NeutronHPElementData::GetData | ( | G4NeutronHPFissionData * | ) | [inline] |
void G4NeutronHPElementData::Harmonise | ( | G4NeutronHPVector *& | theStore, | |
G4NeutronHPVector * | theNew | |||
) |
Definition at line 141 of file G4NeutronHPElementData.cc.
References G4NeutronHPVector::GetEnergy(), G4NeutronHPVector::GetVectorLength(), G4NeutronHPVector::GetXsec(), CLHEP::detail::n, and G4NeutronHPVector::SetData().
Referenced by UpdateData().
00142 { 00143 if(theNew == 0) { return; } 00144 G4int s_tmp = 0, n=0, m_tmp=0; 00145 G4NeutronHPVector * theMerge = new G4NeutronHPVector(theStore->GetVectorLength()); 00146 // G4cout << "Harmonise 1: "<<theStore->GetEnergy(s)<<" "<<theNew->GetEnergy(0)<<G4endl; 00147 while ( theStore->GetEnergy(s_tmp)<theNew->GetEnergy(0)&&s_tmp<theStore->GetVectorLength() ) 00148 { 00149 theMerge->SetData(m_tmp++, theStore->GetEnergy(s_tmp), theStore->GetXsec(s_tmp)); 00150 s_tmp++; 00151 } 00152 G4NeutronHPVector *active = theStore; 00153 G4NeutronHPVector * passive = theNew; 00154 G4NeutronHPVector * tmp; 00155 G4int a = s_tmp, p = n, t; 00156 // G4cout << "Harmonise 2: "<<active->GetVectorLength()<<" "<<passive->GetVectorLength()<<G4endl; 00157 while (a<active->GetVectorLength()&&p<passive->GetVectorLength()) 00158 { 00159 if(active->GetEnergy(a) <= passive->GetEnergy(p)) 00160 { 00161 theMerge->SetData(m_tmp, active->GetEnergy(a), active->GetXsec(a)); 00162 G4double x = theMerge->GetEnergy(m_tmp); 00163 G4double y = std::max(0., passive->GetXsec(x)); 00164 theMerge->SetData(m_tmp, x, theMerge->GetXsec(m_tmp)+y); 00165 m_tmp++; 00166 a++; 00167 } else { 00168 // G4cout << "swapping in Harmonise"<<G4endl; 00169 tmp = active; t=a; 00170 active = passive; a=p; 00171 passive = tmp; p=t; 00172 } 00173 } 00174 // G4cout << "Harmonise 3: "<< a <<" "<<active->GetVectorLength()<<" "<<m<<G4endl; 00175 while (a!=active->GetVectorLength()) 00176 { 00177 theMerge->SetData(m_tmp++, active->GetEnergy(a), active->GetXsec(a)); 00178 a++; 00179 } 00180 // G4cout << "Harmonise 4: "<< p <<" "<<passive->GetVectorLength()<<" "<<m<<G4endl; 00181 while (p!=passive->GetVectorLength()) 00182 { 00183 // Modified by T. KOI 00184 //theMerge->SetData(m++, passive->GetEnergy(p), passive->GetXsec(p)); 00185 G4double x = passive->GetEnergy(p); 00186 G4double y = std::max(0., active->GetXsec(x)); 00187 theMerge->SetData(m_tmp++, x, passive->GetXsec(p)+y); 00188 p++; 00189 } 00190 // G4cout <<"Harmonise 5: "<< theMerge->GetVectorLength() << " " << m << G4endl; 00191 delete theStore; 00192 theStore = theMerge; 00193 // G4cout <<"Harmonise 6: "<< theStore->GetVectorLength() << " " << m << G4endl; 00194 }
void G4NeutronHPElementData::Init | ( | G4Element * | theElement | ) |
Definition at line 54 of file G4NeutronHPElementData.cc.
References G4StableIsotopes::GetAbundance(), G4StableIsotopes::GetFirstIsotope(), G4Element::GetIsotope(), G4StableIsotopes::GetIsotopeNucleonCount(), G4Isotope::Getm(), G4Isotope::GetN(), G4StableIsotopes::GetNumberOfIsotopes(), G4Element::GetNumberOfIsotopes(), G4Element::GetRelativeAbundanceVector(), G4Element::GetZ(), G4NeutronHPVector::ThinOut(), and UpdateData().
Referenced by MakePhysicsVector().
00055 { 00056 G4int count = theElement->GetNumberOfIsotopes(); 00057 if(count == 0) count += 00058 theStableOnes.GetNumberOfIsotopes(static_cast<G4int>(theElement->GetZ())); 00059 theIsotopeWiseData = new G4NeutronHPIsoData[count]; 00060 // filename = ein data-set je isotope. 00061 count = 0; 00062 G4int nIso = theElement->GetNumberOfIsotopes(); 00063 G4int Z = static_cast<G4int> (theElement->GetZ()); 00064 //G4int i1; 00065 if(nIso!=0) 00066 { 00067 for (G4int i1=0; i1<nIso; i1++) 00068 { 00069 // G4cout <<" Init: normal case"<<G4endl; 00070 G4int A = theElement->GetIsotope(i1)->GetN(); 00071 G4int M = theElement->GetIsotope(i1)->Getm(); 00072 G4double frac = theElement->GetRelativeAbundanceVector()[i1]/perCent; 00073 //UpdateData(A, Z, count++, frac); 00074 UpdateData(A, Z, M, count++, frac); 00075 } 00076 }else{ 00077 // G4cout <<" Init: theStableOnes case: Z="<<Z<<G4endl; 00078 G4int first = theStableOnes.GetFirstIsotope(Z); 00079 // G4cout <<"first="<<first<<" "<<theStableOnes.GetNumberOfIsotopes(theElement->GetZ())<<G4endl; 00080 for(G4int i1=0; 00081 i1<theStableOnes.GetNumberOfIsotopes(static_cast<G4int>(theElement->GetZ()) ); 00082 i1++) 00083 { 00084 // G4cout <<" Init: theStableOnes in the loop"<<G4endl; 00085 G4int A = theStableOnes.GetIsotopeNucleonCount(first+i1); 00086 G4double frac = theStableOnes.GetAbundance(first+i1); 00087 // G4cout <<" Init: theStableOnes in the loop: "<<A<<G4endl; 00088 UpdateData(A, Z, count++, frac); 00089 } 00090 } 00091 theElasticData->ThinOut(precision); 00092 theInelasticData->ThinOut(precision); 00093 theCaptureData->ThinOut(precision); 00094 theFissionData->ThinOut(precision); 00095 }
G4NeutronHPVector * G4NeutronHPElementData::MakePhysicsVector | ( | G4Element * | theElement, | |
G4ParticleDefinition * | theP, | |||
G4NeutronHPInelasticData * | theSet | |||
) |
Definition at line 220 of file G4NeutronHPElementData.cc.
References GetData(), Init(), and G4Neutron::Neutron().
00223 { 00224 if(theP != G4Neutron::Neutron()) throw G4HadronicException(__FILE__, __LINE__, "not a neutron"); 00225 Init ( theElement ); 00226 return GetData(theSet); 00227 }
G4NeutronHPVector * G4NeutronHPElementData::MakePhysicsVector | ( | G4Element * | theElement, | |
G4ParticleDefinition * | theP, | |||
G4NeutronHPElasticData * | theSet | |||
) |
Definition at line 212 of file G4NeutronHPElementData.cc.
References GetData(), Init(), and G4Neutron::Neutron().
00215 { 00216 if(theP != G4Neutron::Neutron()) throw G4HadronicException(__FILE__, __LINE__, "not a neutron"); 00217 Init ( theElement ); 00218 return GetData(theSet); 00219 }
G4NeutronHPVector * G4NeutronHPElementData::MakePhysicsVector | ( | G4Element * | theElement, | |
G4ParticleDefinition * | theP, | |||
G4NeutronHPCaptureData * | theSet | |||
) |
Definition at line 204 of file G4NeutronHPElementData.cc.
References GetData(), Init(), and G4Neutron::Neutron().
00207 { 00208 if(theP != G4Neutron::Neutron()) throw G4HadronicException(__FILE__, __LINE__, "not a neutron"); 00209 Init ( theElement ); 00210 return GetData(theSet); 00211 }
G4NeutronHPVector * G4NeutronHPElementData::MakePhysicsVector | ( | G4Element * | theElement, | |
G4ParticleDefinition * | theP, | |||
G4NeutronHPFissionData * | theSet | |||
) |
Definition at line 196 of file G4NeutronHPElementData.cc.
References GetData(), Init(), and G4Neutron::Neutron().
00199 { 00200 if(theP != G4Neutron::Neutron()) throw G4HadronicException(__FILE__, __LINE__, "not a neutron"); 00201 Init ( theElement ); 00202 return GetData(theSet); 00203 }
void G4NeutronHPElementData::UpdateData | ( | G4int | A, | |
G4int | Z, | |||
G4int | M, | |||
G4int | index, | |||
G4double | abundance | |||
) |
Definition at line 98 of file G4NeutronHPElementData.cc.
References Harmonise(), G4NeutronHPIsoData::Init(), G4NeutronHPIsoData::MakeCaptureData(), G4NeutronHPIsoData::MakeElasticData(), G4NeutronHPIsoData::MakeFissionData(), and G4NeutronHPIsoData::MakeInelasticData().
00099 { 00100 //Reads in the Data, using G4NeutronHPIsoData[], and its Init 00101 // G4cout << "entered: ElementWiseData::UpdateData"<<G4endl; 00102 //theIsotopeWiseData[index].Init(A, Z, abundance); 00103 theIsotopeWiseData[index].Init(A, Z, M, abundance); 00104 // G4cout << "ElementWiseData::UpdateData Init finished"<<G4endl; 00105 00106 theBuffer = theIsotopeWiseData[index].MakeElasticData(); 00107 // G4cout << "ElementWiseData::UpdateData MakeElasticData finished: " 00108 // <<theBuffer->GetVectorLength()<<G4endl; 00109 Harmonise(theElasticData, theBuffer); 00110 // G4cout << "ElementWiseData::UpdateData Harmonise finished: " 00111 // <<theElasticData->GetVectorLength()<<G4endl; 00112 delete theBuffer; 00113 00114 theBuffer = theIsotopeWiseData[index].MakeInelasticData(); 00115 // G4cout << "ElementWiseData::UpdateData MakeInelasticData finished: " 00116 // <<theBuffer->GetVectorLength()<<G4endl; 00117 Harmonise(theInelasticData, theBuffer); 00118 // G4cout << "ElementWiseData::UpdateData Harmonise finished: " 00119 // <<theInelasticData->GetVectorLength()<<G4endl; 00120 delete theBuffer; 00121 00122 theBuffer = theIsotopeWiseData[index].MakeCaptureData(); 00123 // G4cout << "ElementWiseData::UpdateData MakeCaptureData finished: " 00124 // <<theBuffer->GetVectorLength()<<G4endl; 00125 Harmonise(theCaptureData, theBuffer); 00126 // G4cout << "ElementWiseData::UpdateData Harmonise finished: " 00127 // <<theCaptureData->GetVectorLength()<<G4endl; 00128 delete theBuffer; 00129 00130 theBuffer = theIsotopeWiseData[index].MakeFissionData(); 00131 // G4cout << "ElementWiseData::UpdateData MakeFissionData finished: " 00132 // <<theBuffer->GetVectorLength()<<G4endl; 00133 Harmonise(theFissionData, theBuffer); 00134 // G4cout << "ElementWiseData::UpdateData Harmonise finished: " 00135 // <<theFissionData->GetVectorLength()<<G4endl; 00136 delete theBuffer; 00137 00138 // G4cout << "ElementWiseData::UpdateData finished"<endl; 00139 }
void G4NeutronHPElementData::UpdateData | ( | G4int | A, | |
G4int | Z, | |||
G4int | index, | |||
G4double | abundance | |||
) | [inline] |
Definition at line 64 of file G4NeutronHPElementData.hh.
Referenced by Init().
00064 { G4int M=0; UpdateData( A, Z, M, index, abundance); };