43 #ifdef G4MULTITHREADED 44 #include "G4MTRunManager.hh" 46 #include "G4RunManager.hh" 48 #include "G4UImanager.hh" 50 #include "RE01DetectorConstruction.hh" 51 #include "RE01CalorimeterROGeometry.hh" 52 #include "QGSP_BERT.hh" 53 #include "G4UnknownDecayPhysics.hh" 54 #include "G4ParallelWorldPhysics.hh" 55 #include "RE01ActionInitialization.hh" 57 #include "G4VisExecutive.hh" 58 #include "G4UIExecutive.hh" 60 int main(
int argc,
char** argv)
63 G4UIExecutive* ui =
nullptr;
65 ui =
new G4UIExecutive(argc, argv);
68 #ifdef G4MULTITHREADED 69 G4MTRunManager * runManager =
new G4MTRunManager;
72 G4RunManager * runManager =
new G4RunManager;
76 G4VisManager* visManager =
new G4VisExecutive;
77 visManager->Initialize();
79 G4String parallelWorldName =
"ReadoutWorld";
80 G4VUserDetectorConstruction* detector
81 =
new RE01DetectorConstruction();
82 detector->RegisterParallelWorld(
83 new RE01CalorimeterROGeometry(parallelWorldName));
84 runManager->SetUserInitialization(detector);
86 G4VModularPhysicsList* physicsList =
new QGSP_BERT;
87 physicsList->RegisterPhysics(
new G4UnknownDecayPhysics);
88 physicsList->RegisterPhysics(
89 new G4ParallelWorldPhysics(parallelWorldName));
90 runManager->SetUserInitialization(physicsList);
92 runManager->SetUserInitialization(
93 new RE01ActionInitialization);
95 runManager->Initialize();
104 G4UImanager* UImanager = G4UImanager::GetUIpointer();
105 G4String command =
"/control/execute ";
107 UImanager->ApplyCommand(command+fileName);
int main(int argc, char **argv)