Import Geant4 11.4.0 source tree

This commit is contained in:
Gabriele Cosmo
2025-12-05 08:54:02 +01:00
parent a499fb82e9
commit b4a16de652
6484 changed files with 232674 additions and 221097 deletions
@@ -134,10 +134,12 @@ G4FissionFragmentGenerator::G4GenerateFission(G4long NumberOfFissions,
// InitializeFissionProductYieldClass();
}
for (G4long i = 0; i < NumberOfFissions; i++) {
FissionEvents.push_back(YieldData_->G4GetFission());
// FIXME Use particle momentum in balance equation
// FissionEvents.push_back(YieldData_->G4GetFission(Projectile.Get4Momentum()));
if (nullptr != YieldData_) {
for (G4long i = 0; i < NumberOfFissions; i++) {
FissionEvents.push_back(YieldData_->G4GetFission());
// FIXME Use particle momentum in balance equation
// FissionEvents.push_back(YieldData_->G4GetFission(Projectile.Get4Momentum()));
}
}
}
else {
@@ -194,7 +194,9 @@ void G4ParticleHPChannel::Harmonise(G4ParticleHPVector*& theStore,
m_tmp++;
a++;
G4double xp = aPassive->GetEnergy(p);
if (std::abs(std::abs(xp - xa) / xa) < 0.001) {
xa = std::max(xa, 0.0);
xp = std::max(xp, 0.0);
if (std::abs(xp - xa) < 0.001*xa) {
++p;
}
}
@@ -69,11 +69,6 @@ void G4ParticleHPElementData::Init(G4Element* theElement,
G4double frac = theElement->GetRelativeAbundanceVector()[i1] / CLHEP::perCent;
UpdateData(A, Z, M, i1, frac, projectile, dataDirVariable);
}
//theElasticData->ThinOut(precision);
//if (projectile == G4Neutron::Neutron()) theInelasticData->ThinOut(precision);
//theCaptureData->ThinOut(precision);
//theFissionData->ThinOut(precision);
}
void G4ParticleHPElementData::UpdateData(G4int A, G4int Z, G4int M, G4int index,
@@ -270,7 +270,7 @@ void G4ParticleHPFinalState::adjust_final_state(G4LorentzVector init_4p_lab)
G4LorentzVector dif_4p = init_4p_lab - secs_4p_lab;
G4LorentzVector p4(0);
if (ires == -1) {
if (ires == -1 && nullptr != resi_pd) {
// Create and Add Residual Nucleus
ires = nSecondaries;
nSecondaries += 1;
@@ -155,7 +155,8 @@ G4double G4ParticleHPKallbachMannSyst::A(G4double anEnergy)
G4double G4ParticleHPKallbachMannSyst::SeparationEnergy(G4int Ac, G4int Nc, G4int AA, G4int ZA,
G4int Abinding, G4int Zbinding)
{
G4double result;
G4double result = 0.0;
if (Ac < 1 || AA < 1) { return result; }
G4int NA = AA - ZA;
G4int Zc = Ac - Nc;
result = 15.68 * (Ac - AA);
@@ -688,10 +688,11 @@ G4ParticleHPThermalScattering::sample_inelastic_E_mu(G4double pE,
}
// Compute interpolation factor of the incident neutron energy
G4double factor = (energyLH.second - pE) / (energyLH.second - energyLH.first);
if ((energyLH.second - pE) <= 0. && std::fabs(pE / energyLH.second - 1) < 1E-11) factor = 0.;
if ((energyLH.first - pE) >= 0. && std::fabs(energyLH.first / pE - 1) < 1E-11) factor = 1.;
const G4double deltalim = 1.e-6*CLHEP::eV;
G4double e1 = energyLH.first;
G4double e2 = energyLH.second;
G4double factor = (std::abs(e2 - e1) > deltalim) ? (e2 - pE)/(e2 - e1) : 0.0;
factor = std::min(factor, 1.0);
G4double rndm1 = G4UniformRand();
G4double rndm2 = G4UniformRand();
@@ -995,7 +996,7 @@ G4ParticleHPThermalScattering::create_sE_and_EPM_from_pE_and_vE_P_E_isoAng(
E_isoAng anE_isoAng;
// extreme case - there is no possibility to sample
if (nullptr == pE_P_E_isoAng_EL || nullptr == pE_P_E_isoAng_EL) {
if (nullptr == pE_P_E_isoAng_EL || nullptr == pE_P_E_isoAng_EH) {
anE_isoAng.n = 1;
anE_isoAng.isoAngle.push_back(0.0);
return std::pair<G4double, E_isoAng>(pE, anE_isoAng);