32 #ifdef G4MULTITHREADED 33 #include "G4MTRunManager.hh" 35 #include "G4RunManager.hh" 37 #include "G4ScoringManager.hh" 38 #include "G4UImanager.hh" 40 #include "Randomize.hh" 42 #include "ExExChDetectorConstruction.hh" 44 #ifdef G4MULTITHREADED 45 #include "ExExChUserActionInitialization.hh" 47 #include "ExExChPrimaryGeneratorAction.hh" 48 #include "ExExChTrackingAction.hh" 49 #include "ExExChStackingAction.hh" 50 #include "ExExChEventAction.hh" 51 #include "ExExChRunAction.hh" 54 #include "ExExChPhysicsList.hh" 55 #include "QGSP_BERT.hh" 58 #include "G4VisExecutive.hh" 62 #include "G4UIExecutive.hh" 67 int main(
int argc,
char** argv)
70 #ifdef G4MULTITHREADED 71 G4MTRunManager* runManager =
new G4MTRunManager;
74 runManager->SetNumberOfThreads(atoi(argv[2]));
77 G4cout <<
"MT MODE ON " << runManager->GetNumberOfThreads() << G4endl;
79 G4RunManager* runManager =
new G4RunManager;
80 G4cout <<
"MT MODE OFF" << G4endl;
84 G4ScoringManager * scManager = G4ScoringManager::GetScoringManager();
85 scManager->SetVerboseLevel(0);
88 #ifndef G4MULTITHREADED 89 CLHEP::HepRandom::setTheEngine(
new CLHEP::RanecuEngine);
93 G4VUserDetectorConstruction* detector =
94 new ExExChDetectorConstruction;
95 runManager->SetUserInitialization(detector);
96 runManager->SetUserInitialization(
new ExExChPhysicsList());
98 #ifndef G4MULTITHREADED 100 runManager->SetUserAction(
new ExExChPrimaryGeneratorAction());
101 runManager->SetUserAction(
new ExExChEventAction());
102 runManager->SetUserAction(
new ExExChStackingAction());
103 runManager->SetUserAction(
new ExExChTrackingAction());
104 runManager->SetUserAction(
new ExExChRunAction());
106 runManager->SetUserInitialization(
107 new ExExChUserActionInitialization());
111 G4UImanager* UI = G4UImanager::GetUIpointer();
115 G4String command =
"/control/execute ";
117 UI->ApplyCommand(command+fileName);
123 G4VisManager* visManager =
new G4VisExecutive;
124 visManager->Initialize();
128 G4UIExecutive * ui =
new G4UIExecutive(argc,argv);
int main(int argc, char **argv)