Import Geant4 10.3.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2016-06-30 14:12:05 +02:00
parent a654a7ab1f
commit 4ec577e5c4
2021 changed files with 100995 additions and 78277 deletions
@@ -83,14 +83,17 @@ G4ParticleHPInelasticData::G4ParticleHPInelasticData(G4ParticleDefinition* proje
theProjectile=projectile;
theHPData = NULL;
instanceOfWorker = false;
if ( G4Threading::IsMasterThread() ) {
theHPData = new G4ParticleHPData( theProjectile );
} else {
instanceOfWorker = true;
}
}
G4ParticleHPInelasticData::~G4ParticleHPInelasticData()
{
if ( theCrossSections != NULL ) {
if ( theCrossSections != NULL && instanceOfWorker != true ) {
theCrossSections->clearAndDestroy();
delete theCrossSections;
theCrossSections = NULL;
@@ -268,8 +271,7 @@ GetCrossSection(const G4DynamicParticle* projectile, const G4Element*anE, G4doub
G4double theA = anE->GetN();
G4double theZ = anE->GetZ();
G4double eleMass;
eleMass = ( G4NucleiProperties::GetNuclearMass(static_cast<G4int>(theA+eps), static_cast<G4int>(theZ+eps))
) / theProjectile->GetPDGMass();
eleMass = G4NucleiProperties::GetNuclearMass(static_cast<G4int>(theA+eps), static_cast<G4int>(theZ+eps) );
G4ReactionProduct boosted;
G4double aXsection;
@@ -290,7 +292,9 @@ GetCrossSection(const G4DynamicParticle* projectile, const G4Element*anE, G4doub
{
counter ++;
#endif
G4ReactionProduct aThermalNuc = aNuc.GetThermalNucleus(eleMass, aT);
//G4ReactionProduct aThermalNuc = aNuc.GetThermalNucleus( eleMass/theProjectile->GetPDGMass(), aT );
//G4Nucleus::GetThermalNucleus requests normalization of mass in neutron mass
G4ReactionProduct aThermalNuc = aNuc.GetThermalNucleus( eleMass/G4Neutron::Neutron()->GetPDGMass(), aT );
boosted.Lorentz(theNeutron, aThermalNuc);
G4double theEkin = boosted.GetKineticEnergy();
aXsection = (*((*theCrossSections)(index))).GetValue(theEkin, outOfRange);