Import Geant4 10.4.0.beta source tree
This commit is contained in:
@@ -16,6 +16,12 @@ track of all tags.
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
3rd May 2017 John Allison (exVisualization-V10-03-02)
|
||||
**********************************************************************
|
||||
Note: This History file is no longer used. See the individual History
|
||||
files in the sub-directories.
|
||||
**********************************************************************
|
||||
|
||||
24th April 2013 Gabriele Cosmo (exVisualization-V09-06-01)
|
||||
- Retagged. No change in contents...
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$Id: History 69587 2013-05-08 14:26:03Z gcosmo $
|
||||
$Id: History 103931 2017-05-03 13:52:02Z gcosmo $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -16,6 +16,11 @@ track of all tags.
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
8th January 2017 John Allison (exam-ext-vis-persp-V10-03-00)
|
||||
- perspective.cc:
|
||||
o Changed SetUserAction to RegisterRunDurationUserVisAction.
|
||||
o Updated to current practice.
|
||||
|
||||
27th March 2013 John Allison (exam-ext-vis-persp-V09-06-02)
|
||||
- Added separators between functions.
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
/// \brief Main program of the visualization/perspective example
|
||||
//
|
||||
//
|
||||
// $Id: perspective.cc 69587 2013-05-08 14:26:03Z gcosmo $
|
||||
// $Id: perspective.cc 103931 2017-05-03 13:52:02Z gcosmo $
|
||||
//
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -46,20 +46,18 @@
|
||||
|
||||
int main(int argc,char** argv) {
|
||||
|
||||
G4UIExecutive* ui = new G4UIExecutive(argc,argv);
|
||||
|
||||
G4VisManager* visManager = new G4VisExecutive;
|
||||
|
||||
visManager->RegisterRunDurationUserVisAction
|
||||
("Perspective",
|
||||
new PerspectiveVisAction,
|
||||
G4VisExtent(-100*m,100*m,-100*m,100*m,-100*m,100*m));
|
||||
|
||||
visManager->Initialise();
|
||||
|
||||
visManager->SetUserAction
|
||||
(new PerspectiveVisAction,
|
||||
G4VisExtent(-100*m,100*m,-100*m,100*m,-100*m,100*m));
|
||||
|
||||
G4String command = "/control/execute ";
|
||||
G4String fileName = "vis.mac";
|
||||
if (argc > 1) { // Macro name supplied.
|
||||
fileName = argv[1];
|
||||
}
|
||||
G4UIExecutive* ui = new G4UIExecutive(argc,argv);
|
||||
G4UImanager::GetUIpointer()->ApplyCommand(command+fileName);
|
||||
G4UImanager::GetUIpointer()->ApplyCommand("/control/execute vis.mac");
|
||||
ui->SessionStart();
|
||||
|
||||
delete ui;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$Id: History 87256 2014-11-28 07:58:08Z gcosmo $
|
||||
$Id: History 103931 2017-05-03 13:52:02Z gcosmo $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -16,6 +16,10 @@ track of all tags.
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
8th January 2017 John Allison (exam-ext-vis-standalone-V10-03-00)
|
||||
- standalone.cc:
|
||||
o Updated to current practice.
|
||||
|
||||
27th November 2014 John Allison (exam-ext-vis-standalone-V10-00-01)
|
||||
- README: Mention /vis/scene/add/extent.
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
/// \brief Main program of the visualization/standalone example
|
||||
//
|
||||
//
|
||||
// $Id: standalone.cc 69587 2013-05-08 14:26:03Z gcosmo $
|
||||
// $Id: standalone.cc 103931 2017-05-03 13:52:02Z gcosmo $
|
||||
//
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -46,6 +46,8 @@
|
||||
|
||||
int main(int argc,char** argv) {
|
||||
|
||||
G4UIExecutive* ui = new G4UIExecutive(argc, argv);
|
||||
|
||||
G4VisManager* visManager = new G4VisExecutive;
|
||||
visManager->RegisterRunDurationUserVisAction
|
||||
("A standalone example - 3 boxes, 2 with boolean subtracted cutout",
|
||||
@@ -53,9 +55,7 @@ int main(int argc,char** argv) {
|
||||
G4VisExtent(-10*m,10*m,-10*m,10*m,-10*m,10*m));
|
||||
visManager->Initialize ();
|
||||
|
||||
G4UIExecutive* ui = new G4UIExecutive(argc, argv);
|
||||
G4UImanager* UImanager = G4UImanager::GetUIpointer();
|
||||
UImanager->ApplyCommand ("/control/execute standalone.mac");
|
||||
G4UImanager::GetUIpointer()->ApplyCommand ("/control/execute standalone.mac");
|
||||
ui->SessionStart();
|
||||
|
||||
delete ui;
|
||||
|
||||
@@ -46,7 +46,6 @@ target_link_libraries(userVisAction ${Geant4_LIBRARIES})
|
||||
set(USERVISACTION_SCRIPTS
|
||||
userVisAction.in
|
||||
userVisAction.out
|
||||
init.mac
|
||||
init_vis.mac
|
||||
run1.mac
|
||||
run2.mac
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$Id: History 87255 2014-11-28 07:52:46Z gcosmo $
|
||||
$Id: History 103931 2017-05-03 13:52:02Z gcosmo $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -16,6 +16,23 @@ track of all tags.
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
3rd May 2017 John Allison (exam-ext-vis-UVA-V10-03-04)
|
||||
- Copied exampleB1.in to userVisAction.in.
|
||||
All macros now include /run/initialize.
|
||||
|
||||
28th April 2017 John Allison (exam-ext-vis-UVA-V10-03-03)
|
||||
- Copied run1.mac and run2.mac from example B1.
|
||||
|
||||
26th April 2017 John Allison (exam-ext-vis-UVA-V10-03-02)
|
||||
- Removed init.mac. It is no longer used. /run/initialize is in
|
||||
the new run1.mac and run2.mac.
|
||||
|
||||
8th January 2017 John Allison (exam-ext-vis-UVA-V10-03-00)
|
||||
- userVisAction.cc:
|
||||
o Changed SetUserAction to RegisterRunDurationUserVisAction.
|
||||
o Updated to current practice.
|
||||
- init_vis.mac: Updated to current practice.
|
||||
|
||||
27th November 2014 John Allison (exam-ext-vis-UVA-V10-00-02)
|
||||
- README: Mention /vis/scene/add/extent.
|
||||
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
# Macro file for the initialization phase of example B1
|
||||
# when running in interactive mode with visualization
|
||||
# Macro file for the initialization of example B1
|
||||
# in interactive session
|
||||
#
|
||||
# Set some default verbose
|
||||
#
|
||||
/control/verbose 2
|
||||
/control/saveHistory
|
||||
/run/verbose 2
|
||||
#
|
||||
# Change the default number of threads (in multi-threaded mode)
|
||||
#/run/numberOfThreads 4
|
||||
#
|
||||
# Initialize kernel
|
||||
/run/initialize
|
||||
#
|
||||
# Visualization setting
|
||||
/control/execute vis.mac
|
||||
|
||||
@@ -3,8 +3,13 @@
|
||||
# Can be run in batch, without graphic
|
||||
# or interactively: Idle> /control/execute run1.mac
|
||||
#
|
||||
/control/verbose 2
|
||||
# Change the default number of workers (in multi-threading mode)
|
||||
#/run/numberOfWorkers 4
|
||||
#
|
||||
# Initialize kernel
|
||||
/run/initialize
|
||||
#
|
||||
/control/verbose 2
|
||||
/run/verbose 2
|
||||
/event/verbose 0
|
||||
/tracking/verbose 1
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
# To be run preferably in batch, without graphics:
|
||||
# % exampleB1 run2.mac
|
||||
#
|
||||
#/run/numberOfWorkers 4
|
||||
/run/initialize
|
||||
#
|
||||
/control/verbose 2
|
||||
/run/verbose 2
|
||||
#
|
||||
|
||||
@@ -38,14 +38,9 @@
|
||||
#include "G4UImanager.hh"
|
||||
#include "QBBC.hh"
|
||||
|
||||
#ifdef G4VIS_USE
|
||||
#include "G4UIExecutive.hh"
|
||||
#include "G4VisExecutive.hh"
|
||||
#include "UVA_VisAction.hh"
|
||||
#endif
|
||||
|
||||
#ifdef G4UI_USE
|
||||
#include "G4UIExecutive.hh"
|
||||
#endif
|
||||
|
||||
#include "Randomize.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
@@ -54,6 +49,13 @@
|
||||
|
||||
int main(int argc,char** argv)
|
||||
{
|
||||
// Detect interactive mode (if no arguments) and define UI session
|
||||
//
|
||||
G4UIExecutive* ui = 0;
|
||||
if ( argc == 1 ) {
|
||||
ui = new G4UIExecutive(argc, argv);
|
||||
}
|
||||
|
||||
// Choose the Random engine
|
||||
//
|
||||
G4Random::setTheEngine(new CLHEP::RanecuEngine);
|
||||
@@ -79,42 +81,31 @@ int main(int argc,char** argv)
|
||||
// User action initialization
|
||||
runManager->SetUserInitialization(new B1ActionInitialization());
|
||||
|
||||
// Initialize G4 kernel
|
||||
//
|
||||
runManager->Initialize();
|
||||
|
||||
#ifdef G4VIS_USE
|
||||
// Initialize visualization
|
||||
G4VisManager* visManager = new G4VisExecutive;
|
||||
// G4VisExecutive can take a verbosity argument - see /vis/verbose guidance.
|
||||
// G4VisManager* visManager = new G4VisExecutive("Quiet");
|
||||
visManager->Initialize();
|
||||
// Register User Vis Action with optional extent
|
||||
visManager->SetUserAction
|
||||
(new UVA_VisAction, G4VisExtent(-20*cm,-10*cm,-25*cm,-15*cm,20*cm,40*cm));
|
||||
#endif
|
||||
visManager->RegisterRunDurationUserVisAction
|
||||
("My nice logo",
|
||||
new UVA_VisAction,
|
||||
G4VisExtent(-20*cm,-10*cm,-25*cm,-15*cm,20*cm,40*cm));
|
||||
visManager->Initialize();
|
||||
|
||||
// Get the pointer to the User Interface manager
|
||||
G4UImanager* UImanager = G4UImanager::GetUIpointer();
|
||||
|
||||
if (argc!=1) {
|
||||
if ( ! ui ) {
|
||||
// batch mode
|
||||
G4String command = "/control/execute ";
|
||||
G4String fileName = argv[1];
|
||||
UImanager->ApplyCommand(command+fileName);
|
||||
}
|
||||
else {
|
||||
// interactive mode : define UI session
|
||||
#ifdef G4UI_USE
|
||||
G4UIExecutive* ui = new G4UIExecutive(argc, argv);
|
||||
#ifdef G4VIS_USE
|
||||
UImanager->ApplyCommand("/control/execute init_vis.mac");
|
||||
#else
|
||||
UImanager->ApplyCommand("/control/execute init.mac");
|
||||
#endif
|
||||
// interactive mode
|
||||
UImanager->ApplyCommand("/control/execute init_vis.mac");
|
||||
ui->SessionStart();
|
||||
delete ui;
|
||||
#endif
|
||||
}
|
||||
|
||||
// Job termination
|
||||
@@ -122,9 +113,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;
|
||||
|
||||
@@ -1,21 +1,16 @@
|
||||
/tracking/verbose 1
|
||||
# Macro file for example B1 test
|
||||
|
||||
/gun/energy 200 MeV
|
||||
/gun/particle e+
|
||||
/run/beamOn 1
|
||||
/run/initialize
|
||||
|
||||
/gun/energy 1 TeV
|
||||
/gun/particle mu+
|
||||
/run/beamOn 1
|
||||
|
||||
/tracking/verbose 0
|
||||
|
||||
/gun/energy 200 MeV
|
||||
/gun/particle e+
|
||||
/run/beamOn 100
|
||||
|
||||
/gun/energy 1 TeV
|
||||
/gun/particle mu+
|
||||
/run/beamOn 100
|
||||
|
||||
exit
|
||||
# gamma 6 MeV
|
||||
/gun/particle gamma
|
||||
/gun/energy 6 MeV
|
||||
#
|
||||
/run/printProgress 100
|
||||
/run/beamOn 1000
|
||||
#
|
||||
# proton 210 MeV
|
||||
/gun/particle proton
|
||||
/gun/energy 210 MeV
|
||||
#
|
||||
/run/beamOn 1000
|
||||
|
||||
Reference in New Issue
Block a user