Import Geant4 10.0.0 source tree
This commit is contained in:
@@ -136,33 +136,22 @@ G4EMDissociation::G4EMDissociation(const G4EMDissociation& emd)
|
||||
|
||||
G4EMDissociation::G4EMDissociation (G4ExcitationHandler *aExcitationHandler)
|
||||
{
|
||||
//
|
||||
//
|
||||
// Send message to stdout to advise that the G4EMDissociation model is being
|
||||
// used.
|
||||
//
|
||||
// Send message to stdout to advise that the G4EMDissociation model is being
|
||||
// used.
|
||||
PrintWelcomeMessage();
|
||||
|
||||
theExcitationHandler = aExcitationHandler;
|
||||
handlerDefinedInternally = false;
|
||||
//
|
||||
//
|
||||
// This EM dissociation model needs access to the cross-sections held in
|
||||
// G4EMDissociationCrossSection.
|
||||
//
|
||||
|
||||
// This EM dissociation model needs access to the cross-sections held in
|
||||
// G4EMDissociationCrossSection.
|
||||
dissociationCrossSection = new G4EMDissociationCrossSection;
|
||||
thePhotonSpectrum = new G4EMDissociationSpectrum;
|
||||
//
|
||||
//
|
||||
// Set the minimum and maximum range for the model (despite nomanclature, this
|
||||
// is in energy per nucleon number).
|
||||
//
|
||||
|
||||
// Set the minimum and maximum range for the model (despite nomanclature, this
|
||||
// is in energy per nucleon number)
|
||||
SetMinEnergy(100.0*MeV);
|
||||
SetMaxEnergy(500.0*GeV);
|
||||
//
|
||||
//
|
||||
// Set the default verbose level to 0 - no output.
|
||||
//
|
||||
verboseLevel = 0;
|
||||
}
|
||||
|
||||
@@ -179,19 +168,16 @@ G4EMDissociation::~G4EMDissociation() {
|
||||
G4HadFinalState *G4EMDissociation::ApplyYourself
|
||||
(const G4HadProjectile &theTrack, G4Nucleus &theTarget)
|
||||
{
|
||||
//
|
||||
//
|
||||
// The secondaries will be returned in G4HadFinalState &theParticleChange -
|
||||
// initialise this.
|
||||
//
|
||||
// The secondaries will be returned in G4HadFinalState &theParticleChange -
|
||||
// initialise this.
|
||||
|
||||
theParticleChange.Clear();
|
||||
theParticleChange.SetStatusChange(stopAndKill);
|
||||
//
|
||||
//
|
||||
// Get relevant information about the projectile and target (A, Z) and
|
||||
// energy/nuc, momentum, velocity, Lorentz factor and rest-mass of the
|
||||
// projectile.
|
||||
//
|
||||
|
||||
// Get relevant information about the projectile and target (A, Z) and
|
||||
// energy/nuc, momentum, velocity, Lorentz factor and rest-mass of the
|
||||
// projectile.
|
||||
|
||||
const G4ParticleDefinition *definitionP = theTrack.GetDefinition();
|
||||
const G4double AP = definitionP->GetBaryonNumber();
|
||||
const G4double ZP = definitionP->GetPDGCharge();
|
||||
@@ -202,13 +188,10 @@ G4HadFinalState *G4EMDissociation::ApplyYourself
|
||||
G4double AT = theTarget.GetA_asInt();
|
||||
G4double ZT = theTarget.GetZ_asInt();
|
||||
G4double MT = G4NucleiProperties::GetNuclearMass(AT,ZT);
|
||||
//
|
||||
//
|
||||
// Depending upon the verbosity level, output the initial information on the
|
||||
// projectile and target.
|
||||
//
|
||||
if (verboseLevel >= 2)
|
||||
{
|
||||
|
||||
// Depending upon the verbosity level, output the initial information on the
|
||||
// projectile and target
|
||||
if (verboseLevel >= 2) {
|
||||
G4cout.precision(6);
|
||||
G4cout <<"########################################"
|
||||
<<"########################################"
|
||||
@@ -222,23 +205,21 @@ G4HadFinalState *G4EMDissociation::ApplyYourself
|
||||
<<G4endl;
|
||||
G4cout <<"Projectile momentum and Energy/nuc = " <<pP <<" ," <<E <<G4endl;
|
||||
}
|
||||
//
|
||||
//
|
||||
// Initialise the variables which will be used with the phase-space decay and
|
||||
// to boost the secondaries from the interaction.
|
||||
//
|
||||
|
||||
// Initialise the variables which will be used with the phase-space decay and
|
||||
// to boost the secondaries from the interaction.
|
||||
|
||||
G4ParticleDefinition *typeNucleon = NULL;
|
||||
G4ParticleDefinition *typeDaughter = NULL;
|
||||
G4double Eg = 0.0;
|
||||
G4double mass = 0.0;
|
||||
G4ThreeVector boost = G4ThreeVector(0.0, 0.0, 0.0);
|
||||
//
|
||||
//
|
||||
// Determine the cross-sections at the giant dipole and giant quadrupole
|
||||
// resonance energies for the projectile and then target. The information is
|
||||
// initially provided in the G4PhysicsFreeVector individually for the E1
|
||||
// and E2 fields. These are then summed.
|
||||
//
|
||||
|
||||
// Determine the cross-sections at the giant dipole and giant quadrupole
|
||||
// resonance energies for the projectile and then target. The information is
|
||||
// initially provided in the G4PhysicsFreeVector individually for the E1
|
||||
// and E2 fields. These are then summed.
|
||||
|
||||
G4double bmin = thePhotonSpectrum->GetClosestApproach(AP, ZP, AT, ZT, b);
|
||||
G4PhysicsFreeVector *crossSectionP = dissociationCrossSection->
|
||||
GetCrossSectionForProjectile(AP, ZP, AT, ZT, b, bmin);
|
||||
@@ -247,22 +228,19 @@ G4HadFinalState *G4EMDissociation::ApplyYourself
|
||||
|
||||
G4double totCrossSectionP = (*crossSectionP)[0]+(*crossSectionP)[1];
|
||||
G4double totCrossSectionT = (*crossSectionT)[0]+(*crossSectionT)[1];
|
||||
//
|
||||
//
|
||||
// Now sample whether the interaction involved EM dissociation of the projectile
|
||||
// or the target.
|
||||
//
|
||||
|
||||
// Now sample whether the interaction involved EM dissociation of the projectile
|
||||
// or the target.
|
||||
|
||||
if (G4UniformRand() <
|
||||
totCrossSectionP / (totCrossSectionP + totCrossSectionT))
|
||||
{
|
||||
//
|
||||
//
|
||||
// It was the projectile which underwent EM dissociation. Define the Lorentz
|
||||
// boost to be applied to the secondaries, and sample whether a proton or a
|
||||
// neutron was ejected. Then determine the energy of the virtual gamma ray
|
||||
// which passed from the target nucleus ... this will be used to define the
|
||||
// excitation of the projectile.
|
||||
//
|
||||
totCrossSectionP / (totCrossSectionP + totCrossSectionT)) {
|
||||
|
||||
// It was the projectile which underwent EM dissociation. Define the Lorentz
|
||||
// boost to be applied to the secondaries, and sample whether a proton or a
|
||||
// neutron was ejected. Then determine the energy of the virtual gamma ray
|
||||
// which passed from the target nucleus ... this will be used to define the
|
||||
// excitation of the projectile.
|
||||
|
||||
mass = MP;
|
||||
if (G4UniformRand() < dissociationCrossSection->
|
||||
GetWilsonProbabilityForProtonDissociation (AP, ZP))
|
||||
@@ -295,24 +273,21 @@ G4HadFinalState *G4EMDissociation::ApplyYourself
|
||||
if (verboseLevel >= 2)
|
||||
G4cout <<"Transition type was E2" <<G4endl;
|
||||
}
|
||||
//
|
||||
//
|
||||
// We need to define a Lorentz vector with the original momentum, but total
|
||||
// energy includes the projectile and virtual gamma. This is then used
|
||||
// to calculate the boost required for the secondaries.
|
||||
//
|
||||
|
||||
// We need to define a Lorentz vector with the original momentum, but total
|
||||
// energy includes the projectile and virtual gamma. This is then used
|
||||
// to calculate the boost required for the secondaries.
|
||||
|
||||
pP.setE(pP.e()+Eg);
|
||||
boost = pP.findBoostToCM();
|
||||
}
|
||||
else
|
||||
{
|
||||
//
|
||||
//
|
||||
// It was the target which underwent EM dissociation. Sample whether a
|
||||
// proton or a neutron was ejected. Then determine the energy of the virtual
|
||||
// gamma ray which passed from the projectile nucleus ... this will be used to
|
||||
// define the excitation of the target.
|
||||
//
|
||||
// It was the target which underwent EM dissociation. Sample whether a
|
||||
// proton or a neutron was ejected. Then determine the energy of the virtual
|
||||
// gamma ray which passed from the projectile nucleus ... this will be used to
|
||||
// define the excitation of the target.
|
||||
|
||||
mass = MT;
|
||||
if (G4UniformRand() < dissociationCrossSection->
|
||||
GetWilsonProbabilityForProtonDissociation (AT, ZT))
|
||||
@@ -345,12 +320,11 @@ G4HadFinalState *G4EMDissociation::ApplyYourself
|
||||
if (verboseLevel >= 2)
|
||||
G4cout <<"Transition type was E2" <<G4endl;
|
||||
}
|
||||
//
|
||||
//
|
||||
// Add the projectile to theParticleChange, less the energy of the
|
||||
// not-so-virtual gamma-ray. Not that at the moment, no lateral momentum
|
||||
// is transferred between the projectile and target nuclei.
|
||||
//
|
||||
|
||||
// Add the projectile to theParticleChange, less the energy of the
|
||||
// not-so-virtual gamma-ray. Not that at the moment, no lateral momentum
|
||||
// is transferred between the projectile and target nuclei.
|
||||
|
||||
G4ThreeVector v = pP.vect();
|
||||
v.setMag(1.0);
|
||||
G4DynamicParticle *changedP = new G4DynamicParticle
|
||||
@@ -362,21 +336,19 @@ G4HadFinalState *G4EMDissociation::ApplyYourself
|
||||
changedP->DumpInfo();
|
||||
}
|
||||
}
|
||||
//
|
||||
//
|
||||
// Perform a two-body decay based on the restmass energy of the parent and
|
||||
// gamma-ray, and the masses of the daughters. In the frame of reference of
|
||||
// the nucles, the angular distribution is sampled isotropically, but the
|
||||
// the nucleon and secondary nucleus are boosted if they've come from the
|
||||
// projectile.
|
||||
//
|
||||
|
||||
// Perform a two-body decay based on the restmass energy of the parent and
|
||||
// gamma-ray, and the masses of the daughters. In the frame of reference of
|
||||
// the nucles, the angular distribution is sampled isotropically, but the
|
||||
// the nucleon and secondary nucleus are boosted if they've come from the
|
||||
// projectile.
|
||||
|
||||
G4double e = mass + Eg;
|
||||
G4double mass1 = typeNucleon->GetPDGMass();
|
||||
G4double mass2 = typeDaughter->GetPDGMass();
|
||||
G4double pp = (e+mass1+mass2)*(e+mass1-mass2)*
|
||||
(e-mass1+mass2)*(e-mass1-mass2)/(4.0*e*e);
|
||||
if (pp < 0.0)
|
||||
{
|
||||
if (pp < 0.0) {
|
||||
pp = 1.0*eV;
|
||||
// if (verboseLevel >`= 1)
|
||||
// {
|
||||
@@ -400,42 +372,41 @@ G4HadFinalState *G4EMDissociation::ApplyYourself
|
||||
G4DynamicParticle *dynamicDaughter =
|
||||
new G4DynamicParticle(typeDaughter, -direction*pp);
|
||||
dynamicDaughter->Set4Momentum(dynamicDaughter->Get4Momentum().boost(-boost));
|
||||
//
|
||||
//
|
||||
// The "decay" products have to be transferred to the G4HadFinalState object.
|
||||
// Furthermore, the residual nucleus should be de-excited.
|
||||
//
|
||||
|
||||
// The "decay" products have to be transferred to the G4HadFinalState object.
|
||||
// Furthermore, the residual nucleus should be de-excited.
|
||||
|
||||
theParticleChange.AddSecondary (dynamicNucleon);
|
||||
if (verboseLevel >= 2)
|
||||
{
|
||||
if (verboseLevel >= 2) {
|
||||
G4cout <<"Nucleon from the EMD process:" <<G4endl;
|
||||
dynamicNucleon->DumpInfo();
|
||||
}
|
||||
|
||||
G4Fragment *theFragment = new
|
||||
G4Fragment* theFragment = new
|
||||
G4Fragment((G4int) typeDaughter->GetBaryonNumber(),
|
||||
(G4int) typeDaughter->GetPDGCharge(), dynamicDaughter->Get4Momentum());
|
||||
if (verboseLevel >= 2)
|
||||
{
|
||||
|
||||
if (verboseLevel >= 2) {
|
||||
G4cout <<"Dynamic properties of the prefragment:" <<G4endl;
|
||||
G4cout.precision(6);
|
||||
dynamicDaughter->DumpInfo();
|
||||
G4cout <<"Nuclear properties of the prefragment:" <<G4endl;
|
||||
G4cout <<theFragment <<G4endl;
|
||||
}
|
||||
G4ReactionProductVector *products =
|
||||
theExcitationHandler->BreakItUp(*theFragment);
|
||||
|
||||
G4ReactionProductVector* products =
|
||||
theExcitationHandler->BreakItUp(*theFragment);
|
||||
delete theFragment;
|
||||
theFragment = NULL;
|
||||
|
||||
G4DynamicParticle* secondary = 0;
|
||||
G4ReactionProductVector::iterator iter;
|
||||
for (iter = products->begin(); iter != products->end(); ++iter)
|
||||
{
|
||||
G4DynamicParticle *secondary =
|
||||
new G4DynamicParticle((*iter)->GetDefinition(),
|
||||
(*iter)->GetTotalEnergy(), (*iter)->GetMomentum());
|
||||
for (iter = products->begin(); iter != products->end(); ++iter) {
|
||||
secondary = new G4DynamicParticle((*iter)->GetDefinition(),
|
||||
(*iter)->GetTotalEnergy(), (*iter)->GetMomentum());
|
||||
theParticleChange.AddSecondary (secondary);
|
||||
}
|
||||
delete products;
|
||||
|
||||
if (verboseLevel >= 2)
|
||||
G4cout <<"########################################"
|
||||
@@ -444,8 +415,8 @@ G4HadFinalState *G4EMDissociation::ApplyYourself
|
||||
|
||||
return &theParticleChange;
|
||||
}
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
||||
|
||||
void G4EMDissociation::PrintWelcomeMessage ()
|
||||
{
|
||||
G4cout <<G4endl;
|
||||
@@ -461,5 +432,4 @@ void G4EMDissociation::PrintWelcomeMessage ()
|
||||
|
||||
return;
|
||||
}
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
||||
|
||||
Reference in New Issue
Block a user