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
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4DecayProducts.hh,v 1.12 2006/06/29 19:22:45 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4DecayProducts.hh,v 1.14 2010/10/27 07:47:04 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-04 $
//
//
// ------------------------------------------------------------
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4DynamicParticle.hh,v 1.18 2007/03/11 07:17:35 kurasige Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4DynamicParticle.hh,v 1.22 2010/08/11 17:14:02 kurasige Exp $
// GEANT4 tag $Name: geant4-09-04 $
//
//
// ------------------------------------------------------------
@@ -82,14 +82,14 @@ class G4DynamicParticle
//- constructors
G4DynamicParticle();
G4DynamicParticle(G4ParticleDefinition * aParticleDefinition,
G4DynamicParticle(const G4ParticleDefinition * aParticleDefinition,
const G4ThreeVector& aMomentumDirection,
G4double aKineticEnergy);
G4DynamicParticle(G4ParticleDefinition * aParticleDefinition,
G4DynamicParticle(const G4ParticleDefinition * aParticleDefinition,
const G4ThreeVector& aParticleMomentum);
G4DynamicParticle(G4ParticleDefinition * aParticleDefinition,
G4DynamicParticle(const G4ParticleDefinition * aParticleDefinition,
const G4LorentzVector &aParticleMomentum);
G4DynamicParticle(G4ParticleDefinition * aParticleDefinition,
G4DynamicParticle(const G4ParticleDefinition * aParticleDefinition,
G4double aTotalEnergy,
const G4ThreeVector &aParticleMomentum);
@@ -181,10 +181,14 @@ class G4DynamicParticle
void AddElectron(G4int orbit, G4int number = 1);
void RemoveElectron(G4int orbit, G4int number = 1);
const G4ParticleDefinition* GetParticleDefinition() const;
void SetDefinition(const G4ParticleDefinition * aParticleDefinition);
// Set/Get particle definition
// following method of GetDefinition remains
// because of backward compatiblity. It will be removed in future
G4ParticleDefinition* GetDefinition() const;
void SetDefinition(G4ParticleDefinition * aParticleDefinition);
// Set/Get particle definition
const G4DecayProducts *GetPreAssignedDecayProducts() const;
void SetPreAssignedDecayProducts(G4DecayProducts *aDecayProducts);
@@ -200,15 +204,15 @@ class G4DynamicParticle
// mode 0 : default )(minimum)
// mode 1 : 0 + electron occupancy
private:
protected:
void AllocateElectronOccupancy();
G4double GetElectronMass() const;
private:
protected:
G4ThreeVector theMomentumDirection;
// The normalized momentum vector
G4ParticleDefinition *theParticleDefinition;
const G4ParticleDefinition *theParticleDefinition;
// Contains the static information of this particle.
G4ThreeVector thePolarization;
@@ -231,7 +235,7 @@ class G4DynamicParticle
G4double thePreAssignedDecayTime;
private:
protected:
G4int verboseLevel;
public: // With Description
@@ -242,7 +246,7 @@ class G4DynamicParticle
// 1: Warning message
// 2: More
private:
protected:
G4PrimaryParticle* primaryParticle;
// This void pointer is used by G4EventManager to maintain the
// link between pre-assigned decay products and corresponding
@@ -265,7 +269,7 @@ class G4DynamicParticle
// corresponding primary particle or pre-assigned decay product will be
// returned if available. Otherwise (e.g. for geantino) returns 0.
private:
protected:
G4int thePDGcode;
};
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4DynamicParticle.icc,v 1.16 2007/03/11 07:17:35 kurasige Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4DynamicParticle.icc,v 1.21 2010/10/27 07:47:05 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-04 $
//
//
// ------------------------------------------------------------
@@ -86,6 +86,7 @@ inline G4int G4DynamicParticle::GetOccupancy(G4int orbit) const
inline void G4DynamicParticle::AddElectron(G4int orbit, G4int number )
{
if ( theElectronOccupancy == 0) AllocateElectronOccupancy();
if ( theElectronOccupancy != 0) {
G4int n = theElectronOccupancy->AddElectron(orbit, number );
theDynamicalCharge -= eplus * n;
@@ -95,7 +96,8 @@ inline void G4DynamicParticle::AddElectron(G4int orbit, G4int number )
inline void G4DynamicParticle::RemoveElectron(G4int orbit, G4int number)
{
if ( theElectronOccupancy != 0) {
if ( theElectronOccupancy == 0) AllocateElectronOccupancy();
if ( theElectronOccupancy != 0) {
G4int n = theElectronOccupancy->RemoveElectron(orbit, number );
theDynamicalCharge += eplus * n;
theDynamicalMass -= GetElectronMass() * n;
@@ -190,7 +192,12 @@ inline G4double G4DynamicParticle::GetTotalMomentum() const
inline G4ParticleDefinition* G4DynamicParticle::GetDefinition() const
{
return theParticleDefinition;
return const_cast<G4ParticleDefinition*>(theParticleDefinition);
}
inline const G4ParticleDefinition* G4DynamicParticle::GetParticleDefinition() const
{
return const_cast<G4ParticleDefinition*>(theParticleDefinition);
}
inline const G4ThreeVector& G4DynamicParticle::GetPolarization() const
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4ElectronOccupancy.hh,v 1.10 2009/10/21 12:50:31 kurasige Exp $
// GEANT4 tag $Name: geant4-09-03 $
// $Id: G4ElectronOccupancy.hh,v 1.12 2010/10/27 07:47:05 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-04 $
//
//
// ------------------------------------------------------------
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4IonTable.hh,v 1.28 2009/09/23 12:13:48 kurasige Exp $
// GEANT4 tag $Name: geant4-09-03 $
// $Id: G4IonTable.hh,v 1.31 2010/10/16 06:04:51 kurasige Exp $
// GEANT4 tag $Name: geant4-09-04 $
//
//
// ------------------------------------------------------------
@@ -50,7 +50,7 @@
#include "G4ios.hh"
#include "globals.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleTableIterator.hh"
#include "G4ParticleTable.hh"
#include "G4Ions.hh"
#include <cmath>
@@ -70,8 +70,8 @@ class G4IonTable
public:
// Use STL map as list of ions
typedef std::multimap<G4int, G4ParticleDefinition*> G4IonList;
typedef std::multimap<G4int, G4ParticleDefinition*>::iterator G4IonListIterator;
typedef std::multimap<G4int, const G4ParticleDefinition*> G4IonList;
typedef std::multimap<G4int, const G4ParticleDefinition*>::iterator G4IonListIterator;
public:
// constructor
@@ -139,6 +139,10 @@ class G4IonTable
static G4bool IsIon(const G4ParticleDefinition*);
// return true if the particle is ion
static G4bool IsAntiIon(const G4ParticleDefinition*);
// return true if the particle is anti_ion
const G4String& GetIonName(G4int Z, G4int A, G4double E) const;
const G4String& GetIonName(G4int Z, G4int A, G4int L, G4double E) const;
// get ion name
@@ -193,8 +197,8 @@ class G4IonTable
G4bool Contains(const G4ParticleDefinition *particle) const;
// Return 'true' if the ion exists
void Insert(G4ParticleDefinition* particle);
void Remove(G4ParticleDefinition* particle);
void Insert(const G4ParticleDefinition* particle);
void Remove(const G4ParticleDefinition* particle);
// Insert/Remove an ion in the table
void clear();
@@ -217,9 +221,10 @@ class G4IonTable
// Ask properties of isotopes to this G4VIsotopeTable
G4ParticleDefinition* GetLightIon(G4int Z, G4int A) const;
G4ParticleDefinition* GetLightAntiIon(G4int Z, G4int A) const;
G4bool IsLightIon(G4ParticleDefinition*) const;
G4bool IsLightIon(const G4ParticleDefinition*) const;
G4bool IsLightAntiIon(const G4ParticleDefinition*) const;
// return true if the particle is pre-defined ion
void AddProcessManager(const G4String& ionName);
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4KL3DecayChannel.hh,v 1.5 2006/06/29 19:23:33 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4KL3DecayChannel.hh,v 1.6 2010/10/30 07:55:00 kurasige Exp $
// GEANT4 tag $Name: geant4-09-04 $
//
//
// ------------------------------------------------------------
@@ -89,7 +89,6 @@ class G4KL3DecayChannel :public G4VDecayChannel
// coefficients
G4double pLambda;
G4double pXi0;
G4double pNormalization;
public:
void SetDalitzParameter(G4double aLambda, G4double aXi );
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4ParticleDefinition.hh,v 1.33 2008/11/14 16:26:30 kurasige Exp $
// GEANT4 tag $Name: geant4-09-03 $
// $Id: G4ParticleDefinition.hh,v 1.34 2010/08/10 15:47:42 kurasige Exp $
// GEANT4 tag $Name: geant4-09-04 $
//
//
// ------------------------------------------------------------
@@ -160,7 +160,7 @@ class G4ParticleDefinition
void SetPDGLifeTime(G4double aLifeTime) { thePDGLifeTime = aLifeTime; }
public:// With Description
G4DecayTable* GetDecayTable();
G4DecayTable* GetDecayTable() const;
void SetDecayTable(G4DecayTable* aDecayTable);
// Set/Get Decay Table
// !! Decay Table can be modified !!
@@ -171,7 +171,7 @@ class G4ParticleDefinition
// Set/Get Process Manager
// !! Process Manager can be modified !!
G4ParticleTable* GetParticleTable();
G4ParticleTable* GetParticleTable() const;
// get pointer to the particle table
void DumpTable() const;
@@ -24,18 +24,18 @@
// ********************************************************************
//
//
// $Id: G4ParticleDefinition.icc,v 1.14 2009/03/27 20:33:50 gum Exp $
// GEANT4 tag $Name: geant4-09-03 $
// $Id: G4ParticleDefinition.icc,v 1.15 2010/08/10 15:47:42 kurasige Exp $
// GEANT4 tag $Name: geant4-09-04 $
//
inline
G4ParticleTable* G4ParticleDefinition::GetParticleTable()
G4ParticleTable* G4ParticleDefinition::GetParticleTable() const
{
return theParticleTable;
}
inline
G4DecayTable* G4ParticleDefinition::GetDecayTable()
G4DecayTable* G4ParticleDefinition::GetDecayTable() const
{
return theDecayTable;
}
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4ParticleTable.hh,v 1.21 2008/03/22 06:03:40 kurasige Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4ParticleTable.hh,v 1.22 2010/10/30 07:55:00 kurasige Exp $
// GEANT4 tag $Name: geant4-09-04 $
//
//
// ------------------------------------------------------------
@@ -208,7 +208,6 @@ class G4ParticleTable
G4PTblDictionary* fDictionary;
G4PTblDicIterator* fIterator;
G4PTblEncodingDictionary* fEncodingDictionary;
G4int DictionaryBucketSize;
static G4ParticleTable* fgParticleTable;
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4PrimaryParticle.hh,v 1.4 2006/09/28 14:29:43 kurasige Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4PrimaryParticle.hh,v 1.8 2010/10/27 07:47:05 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-04 $
//
//
@@ -76,10 +76,10 @@ class G4PrimaryParticle
G4double px,G4double py,G4double pz);
G4PrimaryParticle(G4int Pcode,
G4double px,G4double py,G4double pz,G4double E);
G4PrimaryParticle(G4ParticleDefinition* Gcode);
G4PrimaryParticle(G4ParticleDefinition* Gcode,
G4PrimaryParticle(const G4ParticleDefinition* Gcode);
G4PrimaryParticle(const G4ParticleDefinition* Gcode,
G4double px,G4double py,G4double pz);
G4PrimaryParticle(G4ParticleDefinition* Gcode,
G4PrimaryParticle(const G4ParticleDefinition* Gcode,
G4double px,G4double py,G4double pz,G4double E);
~G4PrimaryParticle();
@@ -93,7 +93,7 @@ class G4PrimaryParticle
private:
G4int PDGcode;
G4ParticleDefinition * G4code;
const G4ParticleDefinition * G4code;
G4double Px;
G4double Py;
G4double Pz;
@@ -129,6 +129,8 @@ class G4PrimaryParticle
inline G4int GetPDGcode() const
{ return PDGcode; }
inline G4ParticleDefinition * GetG4code() const
{ return const_cast<G4ParticleDefinition*>(G4code); }
inline const G4ParticleDefinition * GetParticleDefinition() const
{ return G4code; }
inline G4ThreeVector GetMomentum() const
{ return G4ThreeVector(Px,Py,Pz); }
@@ -161,7 +163,8 @@ class G4PrimaryParticle
public: // with description
// Followings are available Set methods.
void SetPDGcode(G4int Pcode);
void SetG4code(G4ParticleDefinition * Gcode);
void SetG4code(const G4ParticleDefinition * Gcode);
void SetParticleDefinition(const G4ParticleDefinition * pdef);
inline void SetMomentum(G4double px, G4double py, G4double pz)
{
Px = px;
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4PrimaryVertex.hh,v 1.4 2006/07/20 15:14:43 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4PrimaryVertex.hh,v 1.6 2010/10/27 07:47:05 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-04 $
//
//
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4ShortLivedTable.hh,v 1.13 2008/03/20 02:23:31 kurasige Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4ShortLivedTable.hh,v 1.14 2010/08/10 15:47:42 kurasige Exp $
// GEANT4 tag $Name: geant4-09-04 $
//
//
// ------------------------------------------------------------
@@ -57,7 +57,7 @@ class G4ShortLivedTable
public:
// Use STL Vector as list of shortlives
typedef std::vector<G4ParticleDefinition*> G4ShortLivedList;
typedef std::vector<const G4ParticleDefinition*> G4ShortLivedList;
public:
G4ShortLivedTable();
@@ -68,7 +68,7 @@ class G4ShortLivedTable
public: // With Description
virtual ~G4ShortLivedTable();
G4bool IsShortLived(G4ParticleDefinition*) const;
G4bool IsShortLived(const G4ParticleDefinition*) const;
// return true if the particle is shortlived particle
void DumpTable(const G4String &particle_name = "ALL") const;
@@ -80,10 +80,10 @@ class G4ShortLivedTable
G4bool Contains(const G4ParticleDefinition *particle) const;
// return true if the list contains the specified particle
void Insert(G4ParticleDefinition* particle);
void Insert(const G4ParticleDefinition* particle);
// add the particle in the list
void Remove(G4ParticleDefinition* particle);
void Remove(const G4ParticleDefinition* particle);
// remove the particle (not delete) from the list
G4ParticleDefinition* GetParticle(G4int index) const;
@@ -131,7 +131,7 @@ inline
G4ParticleDefinition* G4ShortLivedTable::GetParticle(G4int index) const
{
if ( (index >=0 ) && (index < Entries()) ) {
return (*fShortLivedList)[index];
return const_cast<G4ParticleDefinition*>( (*fShortLivedList)[index] );
} else {
return 0;
}
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4VDecayChannel.hh,v 1.12 2006/06/29 19:24:50 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4VDecayChannel.hh,v 1.13 2010/08/10 15:47:42 kurasige Exp $
// GEANT4 tag $Name: geant4-09-04 $
//
//
// ------------------------------------------------------------
@@ -86,7 +86,7 @@ class G4VDecayChannel
public: // With Description
//get kinematics name
G4String GetKinematicsName() const;
const G4String& GetKinematicsName() const;
//get branching ratio
G4double GetBR() const;
//get number of daughter particles
@@ -260,7 +260,7 @@ inline
}
inline
G4String G4VDecayChannel::GetKinematicsName() const { return kinematics_name; }
const G4String& G4VDecayChannel::GetKinematicsName() const { return kinematics_name; }
inline
void G4VDecayChannel::SetBR(G4double value){ rbranch = value; }