Import Geant4 11.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2023-12-08 10:43:34 +01:00
parent dd1f179cda
commit 860a2b92bf
3962 changed files with 139318 additions and 164259 deletions
@@ -32,12 +32,10 @@
#include "G4HETCAlpha.hh"
#include "G4Alpha.hh"
#include "G4CoulombBarrier.hh"
G4HETCAlpha::G4HETCAlpha()
: G4HETCChargedFragment(G4Alpha::Alpha(), &theAlphaCoulombBarrier)
{}
G4HETCAlpha::~G4HETCAlpha()
: G4HETCChargedFragment(G4Alpha::Alpha(), new G4CoulombBarrier(4, 2))
{}
G4double G4HETCAlpha::GetAlpha() const
@@ -49,22 +47,17 @@ G4double G4HETCAlpha::GetAlpha() const
}
else if (theFragZ <= 50)
{
C = 0.1 + -((theFragZ-50.)/20.)*0.02;
C = 0.1 - (theFragZ - 30)*0.001;
}
else if (theFragZ < 70)
{
C = 0.08 + -((theFragZ-70.)/20.)*0.02;
C = 0.08 - (theFragZ-70)*0.001;
}
else
{
C = 0.06;
}
return 1.0+C;
}
G4double G4HETCAlpha::GetBeta() const
{
return theCoulombBarrier;
return 1.0 + C;
}
G4double G4HETCAlpha::GetSpinFactor() const
@@ -72,7 +65,7 @@ G4double G4HETCAlpha::GetSpinFactor() const
return 1.0;
}
G4double G4HETCAlpha::K(const G4Fragment & aFragment)
G4double G4HETCAlpha::K(const G4Fragment& aFragment) const
{
// Number of protons in emitted fragment
G4int Pa = theZ;
@@ -90,11 +83,12 @@ G4double G4HETCAlpha::K(const G4Fragment & aFragment)
result = 3.0/(P*(P-1.0)*(P-2.0)*(P-3.0)) *
(H*(H-1.0)*(H-2.0)*(H-3.0)*r*r*(r-1.0)*(r-1.0) +
2.0*H*(H-1.0)*(H-2.0)*(Pa*r*(1.0-r)*(1.0-r)+Na*r*r*(1.0-r)) +
H*(H-1.0)*(Pa*(Pa-1.0)*(1.0-r)*(1.0-r)+4.0*Na*Pa*r*(1.0-r)+Na*(Na-1.0)*r*r) +
H*(H-1.0)*(Pa*(Pa-1.0)*(1.0-r)*(1.0-r)+
4.0*Na*Pa*r*(1.0-r)+Na*(Na-1.0)*r*r) +
2*H*(Pa*Na*(Na-1.0)*r+Pa*(Pa-1.0)*Na*(1.0-r)) +
Pa*(Pa-1.0)*Na*(Na-1.0));
result /= 6.0*r*r*(1. - r) *(1. - r);
result /= (6.0*r*r*(1. - r) *(1. - r));
}
return std::max(0.0,result);
}
@@ -37,26 +37,21 @@
#include "G4NuclearLevelData.hh"
G4HETCChargedFragment::G4HETCChargedFragment(
const G4ParticleDefinition* pd, G4VCoulombBarrier * aCoulombBarrier)
const G4ParticleDefinition* pd, G4VCoulombBarrier* aCoulombBarrier)
: G4HETCFragment(pd, aCoulombBarrier)
{}
G4HETCChargedFragment::~G4HETCChargedFragment()
{}
G4double G4HETCChargedFragment::
SampleKineticEnergy(const G4Fragment & aFragment)
G4double G4HETCChargedFragment::SampleKineticEnergy(const G4Fragment& fr)
{
G4int Pb = aFragment.GetNumberOfParticles();
G4int H = aFragment.GetNumberOfHoles();
G4int Pb = fr.GetNumberOfParticles();
G4int H = fr.GetNumberOfHoles();
G4double g0 = (6.0/pi2)*fNucData->GetLevelDensity(theFragZ,theFragA,
aFragment.GetExcitationEnergy());
G4double g0 = (6.0/pi2)*fNucData->GetLevelDensity(theFragZ, theFragA,
fr.GetExcitationEnergy());
G4double Ab = std::max(0.0,G4double(Pb*Pb+H*H+Pb-3*H)/(4.0*g0));
G4double Emax = theMaxKinEnergy - Ab;
G4double x = BetaRand(Pb + H, 2);
return Emax - (Emax-theCoulombBarrier)*x;
return Emax - (Emax - theCoulombBarrier)*x;
}
@@ -32,18 +32,16 @@
#include "G4HETCDeuteron.hh"
#include "G4Deuteron.hh"
#include "G4CoulombBarrier.hh"
G4HETCDeuteron::G4HETCDeuteron()
: G4HETCChargedFragment(G4Deuteron::Deuteron(), &theDeuteronCoulombBarrier)
{}
G4HETCDeuteron::~G4HETCDeuteron()
: G4HETCChargedFragment(G4Deuteron::Deuteron(), new G4CoulombBarrier(2, 1))
{}
G4double G4HETCDeuteron::GetAlpha() const
{
G4double C = 0.0;
if (theFragZ >= 70)
if (theFragZ <= 70)
{
C = 0.10;
}
@@ -55,33 +53,27 @@ G4double G4HETCDeuteron::GetAlpha() const
return 1.0 + C*0.5;
}
G4double G4HETCDeuteron::GetBeta() const
{
return -theCoulombBarrier;
}
G4double G4HETCDeuteron::GetSpinFactor() const
{
// 2s+1
return 3.0;
}
G4double G4HETCDeuteron::K(const G4Fragment & aFragment)
G4double G4HETCDeuteron::K(const G4Fragment& aFragment) const
{
// Number of protons in emitted fragment
G4int Pa = theZ;
// Number of neutrons in emitted fragment
G4int Na = theA - Pa;
G4double r = G4double(theResZ)/G4double(theResA);
G4double r = (G4double)theResZ/(G4double)theResA;
G4int P = aFragment.GetNumberOfParticles();
G4int H = aFragment.GetNumberOfHoles();
G4double result = 0.0;
if (P > 1) {
result = 2.*(H*(H-1.0)*r*(r-1.0)+H*(Na*r+Pa*(1.0-r)) + Pa*Na)
/(P*(P-1.0)*r*(1.0 - r));
}
G4double result = (P > 1) ?
2.*(H*(H-1.0)*r*(r-1.0)+H*(Na*r+Pa*(1.0-r)) + Pa*Na)
/(P*(P-1.0)*r*(1.0 - r)) : 0.0;
return std::max(0.0,result);
}
@@ -35,42 +35,36 @@
#include "G4NuclearLevelData.hh"
#include "G4PhysicalConstants.hh"
G4HETCFragment::
G4HETCFragment(const G4ParticleDefinition* part,
G4VCoulombBarrier* aCoulombBarrier)
G4HETCFragment::G4HETCFragment(const G4ParticleDefinition* part,
G4VCoulombBarrier* aCoulombBarrier)
: G4VPreCompoundFragment(part, aCoulombBarrier)
{
G4double r0 = theParameters->GetR0();
r2norm = r0*r0/(CLHEP::pi*CLHEP::hbarc*CLHEP::hbarc*CLHEP::hbarc);
}
G4HETCFragment::~G4HETCFragment()
{}
G4double G4HETCFragment::
CalcEmissionProbability(const G4Fragment & aFragment)
G4double G4HETCFragment::CalcEmissionProbability(const G4Fragment& fp)
{
if (GetEnergyThreshold() <= 0.0)
{
theEmissionProbability = 0.0;
return 0.0;
}
if (GetEnergyThreshold() <= 0.0) {
theEmissionProbability = 0.0;
return 0.0;
}
// Coulomb barrier is the lower limit
// of integration over kinetic energy
theEmissionProbability =
IntegrateEmissionProbability(theCoulombBarrier,theMaxKinEnergy,aFragment);
theEmissionProbability =
IntegrateEmissionProbability(theCoulombBarrier, theMaxKinEnergy, fp);
return theEmissionProbability;
}
G4double G4HETCFragment::
IntegrateEmissionProbability(G4double & Low, G4double & Up,
const G4Fragment & aFragment)
G4double
G4HETCFragment::IntegrateEmissionProbability(G4double Low, G4double Up,
const G4Fragment& frag)
{
G4double U = aFragment.GetExcitationEnergy();
G4double U = frag.GetExcitationEnergy();
G4int P = aFragment.GetNumberOfParticles();
G4int H = aFragment.GetNumberOfHoles();
G4int P = frag.GetNumberOfParticles();
G4int H = frag.GetNumberOfHoles();
G4int N = P + H;
G4int Pb = P - theA;
G4int Nb = Pb + H;
@@ -87,18 +81,17 @@ IntegrateEmissionProbability(G4double & Low, G4double & Up,
G4int Pf = P;
G4int Hf = H;
G4int Nf = N-1;
for (G4int i = 1; i < theA; ++i)
{
Pf *= (P-i);
Hf *= (H-i);
Nf *= (N-1-i);
}
for (G4int i = 1; i < theA; ++i) {
Pf *= (P-i);
Hf *= (H-i);
Nf *= (N-1-i);
}
G4double X = std::max(Up - Ab + GetBeta(),0.0);
G4double Y = std::max(Up - Ab - Low, 0.0);
G4double Probability = r2norm*GetSpinFactor()*theReducedMass*GetAlpha()
*g4calc->Z23(theResA)*Pf*Hf*Nf*K(aFragment)*(X/Nb - Y/(Nb+1))
*g4calc->Z23(theResA)*Pf*Hf*Nf*K(frag)*(X/Nb - Y/(Nb+1))
*U*g4calc->powN(gb*Y,Nb)/g4calc->powN(ga*U,N);
return Probability;
@@ -32,12 +32,10 @@
#include "G4HETCHe3.hh"
#include "G4He3.hh"
#include "G4CoulombBarrier.hh"
G4HETCHe3::G4HETCHe3()
: G4HETCChargedFragment(G4He3::He3(), &theHe3CoulombBarrier)
{}
G4HETCHe3::~G4HETCHe3()
: G4HETCChargedFragment(G4He3::He3(), new G4CoulombBarrier(3, 2))
{}
G4double G4HETCHe3::GetAlpha() const
@@ -49,11 +47,11 @@ G4double G4HETCHe3::GetAlpha() const
}
else if (theFragZ <= 50)
{
C = 0.1 + -((theFragZ-50.)/20.)*0.02;
C = 0.1 - (theFragZ-30)*0.001;
}
else if (theFragZ < 70)
{
C = 0.08 + -((theFragZ-70.)/20.)*0.02;
C = 0.08 - (theFragZ-70)*0.001;
}
else
{
@@ -61,11 +59,6 @@ G4double G4HETCHe3::GetAlpha() const
}
return 1.0 + C*(4.0/3.0);
}
G4double G4HETCHe3::GetBeta() const
{
return -theCoulombBarrier;
}
G4double G4HETCHe3::GetSpinFactor() const
{
@@ -73,7 +66,7 @@ G4double G4HETCHe3::GetSpinFactor() const
return 2.0;
}
G4double G4HETCHe3::K(const G4Fragment & aFragment)
G4double G4HETCHe3::K(const G4Fragment& aFragment) const
{
// Number of protons in emitted fragment
G4int Pa = theZ;
@@ -37,10 +37,7 @@
#include "G4NuclearLevelData.hh"
G4HETCNeutron::G4HETCNeutron()
: G4HETCFragment(G4Neutron::Neutron(), &theNeutronCoulombBarrier)
{}
G4HETCNeutron::~G4HETCNeutron()
: G4HETCFragment(G4Neutron::Neutron())
{}
G4double G4HETCNeutron::GetAlpha() const
@@ -50,7 +47,7 @@ G4double G4HETCNeutron::GetAlpha() const
G4double G4HETCNeutron::GetBeta() const
{
return (2.12/(theResA13*theResA13)-0.05)*MeV/GetAlpha();
return (2.12/(theResA13*theResA13)-0.05)/GetAlpha(); // in MeV
}
G4double G4HETCNeutron::GetSpinFactor() const
@@ -59,7 +56,7 @@ G4double G4HETCNeutron::GetSpinFactor() const
return 2.0;
}
G4double G4HETCNeutron::K(const G4Fragment & aFragment)
G4double G4HETCNeutron::K(const G4Fragment& aFragment) const
{
// Number of protons in emitted fragment
G4int Pa = theZ;
@@ -71,36 +68,24 @@ G4double G4HETCNeutron::K(const G4Fragment & aFragment)
G4int P = aFragment.GetNumberOfParticles();
G4int H = aFragment.GetNumberOfHoles();
G4double result = 0.0;
if (P > 0)
{
result = (H + Na/(1.0-r))/P;
}
return std::max(0.0,result);
G4double result = (P > 0) ? (H + Na/(1.0 - r))/P : 0.0;
return result;
}
G4double G4HETCNeutron::SampleKineticEnergy(const G4Fragment & aFragment)
G4double G4HETCNeutron::SampleKineticEnergy(const G4Fragment& frag)
{
G4int H = aFragment.GetNumberOfHoles();
G4int Pb = aFragment.GetNumberOfParticles();
G4int H = frag.GetNumberOfHoles();
G4int Pb = frag.GetNumberOfParticles();
G4int Nb = Pb + H;
G4double U = aFragment.GetExcitationEnergy();
G4double g0 = (6.0/pi2)*fNucData->GetLevelDensity(theFragZ,theFragA,U);
G4double U = frag.GetExcitationEnergy();
G4double g0 =
(6.0/CLHEP::pi2)*fNucData->GetLevelDensity(theFragZ,theFragA,U);
G4double Ab = std::max(0.0,G4double(Pb*Pb+H*H+Pb-3*H)/(4.0*g0));
G4double Ab = std::max(0.0, (G4double)(Pb*Pb+H*H+Pb-3*H)/(4.0*g0));
G4double Emax = theMaxKinEnergy - Ab;
G4double cut = GetBeta() / (GetBeta()+Emax/G4double(Nb+1));
G4double x(0.0);
if (G4UniformRand() <= cut)
{
x = BetaRand(Nb,1);
}
else
{
x = BetaRand(Nb,2);
}
G4double x = (G4UniformRand() <= cut) ? BetaRand(Nb,1) : BetaRand(Nb,2);
return Emax * (1.0 - x);
}
@@ -32,18 +32,16 @@
#include "G4HETCProton.hh"
#include "G4Proton.hh"
#include "G4CoulombBarrier.hh"
G4HETCProton::G4HETCProton()
: G4HETCChargedFragment(G4Proton::Proton(), &theProtonCoulombBarrier)
{}
G4HETCProton::~G4HETCProton()
: G4HETCChargedFragment(G4Proton::Proton(), new G4CoulombBarrier(1, 1))
{}
G4double G4HETCProton::GetAlpha() const
{
G4double C = 0.0;
if (theResZ >= 70)
if (theResZ <= 70)
{
C = 0.10;
}
@@ -55,18 +53,13 @@ G4double G4HETCProton::GetAlpha() const
return 1.0 + C;
}
G4double G4HETCProton::GetBeta() const
{
return -theCoulombBarrier;
}
G4double G4HETCProton::GetSpinFactor() const
{
// 2s+1
return 2.0;
}
G4double G4HETCProton::K(const G4Fragment & aFragment)
G4double G4HETCProton::K(const G4Fragment& aFragment) const
{
// Number of protons in emitted fragment
G4int Pa = theZ;
@@ -32,18 +32,16 @@
#include "G4HETCTriton.hh"
#include "G4Triton.hh"
#include "G4CoulombBarrier.hh"
G4HETCTriton::G4HETCTriton()
: G4HETCChargedFragment(G4Triton::Triton(), &theTritonCoulombBarrier)
{}
G4HETCTriton::~G4HETCTriton()
: G4HETCChargedFragment(G4Triton::Triton(), new G4CoulombBarrier(3, 1))
{}
G4double G4HETCTriton::GetAlpha() const
{
G4double C;
if (theFragZ >= 70)
if (theFragZ <= 70)
{
C = 0.10;
}
@@ -56,18 +54,13 @@ G4double G4HETCTriton::GetAlpha() const
return 1.0 + C/3.0;
}
G4double G4HETCTriton::GetBeta() const
{
return -theCoulombBarrier;
}
G4double G4HETCTriton::GetSpinFactor() const
{
// 2s+1
return 2.0;
}
G4double G4HETCTriton::K(const G4Fragment & aFragment)
G4double G4HETCTriton::K(const G4Fragment& aFragment) const
{
// Number of protons in emitted fragment
G4int Pa = theZ;
@@ -41,14 +41,11 @@
//
#include "G4PreCompoundAlpha.hh"
#include "G4SystemOfUnits.hh"
#include "G4CoulombBarrier.hh"
#include "G4Alpha.hh"
G4PreCompoundAlpha::G4PreCompoundAlpha()
: G4PreCompoundIon(G4Alpha::Alpha(), &theAlphaCoulombBarrier)
{}
G4PreCompoundAlpha::~G4PreCompoundAlpha()
: G4PreCompoundIon(G4Alpha::Alpha(), new G4CoulombBarrier(4, 2))
{}
G4double G4PreCompoundAlpha::FactorialFactor(G4int N, G4int P) const
@@ -88,7 +85,7 @@ G4double G4PreCompoundAlpha::GetRj(G4int nParticles, G4int nCharged) const
{
G4double rj = 0.0;
if(nCharged >=2 && (nParticles-nCharged) >=2 ) {
G4double denominator =
G4double denominator = (G4double)
(nParticles*(nParticles-1))*((nParticles-2)*(nParticles-3));
rj = (6.0*nCharged*(nCharged-1))*
((nParticles-nCharged)*(nParticles-nCharged-1))/denominator;
@@ -40,14 +40,11 @@
//
#include "G4PreCompoundDeuteron.hh"
#include "G4SystemOfUnits.hh"
#include "G4CoulombBarrier.hh"
#include "G4Deuteron.hh"
G4PreCompoundDeuteron::G4PreCompoundDeuteron()
: G4PreCompoundIon(G4Deuteron::Deuteron(), &theDeuteronCoulombBarrier)
{}
G4PreCompoundDeuteron::~G4PreCompoundDeuteron()
: G4PreCompoundIon(G4Deuteron::Deuteron(), new G4CoulombBarrier(2, 1))
{}
G4double G4PreCompoundDeuteron::FactorialFactor(G4int N, G4int P) const
@@ -64,7 +61,7 @@ G4double G4PreCompoundDeuteron::GetRj(G4int nParticles, G4int nCharged) const
{
G4double rj = 0.0;
if(nCharged >=1 && (nParticles-nCharged) >=1) {
G4double denominator = (nParticles*(nParticles-1));
G4double denominator = (G4double)(nParticles*(nParticles-1));
rj = 2*nCharged*(nParticles-nCharged)/denominator;
}
return rj;
@@ -104,7 +104,7 @@ G4ReactionProduct*
G4PreCompoundEmission::PerformEmission(G4Fragment & aFragment)
{
// Choose a Fragment for emission
G4VPreCompoundFragment * thePreFragment =
G4VPreCompoundFragment * thePreFragment =
theFragmentsVector->ChooseFragment();
if (thePreFragment == nullptr)
{
@@ -266,11 +266,11 @@ G4double G4PreCompoundEmission::rho(G4int p, G4int h, G4double gg,
G4double E, G4double Ef) const
{
// 25.02.2010 V.Ivanchenko added more protections
G4double Aph = (p*p + h*h + p - 3.0*h)/(4.0*gg);
G4double Aph = (p*p + h*h + p - 3.0*h)/(4.0*gg);
if ( E - Aph < 0.0) { return 0.0; }
G4double logConst = (p+h)*G4Log(gg)
G4double logConst = (p+h)*G4Log(gg)
- g4calc->logfactorial(p+h-1) - g4calc->logfactorial(p)
- g4calc->logfactorial(h);
@@ -49,11 +49,7 @@ G4PreCompoundFragment::G4PreCompoundFragment(const G4ParticleDefinition* p,
else { index = theA + 1; }
}
G4PreCompoundFragment::~G4PreCompoundFragment()
{}
G4double G4PreCompoundFragment::
CalcEmissionProbability(const G4Fragment & aFragment)
G4double G4PreCompoundFragment::CalcEmissionProbability(const G4Fragment& fr)
{
//G4cout << theCoulombBarrier << " " << GetMaximalKineticEnergy() << G4endl;
// If theCoulombBarrier effect is included in the emission probabilities
@@ -69,11 +65,11 @@ CalcEmissionProbability(const G4Fragment & aFragment)
}
theEmissionProbability =
IntegrateEmissionProbability(theMinKinEnergy,theMaxKinEnergy,aFragment);
IntegrateEmissionProbability(theMinKinEnergy, theMaxKinEnergy, fr);
/*
G4cout << "## G4PreCompoundFragment::CalcEmisProb "
<< "Z= " << aFragment.GetZ_asInt()
<< " A= " << aFragment.GetA_asInt()
<< "Z= " << fr.GetZ_asInt()
<< " A= " << fr.GetA_asInt()
<< " Elow= " << LowerLimit/MeV
<< " Eup= " << UpperLimit/MeV
<< " prob= " << theEmissionProbability
@@ -82,9 +78,9 @@ CalcEmissionProbability(const G4Fragment & aFragment)
return theEmissionProbability;
}
G4double G4PreCompoundFragment::
IntegrateEmissionProbability(G4double low, G4double up,
const G4Fragment & aFragment)
G4double
G4PreCompoundFragment::IntegrateEmissionProbability(G4double low, G4double up,
const G4Fragment& fr)
{
static const G4double den = 1.0/CLHEP::MeV;
G4double del = (up - low);
@@ -92,14 +88,14 @@ IntegrateEmissionProbability(G4double low, G4double up,
nbins = std::max(nbins, 4);
del /= static_cast<G4double>(nbins);
G4double e = low + 0.5*del;
probmax = ProbabilityDistributionFunction(e, aFragment);
probmax = ProbabilityDistributionFunction(e, fr);
//G4cout << " 0. e= " << e << " y= " << probmax << G4endl;
G4double sum = probmax;
for (G4int i=1; i<nbins; ++i) {
e += del;
G4double y = ProbabilityDistributionFunction(e, aFragment);
G4double y = ProbabilityDistributionFunction(e, fr);
probmax = std::max(probmax, y);
sum += y;
if(y < sum*0.01) { break; }
@@ -135,7 +131,7 @@ G4double G4PreCompoundFragment::GetOpt0(G4double ekin) const
{
G4double r0 = theParameters->GetR0()*theResA13;
// cross section is now given in mb (r0 is in mm) for the sake of consistency
//with the rest of the options
// with the rest of the options
return 1.e+25*CLHEP::pi*r0*r0*theResA13*GetAlpha()*(1.0 + GetBeta()/ekin);
}
@@ -41,14 +41,11 @@
//
#include "G4PreCompoundHe3.hh"
#include "G4SystemOfUnits.hh"
#include "G4CoulombBarrier.hh"
#include "G4He3.hh"
G4PreCompoundHe3::G4PreCompoundHe3()
: G4PreCompoundIon(G4He3::He3(), &theHe3CoulombBarrier)
{}
G4PreCompoundHe3::~G4PreCompoundHe3()
: G4PreCompoundIon(G4He3::He3(), new G4CoulombBarrier(3, 2))
{}
G4double G4PreCompoundHe3::FactorialFactor(G4int N, G4int P) const
@@ -65,7 +62,7 @@ G4double G4PreCompoundHe3::GetRj(G4int nParticles, G4int nCharged) const
{
G4double rj = 0.0;
if(nCharged >=2 && (nParticles-nCharged) >= 1) {
G4double denominator = (nParticles*(nParticles-1)*(nParticles-2));
G4double denominator = (G4double)(nParticles*(nParticles-1)*(nParticles-2));
rj = (3*nCharged*(nCharged-1)*(nParticles-nCharged))/denominator;
}
return rj;
@@ -53,9 +53,6 @@ G4PreCompoundIon(const G4ParticleDefinition* part,
fact = 0.75*CLHEP::millibarn/(CLHEP::pi*r0*r0*r0);
}
G4PreCompoundIon::~G4PreCompoundIon()
{}
G4double G4PreCompoundIon::
ProbabilityDistributionFunction(G4double eKin,
const G4Fragment& aFragment)
@@ -97,8 +94,3 @@ ProbabilityDistributionFunction(G4double eKin,
return pA;
}
G4double G4PreCompoundIon::GetBeta() const
{
return -theCoulombBarrier;
}
@@ -208,7 +208,8 @@ G4ReactionProductVector* G4PreCompoundModel::DeExcite(G4Fragment& aFragment)
// Conditions to skip pre-compound and perform equilibrium emission
if (!isActive || (Z < minZ && A < minA) ||
U < fLowLimitExc*A || U > A*fHighLimitExc || 0 < aFragment.GetNumberOfLambdas()) {
U < fLowLimitExc*A || U > A*fHighLimitExc ||
0 < aFragment.GetNumberOfLambdas()) {
PerformEquilibriumEmission(aFragment, Result);
return Result;
}
@@ -273,14 +274,14 @@ G4ReactionProductVector* G4PreCompoundModel::DeExcite(G4Fragment& aFragment)
if(!go_ahead || P1 <= P2+P3 || Z < minZ || A < minA ||
U <= fLowLimitExc*A || U > A*fHighLimitExc ||
aFragment.GetNumberOfExcitons() <= 0) {
//G4cout<<"#4 EquilibriumEmission"<<G4endl;
// G4cout<<"#4 EquilibriumEmission"<<G4endl;
PerformEquilibriumEmission(aFragment,Result);
return Result;
}
G4double emissionProbability =
theEmission->GetTotalProbability(aFragment);
//G4cout<<"#1 TotalEmissionProbability="<<TotalEmissionProbability
// <<" Nex= " <<aFragment.GetNumberOfExcitons()<<G4endl;
//G4cout<<"#1 TotalEmissionProbability="<<emissionProbability
//<<" Nex= " <<aFragment.GetNumberOfExcitons()<<G4endl;
//J.M.Quesada (May 08) this has already been done in order to decide
// what to do (preeq-eq)
// Sum of all probabilities
@@ -41,14 +41,10 @@
//
#include "G4PreCompoundNeutron.hh"
#include "G4SystemOfUnits.hh"
#include "G4Neutron.hh"
G4PreCompoundNeutron::G4PreCompoundNeutron()
: G4PreCompoundNucleon(G4Neutron::Neutron(), &theNeutronCoulombBarrier)
{}
G4PreCompoundNeutron::~G4PreCompoundNeutron()
: G4PreCompoundNucleon(G4Neutron::Neutron())
{}
G4double G4PreCompoundNeutron::GetRj(G4int nParticles, G4int nCharged) const
@@ -68,6 +64,6 @@ G4double G4PreCompoundNeutron::GetAlpha() const
G4double G4PreCompoundNeutron::GetBeta() const
{
return (2.12/(theResA13*theResA13)-0.05)*MeV/GetAlpha();
return (2.12/(theResA13*theResA13)-0.05)/GetAlpha(); // in MeV
}
@@ -49,9 +49,6 @@ G4PreCompoundNucleon::G4PreCompoundNucleon(
: G4PreCompoundFragment(part,aCoulombBarrier)
{}
G4PreCompoundNucleon::~G4PreCompoundNucleon()
{}
G4double G4PreCompoundNucleon::
ProbabilityDistributionFunction(G4double eKin,
const G4Fragment& aFragment)
@@ -77,15 +74,15 @@ ProbabilityDistributionFunction(G4double eKin,
G4double rj = GetRj(P, aFragment.GetNumberOfCharged());
G4double xs = CrossSection(eKin);
if (rj <0.0 || xs < 0.0) { return 0.0; }
if (rj < 0.0 || xs < 0.0) { return 0.0; }
static const G4double fact = 2*CLHEP::millibarn
/(CLHEP::pi2*CLHEP::hbarc*CLHEP::hbarc*CLHEP::hbarc);
G4double Probability = fact * theReducedMass * rj * xs * eKin * P * (N-1)
* g4calc->powN(g1*E1/(g0*E0),N-2) * g1 / (E0*g0*g0);
//G4cout << "N= " << N << " g0= " << g0 << " g1= " << g1 << " E0= " << E0 << " E1= " << E1
// << " prob= " << Probability << G4endl;
//G4cout << "N=" << N << " g0=" << g0 << " g1=" << g1 << " E0=" << E0
// << " E1=" << E1 << " prob=" << Probability << G4endl;
return Probability;
}
@@ -34,7 +34,7 @@
// Author: V.Lara
//
// Modified:
// 21.08.2008 J. M. Quesada added external choice of inverse cross section option
// 21.08.2008 J. M. Quesada added external choice of inverse cross section
// 21.08.2008 J. M. Quesada added external choice for superimposed Coulomb
// barrier (if useSICB=true)
// 20.08.2010 V.Ivanchenko added G4Pow and G4PreCompoundParameters pointers
@@ -42,17 +42,11 @@
//
#include "G4PreCompoundProton.hh"
#include "G4PhysicalConstants.hh"
#include "G4SystemOfUnits.hh"
#include "G4CoulombBarrier.hh"
#include "G4Proton.hh"
#include "G4Log.hh"
#include "G4Exp.hh"
G4PreCompoundProton::G4PreCompoundProton()
: G4PreCompoundNucleon(G4Proton::Proton(), &theProtonCoulombBarrier)
{}
G4PreCompoundProton::~G4PreCompoundProton()
: G4PreCompoundNucleon(G4Proton::Proton(), new G4CoulombBarrier(1, 1))
{}
G4double G4PreCompoundProton::GetRj(G4int nParticles, G4int nCharged) const
@@ -78,9 +72,4 @@ G4double G4PreCompoundProton::GetAlpha() const
}
return 1.0 + C;
}
G4double G4PreCompoundProton::GetBeta() const
{
return -theCoulombBarrier;
}
@@ -64,9 +64,6 @@ G4PreCompoundTransitions::G4PreCompoundTransitions()
r0 = param->GetTransitionsR0();
}
G4PreCompoundTransitions::~G4PreCompoundTransitions()
{}
// Calculates transition probabilities with
// DeltaN = +2 (Trans1) -2 (Trans2) and 0 (Trans3)
G4double G4PreCompoundTransitions::
@@ -104,7 +101,7 @@ CalculateProbability(const G4Fragment & aFragment)
// Sample kind of nucleon-projectile
G4bool ChargedNucleon(false);
if(G4int(P*G4UniformRand()) <= aFragment.GetNumberOfCharged()) {
if(G4lrint(P*G4UniformRand()) <= aFragment.GetNumberOfCharged()) {
ChargedNucleon = true;
}
@@ -41,14 +41,11 @@
//
#include "G4PreCompoundTriton.hh"
#include "G4SystemOfUnits.hh"
#include "G4Triton.hh"
#include "G4CoulombBarrier.hh"
G4PreCompoundTriton::G4PreCompoundTriton()
: G4PreCompoundIon(G4Triton::Triton(), &theTritonCoulombBarrier)
{}
G4PreCompoundTriton::~G4PreCompoundTriton()
: G4PreCompoundIon(G4Triton::Triton(), new G4CoulombBarrier(3, 1))
{}
G4double G4PreCompoundTriton::FactorialFactor(G4int N, const G4int P) const
@@ -65,7 +62,7 @@ G4double G4PreCompoundTriton::GetRj(G4int nParticles, G4int nCharged) const
{
G4double rj = 0.0;
if(nCharged >= 1 && (nParticles-nCharged) >= 2) {
G4double denominator = (nParticles*(nParticles-1)*(nParticles-2));
G4double denominator = (G4double)(nParticles*(nParticles-1)*(nParticles-2));
rj = (3*nCharged*(nParticles-nCharged)*(nParticles-nCharged-1))
/denominator;
}
@@ -75,7 +72,7 @@ G4double G4PreCompoundTriton::GetRj(G4int nParticles, G4int nCharged) const
G4double G4PreCompoundTriton::GetAlpha() const
{
G4double C = 0.0;
if (theFragZ >= 70)
if (theFragZ <= 70)
{
C = 0.10;
}
@@ -35,28 +35,25 @@
#include "G4NucleiProperties.hh"
#include "G4NuclearLevelData.hh"
#include "G4DeexPrecoParameters.hh"
#include "G4VCoulombBarrier.hh"
G4VPreCompoundFragment::G4VPreCompoundFragment(
const G4ParticleDefinition* part, G4VCoulombBarrier* aCoulombBarrier)
: particle(part), theCoulombBarrierPtr(aCoulombBarrier),
theMomentum(0.,0.,0.,0.),
theA(particle->GetBaryonNumber()),
theZ(G4lrint(particle->GetPDGCharge())),
theResA(0),theResZ(0),theFragA(0),theFragZ(0),theBindingEnergy(0.0),
theMinKinEnergy(0.0),theMaxKinEnergy(0.0),theResMass(0.0),
theReducedMass(0.0),
theEmissionProbability(0.0),theCoulombBarrier(0.0),
OPTxs(3),useSICB(true)
: theA(part->GetBaryonNumber()),
theZ(G4lrint(part->GetPDGCharge()/CLHEP::eplus)),
particle(part),
theCoulombBarrierPtr(aCoulombBarrier)
{
theMass = particle->GetPDGMass();
fNucData = G4NuclearLevelData::GetInstance();
theParameters = fNucData->GetParameters();
g4calc = G4Pow::GetInstance();
theResA13 = 0.0;
}
G4VPreCompoundFragment::~G4VPreCompoundFragment()
{}
{
delete theCoulombBarrierPtr;
}
std::ostream&
operator << (std::ostream &out, const G4VPreCompoundFragment &theFragment)
@@ -76,7 +73,7 @@ operator << (std::ostream &out, const G4VPreCompoundFragment *theFragment)
}
void
G4VPreCompoundFragment::Initialize(const G4Fragment & aFragment)
G4VPreCompoundFragment::Initialize(const G4Fragment& aFragment)
{
theFragA = aFragment.GetA_asInt();
theFragZ = aFragment.GetZ_asInt();
@@ -89,10 +86,12 @@ G4VPreCompoundFragment::Initialize(const G4Fragment & aFragment)
}
theResA13 = g4calc->Z13(theResA);
theCoulombBarrier = theCoulombBarrierPtr->
GetCoulombBarrier(theResA,theResZ,aFragment.GetExcitationEnergy());
G4double elim = (0 == OPTxs) ? theCoulombBarrier : theCoulombBarrier*0.5;
if (0 < theZ) {
theCoulombBarrier = theCoulombBarrierPtr->
GetCoulombBarrier(theResA, theResZ, aFragment.GetExcitationEnergy());
}
G4double elim = (0 == OPTxs) ? theCoulombBarrier : theCoulombBarrier*0.6;
// Calculate masses
theResMass = G4NucleiProperties::GetNuclearMass(theResA, theResZ);
@@ -106,9 +105,9 @@ G4VPreCompoundFragment::Initialize(const G4Fragment & aFragment)
// after separation - the true assimptotic value
G4double Ecm = aFragment.GetMomentum().m();
G4double twoEcm = Ecm + Ecm;
theMaxKinEnergy = std::max(((Ecm-theResMass)*(Ecm+theResMass) + theMass*theMass)
/twoEcm - theMass,0.0);
theMaxKinEnergy = std::max(((Ecm-theResMass)*(Ecm+theResMass) +
theMass*theMass)/twoEcm - theMass, 0.0);
theMinKinEnergy = (elim == 0.0) ? 0.0 :
std::max(((theMass+elim)*(twoEcm-theMass-elim) +
theMass*theMass)/twoEcm - theMass,0.0);
std::max(((theMass+elim)*(twoEcm-theMass-elim) +
theMass*theMass)/twoEcm - theMass, 0.0);
}