44 #include "G4UImanager.hh" 45 #ifdef G4MULTITHREADED 46 #include "G4MTRunManager.hh" 48 #include "G4RunManager.hh" 51 #include "Par02DetectorConstruction.hh" 52 #include "Par02PhysicsList.hh" 53 #include "Par02ActionInitialization.hh" 55 #include "G4VisExecutive.hh" 56 #include "G4UIExecutive.hh" 58 int main(
int argc,
char** argv ) {
61 G4UIExecutive* ui =
nullptr;
63 ui =
new G4UIExecutive(argc, argv);
69 #ifdef G4MULTITHREADED 70 G4MTRunManager* runManager =
new G4MTRunManager;
71 runManager->SetNumberOfThreads(4);
72 G4cout<<
"+-------------------------------------------------------+"<<G4endl;
73 G4cout<<
"| Constructing MT run manager |"<<G4endl;
74 G4cout<<
"+-------------------------------------------------------+"<<G4endl;
76 G4RunManager* runManager =
new G4RunManager;
77 G4cout<<
"+-------------------------------------------------------+"<<G4endl;
78 G4cout<<
"| Constructing sequential run manager |"<<G4endl;
79 G4cout<<
"+-------------------------------------------------------+"<<G4endl;
83 G4VUserDetectorConstruction* detector =
new Par02DetectorConstruction();
84 runManager->SetUserInitialization( detector );
87 G4VUserPhysicsList* physicsList =
new Par02PhysicsList;
88 runManager->SetUserInitialization( physicsList );
93 runManager->SetUserInitialization(
new Par02ActionInitialization );
96 runManager->Initialize();
101 G4cout <<
"Instantiating Visualization Manager......." << G4endl;
102 G4VisManager* visManager =
new G4VisExecutive;
103 visManager->Initialize();
112 G4String command =
"/control/execute ";
114 G4UImanager * UImanager = G4UImanager::GetUIpointer();
115 UImanager->ApplyCommand( command+fileName );
int main(int argc, char **argv)