Import Geant4 10.7.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2020-06-26 10:23:25 +02:00
parent c02c370437
commit 67ba86d073
1871 changed files with 174422 additions and 131884 deletions
+82 -83
View File
@@ -25,24 +25,24 @@
//
//
//
//
//
// ------------------------------------------------------------
// GEANT 4 class header file
// GEANT 4 class header file
//
// Class Description:
// This class is a subclass of G4VUserPhysicsList.
// The user should register his/her physics constructors
// by using
// G4VModularPhysicsList::RegsiterPhysics()
// This class is a subclass of G4VUserPhysicsList.
// The user should register his/her physics constructors
// by using
// G4VModularPhysicsList::RegsiterPhysics()
// to construt particles and processes.
//
// Only one physics constructor can be registered for each "physics_type".
// Physics constructors with same "physics_type" can be replaced by
// G4VModularPhysicsList::ReplacePhysics() method
//
// ------------------------------------------------------------
// ------------------------------------------------------------
// History
// - first version 12 Nov 2000 by H.Kurashige
// - first version 12 Nov 2000 by H.Kurashige
// - Add ReplacePhysics 14 Mar 2011 by H.Kurashige
// - Add Worker cleanup 21 Apr 2017 by A.Dotti
//
@@ -52,23 +52,24 @@
#include <vector>
#include "G4ios.hh"
#include "globals.hh"
#include "rundefs.hh"
#include "G4ios.hh"
#include "G4VUserPhysicsList.hh"
#include "G4VPhysicsConstructor.hh"
#include "G4VUPLSplitter.hh"
#include "G4VUserPhysicsList.hh"
class G4VMPLData {
//Encapsulate the fields of class G4VModularPhysicsList
//that are per-thread.
public:
void initialize();
typedef std::vector<G4VPhysicsConstructor*> G4PhysConstVectorData;
//TODO: understand this
//See: https://jira-geant4.kek.jp/browse/DEV-284
G4PhysConstVectorData* physicsVector;
class G4VMPLData
{
// Encapsulate the fields of class G4VModularPhysicsList
// that are per-thread.
public:
void initialize();
typedef std::vector<G4VPhysicsConstructor*> G4PhysConstVectorData;
// TODO: understand this
// See: https://jira-geant4.kek.jp/browse/DEV-284
G4PhysConstVectorData* physicsVector;
};
// The type G4VMPLManager is introduced to encapsulate the methods used by
@@ -89,84 +90,82 @@ public:
typedef G4VUPLSplitter<G4VMPLData> G4VMPLManager;
typedef G4VMPLManager G4VModularPhysicsListSubInstanceManager;
class G4VModularPhysicsList: public virtual G4VUserPhysicsList
class G4VModularPhysicsList : public virtual G4VUserPhysicsList
{
public:
G4VModularPhysicsList();
virtual ~G4VModularPhysicsList();
public:
G4VModularPhysicsList();
virtual ~G4VModularPhysicsList();
protected:
// hide copy constructor and assignment operator
G4VModularPhysicsList(const G4VModularPhysicsList&);
G4VModularPhysicsList & operator=(const G4VModularPhysicsList&);
// hide copy constructor and assignment operator
G4VModularPhysicsList(const G4VModularPhysicsList&);
G4VModularPhysicsList& operator=(const G4VModularPhysicsList&);
public: // with description
// This method will be invoked in the Construct() method.
// each particle type will be instantiated
virtual void ConstructParticle() override;
// This method will be invoked in the Construct() method.
// each physics process will be instantiated and
// registered to the process manager of each particle type
virtual void ConstructProcess() override;
public: // with description
// Register Physics Constructor
void RegisterPhysics(G4VPhysicsConstructor* );
const G4VPhysicsConstructor* GetPhysics(G4int index) const;
const G4VPhysicsConstructor* GetPhysics(const G4String& name) const;
const G4VPhysicsConstructor* GetPhysicsWithType(G4int physics_type) const;
public: // with description
// This method will be invoked in the Construct() method.
// each particle type will be instantiated
virtual void ConstructParticle() override;
// Replace Physics Constructor
// The existing physics constructor with same physics_type as one of
// the given physics constructor is replaced
// (existing physics will be deleted)
// If a corresponding physics constructor is NOT found,
// the given physics constructor is just added
void ReplacePhysics(G4VPhysicsConstructor* );
// This method will be invoked in the Construct() method.
// each physics process will be instantiated and
// registered to the process manager of each particle type
virtual void ConstructProcess() override;
public: // with description
// Register Physics Constructor
void RegisterPhysics(G4VPhysicsConstructor*);
const G4VPhysicsConstructor* GetPhysics(G4int index) const;
const G4VPhysicsConstructor* GetPhysics(const G4String& name) const;
const G4VPhysicsConstructor* GetPhysicsWithType(G4int physics_type) const;
// Replace Physics Constructor
// The existing physics constructor with same physics_type as one of
// the given physics constructor is replaced
// (existing physics will be deleted)
// If a corresponding physics constructor is NOT found,
// the given physics constructor is just added
void ReplacePhysics(G4VPhysicsConstructor*);
// Remove Physics Constructor from the list
void RemovePhysics(G4VPhysicsConstructor*);
void RemovePhysics(G4int type);
void RemovePhysics(const G4String& name);
// Remove Physics Constructor from the list
void RemovePhysics(G4VPhysicsConstructor* );
void RemovePhysics(G4int type);
void RemovePhysics(const G4String& name);
/////////////////////////////////////
public: // with description
void SetVerboseLevel(G4int value);
G4int GetVerboseLevel() const;
// set/get controle flag for output message
// 0: Silent
// 1: Warning message
// 2: More
// given verbose level is set to all physics constructors
public: // with description
void SetVerboseLevel(G4int value);
G4int GetVerboseLevel() const;
// set/get controle flag for output message
// 0: Silent
// 1: Warning message
// 2: More
// given verbose level is set to all physics constructors
protected: // with description
G4int verboseLevel;
typedef G4VMPLData::G4PhysConstVectorData G4PhysConstVector;
G4int g4vmplInstanceID;
G4RUN_DLL static G4VMPLManager G4VMPLsubInstanceManager;
public:
inline G4int GetInstanceID() const;
static const G4VMPLManager& GetSubInstanceManager();
virtual void TerminateWorker() override;
protected: // with description
G4int verboseLevel;
typedef G4VMPLData::G4PhysConstVectorData G4PhysConstVector;
G4int g4vmplInstanceID;
G4RUN_DLL static G4VMPLManager G4VMPLsubInstanceManager;
public:
inline G4int GetInstanceID() const;
static const G4VMPLManager& GetSubInstanceManager();
virtual void TerminateWorker() override;
};
inline
G4int G4VModularPhysicsList::GetVerboseLevel() const
inline G4int G4VModularPhysicsList::GetVerboseLevel() const
{
return verboseLevel;
return verboseLevel;
}
inline
G4int G4VModularPhysicsList::GetInstanceID() const
inline G4int G4VModularPhysicsList::GetInstanceID() const
{
return g4vmplInstanceID;
return g4vmplInstanceID;
}
inline
const G4VMPLManager& G4VModularPhysicsList::GetSubInstanceManager()
inline const G4VMPLManager& G4VModularPhysicsList::GetSubInstanceManager()
{
return G4VMPLsubInstanceManager;
return G4VMPLsubInstanceManager;
}
#endif