34 #ifdef G4MULTITHREADED 35 #include "G4MTRunManager.hh" 37 #include "G4RunManager.hh" 39 #include "G4UImanager.hh" 40 #include "G4ScoringManager.hh" 42 #include "RE03DetectorConstruction.hh" 43 #include "FTFP_BERT.hh" 44 #include "RE03ActionInitialization.hh" 46 #include "G4VisExecutive.hh" 47 #include "G4UIExecutive.hh" 54 int main(
int argc,
char** argv)
57 G4UIExecutive* ui =
nullptr;
59 ui =
new G4UIExecutive(argc, argv);
64 #ifdef G4MULTITHREADED 65 G4MTRunManager * runManager =
new G4MTRunManager;
66 runManager->SetNumberOfThreads(4);
68 G4RunManager * runManager =
new G4RunManager;
72 G4ScoringManager * scManager = G4ScoringManager::GetScoringManager();
73 scManager->SetVerboseLevel(1);
82 G4VUserDetectorConstruction* detector =
new RE03DetectorConstruction;
83 runManager->SetUserInitialization(detector);
85 G4VUserPhysicsList* physics =
new FTFP_BERT;
86 runManager->SetUserInitialization(physics);
90 RE03ActionInitialization* actions =
new RE03ActionInitialization;
91 runManager->SetUserInitialization(actions);
94 G4VisManager* visManager =
new G4VisExecutive;
95 visManager->Initialize();
99 runManager->Initialize();
103 G4UImanager* UImanager = G4UImanager::GetUIpointer();
107 UImanager->ApplyCommand(
"/control/execute vis.mac");
113 G4String command =
"/control/execute ";
115 UImanager->ApplyCommand(command+fileName);
int main(int argc, char **argv)