// // ******************************************************************** // * License and Disclaimer * // * * // * The Geant4 software is copyright of the Copyright Holders of * // * the Geant4 Collaboration. It is provided under the terms and * // * conditions of the Geant4 Software License, included in the file * // * LICENSE and available at http://cern.ch/geant4/license . These * // * include a list of copyright holders. * // * * // * Neither the authors of this software system, nor their employing * // * institutes,nor the agencies providing financial support for this * // * work make any representation or warranty, express or implied, * // * regarding this software system or assume any liability for its * // * use. Please see the license in the file LICENSE and URL above * // * for the full disclaimer and the limitation of liability. * // * * // * This code implementation is the result of the scientific and * // * technical work of the GEANT4 collaboration. * // * By using, copying, modifying or distributing the software (or * // * any work based on the software) you agree to acknowledge its * // * use in resulting scientific publications, and indicate your * // * acceptance of all terms of the Geant4 Software license. * // ******************************************************************** // // neutron_hp -- source file // J.P. Wellisch, Nov-1996 // A prototype of the low energy neutron transport model. // // 12-Apr-06 fix in delayed neutron and photon emission without FS data by T. Koi // #include "G4NeutronHPFissionFS.hh" #include "G4Nucleus.hh" #include "G4DynamicParticleVector.hh" #include "G4NeutronHPFissionERelease.hh" void G4NeutronHPFissionFS::Init (G4double A, G4double Z, G4String & dirName, G4String & aFSType) { theFS.Init(A, Z, dirName, aFSType); theFC.Init(A, Z, dirName, aFSType); theSC.Init(A, Z, dirName, aFSType); theTC.Init(A, Z, dirName, aFSType); theLC.Init(A, Z, dirName, aFSType); } G4HadFinalState * G4NeutronHPFissionFS::ApplyYourself(const G4HadProjectile & theTrack) { // prepare neutron theResult.Clear(); G4double eKinetic = theTrack.GetKineticEnergy(); const G4HadProjectile *incidentParticle = &theTrack; G4ReactionProduct theNeutron( const_cast(incidentParticle->GetDefinition()) ); theNeutron.SetMomentum( incidentParticle->Get4Momentum().vect() ); theNeutron.SetKineticEnergy( eKinetic ); // prepare target G4Nucleus aNucleus; G4ReactionProduct theTarget; G4double targetMass = theFS.GetMass(); G4ThreeVector neuVelo = (1./incidentParticle->GetDefinition()->GetPDGMass())*theNeutron.GetMomentum(); theTarget = aNucleus.GetBiasedThermalNucleus( targetMass, neuVelo, theTrack.GetMaterial()->GetTemperature()); // set neutron and target in the FS classes theFS.SetNeutron(theNeutron); theFS.SetTarget(theTarget); theFC.SetNeutron(theNeutron); theFC.SetTarget(theTarget); theSC.SetNeutron(theNeutron); theSC.SetTarget(theTarget); theTC.SetNeutron(theNeutron); theTC.SetTarget(theTarget); theLC.SetNeutron(theNeutron); theLC.SetTarget(theTarget); // boost to target rest system and decide on channel. theNeutron.Lorentz(theNeutron, -1*theTarget); // dice the photons G4DynamicParticleVector * thePhotons; thePhotons = theFS.GetPhotons(); // select the FS in charge eKinetic = theNeutron.GetKineticEnergy(); G4double xSec[4]; xSec[0] = theFC.GetXsec(eKinetic); xSec[1] = xSec[0]+theSC.GetXsec(eKinetic); xSec[2] = xSec[1]+theTC.GetXsec(eKinetic); xSec[3] = xSec[2]+theLC.GetXsec(eKinetic); G4int it; unsigned int i=0; G4double random = G4UniformRand(); if(xSec[3]==0) { it=-1; } else { for(i=0; i<4; i++) { it =i; if(randomsize(); for(i=0; isize(); i++) { theResult.AddSecondary(theNeutrons->operator[](i)); } delete theNeutrons; G4DynamicParticleVector * theDelayed = 0; theDelayed = theFS.ApplyYourself(0, delayed, theDecayConstants); for(i=0; isize(); i++) { G4double time = -std::log(G4UniformRand())/theDecayConstants[i]; time += theTrack.GetGlobalTime(); G4HadSecondary * track = new G4HadSecondary(theDelayed->operator[](i)); track->SetTime(time); theResult.AddSecondary(track); } delete theDelayed; } else { // cout << " all = "<size(); G4int i0; for(i0=0; i0operator[](i0)); } for(i0=Prompt; i0operator[](i)); this line will be delete G4HadSecondary * track = new G4HadSecondary( theNeutrons->operator[]( i0 ) ); track->SetTime(time); theResult.AddSecondary(track); } delete theNeutrons; } delete [] theDecayConstants; // cout << "all delayed "<size(); for(i=0; ioperator[](i)); } delete thePhotons; } // finally deal with local energy depositions. // G4cout <<"Number of secondaries = "<