46 #include "Par01DetectorConstruction.hh" 47 #include "Par01ParallelWorldForPion.hh" 52 #include "FTFP_BERT.hh" 53 #include "G4FastSimulationPhysics.hh" 55 #include "G4UImanager.hh" 56 #ifdef G4MULTITHREADED 57 #include "G4MTRunManager.hh" 59 #include "G4RunManager.hh" 65 #include "Par01ActionInitialization.hh" 67 #include "G4VisExecutive.hh" 68 #include "G4UIExecutive.hh" 72 int main(
int argc,
char** argv)
75 G4UIExecutive* ui =
nullptr;
77 ui =
new G4UIExecutive(argc, argv);
83 #ifdef G4MULTITHREADED 84 G4MTRunManager * runManager =
new G4MTRunManager;
85 runManager->SetNumberOfThreads(4);
86 G4cout<<
"+-------------------------------------------------------+"<<G4endl;
87 G4cout<<
"| Constructing MT run manager |"<<G4endl;
88 G4cout<<
"+-------------------------------------------------------+"<<G4endl;
90 G4RunManager * runManager =
new G4RunManager;
91 G4cout<<
"+-------------------------------------------------------+"<<G4endl;
92 G4cout<<
"| Constructing sequential run manager |"<<G4endl;
93 G4cout<<
"+-------------------------------------------------------+"<<G4endl;
100 G4VUserDetectorConstruction* detector =
new Par01DetectorConstruction();
102 detector->RegisterParallelWorld(
new Par01ParallelWorldForPion(
"pionGhostWorld"));
104 runManager->SetUserInitialization(detector);
112 FTFP_BERT* physicsList =
new FTFP_BERT;
114 G4FastSimulationPhysics* fastSimulationPhysics =
new G4FastSimulationPhysics();
115 fastSimulationPhysics->BeVerbose();
118 fastSimulationPhysics->ActivateFastSimulation(
"e-");
119 fastSimulationPhysics->ActivateFastSimulation(
"e+");
120 fastSimulationPhysics->ActivateFastSimulation(
"gamma");
123 fastSimulationPhysics->ActivateFastSimulation(
"pi+",
"pionGhostWorld");
124 fastSimulationPhysics->ActivateFastSimulation(
"pi-",
"pionGhostWorld");
126 physicsList->RegisterPhysics( fastSimulationPhysics );
128 runManager->SetUserInitialization(physicsList);
133 runManager->SetUserInitialization(
new Par01ActionInitialization );
136 runManager->Initialize();
141 G4cout <<
"Instantiating Visualization Manager......." << G4endl;
142 G4VisManager* visManager =
new G4VisExecutive;
155 G4String command =
"/control/execute ";
157 G4UImanager * UImanager = G4UImanager::GetUIpointer();
158 UImanager->ApplyCommand(command+fileName);
int main(int argc, char **argv)