Import Geant4 9.4.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 16:25:56 +02:00
parent 74cad5e589
commit 89a9605df1
4440 changed files with 379508 additions and 189225 deletions
@@ -501,6 +501,9 @@ G4DynamicParticle* G4KaonMinusAbsorptionAtRest::SigmaLambdaConversion(G4DynamicP
default:
sigmaLambdaConversionRate = 0.;
// Add dummy particles to avoid possibility of passing NULL pointers
inNucleonDef = G4Proton::Proton();
outNucleonDef = G4Proton::Proton();
}
if (ranflat >= sigmaLambdaConversionRate) return 0;
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4MuonMinusCaptureAtRest.cc,v 1.54 2009/01/24 11:55:38 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-03 $
// $Id: G4MuonMinusCaptureAtRest.cc,v 1.56 2010/11/12 06:52:01 dennis Exp $
// GEANT4 tag $Name: geant4-09-04 $
//
// G4MuonMinusCaptureAtRest physics process
// Larry Felawka (TRIUMF) and Art Olin (TRIUMF)
@@ -248,7 +248,7 @@ G4ReactionProductVector* G4MuonMinusCaptureAtRest::DoMuCapture()
G4int iz = G4int(targetZ);
G4int ia = G4int(targetA);
// proton as a target
// p, d, t, 3He or alpha as target
if(iz <= 2) {
if(ia > 1) {
@@ -258,10 +258,13 @@ G4ReactionProductVector* G4MuonMinusCaptureAtRest::DoMuCapture()
availableEnergy -= 2.0*neutron_mass_c2;
} else if(iz == 2) {
G4ParticleDefinition* pd = 0;
if(ia == 3) pd = G4Deuteron::Deuteron();
if(ia == 4) pd = G4Triton::Triton();
else
if (ia == 3) {
pd = G4Deuteron::Deuteron();
} else if(ia == 4) {
pd = G4Triton::Triton();
} else {
pd = G4ParticleTable::GetParticleTable()->FindIon(1,ia-1,0,1);
}
// G4cout << "Extra " << pd->GetParticleName() << G4endl;
availableEnergy -= pd->GetPDGMass();
@@ -301,7 +304,7 @@ G4ReactionProductVector* G4MuonMinusCaptureAtRest::DoMuCapture()
// pick random proton inside nucleus
G4double eEx;
do {
theN->Init(targetA, targetZ);
theN->Init(ia, iz);
G4LorentzVector thePMom;
G4Nucleon * aNucleon = 0;
G4int theProtonCounter = G4int( targetZ * G4UniformRand() );
@@ -208,9 +208,9 @@ G4PiMinusStopMaterial* G4PiMinusAbsorptionAtRest::LoadAlgorithm(int Z)
G4cout << "Load material algorithm " << Z << G4endl;
}
G4int index = 3;
if (Z <= 3) { index = 3;}
if (Z > 3 && Z<= 6) {index = 6;}
G4int index = 0;
if (Z > 0 && Z < 4) {index = 3;}
if (Z > 3 && Z < 7) {index = 6;}
if (Z == 7) {index = 7;}
if (Z >= 8 && Z<= 11) {index = 8;}
if (Z >= 12 && Z<= 18) {index = 13;}
@@ -53,13 +53,12 @@
// Constructor
G4PiMinusStopMaterial::G4PiMinusStopMaterial()
{
_definitions = 0;
_momenta = 0;
_distributionE = 0;
_distributionAngle = 0;
theR = 0.5;
}
@@ -67,11 +66,10 @@ G4PiMinusStopMaterial::G4PiMinusStopMaterial()
G4PiMinusStopMaterial::~G4PiMinusStopMaterial()
{
// _definitions->clear();
if (_definitions != 0) delete _definitions;
_definitions = 0;
for(unsigned int i=0; i<_momenta->size(); i++) delete(*_momenta)[i];
for (unsigned int i=0; i<_momenta->size(); i++) delete(*_momenta)[i];
if (_momenta != 0) delete _momenta;
delete _distributionE;
@@ -93,14 +91,13 @@ std::vector<G4ParticleDefinition*>* G4PiMinusStopMaterial::DefinitionVector()
}
std::vector<G4LorentzVector*>* G4PiMinusStopMaterial::P4Vector(const G4double binding,
const G4double massNucleus)
std::vector<G4LorentzVector*>*
G4PiMinusStopMaterial::P4Vector(const G4double binding,
const G4double massNucleus)
{
// Generate energy of direct absorption products according to experimental data
// The energy distribution of the two nucleons is assumed to be the same
// for protons and neutrons
// Generate energy of direct absorption products according to experimental
// data. The energy distribution of the two nucleons is assumed to be the
// same for protons and neutrons.
G4double eKin1;
G4double eKin2;
@@ -190,12 +187,3 @@ G4double G4PiMinusStopMaterial::RecoilEnergy(const G4double mass)
return eNucleus;
}
@@ -41,9 +41,10 @@
// Constructor
G4StopDummyDeexcitation::G4StopDummyDeexcitation()
{}
G4StopDummyDeexcitation::G4StopDummyDeexcitation()
{
_products = 0;
}
// Destructor