Skip to content

Commit cb0eb11

Browse files
author
David Webber
committed
Fixing a bug introduced in revision 285 which removed physics lists selection. Physics lists can now be selected in jobOptions.mac. If the WCSim physics list is selected, its hadronic model can be selected in jobOptions2.mac
1 parent c40c6b1 commit cb0eb11

File tree

3 files changed

+36
-18
lines changed

3 files changed

+36
-18
lines changed

WCSim.cc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,15 @@ int main(int argc,char** argv)
4747
// Set up the messenger hooks here, initialize the actual list after loading jobOptions.mac
4848
WCSimPhysicsListFactory *physFactory = new WCSimPhysicsListFactory();
4949

50-
50+
// Currently, default model is set to BINARY
51+
UI->ApplyCommand("/control/execute jobOptions.mac");
52+
5153
// Initialize the physics factory to register the selected physics.
5254
physFactory->InitializeList();
5355
runManager->SetUserInitialization(physFactory);
54-
56+
57+
// If the WCSim physics list was chosen in jobOptions.mac,
58+
// then it's hadronic model needs to be selected in jobOptions2.mac
5559
//=================================
5660
// Added by JLR 2005-07-05
5761
//=================================
@@ -60,11 +64,7 @@ int main(int argc,char** argv)
6064
// by the program BEFORE the runManager is initialized.
6165
// If file does not exist, default model will be used.
6266
// Currently, default model is set to BINARY.
63-
//K.Z. 2010-08: Moving the choice of the physics lists and
64-
//the hadronic model for wcsim default physcis lists to the right
65-
//place, after initializing the physics list factory
66-
67-
UI->ApplyCommand("/control/execute jobOptions.mac");
67+
UI->ApplyCommand("/control/execute jobOptions2.mac");
6868

6969
// Visualization
7070
G4VisManager* visManager = new WCSimVisManager;

jobOptions.mac

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
1-
# First choose the hadronic interaction model.
2-
# Note: WCSim physics list only
3-
# Options:
4-
# GHEISHA (Original Geant4 model)
5-
# BERTINI (Bertini intra-nuclear cascade model)
6-
# BINARY (Binary intra-nuclear cascade model) -- this is the default
7-
/WCSim/physics/secondaries/model BINARY
1+
# Choose the physics list.
2+
# Physics lists are described in the Geant4 documentation at
3+
# http://geant4.cern.ch/support/proc_mod_catalog/physics_lists/physicsLists.shtml
4+
# and
5+
# http://geant4.cern.ch/support/proc_mod_catalog/physics_lists/referencePL.shtml
6+
# and
7+
# http://geant4.slac.stanford.edu/SLACTutorial09/ChoosingPhysicsList.ppt
8+
#
9+
# The list of available physics lists is output during WCSim initialization.
10+
# A "WCSim" physics list is provided in addition to the Gean4 lists for backwards-compatibility
11+
# uncomment one line below to choose the physics list
12+
#
13+
#/WCSim/physics/list QGSP_BIC_HP #preferred for energies below 5 GeV
14+
#/WCSim/physics/list LBE # preferred for low-background experiments.
15+
/WCSim/physics/list WCSim # included for backward-compatibility. Requires jobOptions2.mac
816

917

10-
# Then choose the appropriate physics lists:
1118

12-
#/WCSim/physics/list QGSP_BIC_HP #preferred?
13-
/WCSim/physics/list WCSim #old list
14-
#/WCSim/physics/list LBE # now working

jobOptions2.mac

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# This file is required only if the WCSim physics list is selected in jobOptions.mac
2+
# If the WCSim physics list is not selected, setting /WCSim/physics/secondaries/model
3+
# will fail and any lines below that point will not be read.
4+
#
5+
# Choose hadronic interaction model.
6+
# Note: WCSim physics list only
7+
# Note2: Probably broken because this file is read before WCSim object instantiation
8+
# Options:
9+
# GHEISHA (Original Geant4 model)
10+
# BERTINI (Bertini intra-nuclear cascade model)
11+
# BINARY (Binary intra-nuclear cascade model) -- this is the default
12+
/WCSim/physics/secondaries/model BINARY
13+
# Do not put any commands below this line
14+

0 commit comments

Comments
 (0)