Import Geant4 9.5.0 source tree
This commit is contained in:
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VUserPhysicsList.hh,v 1.41 2009/08/09 14:31:46 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-09-03 $
|
||||
// $Id: G4VUserPhysicsList.hh,v 1.41 2009-08-09 14:31:46 kurasige Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -39,9 +39,6 @@
|
||||
// Construct particles
|
||||
// G4VUserPhysicsList::ConstructProcess()
|
||||
// Construct procesess and register them to particles
|
||||
// G4VUserPhysicsList::SetCuts()
|
||||
// set cut values in range to all particles
|
||||
// (and rebuilding physics table will be invoked )
|
||||
//
|
||||
// -------------------------------------------
|
||||
// History
|
||||
@@ -80,6 +77,9 @@
|
||||
// virtual G4bool CheckForRetrievePhysicsTable()
|
||||
// virtual G4bool CheckMaterialInfo()
|
||||
// added void BuildPhysicsTable()
|
||||
// Added PhysicsListHelper 29 Apr. 2011 H.Kurashige
|
||||
// Added default impelmentation of SetCuts 10 June 2011 H.Kurashige
|
||||
// SetCuts is not 'pure virtual' any more
|
||||
// ------------------------------------------------------------
|
||||
#ifndef G4VUserPhysicsList_h
|
||||
#define G4VUserPhysicsList_h 1
|
||||
@@ -91,6 +91,7 @@
|
||||
#include "G4ProductionCutsTable.hh"
|
||||
|
||||
class G4UserPhysicsListMessenger;
|
||||
class G4PhysicsListHelper;
|
||||
class G4VProcess;
|
||||
|
||||
class G4VUserPhysicsList
|
||||
@@ -99,6 +100,10 @@ class G4VUserPhysicsList
|
||||
G4VUserPhysicsList();
|
||||
virtual ~G4VUserPhysicsList();
|
||||
|
||||
// copy constructor and assignment operator
|
||||
G4VUserPhysicsList(const G4VUserPhysicsList&);
|
||||
G4VUserPhysicsList & operator=(const G4VUserPhysicsList&);
|
||||
|
||||
public: // with description
|
||||
// Each particle type will be instantiated
|
||||
// This method is invoked by the RunManger
|
||||
@@ -116,14 +121,22 @@ class G4VUserPhysicsList
|
||||
protected: // with description
|
||||
// User must invoke this method in his ConstructProcess()
|
||||
// implementation in order to insures particle transportation.
|
||||
// !! Caution: this class must not be overriden !!
|
||||
void AddTransportation();
|
||||
|
||||
//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);
|
||||
|
||||
public:
|
||||
void UseCoupledTransportation(G4bool vl=true);
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
public: // with description
|
||||
// "SetCuts" method sets a cut value for all particle types
|
||||
// in the particle table
|
||||
virtual void SetCuts() = 0;
|
||||
virtual void SetCuts();
|
||||
|
||||
public: // with description
|
||||
// set/get the default cut value
|
||||
@@ -177,16 +190,13 @@ class G4VUserPhysicsList
|
||||
public: // with description
|
||||
// Request to print out information of cut values
|
||||
// Printing will be performed when all tables are made
|
||||
void DumpCutValuesTable(G4int nParticles=4);
|
||||
void DumpCutValuesTable(G4int flag =1);
|
||||
|
||||
// The following method actually trigger the print-out requested
|
||||
// by the above method. This method must be invoked by RunManager
|
||||
// at the proper moment.
|
||||
void DumpCutValuesTableIfRequested();
|
||||
|
||||
void DumpCutValues(const G4String &particle_name = "ALL");
|
||||
void DumpCutValues(G4ParticleDefinition* );
|
||||
|
||||
public: // with description
|
||||
void SetVerboseLevel(G4int value);
|
||||
G4int GetVerboseLevel() const;
|
||||
@@ -197,8 +207,10 @@ class G4VUserPhysicsList
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
public: // with description
|
||||
// "SetCutsWithDefault" method sets the default cut value
|
||||
// for all particles for the default region.
|
||||
// "SetCutsWithDefault" method invokes default SetCuts method
|
||||
// Note: Cut values will not be overwriten with this method
|
||||
// Using default SetCuts method is recommended
|
||||
// (i.e You do not need to implement SetCuts method)
|
||||
void SetCutsWithDefault();
|
||||
|
||||
// Following are utility methods for SetCuts
|
||||
@@ -206,6 +218,9 @@ class G4VUserPhysicsList
|
||||
// SetCutValue sets a cut value for a particle type for the default region
|
||||
void SetCutValue(G4double aCut, const G4String& pname);
|
||||
|
||||
// GetCutValue sets a cut value for a particle type for the default region
|
||||
G4double GetCutValue(const G4String& pname) const;
|
||||
|
||||
// SetCutValue sets a cut value for a particle type for a region
|
||||
void SetCutValue(G4double aCut, const G4String& pname, const G4String& rname);
|
||||
|
||||
@@ -214,6 +229,7 @@ class G4VUserPhysicsList
|
||||
// In case of "Retrieve" flag is ON,
|
||||
// Cut values will be retrieved from files
|
||||
void SetParticleCuts(G4double cut,G4ParticleDefinition* particle,G4Region* region=0);
|
||||
void SetParticleCuts( G4double cut, const G4String& particleName, G4Region* region=0);
|
||||
|
||||
// Invoke SetCuts for all particles in a region
|
||||
void SetCutsForRegion(G4double aCut, const G4String& rname);
|
||||
@@ -265,26 +281,23 @@ class G4VUserPhysicsList
|
||||
|
||||
void DisableCheckParticleList();
|
||||
|
||||
protected:
|
||||
|
||||
bool fDisableCheckParticleList;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
protected:
|
||||
// the particle table has the complete List of existing particle types
|
||||
G4ParticleTable* theParticleTable;
|
||||
G4ParticleTable::G4PTblDicIterator* theParticleIterator;
|
||||
// the particle table has the complete List of existing particle types
|
||||
G4ParticleTable* theParticleTable;
|
||||
G4ParticleTable::G4PTblDicIterator* theParticleIterator;
|
||||
|
||||
protected:
|
||||
// pointer to G4UserPhysicsListMessenger
|
||||
G4UserPhysicsListMessenger* theMessenger;
|
||||
// pointer to G4UserPhysicsListMessenger
|
||||
G4UserPhysicsListMessenger* theMessenger;
|
||||
|
||||
protected:
|
||||
G4int verboseLevel;
|
||||
G4int verboseLevel;
|
||||
|
||||
protected:
|
||||
// this is the default cut value for all particles
|
||||
G4double defaultCutValue;
|
||||
// this is the default cut value for all particles
|
||||
G4double defaultCutValue;
|
||||
G4bool isSetDefaultCutValue;
|
||||
|
||||
protected:
|
||||
// pointer to ProductionCutsTable
|
||||
@@ -306,34 +319,18 @@ class G4VUserPhysicsList
|
||||
// flag for Physics Table has been built
|
||||
G4bool fIsPhysicsTableBuilt;
|
||||
|
||||
// flag for CheckParticleList
|
||||
G4bool fDisableCheckParticleList;
|
||||
|
||||
// PhysicsListHelper
|
||||
G4PhysicsListHelper* thePLHelper;
|
||||
|
||||
private:
|
||||
enum { FixedStringLengthForStore = 32 };
|
||||
|
||||
|
||||
private:
|
||||
G4bool useCoupledTransportation;
|
||||
|
||||
public:
|
||||
inline void UseCoupledTransportation(G4bool vl=true)
|
||||
{ useCoupledTransportation = vl; }
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// Following method is for backward compatibility and removed soon
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
protected:
|
||||
void SetCutValueForOthers(G4double) const;
|
||||
|
||||
};
|
||||
|
||||
inline
|
||||
void G4VUserPhysicsList::SetCutValueForOthers(G4double) const
|
||||
{
|
||||
G4cerr << "WARNING !" << G4endl;
|
||||
G4cerr << " SetCutValueForOthers became obsolete." << G4endl;
|
||||
G4cerr << " It is harmless to remove this invokation without any side effects." << G4endl;
|
||||
G4cerr << " This dummy method implementation will be removed soon." << G4endl;
|
||||
}
|
||||
|
||||
inline void G4VUserPhysicsList::Construct()
|
||||
{
|
||||
#ifdef G4VERBOSE
|
||||
@@ -400,12 +397,11 @@ inline
|
||||
fStoredInAscii = false;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4VUserPhysicsList::DisableCheckParticleList()
|
||||
{
|
||||
inline
|
||||
void G4VUserPhysicsList::DisableCheckParticleList()
|
||||
{
|
||||
fDisableCheckParticleList = true;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user