Main program of the visualization/userVisAction example.
More...
#include "B1DetectorConstruction.hh"
#include "B1ActionInitialization.hh"
#include "G4RunManager.hh"
#include "G4UImanager.hh"
#include "QBBC.hh"
#include "Randomize.hh"
#include "G4SystemOfUnits.hh"
Go to the source code of this file.
|
int | main (int argc, char **argv) |
|
Main program of the visualization/userVisAction example.
Definition in file userVisAction.cc.
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 55 of file userVisAction.cc.
59 G4Random::setTheEngine(
new CLHEP::RanecuEngine);
63 #ifdef G4MULTITHREADED 64 G4MTRunManager* runManager =
new G4MTRunManager;
66 G4RunManager* runManager =
new G4RunManager;
72 runManager->SetUserInitialization(
new B1DetectorConstruction());
75 G4VModularPhysicsList* physicsList =
new QBBC;
76 physicsList->SetVerboseLevel(1);
77 runManager->SetUserInitialization(physicsList);
80 runManager->SetUserInitialization(
new B1ActionInitialization());
84 runManager->Initialize();
88 G4VisManager* visManager =
new G4VisExecutive;
91 visManager->Initialize();
93 visManager->SetUserAction
94 (
new UVA_VisAction, G4VisExtent(-20*cm,-10*cm,-25*cm,-15*cm,20*cm,40*cm));
98 G4UImanager* UImanager = G4UImanager::GetUIpointer();
102 G4String command =
"/control/execute ";
104 UImanager->ApplyCommand(command+fileName);
109 G4UIExecutive* ui =
new G4UIExecutive(argc, argv);
111 UImanager->ApplyCommand(
"/control/execute init_vis.mac");
113 UImanager->ApplyCommand(
"/control/execute init.mac");