#include "CCalDetectorConstruction.hh"
#include "CCalActionInitializer.hh"
#include "CCalAnalysis.hh"
#include "G4PhysListFactory.hh"
#include "G4RunManager.hh"
#include "G4UImanager.hh"
#include "G4VisExecutive.hh"
#include "G4UIExecutive.hh"
Go to the source code of this file.
|
int | main (int argc, char **argv) |
|
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 44 of file CompositeCalorimeter.cc.
46 G4VisManager *visManager =
nullptr;
48 G4RunManager * runManager =
new G4RunManager;
49 runManager->SetUserInitialization(
new CCalDetectorConstruction);
51 G4PhysListFactory factory;
52 runManager->SetUserInitialization(factory.ReferencePhysList());
54 runManager->SetUserInitialization(
new CCalActionInitializer());
56 G4UImanager * UImanager = G4UImanager::GetUIpointer();
57 UImanager->ApplyCommand(
"/CCal/generator/verbose 2");
58 UImanager->ApplyCommand(
"/gun/position -1380. 0. 0. mm");
59 UImanager->ApplyCommand(
"/gun/direction 1. 0. 0.");
60 UImanager->ApplyCommand(
"/gun/energy 100 GeV");
65 visManager =
new G4VisExecutive;
66 visManager->Initialize();
68 G4UIExecutive* ui =
new G4UIExecutive(argc, argv);
71 UImanager->ApplyCommand(
"/control/execute gui.mac");
73 G4cout <<
" Run initializing ..."<<G4endl;
74 UImanager->ApplyCommand(
"/process/verbose 0");
75 UImanager->ApplyCommand(
"/run/verbose 2");
76 UImanager->ApplyCommand(
"/run/initialize");
79 G4String visCommand =
"/vis/scene/create";
80 UImanager->ApplyCommand(visCommand);
86 visCommand =
"/vis/open OGL";
87 UImanager->ApplyCommand(visCommand);
89 visCommand =
"/vis/viewer/flush";
90 UImanager->ApplyCommand(visCommand);
91 visCommand =
"/tracking/storeTrajectory 1";
92 UImanager->ApplyCommand(visCommand);
94 G4cout <<
"Now, please, apply beamOn command..."<<G4endl;
101 G4String command =
"/control/execute ";
103 UImanager->ApplyCommand(command+fileName);
108 G4AnalysisManager* man = G4AnalysisManager::Instance();
112 delete G4AnalysisManager::Instance();