43 #include "G4UImanager.hh" 44 #ifdef G4MULTITHREADED 45 #include "G4MTRunManager.hh" 47 #include "G4RunManager.hh" 50 #include "Par02DetectorConstruction.hh" 51 #include "Par02PhysicsList.hh" 52 #include "Par02ActionInitialization.hh" 55 #include "G4VisExecutive.hh" 59 #include "G4UIExecutive.hh" 63 int main(
int argc,
char** argv ) {
68 #ifdef G4MULTITHREADED 69 G4MTRunManager* runManager =
new G4MTRunManager;
70 runManager->SetNumberOfThreads(4);
71 G4cout<<
"+-------------------------------------------------------+"<<G4endl;
72 G4cout<<
"| Constructing MT run manager |"<<G4endl;
73 G4cout<<
"+-------------------------------------------------------+"<<G4endl;
75 G4RunManager* runManager =
new G4RunManager;
76 G4cout<<
"+-------------------------------------------------------+"<<G4endl;
77 G4cout<<
"| Constructing sequential run manager |"<<G4endl;
78 G4cout<<
"+-------------------------------------------------------+"<<G4endl;
82 G4VUserDetectorConstruction* detector =
new Par02DetectorConstruction();
83 runManager->SetUserInitialization( detector );
86 G4VUserPhysicsList* physicsList =
new Par02PhysicsList;
87 runManager->SetUserInitialization( physicsList );
92 runManager->SetUserInitialization(
new Par02ActionInitialization );
95 runManager->Initialize();
101 G4cout <<
"Instantiating Visualization Manager......." << G4endl;
102 G4VisManager* visManager =
new G4VisExecutive;
103 visManager->Initialize();
111 G4UIExecutive * ui =
new G4UIExecutive( argc, argv );
116 G4String command =
"/control/execute ";
118 G4UImanager * UImanager = G4UImanager::GetUIpointer();
119 UImanager->ApplyCommand( command+fileName );
int main(int argc, char **argv)