Import Geant4 3.0.0 source tree
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VUserPhysicsList.hh,v 1.5.6.1 1999/12/08 17:35:17 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// $Id: G4VUserPhysicsList.hh,v 1.8 2000/11/14 23:53:13 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -42,6 +42,8 @@
|
||||
// change BuildPhysicsTable as public
|
||||
// removed ConstructAllParticles() and related methods
|
||||
// changed SetCuts method argument
|
||||
// modified 08, Nov 2000 by H.Kurashige
|
||||
// added Retrieve/StorePhysicsTable and related methods
|
||||
// ------------------------------------------------------------
|
||||
#ifndef G4VUserPhysicsList_h
|
||||
#define G4VUserPhysicsList_h 1
|
||||
@@ -52,6 +54,7 @@
|
||||
#include "G4ParticleDefinition.hh"
|
||||
|
||||
class G4UserPhysicsListMessenger;
|
||||
class G4VProcess;
|
||||
|
||||
class G4VUserPhysicsList
|
||||
{
|
||||
@@ -83,7 +86,7 @@ class G4VUserPhysicsList
|
||||
void AddTransportation();
|
||||
|
||||
/////////////////////////////////////
|
||||
public:
|
||||
public: // with description
|
||||
// "SetCuts" method sets a cut value for all particle types
|
||||
// in the particle table
|
||||
virtual void SetCuts() = 0;
|
||||
@@ -94,9 +97,53 @@ class G4VUserPhysicsList
|
||||
void SetCutsWithDefault();
|
||||
|
||||
public: // with description
|
||||
//
|
||||
// Invoke BuildPhysicsTable for all processes for each particle
|
||||
// In case of "Retrieve" flag is ON, PhysicsTable will be
|
||||
// retrieved from files
|
||||
void BuildPhysicsTable(G4ParticleDefinition* );
|
||||
|
||||
// Store PhysicsTable together with both material and cut value
|
||||
// information in files under the specified directory.
|
||||
// (return true if files are sucessfully created)
|
||||
G4bool StorePhysicsTable(const G4String& directory = ".");
|
||||
|
||||
// Return true if "Retrieve" flag is ON.
|
||||
// (i.e. PhysicsTable will be retrieved from files)
|
||||
G4bool IsPhysicsTableRetrieved() const;
|
||||
// Get directory path for physics table files.
|
||||
const G4String& GetPhysicsTableDirectory() const;
|
||||
|
||||
// Set "Retrieve" flag
|
||||
// Directory path can be set together.
|
||||
// Null string (default) means directory is not changed
|
||||
// from the current value
|
||||
void SetPhysicsTableRetrieved(const G4String& directory = "");
|
||||
|
||||
// Reset "Retrieve" flag
|
||||
void ResetPhysicsTableRetrieved();
|
||||
|
||||
protected: // with description
|
||||
// do BuildPhysicsTable for make the integral schema
|
||||
void BuildIntegralPhysicsTable(G4VProcess* ,G4ParticleDefinition* );
|
||||
|
||||
protected: // with description
|
||||
// Retrieve PhysicsTable from files for proccess belongng the particle.
|
||||
// Normal BuildPhysics procedure of processes will be invoked,
|
||||
// if it fails (in case of Process's RetrievePhysicsTable returns false)
|
||||
virtual void RetrievePhysicsTable(G4ParticleDefinition* );
|
||||
|
||||
// Store material information in files under the specified directory.
|
||||
virtual G4bool StoreMaterialInfo(const G4String& directory);
|
||||
// Store cut values information in files under the specified directory.
|
||||
virtual G4bool StoreCutValues(const G4String& directory);
|
||||
|
||||
// check stored material and cut values
|
||||
virtual G4bool CheckForRetrievePhysicsTable(const G4String& directory);
|
||||
// check stored material is consistent with the current detector setup.
|
||||
virtual G4bool CheckMaterialInfo(const G4String& directory);
|
||||
// check stored cuvalue is consistent with the current detector setup.
|
||||
virtual G4bool CheckCutValues(const G4String& directory);
|
||||
|
||||
protected: // with description
|
||||
// Following are utility methods for SetCuts/reCalcCuts
|
||||
|
||||
@@ -189,19 +236,35 @@ class G4VUserPhysicsList
|
||||
protected:
|
||||
G4int verboseLevel;
|
||||
|
||||
protected:
|
||||
// flag to determine physics table will be build from file or not
|
||||
G4bool fRetrievePhysicsTable;
|
||||
|
||||
G4bool fIsCheckedForRetrievePhysicsTable;
|
||||
|
||||
// directory name for physics table files
|
||||
G4String directoryPhysicsTable;
|
||||
|
||||
// number of materials in G4MaterialTable
|
||||
// (this member is used by store/restore physics table)
|
||||
G4int numberOfMaterial;
|
||||
};
|
||||
|
||||
|
||||
inline void G4VUserPhysicsList::Construct()
|
||||
{
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel >1) G4cout << "G4VUserPhysicsList::Construct()" << G4endl;
|
||||
|
||||
if (verboseLevel >1) G4cout << "Construct particles " << G4endl;
|
||||
#endif
|
||||
ConstructParticle();
|
||||
|
||||
InitializeProcessManager();
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel >1) G4cout << "Construct processes " << G4endl;
|
||||
#endif
|
||||
ConstructProcess();
|
||||
}
|
||||
|
||||
@@ -213,10 +276,12 @@ inline G4double G4VUserPhysicsList::GetDefaultCutValue() const
|
||||
inline void G4VUserPhysicsList::SetVerboseLevel(G4int value)
|
||||
{
|
||||
verboseLevel = value;
|
||||
#ifdef G4VERBOSE
|
||||
if (verboseLevel >1){
|
||||
G4cout << "G4VUserPhysicsList::SetVerboseLevel :";
|
||||
G4cout << " Verbose level is set to " << verboseLevel << G4endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
inline G4int G4VUserPhysicsList::GetVerboseLevel() const
|
||||
@@ -224,4 +289,39 @@ inline G4int G4VUserPhysicsList::GetVerboseLevel() const
|
||||
return verboseLevel;
|
||||
}
|
||||
|
||||
inline
|
||||
G4bool G4VUserPhysicsList::IsPhysicsTableRetrieved() const
|
||||
{
|
||||
return fRetrievePhysicsTable;
|
||||
}
|
||||
|
||||
inline
|
||||
const G4String& G4VUserPhysicsList::GetPhysicsTableDirectory() const
|
||||
{
|
||||
return directoryPhysicsTable;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4VUserPhysicsList::SetPhysicsTableRetrieved(const G4String& directory)
|
||||
{
|
||||
fRetrievePhysicsTable = true;
|
||||
if(!directory.isNull()) {
|
||||
directoryPhysicsTable = directory;
|
||||
}
|
||||
fIsCheckedForRetrievePhysicsTable=false;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4VUserPhysicsList::ResetPhysicsTableRetrieved()
|
||||
{
|
||||
fRetrievePhysicsTable = false;
|
||||
fIsCheckedForRetrievePhysicsTable=false;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user