Import Geant4 11.3.1 source tree
This commit is contained in:
@@ -6,6 +6,9 @@ It must **not** be used as a substitute for writing good git commit messages!
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
## 2025-01-14 Ben Morgan (emdna-V11-02-18)
|
||||
- Remove obsolete/commented references to G4AllocatorList.
|
||||
|
||||
## 2024-10-31 Hoang Tran (emdna-V11-02-17)
|
||||
- missing value in DNA PTB Ionization Structure;
|
||||
- missing GetMaterial() in DNA PTB Excitation and Elastic models (PR#78,by mjpietrzak)
|
||||
|
||||
@@ -48,7 +48,6 @@
|
||||
|
||||
#include "G4FastList.hh"
|
||||
#include "G4ManyFastLists.hh"
|
||||
#include "G4AllocatorList.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4IT.hh"
|
||||
|
||||
|
||||
@@ -64,8 +64,6 @@ G4FastListNode<G4Track>* G4FastList<G4Track>::__GetNode(G4Track* __track)
|
||||
template<>
|
||||
void G4FastList<G4Track>::DeleteObject(G4Track* __track)
|
||||
{
|
||||
if (G4AllocatorList::GetAllocatorListIfExist() == nullptr) return;
|
||||
|
||||
auto __step = const_cast<G4Step*>(__track->GetStep());
|
||||
if (__step != nullptr)
|
||||
{
|
||||
|
||||
-14
@@ -35,7 +35,6 @@
|
||||
#include "G4MolecularConfiguration.hh"
|
||||
#include "G4MoleculeDefinition.hh"
|
||||
#include "G4UIcommand.hh"
|
||||
#include "G4AllocatorList.hh"
|
||||
#include "G4AutoLock.hh"
|
||||
#include "G4MoleculeTable.hh"
|
||||
#include "G4Serialize.hh"
|
||||
@@ -147,10 +146,6 @@ G4MolecularConfiguration::GetManager()
|
||||
G4MolecularConfiguration::
|
||||
G4MolecularConfigurationManager::~G4MolecularConfigurationManager()
|
||||
{
|
||||
// G4cout << "Does G4AllocatorList exists= ";
|
||||
// G4cout << (G4AllocatorList::GetAllocatorListIfExist() ? "true":"false")
|
||||
// << G4endl;
|
||||
|
||||
G4MolecularConfigurationManager::MolElectronConfTable::iterator it1;
|
||||
G4MolecularConfigurationManager::ElectronOccupancyTable::
|
||||
iterator it2;
|
||||
@@ -507,15 +502,6 @@ G4MolecularConfiguration(const G4MoleculeDefinition* moleculeDef,
|
||||
G4MolecularConfiguration::~G4MolecularConfiguration()
|
||||
{
|
||||
if (fgManager != nullptr) fgManager->RemoveMolecularConfigurationFromTable(this);
|
||||
|
||||
// if (G4AllocatorList::GetAllocatorListIfExist())
|
||||
// {
|
||||
// if (fElectronOccupancy)
|
||||
// {
|
||||
// delete fElectronOccupancy;
|
||||
// fElectronOccupancy = 0;
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
//______________________________________________________________________________
|
||||
|
||||
@@ -6,6 +6,13 @@ It must **not** be used as a substitute for writing good git commit messages!
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
## 2025-02-07 L. Pandola (emlowen-V11-02-08)
|
||||
- Fix residual Coverity defect on G4ShellData
|
||||
|
||||
## 2025-01-09 L. Pandola
|
||||
- Fix Coverity warnings in Penenelope models, G4ShellData, G4FluoData and
|
||||
G4AugerTransition
|
||||
|
||||
## 2024-12-02 A. Ribon (emlowen-V11-02-07)
|
||||
- G4UAtomicDeexcitation : clear vector (vacancyArray) in the method
|
||||
G4UAtomicDeexcitation::GenerateParticles, to avoid rare non-reproducibility
|
||||
|
||||
@@ -64,10 +64,16 @@ G4AugerTransition::~G4AugerTransition()
|
||||
const std::vector<G4int>* G4AugerTransition::AugerOriginatingShellIds(G4int startShellId) const
|
||||
{
|
||||
auto shellId = augerOriginatingShellIdsMap.find(startShellId);
|
||||
|
||||
if (shellId == augerOriginatingShellIdsMap.end())
|
||||
{
|
||||
G4Exception("G4AugerTransition::AugerOriginatingShellIds()",
|
||||
"em2199",JustWarning,"Error: no Auger ID found");
|
||||
return nullptr;
|
||||
}
|
||||
const std::vector<G4int>* dataSet = &(*shellId).second;
|
||||
if (dataSet->empty())
|
||||
G4cout << "Error: no auger Id found"<< G4endl;
|
||||
G4Exception("G4AugerTransition::AugerOriginatingShellIds()",
|
||||
"em2198",JustWarning,"Error: no Auger ID found");
|
||||
return dataSet;
|
||||
}
|
||||
|
||||
|
||||
@@ -157,13 +157,15 @@ G4double G4FluoData::StartShellEnergy(G4int initIndex, G4int vacancyIndex) const
|
||||
else
|
||||
{
|
||||
auto pos = energyMap.find(vacancyIndex);
|
||||
|
||||
G4DataVector dataSet = *((*pos).second);
|
||||
|
||||
G4int nData = (G4int)dataSet.size();
|
||||
if (initIndex >= 0 && initIndex < nData)
|
||||
if (pos != energyMap.end())
|
||||
{
|
||||
n = dataSet[initIndex];
|
||||
G4DataVector dataSet = *((*pos).second);
|
||||
|
||||
G4int nData = (G4int)dataSet.size();
|
||||
if (initIndex >= 0 && initIndex < nData)
|
||||
{
|
||||
n = dataSet[initIndex];
|
||||
}
|
||||
}
|
||||
}
|
||||
return n;
|
||||
@@ -184,13 +186,15 @@ G4double G4FluoData::StartShellProb(G4int initIndex, G4int vacancyIndex) const
|
||||
else
|
||||
{
|
||||
auto pos = probabilityMap.find(vacancyIndex);
|
||||
|
||||
G4DataVector dataSet = *((*pos).second);
|
||||
|
||||
G4int nData = (G4int)dataSet.size();
|
||||
if (initIndex >= 0 && initIndex < nData)
|
||||
if (pos != probabilityMap.end())
|
||||
{
|
||||
n = dataSet[initIndex];
|
||||
G4DataVector dataSet = *((*pos).second);
|
||||
|
||||
G4int nData = (G4int)dataSet.size();
|
||||
if (initIndex >= 0 && initIndex < nData)
|
||||
{
|
||||
n = dataSet[initIndex];
|
||||
}
|
||||
}
|
||||
}
|
||||
return n;
|
||||
|
||||
@@ -497,7 +497,8 @@ G4double G4PenelopeBremsstrahlungAngular::CalculateEffectiveZ(const G4Material*
|
||||
}
|
||||
//Normalize
|
||||
for (G4int i=0;i<nElements;++i)
|
||||
(*StechiometricFactors)[i] /= MaxStechiometricFactor;
|
||||
if (MaxStechiometricFactor > 0.)
|
||||
(*StechiometricFactors)[i] /= MaxStechiometricFactor;
|
||||
|
||||
G4double sumz2 = 0;
|
||||
G4double sums = 0;
|
||||
@@ -509,7 +510,7 @@ G4double G4PenelopeBremsstrahlungAngular::CalculateEffectiveZ(const G4Material*
|
||||
}
|
||||
delete StechiometricFactors;
|
||||
|
||||
G4double ZBR = std::sqrt(sumz2/sums);
|
||||
G4double ZBR = (sums > 0.) ? std::sqrt(sumz2/sums) : 0.;
|
||||
fEffectiveZSq->insert(std::make_pair(material,ZBR));
|
||||
|
||||
return ZBR;
|
||||
|
||||
@@ -232,7 +232,8 @@ void G4PenelopeBremsstrahlungFS::BuildScaledXSTable(const G4Material* material,
|
||||
}
|
||||
//Normalize
|
||||
for (std::size_t i=0;i<nElements;i++)
|
||||
(*StechiometricFactors)[i] /= MaxStechiometricFactor;
|
||||
if (MaxStechiometricFactor > 0.)
|
||||
(*StechiometricFactors)[i] /= MaxStechiometricFactor;
|
||||
|
||||
G4double sumz2 = 0;
|
||||
G4double sums = 0;
|
||||
@@ -604,14 +605,14 @@ G4double G4PenelopeBremsstrahlungFS::SampleGammaEnergy(G4double energy,const G4M
|
||||
const G4double cut) const
|
||||
{
|
||||
std::pair<const G4Material*,G4double> theKey = std::make_pair(mat,cut);
|
||||
if (!(fSamplingTable->count(theKey)) || !(fPBcut->count(theKey)))
|
||||
if (!(fSamplingTable->count(theKey)) || !(fPBcut->count(theKey)) ||
|
||||
!(fReducedXSTable->count(theKey)))
|
||||
{
|
||||
G4ExceptionDescription ed;
|
||||
ed << "Unable to retrieve the SamplingTable: " <<
|
||||
fSamplingTable->count(theKey) << " " <<
|
||||
fPBcut->count(theKey) << G4endl;
|
||||
ed << "Unable to retrieve the SamplingTable for " << mat->GetName() << G4endl;
|
||||
G4Exception("G4PenelopeBremsstrahlungFS::SampleGammaEnergy()",
|
||||
"em2014",FatalException,ed);
|
||||
return 0.;
|
||||
}
|
||||
const G4PhysicsTable* theTableInte = fSamplingTable->find(theKey)->second;
|
||||
const G4PhysicsTable* theTableRed = fReducedXSTable->find(theKey)->second;
|
||||
|
||||
@@ -257,7 +257,8 @@ G4double G4PenelopeBremsstrahlungModel::CrossSectionPerVolume(const G4Material*
|
||||
{
|
||||
G4cout << "G4PenelopeBremsstrahlungModel " << G4endl;
|
||||
G4cout << "Mean free path for gamma emission > " << cutEnergy/keV << " keV at " <<
|
||||
energy/keV << " keV = " << (1./crossPerVolume)/mm << " mm" << G4endl;
|
||||
energy/keV << " keV = " <<
|
||||
(crossPerVolume? (1./crossPerVolume)/mm : DBL_MAX) << " mm" << G4endl;
|
||||
}
|
||||
|
||||
return crossPerVolume;
|
||||
|
||||
@@ -236,7 +236,8 @@ G4double G4PenelopeComptonModel::CrossSectionPerVolume(const G4Material* materia
|
||||
|
||||
if (fVerboseLevel > 2)
|
||||
G4cout << "Compton mean free path at " << energy/keV << " keV for material " <<
|
||||
material->GetName() << " = " << (1./csvolume)/mm << " mm" << G4endl;
|
||||
material->GetName() << " = " <<
|
||||
(csvolume ? (1./csvolume)/mm : DBL_MAX) << " mm" << G4endl;
|
||||
return csvolume;
|
||||
}
|
||||
|
||||
|
||||
@@ -323,11 +323,13 @@ G4double G4PenelopeIonisationModel::CrossSectionPerVolume(const G4Material* mate
|
||||
{
|
||||
G4cout << "G4PenelopeIonisationModel " << G4endl;
|
||||
G4cout << "Mean free path for delta emission > " << cutEnergy/keV << " keV at " <<
|
||||
energy/keV << " keV = " << (1./crossPerVolume)/mm << " mm" << G4endl;
|
||||
energy/keV << " keV = " <<
|
||||
(crossPerVolume ? (1./crossPerVolume)/mm : DBL_MAX) << " mm" << G4endl;
|
||||
if (theXS)
|
||||
totalCross = (theXS->GetTotalCrossSection(energy))*moleculeDensity;
|
||||
G4cout << "Total free path for ionisation (no threshold) at " <<
|
||||
energy/keV << " keV = " << (1./totalCross)/mm << " mm" << G4endl;
|
||||
energy/keV << " keV = " <<
|
||||
(totalCross ? (1./totalCross)/mm : DBL_MAX) << " mm" << G4endl;
|
||||
}
|
||||
return crossPerVolume;
|
||||
}
|
||||
|
||||
@@ -493,7 +493,8 @@ G4double G4PenelopeRayleighModelMI::CrossSectionPerVolume(const G4Material* mate
|
||||
MaxStoichiometricFactor = (*StoichiometricFactors)[i];
|
||||
}
|
||||
for (std::size_t i=0;i<nElements;++i) {
|
||||
(*StoichiometricFactors)[i] /= MaxStoichiometricFactor;
|
||||
if (MaxStoichiometricFactor > 0.)
|
||||
(*StoichiometricFactors)[i] /= MaxStoichiometricFactor;
|
||||
}
|
||||
|
||||
//Equivalent atoms per molecule
|
||||
|
||||
@@ -192,31 +192,38 @@ void G4ShellData::PrintData() const
|
||||
auto posId = idMap.find(Z);
|
||||
std::vector<G4double>* ids = (*posId).second;
|
||||
auto posE = bindingMap.find(Z);
|
||||
G4DataVector* energies = (*posE).second;
|
||||
for (G4int i=0; i<nSh; ++i)
|
||||
if (posE != bindingMap.end())
|
||||
{
|
||||
G4int id = (G4int) (*ids)[i];
|
||||
G4double e = (*energies)[i] / keV;
|
||||
G4cout << i << ") ";
|
||||
G4DataVector* energies = (*posE).second;
|
||||
for (G4int i=0; i<nSh; ++i)
|
||||
{
|
||||
G4int id = (G4int) (*ids)[i];
|
||||
G4double e = (*energies)[i] / keV;
|
||||
G4cout << i << ") ";
|
||||
|
||||
if (occupancyData)
|
||||
{
|
||||
G4cout << " Occupancy: ";
|
||||
if (occupancyData)
|
||||
{
|
||||
G4cout << " Occupancy: ";
|
||||
}
|
||||
else
|
||||
{
|
||||
G4cout << " Shell id: ";
|
||||
}
|
||||
G4cout << id << " - Binding energy = "
|
||||
<< e << " keV ";
|
||||
if (occupancyData)
|
||||
{
|
||||
auto posOcc = occupancyPdfMap.find(Z);
|
||||
G4double prob = 0.;
|
||||
if (posOcc != occupancyPdfMap.end())
|
||||
{
|
||||
std::vector<G4double> probs = *((*posOcc).second);
|
||||
prob = probs[i];
|
||||
}
|
||||
G4cout << "- Probability = " << prob;
|
||||
}
|
||||
G4cout << G4endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
G4cout << " Shell id: ";
|
||||
}
|
||||
G4cout << id << " - Binding energy = "
|
||||
<< e << " keV ";
|
||||
if (occupancyData)
|
||||
{
|
||||
auto posOcc = occupancyPdfMap.find(Z);
|
||||
std::vector<G4double> probs = *((*posOcc).second);
|
||||
G4double prob = probs[i];
|
||||
G4cout << "- Probability = " << prob;
|
||||
}
|
||||
G4cout << G4endl;
|
||||
}
|
||||
G4cout << "-------------------------------------------------"
|
||||
<< G4endl;
|
||||
|
||||
@@ -6,6 +6,10 @@ It must **not** be used as a substitute for writing good git commit messages!
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
## 2025-02-07 Igor Semeniouk (emstand-V11-02-22)
|
||||
- G4OrePowellAtRestModel - Add missing decay plane rotation
|
||||
( random x axis phi )
|
||||
|
||||
## 2024-11-08 V.Ivanchenko (emstand-V11-02-21)
|
||||
- G4BraggModel - fixed problem of 4.12 MeV mu+ range reported in
|
||||
the Forum #12312.
|
||||
|
||||
@@ -103,6 +103,13 @@ void G4OrePowellAtRestModel::SampleSecondaries(
|
||||
G4ThreeVector PhotonMomentum2(0.,sin12,cos12);
|
||||
G4ThreeVector PhotonMomentum3(0.,sin13,cos13);
|
||||
|
||||
// Random x direction ( rotate decay plane along Z axis)
|
||||
|
||||
G4double phi = CLHEP::twopi * G4UniformRand();
|
||||
PhotonMomentum2.rotateZ(phi);
|
||||
PhotonMomentum3.rotateZ(phi);
|
||||
|
||||
|
||||
// First Gamma direction
|
||||
G4ThreeVector dir1 = G4RandomDirection();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user