45 #include "Par01DetectorConstruction.hh" 46 #include "Par01ParallelWorldForPion.hh" 51 #include "FTFP_BERT.hh" 52 #include "G4FastSimulationPhysics.hh" 54 #include "G4UImanager.hh" 55 #ifdef G4MULTITHREADED 56 #include "G4MTRunManager.hh" 58 #include "G4RunManager.hh" 64 #include "Par01ActionInitialization.hh" 67 #include "G4VisExecutive.hh" 71 #include "G4UIExecutive.hh" 76 int main(
int argc,
char** argv)
81 #ifdef G4MULTITHREADED 82 G4MTRunManager * runManager =
new G4MTRunManager;
83 runManager->SetNumberOfThreads(4);
84 G4cout<<
"+-------------------------------------------------------+"<<G4endl;
85 G4cout<<
"| Constructing MT run manager |"<<G4endl;
86 G4cout<<
"+-------------------------------------------------------+"<<G4endl;
88 G4RunManager * runManager =
new G4RunManager;
89 G4cout<<
"+-------------------------------------------------------+"<<G4endl;
90 G4cout<<
"| Constructing sequential run manager |"<<G4endl;
91 G4cout<<
"+-------------------------------------------------------+"<<G4endl;
98 G4VUserDetectorConstruction* detector =
new Par01DetectorConstruction();
100 detector->RegisterParallelWorld(
new Par01ParallelWorldForPion(
"pionGhostWorld"));
102 runManager->SetUserInitialization(detector);
110 FTFP_BERT* physicsList =
new FTFP_BERT;
112 G4FastSimulationPhysics* fastSimulationPhysics =
new G4FastSimulationPhysics();
113 fastSimulationPhysics->BeVerbose();
116 fastSimulationPhysics->ActivateFastSimulation(
"e-");
117 fastSimulationPhysics->ActivateFastSimulation(
"e+");
118 fastSimulationPhysics->ActivateFastSimulation(
"gamma");
121 fastSimulationPhysics->ActivateFastSimulation(
"pi+",
"pionGhostWorld");
122 fastSimulationPhysics->ActivateFastSimulation(
"pi-",
"pionGhostWorld");
124 physicsList->RegisterPhysics( fastSimulationPhysics );
126 runManager->SetUserInitialization(physicsList);
131 runManager->SetUserInitialization(
new Par01ActionInitialization );
134 runManager->Initialize();
140 G4cout <<
"Instantiating Visualization Manager......." << G4endl;
141 G4VisManager* visManager =
new G4VisExecutive;
151 G4UIExecutive * ui =
new G4UIExecutive(argc, argv);
158 G4String command =
"/control/execute ";
160 G4UImanager * UImanager = G4UImanager::GetUIpointer();
161 UImanager->ApplyCommand(command+fileName);
int main(int argc, char **argv)