// neutron_hp -- source file // J.P. Wellisch, Nov-1996 // A prototype of the low energy neutron transport model. // #include "G4NeutronHPElementData.hh" G4NeutronHPElementData::G4NeutronHPElementData() { theFissionData = new G4NeutronHPVector; theCaptureData = new G4NeutronHPVector; theElasticData = new G4NeutronHPVector; theInelasticData = new G4NeutronHPVector; theIsotopeWiseData = NULL; } G4NeutronHPElementData::~G4NeutronHPElementData() { if(theFissionData!=NULL) delete theFissionData; if(theCaptureData!=NULL) delete theCaptureData; if(theElasticData!=NULL) delete theElasticData; if(theInelasticData!=NULL) delete theInelasticData; if(theIsotopeWiseData!=NULL) delete [] theIsotopeWiseData; } void G4NeutronHPElementData::Init(G4Element * theElement) { G4int count = theElement->GetNumberOfIsotopes(); if(count == 0) count += theStableOnes.GetNumberOfIsotopes(theElement->GetZ()); theIsotopeWiseData = new G4NeutronHPIsoData[count]; // filename = ein data-set je isotope. count = 0; G4int nIso = theElement->GetNumberOfIsotopes(); G4int Z = theElement->GetZ(); G4int i1; if(nIso!=0) { for (i1=0; i1GetIsotope(i1)->GetN(); G4double frac = theElement->GetRelativeAbundanceVector()[i1]/perCent; UpdateData(A, Z, count++, frac); } }else{ // G4cout <<" Init: theStableOnes case: Z="<GetZ())<GetZ()); i1++) { // G4cout <<" Init: theStableOnes in the loop"<GetVectorLength()<GetVectorLength()<GetVectorLength()<GetVectorLength()<GetVectorLength()<GetVectorLength()<GetVectorLength()<GetVectorLength()<GetEnergy(s)<<" "<GetEnergy(0)<GetEnergy(s)GetEnergy(0)&&sGetVectorLength() ) { theMerge->SetData(m++, theStore->GetEnergy(s), theStore->GetXsec(s)); s++; } G4NeutronHPVector *active = theStore; G4NeutronHPVector * passive = theNew; G4NeutronHPVector * tmp; G4int a = s, p = n, t; // G4cout << "Harmonise 2: "<GetVectorLength()<<" "<GetVectorLength()<GetVectorLength()&&pGetVectorLength()) { if(active->GetEnergy(a) <= passive->GetEnergy(p)) { theMerge->SetData(m, active->GetEnergy(a), active->GetXsec(a)); G4double x = theMerge->GetEnergy(m); G4double y = passive->GetXsec(x); theMerge->SetData(m, x, theMerge->GetXsec(m)+y); m++; a++; } else { // G4cout << "swapping in Harmonise"<GetVectorLength()<<" "<GetVectorLength()) { theMerge->SetData(m++, active->GetEnergy(a), active->GetXsec(a)); a++; } // G4cout << "Harmonise 4: "<< p <<" "<GetVectorLength()<<" "<GetVectorLength()) { theMerge->SetData(m++, passive->GetEnergy(p), passive->GetXsec(p)); p++; } // G4cout <<"Harmonise 5: "<< theMerge->GetVectorLength() << " " << m << endl; delete theStore; theStore = theMerge; // G4cout <<"Harmonise 6: "<< theStore->GetVectorLength() << " " << m << endl; } G4NeutronHPVector * G4NeutronHPElementData::MakePhysicsVector(G4Element * theElement, G4ParticleDefinition * theP, G4NeutronHPFissionData* theSet) { if(theP != G4Neutron::Neutron()) G4Exception(); Init ( theElement ); return GetData(theSet); } G4NeutronHPVector * G4NeutronHPElementData::MakePhysicsVector(G4Element * theElement, G4ParticleDefinition * theP, G4NeutronHPCaptureData * theSet) { if(theP != G4Neutron::Neutron()) G4Exception(); Init ( theElement ); return GetData(theSet); } G4NeutronHPVector * G4NeutronHPElementData::MakePhysicsVector(G4Element * theElement, G4ParticleDefinition * theP, G4NeutronHPElasticData * theSet) { if(theP != G4Neutron::Neutron()) G4Exception(); Init ( theElement ); return GetData(theSet); } G4NeutronHPVector * G4NeutronHPElementData::MakePhysicsVector(G4Element * theElement, G4ParticleDefinition * theP, G4NeutronHPInelasticData * theSet) { if(theP != G4Neutron::Neutron()) G4Exception(); Init ( theElement ); return GetData(theSet); }