Import Geant4 11.3.0 source tree
This commit is contained in:
@@ -6,6 +6,22 @@ It must **not** be used as a substitute for writing good git commit messages!
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
## 2024-09-09 Vladimir Ivanchenko (hadr-pre-V11-02-03)
|
||||
- G4PreCompoundFragment, G4VPreCompoundFragment - use G4InterfaceToXS class
|
||||
instead of obsolete G4XSectionXS
|
||||
|
||||
## 2024-08-18 Vladimir Ivanchenko (hadr-pre-V11-02-02)
|
||||
- G4PreCompoundFragment, G4VPreCompoundFragment - removed shadowing and minor
|
||||
memory leak at exit, moved initialisation to constructors, define OPTxs
|
||||
parameter only in class constructor
|
||||
|
||||
## 2024-08-14 V. Ivanchenko (hadr-pre-V11-02-01)
|
||||
- G4PreCompoundFragment - complete implementation of usage of XS cross section
|
||||
|
||||
## 2024-07-16 V. Ivanchenko (hadr-pre-V11-02-00)
|
||||
- G4VPreCompoundFragment, G4PreCompoundFragment - added a new option to use
|
||||
G4XSectionXS cross section class
|
||||
|
||||
## 2023-07-12 V. Ivanchenko (hadr-pre-V11-01-00)
|
||||
- clean-up of the sub-library: use the default Coulomb barrier computation,
|
||||
fix format, removed unused data and methods
|
||||
|
||||
+11
-7
@@ -48,7 +48,7 @@ public:
|
||||
G4VCoulombBarrier * aCoulombBarrier);
|
||||
|
||||
~G4PreCompoundFragment() override = default;
|
||||
|
||||
|
||||
// ================================================
|
||||
// Methods for calculating the emission probability
|
||||
// ================================================
|
||||
@@ -59,6 +59,10 @@ public:
|
||||
|
||||
G4double SampleKineticEnergy(const G4Fragment& aFragment) override;
|
||||
|
||||
G4double CrossSection(G4double ekin);
|
||||
|
||||
G4double RecentXS() const { return recentXS; };
|
||||
|
||||
G4PreCompoundFragment(const G4PreCompoundFragment &right) = delete;
|
||||
const G4PreCompoundFragment&
|
||||
operator= (const G4PreCompoundFragment &right) = delete;
|
||||
@@ -67,24 +71,24 @@ public:
|
||||
|
||||
protected:
|
||||
|
||||
G4double CrossSection(G4double ekin) const;
|
||||
|
||||
virtual G4double
|
||||
ProbabilityDistributionFunction(G4double ekin,
|
||||
const G4Fragment & aFragment) = 0;
|
||||
|
||||
private:
|
||||
|
||||
// This method performs integration for probability function over
|
||||
// fragment kinetic energy
|
||||
G4double IntegrateEmissionProbability(G4double low, G4double up,
|
||||
const G4Fragment & aFragment);
|
||||
|
||||
G4double GetOpt0(G4double ekin) const;
|
||||
|
||||
G4int lastA{0};
|
||||
|
||||
G4int index;
|
||||
|
||||
G4double muu;
|
||||
G4double probmax;
|
||||
G4double muu{0.0};
|
||||
G4double probmax{0.0};
|
||||
G4double recentXS{0.0};
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
+8
-15
@@ -51,6 +51,7 @@
|
||||
class G4NuclearLevelData;
|
||||
class G4DeexPrecoParameters;
|
||||
class G4VCoulombBarrier;
|
||||
class G4InterfaceToXS;
|
||||
|
||||
class G4VPreCompoundFragment
|
||||
{
|
||||
@@ -70,8 +71,8 @@ public:
|
||||
// Pure Virtual methods
|
||||
// =====================
|
||||
|
||||
// Initialization method
|
||||
void Initialize(const G4Fragment& aFragment);
|
||||
// Run time initialization method
|
||||
G4bool Initialize(const G4Fragment& aFragment);
|
||||
|
||||
// Methods for calculating the emission probability
|
||||
// ------------------------------------------------
|
||||
@@ -83,8 +84,6 @@ public:
|
||||
// sample kinetic energy of emitted fragment
|
||||
virtual G4double SampleKineticEnergy(const G4Fragment&) = 0;
|
||||
|
||||
inline G4bool IsItPossible(const G4Fragment& aFragment) const;
|
||||
|
||||
inline G4ReactionProduct* GetReactionProduct() const;
|
||||
|
||||
G4int GetA() const { return theA; }
|
||||
@@ -113,7 +112,7 @@ public:
|
||||
void SetMomentum(const G4LorentzVector& lv) { theMomentum = lv; }
|
||||
|
||||
//for inverse cross section choice
|
||||
void SetOPTxs(G4int opt) { OPTxs = opt; }
|
||||
void SetOPTxs(G4int) {}
|
||||
//for superimposed Coulomb Barrier for inverse cross sections
|
||||
void UseSICB(G4bool use) { useSICB = use; }
|
||||
|
||||
@@ -132,6 +131,7 @@ protected:
|
||||
G4NuclearLevelData* fNucData;
|
||||
G4DeexPrecoParameters* theParameters;
|
||||
G4Pow* g4calc;
|
||||
G4InterfaceToXS* fXSection{nullptr};
|
||||
|
||||
G4int theA;
|
||||
G4int theZ;
|
||||
@@ -139,6 +139,9 @@ protected:
|
||||
G4int theResZ{0};
|
||||
G4int theFragA{0};
|
||||
G4int theFragZ{0};
|
||||
//for inverse cross section choice
|
||||
G4int OPTxs;
|
||||
G4int index{0};
|
||||
|
||||
G4double theResA13{0.0};
|
||||
G4double theBindingEnergy{0.0};
|
||||
@@ -151,8 +154,6 @@ protected:
|
||||
G4double theEmissionProbability{0.0};
|
||||
G4double theCoulombBarrier{0.0};
|
||||
|
||||
//for inverse cross section choice
|
||||
G4int OPTxs{3};
|
||||
//for superimposed Coulomb Barrier for inverse cross sections
|
||||
G4bool useSICB{true};
|
||||
|
||||
@@ -163,14 +164,6 @@ private:
|
||||
G4LorentzVector theMomentum{0., 0., 0., 0.};
|
||||
};
|
||||
|
||||
inline G4bool
|
||||
G4VPreCompoundFragment::IsItPossible(const G4Fragment& aFragment) const
|
||||
{
|
||||
G4int pplus = aFragment.GetNumberOfCharged();
|
||||
G4int pneut = aFragment.GetNumberOfParticles()-pplus;
|
||||
return (pneut >= theA - theZ && pplus >= theZ && theMaxKinEnergy > 0.0);
|
||||
}
|
||||
|
||||
inline G4ReactionProduct* G4VPreCompoundFragment::GetReactionProduct() const
|
||||
{
|
||||
G4ReactionProduct* theReactionProduct = new G4ReactionProduct(particle);
|
||||
|
||||
@@ -76,5 +76,6 @@ geant4_module_link_libraries(G4had_preequ_exciton
|
||||
G4baryons
|
||||
G4hadronic_deex_management
|
||||
G4hadronic_deex_util
|
||||
G4hadronic_xsect
|
||||
G4ions
|
||||
G4procman)
|
||||
|
||||
+2
-2
@@ -52,12 +52,12 @@ CreateFragmentVector()
|
||||
theFragVector->push_back(new G4PreCompoundProton());
|
||||
// deuterium
|
||||
theFragVector->push_back(new G4PreCompoundDeuteron());
|
||||
// alpha
|
||||
theFragVector->push_back(new G4PreCompoundAlpha());
|
||||
// triton
|
||||
theFragVector->push_back(new G4PreCompoundTriton());
|
||||
// helium3
|
||||
theFragVector->push_back(new G4PreCompoundHe3());
|
||||
// alpha
|
||||
theFragVector->push_back(new G4PreCompoundAlpha());
|
||||
|
||||
return theFragVector;
|
||||
}
|
||||
|
||||
+37
-39
@@ -37,42 +37,27 @@
|
||||
#include "G4KalbachCrossSection.hh"
|
||||
#include "G4ChatterjeeCrossSection.hh"
|
||||
#include "G4DeexPrecoParameters.hh"
|
||||
#include "G4InterfaceToXS.hh"
|
||||
#include "G4IsotopeList.hh"
|
||||
#include "Randomize.hh"
|
||||
|
||||
G4PreCompoundFragment::G4PreCompoundFragment(const G4ParticleDefinition* p,
|
||||
G4VCoulombBarrier* aCoulBarrier)
|
||||
: G4VPreCompoundFragment(p, aCoulBarrier)
|
||||
{
|
||||
muu = probmax = 0.0;
|
||||
if(0 == theZ) { index = 0; }
|
||||
else if(1 == theZ) { index = theA; }
|
||||
else { index = theA + 1; }
|
||||
}
|
||||
{}
|
||||
|
||||
G4double G4PreCompoundFragment::CalcEmissionProbability(const G4Fragment& fr)
|
||||
{
|
||||
//G4cout << theCoulombBarrier << " " << GetMaximalKineticEnergy() << G4endl;
|
||||
// If theCoulombBarrier effect is included in the emission probabilities
|
||||
// Coulomb barrier is the lower limit of integration over kinetic energy
|
||||
|
||||
theEmissionProbability = 0.0;
|
||||
|
||||
if (theMaxKinEnergy <= theMinKinEnergy) { return 0.0; }
|
||||
|
||||
// compute power once
|
||||
if(0 < index) {
|
||||
muu = G4KalbachCrossSection::ComputePowerParameter(theResA, index);
|
||||
}
|
||||
|
||||
theEmissionProbability =
|
||||
IntegrateEmissionProbability(theMinKinEnergy, theMaxKinEnergy, fr);
|
||||
/*
|
||||
theEmissionProbability = (Initialize(fr)) ?
|
||||
IntegrateEmissionProbability(theMinKinEnergy, theMaxKinEnergy, fr) : 0.0;
|
||||
/*
|
||||
G4cout << "## G4PreCompoundFragment::CalcEmisProb "
|
||||
<< "Z= " << fr.GetZ_asInt()
|
||||
<< " A= " << fr.GetA_asInt()
|
||||
<< " Elow= " << LowerLimit/MeV
|
||||
<< " Eup= " << UpperLimit/MeV
|
||||
<< "Zf= " << fr.GetZ_asInt()
|
||||
<< " Af= " << fr.GetA_asInt()
|
||||
<< " Elow= " << theMinKinEnergy
|
||||
<< " Eup= " << theMaxKinEnergy
|
||||
<< " prob= " << theEmissionProbability
|
||||
<< " index=" << index << " Z=" << theZ << " A=" << theA
|
||||
<< G4endl;
|
||||
*/
|
||||
return theEmissionProbability;
|
||||
@@ -106,24 +91,37 @@ G4PreCompoundFragment::IntegrateEmissionProbability(G4double low, G4double up,
|
||||
return sum;
|
||||
}
|
||||
|
||||
G4double G4PreCompoundFragment::CrossSection(G4double ekin) const
|
||||
G4double G4PreCompoundFragment::CrossSection(G4double ekin)
|
||||
{
|
||||
G4double res;
|
||||
if(OPTxs == 0 || (OPTxs == 4 && theMaxKinEnergy < 10.)) {
|
||||
res = GetOpt0(ekin);
|
||||
/*
|
||||
G4cout << "G4PreCompoundFragment::CrossSection OPTxs=" << OPTxs << " E=" << ekin
|
||||
<< " resZ=" << theResZ << " resA=" << theResA << " index=" << index
|
||||
<< " fXSection:" << fXSection << G4endl;
|
||||
*/
|
||||
// compute power once
|
||||
if (OPTxs > 1 && 0 < index && theResA != lastA) {
|
||||
lastA = theResA;
|
||||
muu = G4KalbachCrossSection::ComputePowerParameter(lastA, index);
|
||||
}
|
||||
if (OPTxs == 0) {
|
||||
recentXS = GetOpt0(ekin);
|
||||
} else if (OPTxs == 1) {
|
||||
G4int Z = std::min(theResZ, ZMAXNUCLEARDATA);
|
||||
//G4double e = std::max(ekin, lowEnergyLimitMeV[Z]);
|
||||
recentXS = fXSection->GetElementCrossSection(ekin, Z)/CLHEP::millibarn;
|
||||
|
||||
} else if(OPTxs <= 2) {
|
||||
res = G4ChatterjeeCrossSection::ComputeCrossSection(ekin,
|
||||
theCoulombBarrier,
|
||||
theResA13, muu,
|
||||
index, theZ, theResA);
|
||||
} else if (OPTxs == 2) {
|
||||
recentXS = G4ChatterjeeCrossSection::ComputeCrossSection(ekin,
|
||||
theCoulombBarrier,
|
||||
theResA13, muu,
|
||||
index, theZ, theResA);
|
||||
|
||||
} else {
|
||||
res = G4KalbachCrossSection::ComputeCrossSection(ekin, theCoulombBarrier,
|
||||
theResA13, muu, index,
|
||||
theZ, theA, theResA);
|
||||
recentXS = G4KalbachCrossSection::ComputeCrossSection(ekin, theCoulombBarrier,
|
||||
theResA13, muu, index,
|
||||
theZ, theA, theResA);
|
||||
}
|
||||
return res;
|
||||
return recentXS;
|
||||
}
|
||||
|
||||
G4double G4PreCompoundFragment::GetOpt0(G4double ekin) const
|
||||
|
||||
+6
-8
@@ -77,15 +77,13 @@ G4double G4PreCompoundFragmentVector::CalculateProbabilities(
|
||||
//G4cout << "## G4PreCompoundFragmentVector::CalculateProbabilities nCh= "
|
||||
// << nChannels << G4endl;
|
||||
G4double probtot = 0.0;
|
||||
for (G4int i=0; i< nChannels; ++i) {
|
||||
(*theChannels)[i]->Initialize(aFragment);
|
||||
G4double prob = ((*theChannels)[i]->IsItPossible(aFragment))
|
||||
? (*theChannels)[i]->CalcEmissionProbability(aFragment)
|
||||
: 0.0;
|
||||
probtot += prob;
|
||||
for (G4int i=0; i<nChannels; ++i) {
|
||||
if ((*theChannels)[i]->Initialize(aFragment)) {
|
||||
G4double prob = (*theChannels)[i]->CalcEmissionProbability(aFragment);
|
||||
probtot += prob;
|
||||
}
|
||||
probabilities[i] = probtot;
|
||||
//G4cout<<" prob= " << prob << " probtot= " << probtot
|
||||
// << " for "<< i << "-th channel" <<G4endl;
|
||||
//G4cout<< " probtot= " << probtot << " for "<< i << "-th channel" <<G4endl;
|
||||
}
|
||||
return probtot;
|
||||
}
|
||||
|
||||
+35
-16
@@ -36,6 +36,7 @@
|
||||
#include "G4NuclearLevelData.hh"
|
||||
#include "G4DeexPrecoParameters.hh"
|
||||
#include "G4VCoulombBarrier.hh"
|
||||
#include "G4InterfaceToXS.hh"
|
||||
|
||||
G4VPreCompoundFragment::G4VPreCompoundFragment(
|
||||
const G4ParticleDefinition* part, G4VCoulombBarrier* aCoulombBarrier)
|
||||
@@ -47,12 +48,24 @@ G4VPreCompoundFragment::G4VPreCompoundFragment(
|
||||
theMass = particle->GetPDGMass();
|
||||
fNucData = G4NuclearLevelData::GetInstance();
|
||||
theParameters = fNucData->GetParameters();
|
||||
OPTxs = theParameters->GetDeexModelType();
|
||||
g4calc = G4Pow::GetInstance();
|
||||
|
||||
if (1 == theZ && 1 == theA) { index = 1; }
|
||||
else if (1 == theZ && 2 == theA) { index = 2; }
|
||||
else if (1 == theZ && 3 == theA) { index = 3; }
|
||||
else if (2 == theZ && 3 == theA) { index = 4; }
|
||||
else if (2 == theZ && 4 == theA) { index = 5; }
|
||||
|
||||
if (OPTxs == 1) {
|
||||
fXSection = new G4InterfaceToXS(particle, index);
|
||||
}
|
||||
}
|
||||
|
||||
G4VPreCompoundFragment::~G4VPreCompoundFragment()
|
||||
{
|
||||
delete theCoulombBarrierPtr;
|
||||
delete fXSection;
|
||||
}
|
||||
|
||||
std::ostream&
|
||||
@@ -72,7 +85,7 @@ operator << (std::ostream &out, const G4VPreCompoundFragment *theFragment)
|
||||
return out;
|
||||
}
|
||||
|
||||
void
|
||||
G4bool
|
||||
G4VPreCompoundFragment::Initialize(const G4Fragment& aFragment)
|
||||
{
|
||||
theFragA = aFragment.GetA_asInt();
|
||||
@@ -81,33 +94,39 @@ G4VPreCompoundFragment::Initialize(const G4Fragment& aFragment)
|
||||
theResZ = theFragZ - theZ;
|
||||
|
||||
theMinKinEnergy = theMaxKinEnergy = theCoulombBarrier = 0.0;
|
||||
if ((theResA < theResZ) || (theResA < theA) || (theResZ < theZ)) {
|
||||
return;
|
||||
if ((theResA < theResZ) || (theResA < theA) || (theResZ < theZ)
|
||||
|| (theResA == theA && theResZ < theZ)
|
||||
|| ((theResA > 1) && (theResA == theResZ || theResZ == 0))) {
|
||||
return false;
|
||||
}
|
||||
theResMass = G4NucleiProperties::GetNuclearMass(theResA, theResZ);
|
||||
G4double Ecm = aFragment.GetMomentum().m();
|
||||
if (Ecm <= theResMass + theMass) { return 0.0; }
|
||||
|
||||
theResA13 = g4calc->Z13(theResA);
|
||||
|
||||
G4double elim = 0.0;
|
||||
if (0 < theZ) {
|
||||
theCoulombBarrier = theCoulombBarrierPtr->
|
||||
GetCoulombBarrier(theResA, theResZ, aFragment.GetExcitationEnergy());
|
||||
elim = (0 < OPTxs) ? theCoulombBarrier*0.5 : theCoulombBarrier;
|
||||
}
|
||||
G4double elim = (0 == OPTxs) ? theCoulombBarrier : theCoulombBarrier*0.6;
|
||||
|
||||
|
||||
// Compute Maximal Kinetic Energy which can be carried by fragments
|
||||
// after separation - the true assimptotic value
|
||||
theMaxKinEnergy =
|
||||
0.5*((Ecm - theResMass)*(Ecm + theResMass) + theMass*theMass)/Ecm - theMass;
|
||||
G4double resM = Ecm - theMass - elim;
|
||||
if (resM < theResMass) { return false; }
|
||||
theMinKinEnergy =
|
||||
0.5*((Ecm - resM)*(Ecm + resM) + theMass*theMass)/Ecm - theMass;
|
||||
|
||||
if (theMinKinEnergy >= theMaxKinEnergy) { return false; }
|
||||
// Calculate masses
|
||||
theResMass = G4NucleiProperties::GetNuclearMass(theResA, theResZ);
|
||||
theReducedMass = theResMass*theMass/(theResMass + theMass);
|
||||
|
||||
// Compute Binding Energies for fragments
|
||||
// needed to separate a fragment from the nucleus
|
||||
theBindingEnergy = theResMass + theMass - aFragment.GetGroundStateMass();
|
||||
|
||||
// Compute Maximal Kinetic Energy which can be carried by fragments
|
||||
// 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);
|
||||
theMinKinEnergy = (elim == 0.0) ? 0.0 :
|
||||
std::max(((theMass+elim)*(twoEcm-theMass-elim) +
|
||||
theMass*theMass)/twoEcm - theMass, 0.0);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user