Import Geant4 10.5.0.beta source tree
This commit is contained in:
@@ -40,7 +40,7 @@ target_link_libraries(RE03 ${Geant4_LIBRARIES} )
|
||||
# relies on these scripts being in the current working directory.
|
||||
#
|
||||
set(RE03_SCRIPTS
|
||||
drawCylinderSlice.mac drawSlice.mac run1.mac run2.mac run3.mac run4.mac vis.mac
|
||||
drawCylinderSlice.mac drawSlice.mac batchrun1.mac run1.mac run2.mac run3.mac run4.mac vis.mac
|
||||
)
|
||||
|
||||
foreach(_script ${RE03_SCRIPTS})
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$Id: History 99162 2016-09-07 08:14:24Z gcosmo $
|
||||
$Id: History 110440 2018-05-23 11:28:07Z gcosmo $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -15,6 +15,22 @@ track of all tags.
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
May 23, 2018 M. Asai (exampleRE03-V10-04-01)
|
||||
- Add batchrun1.mac for batch job and update CMakelists.txt
|
||||
accordingly.
|
||||
|
||||
May 16, 2018 J. Allison
|
||||
- Minor fixes to run*.mac files.
|
||||
|
||||
May 14, 2018 J. Allison (exampleRE03-V10-04-00)
|
||||
- Add #include "G4Types.hh".
|
||||
- Remove G4UI_USE and G4VIS_USE.
|
||||
- Move instantiation of G4UIExecutive to start of main.
|
||||
- vis.mac: Tidy.
|
||||
o No need to create empty scene - /vis/drawVolume creates a new one.
|
||||
o No need to /tracking/storeTrajectories - /vis/scene/add/trajectories does.
|
||||
- run1.mac: Tidy.
|
||||
|
||||
Sep 02, 2016 M. Asai (exampleRE03-V10-02-00)
|
||||
- Migrate to G4THitsMap<G4StatDouble>.
|
||||
|
||||
|
||||
@@ -28,7 +28,10 @@
|
||||
//
|
||||
//
|
||||
// $Id: $
|
||||
//
|
||||
//
|
||||
|
||||
#include "G4Types.hh"
|
||||
|
||||
#ifdef G4MULTITHREADED
|
||||
#include "G4MTRunManager.hh"
|
||||
#else
|
||||
@@ -41,13 +44,8 @@
|
||||
#include "FTFP_BERT.hh"
|
||||
#include "RE03ActionInitialization.hh"
|
||||
|
||||
#ifdef G4VIS_USE
|
||||
#include "G4VisExecutive.hh"
|
||||
#endif
|
||||
|
||||
#ifdef G4UI_USE
|
||||
#include "G4UIExecutive.hh"
|
||||
#endif
|
||||
|
||||
//====================================================================
|
||||
// Un-comment this line for user defined score writer
|
||||
@@ -56,6 +54,12 @@
|
||||
|
||||
int main(int argc,char** argv)
|
||||
{
|
||||
// Instantiate G4UIExecutive if there are no arguments (interactive mode)
|
||||
G4UIExecutive* ui = nullptr;
|
||||
if ( argc == 1 ) {
|
||||
ui = new G4UIExecutive(argc, argv);
|
||||
}
|
||||
|
||||
// Construct the run manager
|
||||
//
|
||||
#ifdef G4MULTITHREADED
|
||||
@@ -87,12 +91,10 @@ int main(int argc,char** argv)
|
||||
RE03ActionInitialization* actions = new RE03ActionInitialization;
|
||||
runManager->SetUserInitialization(actions);
|
||||
|
||||
#ifdef G4VIS_USE
|
||||
// Visualization manager
|
||||
G4VisManager* visManager = new G4VisExecutive;
|
||||
visManager->Initialize();
|
||||
#endif
|
||||
|
||||
|
||||
// Initialize G4 kernel
|
||||
//
|
||||
runManager->Initialize();
|
||||
@@ -101,16 +103,11 @@ int main(int argc,char** argv)
|
||||
//
|
||||
G4UImanager* UImanager = G4UImanager::GetUIpointer();
|
||||
|
||||
if (argc==1) // Define UI session for interactive mode
|
||||
if (ui) // Define UI session for interactive mode
|
||||
{
|
||||
#ifdef G4UI_USE
|
||||
G4UIExecutive* ui = new G4UIExecutive(argc, argv);
|
||||
#ifdef G4VIS_USE
|
||||
UImanager->ApplyCommand("/control/execute vis.mac");
|
||||
#endif
|
||||
UImanager->ApplyCommand("/control/execute vis.mac");
|
||||
ui->SessionStart();
|
||||
delete ui;
|
||||
#endif
|
||||
}
|
||||
else // Batch mode
|
||||
{
|
||||
@@ -124,9 +121,7 @@ int main(int argc,char** argv)
|
||||
// owned and deleted by the run manager, so they should not
|
||||
// be deleted in the main() program !
|
||||
|
||||
#ifdef G4VIS_USE
|
||||
delete visManager;
|
||||
#endif
|
||||
delete runManager;
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
########################################
|
||||
#
|
||||
# define scoring mesh
|
||||
#
|
||||
/score/create/boxMesh boxMesh_1
|
||||
#
|
||||
/score/mesh/boxSize 100. 100. 100. cm
|
||||
/score/mesh/nBin 30 30 30
|
||||
#
|
||||
/score/quantity/energyDeposit eDep
|
||||
/score/quantity/nOfStep nOfStepGamma
|
||||
/score/filter/particle gammaFilter gamma
|
||||
/score/quantity/nOfStep nOfStepEMinus
|
||||
/score/filter/particle eMinusFilter e-
|
||||
/score/quantity/nOfStep nOfStepEPlus
|
||||
/score/filter/particle ePlusFilter e+
|
||||
#
|
||||
/score/close
|
||||
#
|
||||
/score/list
|
||||
#
|
||||
########################################
|
||||
#
|
||||
/control/verbose 2
|
||||
/run/verbose 1
|
||||
/gun/particle e-
|
||||
/run/beamOn 2000
|
||||
#
|
||||
########################################
|
||||
#
|
||||
# Dump scorers to a file
|
||||
#
|
||||
/score/dumpQuantityToFile boxMesh_1 eDep eDep.txt
|
||||
/score/dumpQuantityToFile boxMesh_1 nOfStepGamma nOfStepGamma.txt
|
||||
/score/dumpQuantityToFile boxMesh_1 nOfStepEMinus nOfStepEMinus.txt
|
||||
/score/dumpQuantityToFile boxMesh_1 nOfStepEPlus nOfStepEPlus.txt
|
||||
#
|
||||
#
|
||||
@@ -26,6 +26,7 @@
|
||||
/run/verbose 1
|
||||
#######/event/verbose 1
|
||||
#######/tracking/verbose 1
|
||||
#######/vis/verbose confirmations
|
||||
/gun/particle e-
|
||||
/run/beamOn 2000
|
||||
/vis/enable
|
||||
@@ -43,14 +44,16 @@
|
||||
#
|
||||
# drawing slices
|
||||
#
|
||||
/vis/scene/create
|
||||
/vis/sceneHandler/attach scene-2
|
||||
# new scene and viewer
|
||||
/vis/open OGL
|
||||
/vis/drawVolume world
|
||||
/vis/viewer/copyViewFrom viewer-0
|
||||
/score/colorMap/setMinMax ! 0. 800.
|
||||
/control/loop drawSlice.mac iColumn 0 29 7
|
||||
#
|
||||
########################################
|
||||
#
|
||||
# Dump scores to a file
|
||||
# Dump scorers to a file
|
||||
#
|
||||
/score/dumpQuantityToFile boxMesh_1 nOfStepGamma nOfStepGamma.txt
|
||||
#
|
||||
|
||||
@@ -36,8 +36,6 @@
|
||||
#
|
||||
# drawing slices
|
||||
#
|
||||
/vis/scene/create
|
||||
/vis/sceneHandler/attach scene-2
|
||||
/score/colorMap/setMinMax ! 0. 200.
|
||||
/control/alias iAxis 1
|
||||
/control/loop drawCylinderSlice.mac iColumn 0 29 7
|
||||
|
||||
@@ -1,18 +1,11 @@
|
||||
#
|
||||
# create empty scene
|
||||
#
|
||||
/vis/scene/create
|
||||
#
|
||||
# Create a scene handler for a specific graphics system
|
||||
# (Edit the next line(s) to choose another graphic system)
|
||||
#
|
||||
# (Edit the next line to choose another graphic system)
|
||||
/vis/open OGL
|
||||
#
|
||||
# draw scene
|
||||
#
|
||||
/vis/drawVolume worlds
|
||||
#
|
||||
/vis/viewer/set/viewpointThetaPhi 105 165 deg
|
||||
# Set specific colur for identification
|
||||
# Set specific color for identification
|
||||
###/vis/geometry/set/colour Calor-AP_LayerLog ! yellow
|
||||
###/vis/geometry/set/colour Calor-BP_LayerLog ! yellow
|
||||
###/vis/geometry/set/colour Calor-CP_LayerLog ! yellow
|
||||
@@ -20,8 +13,7 @@
|
||||
##############/vis/viewer/flush
|
||||
#
|
||||
# for drawing the tracks
|
||||
# (if too many tracks cause core dump => storeTrajectory 0)
|
||||
/tracking/storeTrajectory 1
|
||||
##/vis/scene/endOfEventAction accumulate
|
||||
##/vis/scene/add/trajectories
|
||||
/vis/scene/endOfEventAction accumulate
|
||||
/vis/scene/add/trajectories
|
||||
# If too many tracks, /vis/disable before running many events
|
||||
|
||||
|
||||
Reference in New Issue
Block a user