31 #ifdef G4MULTITHREADED 32 #include "G4MTRunManager.hh" 34 #include "G4RunManager.hh" 37 #include "G4ScoringManager.hh" 38 #include "G4UImanager.hh" 40 #ifdef G4MULTITHREADED 41 #include "UserActionInitialization.hh" 44 #include "StackingAction.hh" 45 #include "EventAction.hh" 51 #include "G4VisExecutive.hh" 52 #include "G4UIExecutive.hh" 54 #include "FTFP_BERT.hh" 56 #include "G4EmStandardPhysics_option4_channeling.hh" 57 #include "G4ChannelingPhysics.hh" 58 #include "G4GenericBiasingPhysics.hh" 62 int main(
int argc,
char** argv)
66 G4UIExecutive* ui = 0;
68 ui =
new G4UIExecutive(argc, argv);
72 #ifdef G4MULTITHREADED 73 G4MTRunManager* runManager =
new G4MTRunManager;
74 runManager->SetNumberOfThreads(G4Threading::G4GetNumberOfCores() - 2);
76 G4RunManager* runManager =
new G4RunManager;
80 G4ScoringManager * scManager = G4ScoringManager::GetScoringManager();
81 scManager->SetVerboseLevel(0);
84 G4VModularPhysicsList* physlist=
new FTFP_BERT();
85 G4GenericBiasingPhysics* biasingPhysics =
new G4GenericBiasingPhysics();
86 physlist->RegisterPhysics(
new G4ChannelingPhysics());
87 physlist->ReplacePhysics(
new G4EmStandardPhysics_option4_channeling());
89 biasingPhysics->PhysicsBiasAllCharged();
90 physlist->RegisterPhysics(biasingPhysics);
91 runManager->SetUserInitialization(physlist);
93 #ifndef G4MULTITHREADED 96 runManager->SetUserAction(
new EventAction());
97 runManager->SetUserAction(
new StackingAction());
98 runManager->SetUserAction(
new RunAction());
100 runManager->SetUserInitialization(
new UserActionInitialization());
107 G4VisManager* visManager =
new G4VisExecutive;
110 visManager->Initialize();
113 G4UImanager* UImanager = G4UImanager::GetUIpointer();
119 G4String command =
"/control/execute ";
121 UImanager->ApplyCommand(command+fileName);
125 UImanager->ApplyCommand(
"/control/execute init_vis.mac");
int main(int argc, char **argv)