36 #include "FTFP_BERT.hh" 37 #include "FTFP_INCLXX.hh" 38 #include "G4UImanager.hh" 39 #ifdef G4MULTITHREADED 40 #include "G4MTRunManager.hh" 42 #include "G4RunManager.hh" 44 #include "ActionInitialization.hh" 45 #include "G4UIExecutive.hh" 46 #include "G4GenericBiasingPhysics.hh" 50 int main(
int argc,
char** argv ) {
52 G4UIExecutive* ui =
nullptr;
54 ui =
new G4UIExecutive(argc, argv);
57 #ifdef G4MULTITHREADED 58 G4MTRunManager * runManager =
new G4MTRunManager;
59 runManager->SetNumberOfThreads(4);
60 G4cout<<
"+-------------------------------------------------------+"<<G4endl;
61 G4cout<<
"| Constructing MT run manager |"<<G4endl;
62 G4cout<<
"+-------------------------------------------------------+"<<G4endl;
64 G4RunManager * runManager =
new G4RunManager;
65 G4cout<<
"+-------------------------------------------------------+"<<G4endl;
66 G4cout<<
"| Constructing sequential run manager |"<<G4endl;
67 G4cout<<
"+-------------------------------------------------------+"<<G4endl;
71 runManager->SetUserInitialization( detector );
73 FTFP_BERT* physicsList =
new FTFP_BERT;
76 G4GenericBiasingPhysics* biasingPhysics =
new G4GenericBiasingPhysics;
77 biasingPhysics->Bias(
"proton" );
78 biasingPhysics->Bias(
"neutron" );
79 biasingPhysics->Bias(
"pi+" );
80 biasingPhysics->Bias(
"pi-" );
81 physicsList->RegisterPhysics( biasingPhysics );
83 runManager->SetUserInitialization( physicsList );
84 runManager->SetUserInitialization(
new ActionInitialization );
86 runManager->Initialize();
92 G4String command =
"/control/execute ";
94 G4UImanager * UImanager = G4UImanager::GetUIpointer();
95 UImanager->ApplyCommand(command+fileName);
int main(int argc, char **argv)