// neutron_hp -- source file // J.P. Wellisch, Nov-1996 // A prototype of the low energy neutron transport model. // #include "G4NeutronHPElasticFS.hh" #include "G4ReactionProduct.hh" #include "G4Nucleus.hh" #include "G4Proton.hh" #include "G4Deuteron.hh" #include "G4Triton.hh" #include "G4Alpha.hh" #include "G4ThreeVector.hh" #include "G4LorentzVector.hh" #include "G4ParticleTable.hh" #include "G4NeutronHPDataUsed.hh" void G4NeutronHPElasticFS::Init (G4double A, G4double Z, G4String & dirName, G4String & aFSType) { G4String tString = "/FS/"; G4bool dbool; G4NeutronHPDataUsed aFile = theNames.GetName(A, Z, dirName, tString, dbool); G4String filename = aFile.GetName(); theBaseA = aFile.GetA(); theBaseZ = aFile.GetZ(); if(!dbool) { hasAnyData = false; hasFSData = false; hasXsec = false; return; } G4std::ifstream theData(filename, G4std::ios::in); theData >> repFlag >> targetMass >> frameFlag; if(repFlag==1) { G4int nEnergy; theData >> nEnergy; theCoefficients = new G4NeutronHPLegendreStore(nEnergy); theCoefficients->InitInterpolation(theData); G4double temp, energy; G4int tempdep, nLegendre; G4int i, ii; for (i=0; i> temp >> energy >> tempdep >> nLegendre; energy *=eV; theCoefficients->Init(i, energy, nLegendre); theCoefficients->SetTemperature(i, temp); G4double coeff=0; for(ii=0; ii> coeff; theCoefficients->SetCoeff(i, ii+1, coeff); // @@@HPW@@@ } } } else if (repFlag==2) { G4int nEnergy; theData >> nEnergy; theProbArray = new G4NeutronHPPartial(nEnergy, nEnergy); theProbArray->InitInterpolation(theData); G4double temp, energy; G4int tempdep, nPoints; for(G4int i=0; i> temp >> energy >> tempdep >> nPoints; energy *= eV; theProbArray->InitInterpolation(i, theData); theProbArray->SetT(i, temp); theProbArray->SetX(i, energy); G4double prob, costh; for(G4int ii=0; ii> costh >> prob; theProbArray->SetX(i, ii, costh); theProbArray->SetY(i, ii, prob); } } } else if (repFlag==0) { theData >> frameFlag; } else { G4cout << "unusable number for repFlag: repFlag="<GetDefinition() ); theNeutron.SetMomentum( incidentParticle->GetMomentum() ); theNeutron.SetKineticEnergy( eKinetic ); // G4cout << "G4NeutronHPElasticFS::ApplyYourself++"<SampleElastic(eKinetic); } else if (repFlag==2) { cosTh = theProbArray->Sample(eKinetic); } else if (repFlag==0) { cosTh = 2.*G4UniformRand()-1.; } else { G4cout << "unusable number for repFlag: repFlag="<SetDefinition(G4Proton::Proton()); } else if(targetMass<2 ) { // deuteron theRecoil->SetDefinition(G4Deuteron::Deuteron()); } else if(targetMass<2.999 ) { // 3He theRecoil->SetDefinition(G4He3::He3()); } else if(targetMass<3 ) { // Triton theRecoil->SetDefinition(G4Triton::Triton()); } else { // alpha theRecoil->SetDefinition(G4Alpha::Alpha()); } } else { theRecoil->SetDefinition(G4ParticleTable::GetParticleTable()->FindIon(theBaseZ, theBaseA, 0, theBaseZ)); } theRecoil->SetMomentum(theTarget.GetMomentum()); theResult.SetNumberOfSecondaries(1); theResult.AddSecondary(theRecoil); // G4cout << "G4NeutronHPElasticFS::ApplyYourself 10+"<