Import Geant4 4.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 16:18:25 +02:00
parent 36c080dca6
commit 921d3b1cda
3990 changed files with 185376 additions and 82884 deletions
@@ -14,7 +14,7 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * authors in the GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
@@ -273,7 +273,9 @@ G4DecayProducts *G4NuclearDecayChannel::DecayIt (G4double theParentMass)
for( G4int index=0; index < numberOfDaughters; index++)
{theParentMass += daughters[index]->GetPDGMass();}
theParentMass += Qtransition ;
// bug fix for beta+ decay (flei 25/09/01)
if (decayMode == 2) theParentMass -= 2*0.511 * MeV;
if (GetVerboseLevel()>1) {
G4cout << "G4NuclearDecayChannel::DecayIt ";
G4cout << "the decay mass = " << theParentMass << G4endl;
@@ -333,7 +335,7 @@ G4DecayProducts *G4NuclearDecayChannel::DecayIt (G4double theParentMass)
//
dynamicDaughter = products->PopProducts();
G4LorentzVector daughterMomentum = dynamicDaughter->Get4Momentum();
G4ThreeVector daughterMomentum1 = dynamicDaughter->Get4Momentum();
G4ThreeVector const daughterMomentum1 = G4ThreeVector(daughterMomentum);
//
//
// Now define a G4Fragment with the correct A, Z and excitation, and declare and
@@ -454,7 +456,7 @@ G4DecayProducts *G4NuclearDecayChannel::BetaDecayIt()
//
//create daughter G4DynamicParticle
G4double costheta, sintheta, phi, sinphi, cosphi;
G4double costhetan, sinthetan, phin, sinphin, cosphin;
// G4double costhetan, sinthetan, phin, sinphin, cosphin;
costheta = 2.*G4UniformRand()-1.0;
sintheta = sqrt((1.0-costheta)*(1.0+costheta));
phi = 2.0*M_PI*G4UniformRand()*rad;
@@ -480,7 +482,7 @@ G4DecayProducts *G4NuclearDecayChannel::BetaDecayIt()
} else {
//calculate daughter momentum
// Generate two
G4double rd1, rd2, rd;
G4double rd1, rd2;
G4double daughtermomentum[3];
G4double daughterenergy[3];
G4double momentummax=0.0, momentumsum = 0.0;
@@ -14,7 +14,7 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * authors in the GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
@@ -14,7 +14,7 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * authors in the GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
@@ -44,6 +44,8 @@
// 1) levelTolerance = 2.0 keV
// 2) changes to verbose control
//
// 18,July 2001 F.Lei
// tidy up the print out at run level
//
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
///////////////////////////////////////////////////////////////////////////////
@@ -182,10 +184,12 @@ G4double G4RIsotopeTable::GetMeanLifeTime (G4int Z, G4int A, G4double& aE)
if (!DecaySchemeFile )
{
G4cout <<"G4RIsotopeTable::GetMeanLife() : "
<<"cannot find ion radioactive decay file: "
<<file <<G4endl;
G4cout <<"The nucleus is assumed to be stable " <<G4endl;
if (GetVerboseLevel()>0) {
G4cout <<"G4RIsotopeTable::GetMeanLife() : "
<<"cannot find ion radioactive decay file: "
<<file <<G4endl;
G4cout <<"The nucleus is assumed to be stable " <<G4endl;
}
}
else
{
@@ -232,11 +236,13 @@ G4double G4RIsotopeTable::GetMeanLifeTime (G4int Z, G4int A, G4double& aE)
}
if (!found && !aE )
{
G4cout <<"G4RIsotopeTable::GetMeanLife() : ";
G4cout <<"cannot find ion of required excitation E = " << aE << G4endl;
G4cout <<"state in radioactive data file " <<G4endl;
G4cout <<"The nucleus is assumed to be stable" <<G4endl;
lifetime = -1.0;
if (GetVerboseLevel()>0) {
G4cout <<"G4RIsotopeTable::GetMeanLife() : ";
G4cout <<"cannot find ion of required excitation E = " << aE << G4endl;
G4cout <<"state in radioactive data file " <<G4endl;
G4cout <<"The nucleus is assumed to be stable" <<G4endl;
lifetime = -1.0;
}
}
DecaySchemeFile.close();
}
@@ -44,6 +44,8 @@
//
// CHANGE HISTORY
// --------------
// 27 Sepetember 2001, F. Lei
// verboselevel(0) used in constructor
//
// 01 November 2000, F.Lei
// added " ee = e0 +1. ;" as line 763
@@ -58,7 +60,7 @@
// 14 April 2000, F Lei, DERA UK
// 0.b.4 release. Changes are:
// 1) Use PhotonEvaporation instead of DiscreteGammaDeexcitation
// 2) VR: Significant efficiency inprovement
// 2) VR: Significant efficiency improvement
//
// 29 February 2000, P R Truscott, DERA UK
// 0.b.3 release.
@@ -105,7 +107,7 @@ const G4double G4RadioactiveDecay::levelTolerance =2.0*keV;
G4RadioactiveDecay::G4RadioactiveDecay
(const G4String& processName)
:G4VRestDiscreteProcess(processName, fDecay), HighestBinValue(10.0),
LowestBinValue(1.0e-3), TotBin(200), verboseLevel(1)
LowestBinValue(1.0e-3), TotBin(200), verboseLevel(0)
{
#ifdef G4VERBOSE
if (GetVerboseLevel()>1) {
@@ -226,7 +228,7 @@ void G4RadioactiveDecay::SelectAVolume(const G4String aVolume)
G4LogicalVolumeStore *theLogicalVolumes;
G4LogicalVolume *volume;
theLogicalVolumes=G4LogicalVolumeStore::GetInstance();
for (G4int i = 0; i < theLogicalVolumes->size(); i++){
for (size_t i = 0; i < theLogicalVolumes->size(); i++){
volume=(*theLogicalVolumes)[i];
if (volume->GetName() == aVolume) {
ValidVolumes.push_back(aVolume);
@@ -252,7 +254,7 @@ void G4RadioactiveDecay::DeselectAVolume(const G4String aVolume)
G4LogicalVolumeStore *theLogicalVolumes;
G4LogicalVolume *volume;
theLogicalVolumes=G4LogicalVolumeStore::GetInstance();
for (G4int i = 0; i < theLogicalVolumes->size(); i++){
for (size_t i = 0; i < theLogicalVolumes->size(); i++){
volume=(*theLogicalVolumes)[i];
if (volume->GetName() == aVolume) {
G4std::vector<G4String>::iterator location;
@@ -288,7 +290,7 @@ void G4RadioactiveDecay::SelectAllVolumes()
if (GetVerboseLevel()>0)
G4cout << " RDM Applies to all Volumes" << G4endl;
#endif
for (G4int i = 0; i < theLogicalVolumes->size(); i++){
for (size_t i = 0; i < theLogicalVolumes->size(); i++){
volume=(*theLogicalVolumes)[i];
ValidVolumes.push_back(volume->GetName());
#ifdef G4VERBOSE
@@ -328,7 +330,7 @@ G4bool G4RadioactiveDecay::IsRateTableReady(const G4ParticleDefinition &
// been calculated.
//
G4String aParticleName = aParticle.GetParticleName();
for (G4int i = 0; i < theDecayRateTableVector.size(); i++)
for (size_t i = 0; i < theDecayRateTableVector.size(); i++)
{
if (theDecayRateTableVector[i].GetIonName() == aParticleName)
return true ;
@@ -348,7 +350,7 @@ void G4RadioactiveDecay::GetDecayRateTable(const G4ParticleDefinition &
G4String aParticleName = aParticle.GetParticleName();
for (G4int i = 0; i < theDecayRateTableVector.size(); i++)
for (size_t i = 0; i < theDecayRateTableVector.size(); i++)
{
if (theDecayRateTableVector[i].GetIonName() == aParticleName)
{
@@ -869,6 +871,13 @@ G4DecayTable *G4RadioactiveDecay::LoadDecayTable (G4ParticleDefinition
modeSumBR[6] += b;
}
break;
case ERROR:
default:
//
//
G4cout << " There is an error in decay mode selection! exit RDM now" << G4endl;
exit(0);
}
}
}
@@ -960,7 +969,6 @@ void G4RadioactiveDecay::AddDecayRateTable(const G4ParticleDefinition &theParent
G4bool stable = false;
G4int i;
G4int j;
G4int k;
G4VDecayChannel *theChannel = NULL;
G4NuclearDecayChannel *theNuclearDecayChannel = NULL;
G4ITDecayChannel *theITChannel = NULL;
@@ -1138,6 +1146,7 @@ void G4RadioactiveDecay::AddDecayRateTable(const G4ParticleDefinition &theParent
//
// they are in two parts, first the les than n ones
rates.clear();
size_t k;
for (k = 0; k < RP.size(); k++){
theRate = TP[k]/(TP[k]-TaoPlus) * theBR * RP[k];
rates.push_back(theRate);
@@ -1274,7 +1283,7 @@ G4VParticleChange* G4RadioactiveDecay::DecayIt(const G4Track& theTrack, const G4
<< " is not selected for the RDM"<< G4endl;
G4cout << " There are " << ValidVolumes.size() << " volumes" << G4endl;
G4cout << " The Valid volumes are " << G4endl;
for (G4int i = 0; i< ValidVolumes.size(); i++)
for (size_t i = 0; i< ValidVolumes.size(); i++)
G4cout << ValidVolumes[i] << G4endl;
}
#endif
@@ -1458,14 +1467,14 @@ G4VParticleChange* G4RadioactiveDecay::DecayIt(const G4Track& theTrack, const G4
G4double taotime;
G4double decayRate;
G4int i;
G4int j;
size_t i;
size_t j;
G4int numberOfSecondaries;
G4int totalNumberOfSecondaries = 0;
G4double currentTime;
G4double currentTime = 0.;
G4int ndecaych;
G4DynamicParticle* asecondaryparticle;
G4DecayProducts* products = NULL;
// G4DecayProducts* products = NULL;
G4std::vector<G4DynamicParticle*> secondaryparticles;
G4std::vector<G4double> pw;
pw.clear();
@@ -14,7 +14,7 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * authors in the GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
@@ -14,7 +14,7 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * authors in the GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
@@ -14,7 +14,7 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * authors in the GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
@@ -14,7 +14,7 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * authors in the GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
@@ -14,7 +14,7 @@
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * authors in the GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *