Import Geant4 9.5.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 16:46:55 +02:00
parent 89a9605df1
commit b1eb5424d2
10957 changed files with 888481 additions and 160139 deletions
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4AdjointPrimaryGeneratorAction.hh,v 1.3 2010/07/21 14:21:19 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-04 $
// $Id: G4AdjointPrimaryGeneratorAction.hh,v 1.3 2010-07-21 14:21:19 gcosmo Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
/////////////////////////////////////////////////////////////////////////////////
// Class Name: G4AdjointPrimaryGeneratorAction
+2 -2
View File
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4AdjointSimManager.hh,v 1.2 2009/11/18 18:02:06 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-03 $
// $Id: G4AdjointSimManager.hh,v 1.2 2009-11-18 18:02:06 gcosmo Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
/////////////////////////////////////////////////////////////////////////////////
// Class Name: G4AdjointSimManager.hh
+2 -2
View File
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4AdjointSimMessenger.hh,v 1.2 2009/11/18 18:02:06 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-03 $
// $Id: G4AdjointSimMessenger.hh,v 1.2 2009-11-18 18:02:06 gcosmo Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
/////////////////////////////////////////////////////////////////////////////////
// Class Name: G4AdjointSimMessenger.hh
+2 -2
View File
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4ExceptionHandler.hh,v 1.2 2006/06/29 21:13:08 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4ExceptionHandler.hh,v 1.2 2006-06-29 21:13:08 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
//
// ------------------------------------------------------------
+2 -2
View File
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4MSSteppingAction.hh,v 1.2 2006/06/29 21:13:10 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4MSSteppingAction.hh,v 1.2 2006-06-29 21:13:10 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
//
+2 -2
View File
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4MatScanMessenger.hh,v 1.3 2006/06/29 21:13:12 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4MatScanMessenger.hh,v 1.3 2006-06-29 21:13:12 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
//
+2 -2
View File
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4MaterialScanner.hh,v 1.2 2006/06/29 21:13:14 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4MaterialScanner.hh,v 1.2 2006-06-29 21:13:14 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
//
+139
View File
@@ -0,0 +1,139 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// ------------------------------------------------------------
// GEANT 4 class header file
// Class Description:
// This class is a helper class for physics lists to register processes
// according to the ordering parameter table
// This class is a singleton
// -------------------------------------------
// History
// first version 29 Apr. 2011 by H.Kurashige
// ------------------------------------------------------------
#ifndef G4PhysicsListHelper_h
#define G4PhysicsListHelper_h 1
#include "globals.hh"
#include "G4ios.hh"
#include <vector>
#include "G4ParticleTable.hh"
#include "G4ParticleDefinition.hh"
#include "G4PhysicsListOrderingParameter.hh"
class G4VProcess;
class G4PhysicsListHelper
{
private:
// Hide constructor and destructor
G4PhysicsListHelper();
virtual ~G4PhysicsListHelper();
public: // with description
// This method gives the ponter to the physics list helper
static G4PhysicsListHelper* GetPhysicsListHelper();
//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);
// User must invoke this method in his ConstructProcess()
// implementation in order to insures particle transportation.
void AddTransportation();
// Set flag for using CoupledTransportation
void UseCoupledTransportation(G4bool vl=true);
/////////////////////////////////////////////////////////////////
public:
// check consistencies of list of particles
void CheckParticleList() const;
///////////////////////////////////////////////////////////////////////
public:
// Dump OrdingParameterTable
void DumpOrdingParameterTable(G4int subType = -1) const;
G4PhysicsListOrderingParameter GetOrdingParameter(G4int subType) const;
private:
void ReadOrdingParameterTable();
void ReadInDefaultOrderingParameter();
///////////////////////////////////////////////////////////////////////
public: // with description
void SetVerboseLevel(G4int value);
G4int GetVerboseLevel() const;
// set/get controle flag for output message
// 0: Silent
// 1: Warning message
// 2: More
////////////////////////////////////////////////////////////////////////
private:
static G4PhysicsListHelper* pPLHelper;
// the particle table has the complete List of existing particle types
G4ParticleTable* theParticleTable;
G4ParticleTable::G4PTblDicIterator* theParticleIterator;
G4bool useCoupledTransportation;
G4VProcess* theTransportationProcess;
G4int verboseLevel;
private:
typedef std::vector<G4PhysicsListOrderingParameter> G4OrdParamTable;
G4OrdParamTable* theTable;
G4int sizeOfTable;
G4String ordParamFileName;
};
inline
void G4PhysicsListHelper::UseCoupledTransportation(G4bool vl)
{
useCoupledTransportation = vl;
}
inline
void G4PhysicsListHelper::SetVerboseLevel(G4int value)
{
verboseLevel = value;
}
inline
G4int G4PhysicsListHelper::GetVerboseLevel() const
{
return verboseLevel;
}
#endif
@@ -0,0 +1,73 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// ------------------------------------------------------------
// GEANT 4 class header file
// Class Description:
// This class is a ordering parameter only used by G4PhysicsListHelper
// -------------------------------------------
// History
// first version 29 Apr. 2011 by H.Kurashige
// ------------------------------------------------------------
#ifndef G4PhysicsListOrderingParameter_h
#define G4PhysicsListOrderingParameter_h 1
#include "globals.hh"
#include "G4ios.hh"
class G4PhysicsListHelper;
class G4PhysicsListOrderingParameter
{
friend class G4PhysicsListHelper;
public:
// Hide constructor and destructor
G4PhysicsListOrderingParameter();
virtual ~G4PhysicsListOrderingParameter();
G4String GetTypeName() const {return processTypeName;}
G4int GetType() const { return processType;}
G4int GetSubType() const { return processSubType;}
G4int GetOrdering(int idx) const;
G4bool GetDuplicable() const {return isDuplicable;}
private:
G4String processTypeName;
G4int processType;
G4int processSubType;
G4int ordering[3];
G4bool isDuplicable;
};
inline
G4int G4PhysicsListOrderingParameter::GetOrdering(int idx) const
{
if ((idx<-1)||(idx>2)) return -1;
else return ordering[idx];
}
#endif
+2 -2
View File
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4Run.hh,v 1.16 2007/03/07 03:00:14 asaim Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4Run.hh,v 1.16 2007-03-07 03:00:14 asaim Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
#ifndef G4Run_h
+13 -5
View File
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4RunManager.hh,v 1.55 2010/11/15 09:49:32 asaim Exp $
// GEANT4 tag $Name: geant4-09-04 $
// $Id: G4RunManager.hh,v 1.55 2010-11-15 09:49:32 asaim Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
//
@@ -351,11 +351,17 @@ class G4RunManager
G4String shellCmd = "mkdir -p ";
#else
std::replace(dirStr.begin(), dirStr.end(),'/','\\');
G4String shellCmd = "mkdir ";
G4String shellCmd = "if not exist " + dirStr + " mkdir ";
#endif
shellCmd += dirStr;
randomNumberStatusDir = dirStr;
system(shellCmd);
G4int sysret = system(shellCmd);
if(sysret!=0)
{
G4String errmsg = "\"" + shellCmd + "\" returns non-zero value. Directory creation failed.";
G4Exception("GrRunManager::SetRandomNumberStoreDir","Run0071",JustWarning,errmsg);
G4cerr << " return value = " << sysret << G4endl;
}
}
inline const G4String& GetRandomNumberStoreDir() const
{ return randomNumberStatusDir; }
@@ -364,7 +370,9 @@ class G4RunManager
inline const G4String& GetRandomNumberStatusForThisEvent() const
{
if(storeRandomNumberStatusToG4Event==0 || storeRandomNumberStatusToG4Event==2)
{ G4Exception("Random number status is not available for this event."); }
{ G4Exception("GrRunManager::SetRandomNumberStoreDir",
"Run0072",JustWarning,
"Random number status is not available for this event."); }
return randomNumberStatusForThisEvent;
}
+3 -2
View File
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4RunManagerKernel.hh,v 1.11 2010/11/18 13:46:06 asaim Exp $
// GEANT4 tag $Name: geant4-09-04 $
// $Id: G4RunManagerKernel.hh,v 1.11 2010-11-18 13:46:06 asaim Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
//
@@ -141,6 +141,7 @@ class G4RunManagerKernel
G4EventManager * eventManager;
G4ExceptionHandler* defaultExceptionHandler;
G4Region* defaultRegion;
G4Region* defaultRegionForParallelWorld;
G4String versionString;
public: // with description
+2 -2
View File
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4RunMessenger.hh,v 1.18 2007/11/13 15:48:44 asaim Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4RunMessenger.hh,v 1.18 2007-11-13 15:48:44 asaim Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
//
// GEANT 4 class header file
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4UserPhysicsListMessenger.hh,v 1.20 2009/10/20 07:07:51 kurasige Exp $
// GEANT4 tag $Name: geant4-09-03 $
// $Id: G4UserPhysicsListMessenger.hh,v 1.20 2009-10-20 07:07:51 kurasige Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
//
//---------------------------------------------------------------
@@ -55,7 +55,9 @@
// add buildPhysicsTable command 13 Apr. 1999 by H.Kurashige
// add store/retreivePhysicsTable 08 Nov. 2000 by H.Kurashige
// add setStoredInAscii command 12 Mar. 2001 by H.Kurashige
// add applyCuts command 2 Aug. 2001 by H.Kurashige
// add applyCuts command 2 Aug. 2001 by H.Kurashige
// add dumpOrderingParam command 3 May. 2011 by H.Kurashige
// add getCutForAGivenParticle 11 June 2011 by H.Kurashige
// ------------------------------------------------------------
#ifndef G4UserPhysicsListMessenger_h
@@ -93,10 +95,10 @@ public: // with description
private: //commands
G4UIdirectory * theDirectory;
G4UIcmdWithADoubleAndUnit * setPCutCmd;
G4UIcmdWithADoubleAndUnit * setCutCmd;
G4UIcommand * setCutRCmd;
G4UIcommand * setCutForAGivenParticleCmd;
G4UIcommand * setCutForAGivenParticleCmd;
G4UIcmdWithAString * getCutForAGivenParticleCmd;
G4UIcmdWithAnInteger * verboseCmd;
G4UIcmdWithoutParameter * dumpListCmd;
G4UIcmdWithAString * addProcManCmd;
@@ -106,6 +108,7 @@ public: // with description
G4UIcmdWithAnInteger * asciiCmd;
G4UIcommand * applyCutsCmd;
G4UIcmdWithAString * dumpCutValuesCmd;
G4UIcmdWithAnInteger* dumpOrdParamCmd;
};
#endif
+2 -2
View File
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4UserRunAction.hh,v 1.8 2006/06/29 21:13:26 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4UserRunAction.hh,v 1.8 2006-06-29 21:13:26 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
#ifndef G4UserRunAction_h
+42 -38
View File
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4VModularPhysicsList.hh,v 1.7 2006/06/29 21:13:28 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4VModularPhysicsList.hh,v 1.7 2006-06-29 21:13:28 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
//
// ------------------------------------------------------------
@@ -37,15 +37,16 @@
// by using
// G4VModularPhysicsList::RegsiterPhysics()
// to construt particles and processes.
// In addition the user must implement the four virtual methods
// in his own concrete class derived from this class.
// G4VModularPhysicsList::SetCuts()
// to set cut values in range to all particles
// (rebuild of physics table will be invoked).
//
// 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
// - Add ReplacePhysics 14 Mar 2011 by H.Kurashige
//
// ------------------------------------------------------------
#ifndef G4VModularPhysicsList_h
#define G4VModularPhysicsList_h 1
@@ -62,12 +63,13 @@ class G4VModularPhysicsList: public virtual G4VUserPhysicsList
public:
G4VModularPhysicsList();
virtual ~G4VModularPhysicsList();
protected:
// hide copy constructor and assignment operator
G4VModularPhysicsList(const G4VModularPhysicsList&);
G4VModularPhysicsList & operator=(const G4VModularPhysicsList&);
public: // with description
// "SetCuts" method sets a cut value for all particle types
// in the particle table
virtual void SetCuts() = 0;
// This method will be invoked in the Construct() method.
// each particle type will be instantiated
virtual void ConstructParticle();
@@ -78,48 +80,50 @@ class G4VModularPhysicsList: public virtual G4VUserPhysicsList
virtual void ConstructProcess();
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 any corresponding physics constructor is 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);
/////////////////////////////////////
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
// vector of pointers to G4VPhysicsConstructor
typedef std::vector<G4VPhysicsConstructor*> G4PhysConstVector;
G4PhysConstVector* physicsVector;
G4int verboseLevel;
};
inline
void G4VModularPhysicsList::RegisterPhysics(G4VPhysicsConstructor* fPhysics)
{
physicsVector->push_back(fPhysics);
}
inline
const G4VPhysicsConstructor* G4VModularPhysicsList::GetPhysics(G4int idx) const
G4int G4VModularPhysicsList::GetVerboseLevel() const
{
G4int i;
G4PhysConstVector::iterator itr= physicsVector->begin();
for (i=0; i<idx && itr!= physicsVector->end() ; ++i) ++itr;
if (itr!= physicsVector->end()) return (*itr);
else return 0;
}
inline
const G4VPhysicsConstructor* G4VModularPhysicsList::GetPhysics(const G4String& name) const
{
G4PhysConstVector::iterator itr;
for (itr = physicsVector->begin(); itr!= physicsVector->end(); ++itr) {
if ( name == (*itr)->GetPhysicsName()) break;
}
if (itr!= physicsVector->end()) return (*itr);
else return 0;
}
return verboseLevel;
}
#endif
+2 -2
View File
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4VPersistencyManager.hh,v 1.5 2006/06/29 21:13:30 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4VPersistencyManager.hh,v 1.5 2006-06-29 21:13:30 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
#ifndef G4VPersistencyManager_h
+66 -7
View File
@@ -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
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4VUserDetectorConstruction.hh,v 1.9 2007/05/03 17:59:18 asaim Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4VUserDetectorConstruction.hh,v 1.9 2007-05-03 17:59:18 asaim Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
#ifndef G4VUserDetectorConstruction_h
+2 -2
View File
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4VUserParallelWorld.hh,v 1.2 2006/12/13 15:49:32 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4VUserParallelWorld.hh,v 1.2 2006-12-13 15:49:32 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
#ifndef G4VUserParallelWorld_h
+47 -51
View File
@@ -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
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4VUserPrimaryGeneratorAction.hh,v 1.5 2006/06/29 21:13:38 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4VUserPrimaryGeneratorAction.hh,v 1.5 2006-06-29 21:13:38 gunter Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
#ifndef G4VUserPrimaryGeneratorAction_h