Import Geant4 6.2.0 source tree
This commit is contained in:
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4NeutronHPData.hh,v 1.6 2002/12/12 19:18:10 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02-patch-01 $
|
||||
// $Id: G4NeutronHPData.hh,v 1.7 2004/05/24 10:32:59 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
// Hadronic Process: Very Low Energy Neutron X-Sections
|
||||
// original by H.P. Wellisch, TRIUMF, 14-Feb-97
|
||||
@@ -67,19 +67,13 @@ public:
|
||||
|
||||
G4PhysicsVector * DoPhysicsVector(G4NeutronHPVector * theVector);
|
||||
|
||||
static G4NeutronHPData * Instance()
|
||||
{
|
||||
if(theCrossSectionData==NULL) theCrossSectionData = new G4NeutronHPData;
|
||||
return theCrossSectionData;
|
||||
}
|
||||
static G4NeutronHPData * Instance();
|
||||
|
||||
private:
|
||||
|
||||
G4NeutronHPElementData * theData;
|
||||
G4int numEle;
|
||||
|
||||
static G4NeutronHPData * theCrossSectionData;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4NeutronHPFission.hh,v 1.7 2003/07/01 15:58:36 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// $Id: G4NeutronHPFission.hh,v 1.8 2004/05/24 10:32:59 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
// Hadronic Process: High Precision low E neutron tracking
|
||||
// original by H.P. Wellisch, TRIUMF, 14-Feb-97
|
||||
@@ -68,7 +68,7 @@ class G4NeutronHPFission : public G4HadronicInteraction
|
||||
G4NeutronHPChannel * theFission;
|
||||
G4String dirName;
|
||||
G4int numEle;
|
||||
static G4String theNames[3];
|
||||
// static G4String theNames[3];
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4NeutronHPGamma.hh,v 1.10 2003/06/16 17:10:44 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02-patch-01 $
|
||||
// $Id: G4NeutronHPGamma.hh,v 1.11 2004/05/24 10:32:59 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
#ifndef G4NeutronHPGamma_h
|
||||
#define G4NeutronHPGamma_h 1
|
||||
@@ -39,12 +39,8 @@ class G4NeutronHPGamma
|
||||
{
|
||||
public:
|
||||
|
||||
G4NeutronHPGamma()
|
||||
{
|
||||
next = NULL;
|
||||
instancecount ++;
|
||||
}
|
||||
~G4NeutronHPGamma() {instancecount--;}
|
||||
G4NeutronHPGamma();
|
||||
~G4NeutronHPGamma();
|
||||
|
||||
G4bool Init(std::ifstream & aDataFile);
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4NeutronHPNames.hh,v 1.11 2003/06/16 17:10:57 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02-patch-01 $
|
||||
// $Id: G4NeutronHPNames.hh,v 1.12 2004/05/24 10:32:59 hpw Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
#ifndef G4NeutronHPNames_h
|
||||
#define G4NeutronHPNames_h 1
|
||||
@@ -43,7 +43,7 @@ class G4NeutronHPNames
|
||||
~G4NeutronHPNames(){}
|
||||
|
||||
G4NeutronHPDataUsed GetName(G4int A, G4int Z, G4String base, G4String rest, G4bool & active);
|
||||
G4String GetName(G4int i) { return theString[i]; }
|
||||
G4String GetName(G4int i);
|
||||
void SetMaxOffSet(G4int anOffset) { theMaxOffSet = anOffset; }
|
||||
|
||||
public:
|
||||
|
||||
@@ -27,8 +27,6 @@
|
||||
#include "G4NeutronHPData.hh"
|
||||
#include "G4LPhysicsFreeVector.hh"
|
||||
|
||||
G4NeutronHPData * G4NeutronHPData::theCrossSectionData = NULL;
|
||||
|
||||
G4NeutronHPData::G4NeutronHPData()
|
||||
{
|
||||
numEle = G4Element::GetNumberOfElements();
|
||||
@@ -45,6 +43,12 @@
|
||||
delete [] theData;
|
||||
}
|
||||
|
||||
G4NeutronHPData * G4NeutronHPData::Instance()
|
||||
{
|
||||
static G4NeutronHPData theCrossSectionData;
|
||||
return &theCrossSectionData;
|
||||
}
|
||||
|
||||
G4PhysicsVector * G4NeutronHPData::DoPhysicsVector(G4NeutronHPVector * theVector)
|
||||
{
|
||||
// G4cout << "Entered G4NeutronHPData::DoPhysicsVector."<<G4endl;
|
||||
|
||||
@@ -28,185 +28,183 @@
|
||||
#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)
|
||||
{
|
||||
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<G4ParticleDefinition *>(incidentParticle->GetDefinition()) );
|
||||
theNeutron.SetMomentum( incidentParticle->Get4Momentum().vect() );
|
||||
theNeutron.SetKineticEnergy( eKinetic );
|
||||
theResult.Clear();
|
||||
G4double eKinetic = theTrack.GetKineticEnergy();
|
||||
const G4HadProjectile *incidentParticle = &theTrack;
|
||||
G4ReactionProduct theNeutron( const_cast<G4ParticleDefinition *>(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());
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
theNeutron.Lorentz(theNeutron, -1*theTarget);
|
||||
|
||||
// dice the photons
|
||||
|
||||
G4DynamicParticleVector * thePhotons;
|
||||
thePhotons = theFS.GetPhotons();
|
||||
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(random<xSec[i]/xSec[3]) break;
|
||||
}
|
||||
}
|
||||
|
||||
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(random<xSec[i]/xSec[3]) break;
|
||||
}
|
||||
}
|
||||
|
||||
// dice neutron 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 consistancy of the data. @@
|
||||
|
||||
G4int Prompt=0, delayed=0, all=0;
|
||||
G4DynamicParticleVector * theNeutrons = NULL;
|
||||
switch(it) // check logic, and ask, if partials can be assumed to correspond to individual particles @@@
|
||||
{
|
||||
case 0:
|
||||
theFS.SampleNeutronMult(all, Prompt, delayed, eKinetic, 0);
|
||||
if(Prompt==0&&delayed==0) Prompt=all;
|
||||
theNeutrons = theFC.ApplyYourself(Prompt); // delayed always in FS
|
||||
// take 'U' into account explicitely (see 5.4) in the sampling of energy @@@@
|
||||
break;
|
||||
case 1:
|
||||
theFS.SampleNeutronMult(all, Prompt, delayed, eKinetic, 1);
|
||||
if(Prompt==0&&delayed==0) Prompt=all;
|
||||
theNeutrons = theSC.ApplyYourself(Prompt); // delayed always in FS, off done in FSFissionFS
|
||||
break;
|
||||
case 2:
|
||||
theFS.SampleNeutronMult(all, Prompt, delayed, eKinetic, 2);
|
||||
if(Prompt==0&&delayed==0) Prompt=all;
|
||||
theNeutrons = theTC.ApplyYourself(Prompt); // delayed always in FS
|
||||
break;
|
||||
case 3:
|
||||
theFS.SampleNeutronMult(all, Prompt, delayed, eKinetic, 3);
|
||||
if(Prompt==0&&delayed==0) Prompt=all;
|
||||
theNeutrons = theLC.ApplyYourself(Prompt); // delayed always in FS
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
G4int Prompt=0, delayed=0, all=0;
|
||||
G4DynamicParticleVector * theNeutrons = NULL;
|
||||
switch(it) // check logic, and ask, if partials can be assumed to correspond to individual particles @@@
|
||||
{
|
||||
case 0:
|
||||
theFS.SampleNeutronMult(all, Prompt, delayed, eKinetic, 0);
|
||||
if(Prompt==0&&delayed==0) Prompt=all;
|
||||
theNeutrons = theFC.ApplyYourself(Prompt); // delayed always in FS
|
||||
// take 'U' into account explicitely (see 5.4) in the sampling of energy @@@@
|
||||
break;
|
||||
case 1:
|
||||
theFS.SampleNeutronMult(all, Prompt, delayed, eKinetic, 1);
|
||||
if(Prompt==0&&delayed==0) Prompt=all;
|
||||
theNeutrons = theSC.ApplyYourself(Prompt); // delayed always in FS, off done in FSFissionFS
|
||||
break;
|
||||
case 2:
|
||||
theFS.SampleNeutronMult(all, Prompt, delayed, eKinetic, 2);
|
||||
if(Prompt==0&&delayed==0) Prompt=all;
|
||||
theNeutrons = theTC.ApplyYourself(Prompt); // delayed always in FS
|
||||
break;
|
||||
case 3:
|
||||
theFS.SampleNeutronMult(all, Prompt, delayed, eKinetic, 3);
|
||||
if(Prompt==0&&delayed==0) Prompt=all;
|
||||
theNeutrons = theLC.ApplyYourself(Prompt); // delayed always in FS
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
// dice delayed neutrons and photons, and fallback
|
||||
// for Prompt in case channel had no FS data; add all paricles to FS.
|
||||
|
||||
G4double * theDecayConstants;
|
||||
|
||||
if(theNeutrons != NULL)
|
||||
{
|
||||
theDecayConstants = new G4double[delayed];
|
||||
G4int nPhotons = 0;
|
||||
if(thePhotons!=NULL) nPhotons = thePhotons->size();
|
||||
for(i=0; i<theNeutrons->size(); i++)
|
||||
{
|
||||
theResult.AddSecondary(theNeutrons->operator[](i));
|
||||
}
|
||||
delete theNeutrons;
|
||||
|
||||
G4DynamicParticleVector * theDelayed = NULL;
|
||||
theDelayed = theFS.ApplyYourself(0, delayed, theDecayConstants);
|
||||
for(i=0; i<theDelayed->size(); i++)
|
||||
{
|
||||
G4double time = -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 = "<<all<<G4endl;
|
||||
theFS.SampleNeutronMult(all, Prompt, delayed, eKinetic, 0);
|
||||
theDecayConstants = new G4double[delayed];
|
||||
if(Prompt==0&&delayed==0) Prompt=all;
|
||||
theNeutrons = theFS.ApplyYourself(Prompt, delayed, theDecayConstants);
|
||||
G4int nPhotons = 0;
|
||||
if(thePhotons!=NULL) nPhotons = thePhotons->size();
|
||||
G4int i0;
|
||||
for(i0=0; i0<Prompt; i0++)
|
||||
{
|
||||
theResult.AddSecondary(theNeutrons->operator[](i0));
|
||||
}
|
||||
for(i0=Prompt; i0<Prompt+delayed; i0++)
|
||||
{
|
||||
G4double time = -log(G4UniformRand())/theDecayConstants[i0-Prompt];
|
||||
time += theTrack.GetGlobalTime();
|
||||
G4HadSecondary * track = new G4HadSecondary(theNeutrons->operator[](i));
|
||||
track->SetTime(time);
|
||||
theResult.AddSecondary(track);
|
||||
}
|
||||
delete theNeutrons;
|
||||
}
|
||||
delete [] theDecayConstants;
|
||||
// cout << "all delayed "<<delayed<<G4endl;
|
||||
G4int nPhotons = 0;
|
||||
if(thePhotons!=NULL)
|
||||
{
|
||||
nPhotons = thePhotons->size();
|
||||
for(i=0; i<thePhotons->size(); i++)
|
||||
{
|
||||
theResult.AddSecondary(thePhotons->operator[](i));
|
||||
}
|
||||
delete thePhotons;
|
||||
}
|
||||
G4double * theDecayConstants;
|
||||
|
||||
if(theNeutrons != NULL)
|
||||
{
|
||||
theDecayConstants = new G4double[delayed];
|
||||
G4int nPhotons = 0;
|
||||
if(thePhotons!=NULL) nPhotons = thePhotons->size();
|
||||
for(i=0; i<theNeutrons->size(); i++)
|
||||
{
|
||||
theResult.AddSecondary(theNeutrons->operator[](i));
|
||||
}
|
||||
delete theNeutrons;
|
||||
|
||||
G4DynamicParticleVector * theDelayed = NULL;
|
||||
theDelayed = theFS.ApplyYourself(0, delayed, theDecayConstants);
|
||||
for(i=0; i<theDelayed->size(); i++)
|
||||
{
|
||||
G4double time = -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 = "<<all<<G4endl;
|
||||
theFS.SampleNeutronMult(all, Prompt, delayed, eKinetic, 0);
|
||||
theDecayConstants = new G4double[delayed];
|
||||
if(Prompt==0&&delayed==0) Prompt=all;
|
||||
theNeutrons = theFS.ApplyYourself(Prompt, delayed, theDecayConstants);
|
||||
G4int nPhotons = 0;
|
||||
if(thePhotons!=NULL) nPhotons = thePhotons->size();
|
||||
G4int i0;
|
||||
for(i0=0; i0<Prompt; i0++)
|
||||
{
|
||||
theResult.AddSecondary(theNeutrons->operator[](i0));
|
||||
}
|
||||
for(i0=Prompt; i0<Prompt+delayed; i0++)
|
||||
{
|
||||
G4double time = -log(G4UniformRand())/theDecayConstants[i0-Prompt];
|
||||
time += theTrack.GetGlobalTime();
|
||||
G4HadSecondary * track = new G4HadSecondary(theNeutrons->operator[](i));
|
||||
track->SetTime(time);
|
||||
theResult.AddSecondary(track);
|
||||
}
|
||||
delete theNeutrons;
|
||||
}
|
||||
delete [] theDecayConstants;
|
||||
// cout << "all delayed "<<delayed<<G4endl;
|
||||
unsigned int nPhotons = 0;
|
||||
if(thePhotons!=NULL)
|
||||
{
|
||||
nPhotons = thePhotons->size();
|
||||
for(i=0; i<nPhotons; i++)
|
||||
{
|
||||
theResult.AddSecondary(thePhotons->operator[](i));
|
||||
}
|
||||
delete thePhotons;
|
||||
}
|
||||
|
||||
// do some rotating, if that helps to conserve momentum @@@@
|
||||
|
||||
// finally deal with local energy depositions.
|
||||
// G4cout <<"Number of secondaries = "<<theResult.GetNumberOfSecondaries()<< G4endl;
|
||||
// G4cout <<"Number of photons = "<<nPhotons<<G4endl;
|
||||
// G4cout <<"Number of Prompt = "<<Prompt<<G4endl;
|
||||
// G4cout <<"Number of delayed = "<<delayed<<G4endl;
|
||||
// G4cout <<"Number of photons = "<<nPhotons<<G4endl;
|
||||
G4NeutronHPFissionERelease * theERelease;
|
||||
theERelease = theFS.GetEnergyRelease();
|
||||
G4double eDepByFragments = theERelease->GetFragmentKinetic();
|
||||
theResult.SetLocalEnergyDeposit(eDepByFragments);
|
||||
|
||||
G4NeutronHPFissionERelease * theERelease = theFS.GetEnergyRelease();
|
||||
G4double eDepByFragments = theERelease->GetFragmentKinetic();
|
||||
theResult.SetLocalEnergyDeposit(eDepByFragments);
|
||||
// cout << "local energy deposit" << eDepByFragments<<G4endl;
|
||||
// clean up the primary neutron
|
||||
theResult.SetStatusChange(stopAndKill);
|
||||
return &theResult;
|
||||
}
|
||||
theResult.SetStatusChange(stopAndKill);
|
||||
return &theResult;
|
||||
}
|
||||
|
||||
@@ -26,6 +26,15 @@
|
||||
//
|
||||
#include "G4NeutronHPGamma.hh"
|
||||
int G4NeutronHPGamma::instancecount = 0;
|
||||
|
||||
G4NeutronHPGamma::G4NeutronHPGamma()
|
||||
{
|
||||
next = NULL;
|
||||
instancecount ++;
|
||||
}
|
||||
|
||||
G4NeutronHPGamma::~G4NeutronHPGamma() {instancecount--;}
|
||||
|
||||
G4bool G4NeutronHPGamma::Init(std::ifstream & aDataFile)
|
||||
{
|
||||
G4bool theResult = true;
|
||||
|
||||
@@ -48,6 +48,8 @@
|
||||
"Einsteinium"};
|
||||
|
||||
|
||||
G4String G4NeutronHPNames::GetName(G4int i) { return theString[i]; }
|
||||
|
||||
G4NeutronHPDataUsed G4NeutronHPNames::GetName(G4int A, G4int Z, G4String base, G4String rest, G4bool & aFlag)
|
||||
{
|
||||
G4NeutronHPDataUsed result;
|
||||
|
||||
Reference in New Issue
Block a user