3 modified files
slic/src
diff -u -r1.10 -r1.11
--- PhysicsListManager.cc 19 Oct 2005 22:51:17 -0000 1.10
+++ PhysicsListManager.cc 18 Nov 2005 22:41:10 -0000 1.11
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/slic/src/PhysicsListManager.cc,v 1.10 2005/10/19 22:51:17 jeremy Exp $
+// $Header: /cvs/lcd/slic/src/PhysicsListManager.cc,v 1.11 2005/11/18 22:41:10 jeremy Exp $
#include "PhysicsListManager.hh"
// geant4
@@ -64,7 +64,7 @@
if ( !m_setupLimits ) {
- std::cout << "Enabling limits on ALL particles for volumes with G4UserLimits." << std::endl;
+ std::cout << "Enabling user physics limits." << std::endl;
G4ParticleTable* ptbl = G4ParticleTable::GetParticleTable();
@@ -98,7 +98,7 @@
m_setupLimits = true;
}
else {
- std::cerr << "PhysicsListManager::setupUserLimitsProcesses() already called!" << std::endl;
+ std::cerr << "PhysicsListManager::setupUserLimitsProcesses() was already called!" << std::endl;
}
}
}
slic/src
diff -u -r1.14 -r1.15
--- PhysicsMessenger.cc 19 Oct 2005 22:51:17 -0000 1.14
+++ PhysicsMessenger.cc 18 Nov 2005 22:41:10 -0000 1.15
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/slic/src/PhysicsMessenger.cc,v 1.14 2005/10/19 22:51:17 jeremy Exp $
+// $Header: /cvs/lcd/slic/src/PhysicsMessenger.cc,v 1.15 2005/11/18 22:41:10 jeremy Exp $
#include "PhysicsMessenger.hh"
// slic
@@ -53,23 +53,23 @@
// enable limits
else if ( cmd == m_enableLimitsCmd ) {
bool blim = true;
-
+
if ( newVals != G4String("") ) {
blim = G4UIcmdWithABool::GetNewBoolValue( newVals );
}
-
+
mgr->enableLimits( blim );
std::cout << "Enable limits <" << mgr->enableLimits() << ">." << std::endl;
- }
+ }
else {
std::cerr << "Unknown command for PhysicsMessenger." << std::endl;
}
}
-
+
void PhysicsMessenger::defineCommands()
- {
+ {
G4UIparameter* p;
-
+
m_physicsListDir = new G4UIdirectory( "/physics/" );
m_physicsListDir->SetGuidance( "Physics list commands." );
@@ -86,7 +86,7 @@
// print current list
m_printCurrentCmd = new G4UIcmdWithoutParameter( "/physics/printCurrent", this );
- m_printCurrentCmd->SetGuidance( "Print name of currently selected physics list." );
+ m_printCurrentCmd->SetGuidance( "Print name of currently selected physics list." );
// enable limits
m_enableLimitsCmd = new G4UIcmdWithABool( "/physics/enableLimits", this );
slic/src
diff -u -r1.9 -r1.10
--- RunManager.cc 19 Oct 2005 22:51:18 -0000 1.9
+++ RunManager.cc 18 Nov 2005 22:41:10 -0000 1.10
@@ -1,32 +1,41 @@
-// $Header: /cvs/lcd/slic/src/RunManager.cc,v 1.9 2005/10/19 22:51:18 jeremy Exp $
+// $Header: /cvs/lcd/slic/src/RunManager.cc,v 1.10 2005/11/18 22:41:10 jeremy Exp $
#include "RunManager.hh"
// lcdd
#include "LCDDParser.hh"
+#include "LCDDProcessor.hh"
// slic
#include "PhysicsListManager.hh"
+// geant4
+#include "G4UImanager.hh"
+
namespace slic
{
void RunManager::InitializePhysics()
{
- // get app physics mgr
- PhysicsListManager* pmgr = PhysicsListManager::instance();
-
- // initialize in physics mgr
- pmgr->initializePhysicsList();
+ /* initialize the physics list */
+ PhysicsListManager::instance()->initializePhysicsList();
- // call par class function
+ /* call parent's init function to setup physics */
G4RunManager::InitializePhysics();
- // enable limits if selected (must happen after G4RunManager init for valid G4ProcessManagers!)
- if ( pmgr->enableLimits() ) {
+ /* check if LCDD subsystem got some limits from the input file */
+ LCDDProcessor* lcdd = LCDDProcessor::instance();
+ PhysicsListManager* pmgr = PhysicsListManager::instance();
+ if ( lcdd->getLimitSetsBegin() != lcdd->getLimitSetsEnd() ) {
+ pmgr->enableLimits(true);
+ }
+
+ /* enable physics limits, if necessary */
+ if ( pmgr->enableLimits() ) {
pmgr->setupUserLimitsProcesses();
}
}
+ // called before InitializePhysics()
void RunManager::InitializeGeometry()
{
if ( !LCDDParser::instance()->isValidSetup() ) {
CVSspam 0.2.8