#include "CCalDetectorConstruction.hh"
#include "CCalEndOfEventAction.hh"
#include "CCalRunAction.hh"
#include "CCalPrimaryGeneratorAction.hh"
#include "G4PhysListFactory.hh"
#include "G4RunManager.hh"
#include "G4UImanager.hh"
Go to the source code of this file.
|
int | main (int argc, char **argv) |
|
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 50 of file CompositeCalorimeter.cc.
53 G4VisManager *visManager =
new G4VisExecutive;
54 visManager->Initialize();
57 G4RunManager * runManager =
new G4RunManager;
58 runManager->SetUserInitialization(
new CCalDetectorConstruction);
60 G4PhysListFactory factory;
61 runManager->SetUserInitialization(factory.ReferencePhysList());
72 CCalPrimaryGeneratorAction* primaryGenerator =
new CCalPrimaryGeneratorAction;
73 runManager->SetUserAction(primaryGenerator);
79 runManager->SetUserAction(
new CCalRunAction);
85 runManager->SetUserAction(
new CCalEndOfEventAction(primaryGenerator));
87 G4UImanager * UImanager = G4UImanager::GetUIpointer();
88 UImanager->ApplyCommand(
"/CCal/generator/verbose 2");
89 UImanager->ApplyCommand(
"/gun/position -1380. 0. 0. mm");
90 UImanager->ApplyCommand(
"/gun/direction 1. 0. 0.");
91 UImanager->ApplyCommand(
"/gun/energy 100 GeV");
97 G4UIExecutive* ui =
new G4UIExecutive(argc, argv);
100 UImanager->ApplyCommand(
"/control/execute gui.mac");
101 G4cout <<
" Run initializing ..."<<G4endl;
102 UImanager->ApplyCommand(
"/process/verbose 0");
103 UImanager->ApplyCommand(
"/run/verbose 2");
104 UImanager->ApplyCommand(
"/run/initialize");
107 G4String visCommand =
"/vis/scene/create";
108 UImanager->ApplyCommand(visCommand);
114 visCommand =
"/vis/open OGL";
115 UImanager->ApplyCommand(visCommand);
117 visCommand =
"/vis/viewer/flush";
118 UImanager->ApplyCommand(visCommand);
119 visCommand =
"/tracking/storeTrajectory 1";
120 UImanager->ApplyCommand(visCommand);
122 G4cout <<
"Now, please, apply beamOn command..."<<G4endl;
130 G4String command =
"/control/execute ";
132 UImanager->ApplyCommand(command+fileName);