Import Geant4 9.5.0 source tree
This commit is contained in:
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VPhysicsConstructor.hh,v 1.4 2006/06/29 21:13:32 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4VPhysicsConstructor.hh,v 1.4 2006-06-29 21:13:32 gunter Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -45,10 +45,18 @@
|
||||
// registered to the process manager of each particle type
|
||||
// virtual void ConstructProcess();
|
||||
//
|
||||
// Only one physics constructor can be registered to
|
||||
// Modular Physics List for each "physics_type".
|
||||
// Physics constructors with same "physics_type" can be
|
||||
// replaced by using the method of
|
||||
// G4VModularPhysicsList::ReplacePhysics()
|
||||
//
|
||||
//
|
||||
// -------------------------------------------
|
||||
// History
|
||||
// first version 12 Nov. 2000 by H.Kurashige
|
||||
// History
|
||||
// first version 12 Nov. 2000 by H.Kurashige
|
||||
// Add physicsType 14 Mar. 2011 by H.Kurashige
|
||||
// Add RegisterProcess 1 May 2011 by H.Kurashige
|
||||
// ------------------------------------------------------------
|
||||
#ifndef G4VPhysicsConstructor_h
|
||||
#define G4VPhysicsConstructor_h 1
|
||||
@@ -56,10 +64,13 @@
|
||||
#include "globals.hh"
|
||||
#include "G4ios.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "G4PhysicsListHelper.hh"
|
||||
|
||||
class G4VPhysicsConstructor
|
||||
{
|
||||
public:
|
||||
G4VPhysicsConstructor(const G4String& ="");
|
||||
G4VPhysicsConstructor(const G4String& name, G4int physcis_type);
|
||||
virtual ~G4VPhysicsConstructor(){};
|
||||
|
||||
public: // with description
|
||||
@@ -76,6 +87,9 @@ class G4VPhysicsConstructor
|
||||
void SetPhysicsName(const G4String& ="");
|
||||
const G4String& GetPhysicsName() const;
|
||||
|
||||
void SetPhysicsType(G4int);
|
||||
G4int GetPhysicsType() const;
|
||||
|
||||
void SetVerboseLevel(G4int value);
|
||||
G4int GetVerboseLevel() const;
|
||||
// set/get controle flag for output message
|
||||
@@ -84,25 +98,54 @@ class G4VPhysicsConstructor
|
||||
// 2: More
|
||||
// verbose level is set equal to physics list when registered
|
||||
|
||||
protected:
|
||||
//Register a process to the particle type
|
||||
// according to the ordering parameter table
|
||||
// 'true' is returned if the process is registerd successfully
|
||||
G4bool RegisterProcess(G4VProcess* process,
|
||||
G4ParticleDefinition* particle);
|
||||
|
||||
protected:
|
||||
G4int verboseLevel;
|
||||
G4int verboseLevel;
|
||||
G4String namePhysics;
|
||||
|
||||
G4int typePhysics;
|
||||
|
||||
protected:
|
||||
// the particle table has the complete List of existing particle types
|
||||
G4ParticleTable* theParticleTable;
|
||||
G4ParticleTable::G4PTblDicIterator* theParticleIterator;
|
||||
|
||||
protected:
|
||||
G4PhysicsListHelper* thePLHelper;
|
||||
|
||||
};
|
||||
|
||||
|
||||
inline
|
||||
G4VPhysicsConstructor::G4VPhysicsConstructor(const G4String& name)
|
||||
:verboseLevel(0),namePhysics(name)
|
||||
:verboseLevel(0),namePhysics(name),typePhysics(0)
|
||||
{
|
||||
// pointer to the particle table
|
||||
theParticleTable = G4ParticleTable::GetParticleTable();
|
||||
theParticleIterator = theParticleTable->GetIterator();
|
||||
|
||||
// PhysicsListHelper
|
||||
thePLHelper = G4PhysicsListHelper::GetPhysicsListHelper();
|
||||
}
|
||||
|
||||
inline
|
||||
G4VPhysicsConstructor::G4VPhysicsConstructor( const G4String& name,
|
||||
G4int type )
|
||||
:verboseLevel(0),namePhysics(name),typePhysics(type)
|
||||
{
|
||||
// pointer to the particle table
|
||||
theParticleTable = G4ParticleTable::GetParticleTable();
|
||||
theParticleIterator = theParticleTable->GetIterator();
|
||||
|
||||
if (type<0) typePhysics = 0;
|
||||
|
||||
// PhysicsListHelper
|
||||
thePLHelper = G4PhysicsListHelper::GetPhysicsListHelper();
|
||||
}
|
||||
|
||||
inline void G4VPhysicsConstructor::SetVerboseLevel(G4int value)
|
||||
@@ -125,6 +168,22 @@ inline const G4String& G4VPhysicsConstructor::GetPhysicsName() const
|
||||
return namePhysics;
|
||||
}
|
||||
|
||||
inline void G4VPhysicsConstructor::SetPhysicsType(G4int val)
|
||||
{
|
||||
if (val>0) typePhysics = val;
|
||||
}
|
||||
|
||||
inline G4int G4VPhysicsConstructor::GetPhysicsType() const
|
||||
{
|
||||
return typePhysics;
|
||||
}
|
||||
|
||||
inline
|
||||
G4bool G4VPhysicsConstructor::RegisterProcess(G4VProcess* process,
|
||||
G4ParticleDefinition* particle)
|
||||
{
|
||||
return thePLHelper->RegisterProcess(process, particle);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user