34 #include "ExTGDetectorConstruction.hh" 35 #include "ExTGDetectorConstructionWithSD.hh" 36 #include "ExTGDetectorConstructionWithCpp.hh" 37 #include "ExTGDetectorConstructionWithCuts.hh" 38 #include "G4GenericPhysicsList.hh" 39 #include "ExTGPrimaryGeneratorAction.hh" 40 #include "ExTGActionInitialization.hh" 42 #ifdef G4MULTITHREADED 43 #include "G4MTRunManager.hh" 45 #include "G4RunManager.hh" 48 #include "G4UImanager.hh" 50 #include "G4VisExecutive.hh" 51 #include "G4UIExecutive.hh" 55 int main(
int argc,
char** argv)
58 G4UIExecutive* ui =
nullptr;
60 ui =
new G4UIExecutive(argc, argv);
65 #ifdef G4MULTITHREADED 66 G4MTRunManager* runManager =
new G4MTRunManager;
67 runManager->SetNumberOfThreads(1);
69 G4RunManager* runManager =
new G4RunManager;
74 runManager->SetUserInitialization(
new ExTGDetectorConstruction);
77 std::vector<G4String>* MyConstr =
new std::vector<G4String>;
78 MyConstr->push_back(
"G4EmStandardPhysics");
79 G4VModularPhysicsList* phys =
new G4GenericPhysicsList(MyConstr);
80 runManager->SetUserInitialization(phys);
86 runManager->SetUserInitialization(
new ExTGActionInitialization);
97 G4UImanager * UImanager = G4UImanager::GetUIpointer();
99 G4VisManager* visManager =
new G4VisExecutive;
100 visManager->Initialize();
104 G4String command =
"/control/execute ";
106 UImanager->ApplyCommand(command+fileName);
110 UImanager->ApplyCommand(
"/control/execute run.mac");
int main(int argc, char **argv)