Import Geant4 3.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 15:55:53 +02:00
parent e7d7193284
commit cfcb558cfe
3050 changed files with 91703 additions and 48310 deletions
+7 -1
View File
@@ -1,4 +1,4 @@
$Id: History,v 1.1 2000/03/01 02:06:09 kurasige Exp $
$Id: History,v 1.3 2000/10/25 00:00:48 kurasige Exp $
-------------------------------------------------------------------
=========================================================
@@ -16,6 +16,12 @@ committal in the CVS repository !
----------------------------------------------------------
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
- Oct 24, 00 H.Kurashige(decay-V02-00-01)
- Bug fix in G4Decay::DecayIt (no decay if the particle is stable)
- Oct 19, 00 H.Kurashige(decay-V02-00-00)
- Bug fix in G4Decay to avoid direct modification of G4Track
by the Decay Process
- Mar. 1, 00 H.Kurashige (decay-V01-00-00)
- Bug fix in G4Decay::IsApplicable()
+8 -5
View File
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4Decay.hh,v 1.3 1999/12/15 14:51:27 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// $Id: G4Decay.hh,v 1.4 2000/10/20 11:28:23 kurasige Exp $
// GEANT4 tag $Name: geant4-03-00 $
//
//
// ------------------------------------------------------------
@@ -35,6 +35,9 @@
class G4Decay : public G4VRestDiscreteProcess
{
// Class Description
// This class is a decay process
public:
// Constructors
G4Decay(const G4String& processName ="Decay");
@@ -49,7 +52,7 @@ class G4Decay : public G4VRestDiscreteProcess
// Assignment Operation (generated)
G4Decay & operator=(const G4Decay &right);
public:
public: //With Description
// G4Decay Process has both
// PostStepDoIt (for decay in flight)
// and
@@ -76,7 +79,7 @@ class G4Decay : public G4VRestDiscreteProcess
// returns "true" if the decay process can be applied to
// the particle type.
protected:
protected: // With Description
virtual G4VParticleChange* DecayIt(
const G4Track& aTrack,
const G4Step& aStep
@@ -90,7 +93,7 @@ class G4Decay : public G4VRestDiscreteProcess
G4ForceCondition* condition
);
protected:
protected: // With Description
// GetMeanFreePath returns ctau*beta*gamma for decay in flight
// GetMeanLifeTime returns ctau for decay at rest
virtual G4double GetMeanFreePath(const G4Track& aTrack,
+17 -8
View File
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4Decay.cc,v 1.5 2000/03/01 02:06:11 kurasige Exp $
// GEANT4 tag $Name: geant4-02-00 $
// $Id: G4Decay.cc,v 1.7 2000/10/25 00:01:04 kurasige Exp $
// GEANT4 tag $Name: geant4-03-00 $
//
//
// --------------------------------------------------------------
@@ -227,20 +227,29 @@ G4VParticleChange* G4Decay::DecayIt(const G4Track& aTrack, const G4Step& )
fParticleChangeForDecay.Initialize(aTrack);
// get particle
G4DynamicParticle* aParticle = aTrack.GetDynamicParticle();
const G4DynamicParticle* aParticle = aTrack.GetDynamicParticle();
G4ParticleDefinition* aParticleDef = aParticle->GetDefinition();
// check if the particle is stable
if (aParticleDef->GetPDGStable()) return &fParticleChangeForDecay ;
//check if thePreAssignedDecayProducts exists
G4DecayProducts* products = aParticle->GetPreAssignedDecayProducts();
G4bool isPreAssigned = (products != NULL);
const G4DecayProducts* o_products = (aParticle->GetPreAssignedDecayProducts());
G4bool isPreAssigned = (o_products != NULL);
G4DecayProducts* products = NULL;
if (!isPreAssigned) {
if (isPreAssigned) {
// copy decay products
products = new G4DecayProducts(*o_products);
} else {
// decay acoording to decay table
G4DecayTable *decaytable = aParticle->GetDefinition()->GetDecayTable();
G4DecayTable *decaytable = aParticleDef->GetDecayTable();
if (decaytable == NULL){
#ifdef G4VERBOSE
if (GetVerboseLevel()>0) {
G4cerr << "G4Decay::DoIt : decay table not defined for";
G4cerr << "G4Decay::DoIt : decay table not defined for ";
G4cerr << aParticle->GetDefinition()->GetParticleName()<< G4endl;
}
#endif