// // ******************************************************************** // * 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. * // ******************************************************************** // // // This software was developed by Lawrence Livermore National Laboratory. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // 1. Redistributions of source code must retain the above copyright notice, // this list of conditions and the following disclaimer. // 2. Redistributions in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation // and/or other materials provided with the distribution. // 3. The name of the author may not be used to endorse or promote products // derived from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED // WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO // EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Copyright (c) 2006 The Regents of the University of California. // All rights reserved. // UCRL-CODE-224807 // // // $Id: G4FissionLibrary.cc,v 1.4 2007/06/01 14:02:08 gcosmo Exp $ // // neutron_hp -- source file // J.M. Verbeke, Jan-2007 // A low energy neutron-induced fission model. // #include "G4FissionLibrary.hh" G4FissionLibrary::G4FissionLibrary() : G4NeutronHPFinalState() { hasXsec = false; } G4FissionLibrary::~G4FissionLibrary() { } G4NeutronHPFinalState * G4FissionLibrary::New() { G4FissionLibrary * theNew = new G4FissionLibrary; return theNew; } void G4FissionLibrary::Init (G4double A, G4double Z, G4String & dirName, G4String &) { G4String tString = "/FS/"; G4bool dbool; theIsotope = static_cast(1000*Z+A); G4NeutronHPDataUsed aFile = theNames.GetName(static_cast(A), static_cast(Z), dirName, tString, dbool); G4String filename = aFile.GetName(); if(!dbool) { hasAnyData = false; hasFSData = false; hasXsec = false; return; } std::ifstream theData(filename, std::ios::in); // here it comes G4int infoType, dataType; hasFSData = false; while (theData >> infoType) { hasFSData = true; theData >> dataType; switch(infoType) { case 1: if(dataType==4) theNeutronAngularDis.Init(theData); if(dataType==5) thePromptNeutronEnDis.Init(theData); if(dataType==12) theFinalStatePhotons.InitMean(theData); if(dataType==14) theFinalStatePhotons.InitAngular(theData); if(dataType==15) theFinalStatePhotons.InitEnergies(theData); break; case 2: if(dataType==1) theFinalStateNeutrons.InitMean(theData); break; case 3: if(dataType==1) theFinalStateNeutrons.InitDelayed(theData); if(dataType==5) theDelayedNeutronEnDis.Init(theData); break; case 4: if(dataType==1) theFinalStateNeutrons.InitPrompt(theData); break; case 5: if(dataType==1) theEnergyRelease.Init(theData); break; default: G4cout << "G4FissionLibrary::Init: unknown data type"<(incidentParticle->GetDefinition()) ); theNeutron.SetMomentum( incidentParticle->Get4Momentum().vect() ); theNeutron.SetKineticEnergy( eKinetic ); // prepare target G4Nucleus aNucleus; G4ReactionProduct theTarget; G4ThreeVector neuVelo = (1./incidentParticle->GetDefinition()->GetPDGMass())*theNeutron.GetMomentum(); theTarget = aNucleus.GetBiasedThermalNucleus( targetMass, neuVelo, theTrack.GetMaterial()->GetTemperature()); // set neutron and target in the FS classes theNeutronAngularDis.SetNeutron(theNeutron); theNeutronAngularDis.SetTarget(theTarget); // boost to target rest system theNeutron.Lorentz(theNeutron, -1*theTarget); eKinetic = theNeutron.GetKineticEnergy(); // dice neutron and gamma multiplicities, energies and momenta in Lab. @@ // no energy conservation on an event-to-event basis. we rely on the data to be ok. @@ // also for mean, we rely on the consistency of the data. @@ G4int nPrompt=0, gPrompt=0; SampleMult(theTrack, &nPrompt, &gPrompt, eKinetic); // Build neutrons and add them to dynamic particle vector G4double momentum; for(G4int i=0; iSetDefinition(G4Neutron::Neutron()); it->SetKineticEnergy(getneng_(&i)*MeV); momentum = it->GetTotalMomentum(); G4ThreeVector temp(momentum*getndircosu_(&i), momentum*getndircosv_(&i), momentum*getndircosw_(&i)); it->SetMomentum( temp ); // it->SetGlobalTime(getnage_(&i)*second); theResult.AddSecondary(it); // G4cout <<"G4FissionLibrary::ApplyYourself: energy of prompt neutron " << i << " = " << it->GetKineticEnergy()<SetDefinition(G4Gamma::Gamma()); thePhoton->SetKineticEnergy(getpeng_(&i)*MeV); momentum = thePhoton->GetTotalMomentum(); G4ThreeVector temp(momentum*getpdircosu_(&i), momentum*getpdircosv_(&i), momentum*getpdircosw_(&i)); thePhoton->SetMomentum( temp ); thePhoton->Lorentz(*thePhoton, -1.*theTarget); G4DynamicParticle * it = new G4DynamicParticle; it->SetDefinition(thePhoton->GetDefinition()); it->SetMomentum(thePhoton->GetMomentum()); // it->SetGlobalTime(getpage_(&i)*second); // G4cout <<"G4FissionLibrary::ApplyYourself: energy of prompt photon " << i << " = " << it->GetKineticEnergy()<