38 #ifdef G4MULTITHREADED 42 #ifdef USE_MULTITHREADED 43 #include "G4MTRunManager.hh" 45 #include "F01SteppingVerbose.hh" 46 #include "G4RunManager.hh" 49 #include "F01DetectorConstruction.hh" 50 #include "F01ActionInitialization.hh" 52 #include "F01RunAction.hh" 54 #include "G4UImanager.hh" 56 #include "G4EmParameters.hh" 57 #include "G4HadronicProcessStore.hh" 59 #include "G4PhysicsListHelper.hh" 61 #include "FTFP_BERT.hh" 62 #include "G4StepLimiterPhysics.hh" 63 #include "Randomize.hh" 65 #include "G4VisExecutive.hh" 66 #include "G4UIExecutive.hh" 69 #include "G4Electron.hh" 70 #include "G4Transportation.hh" 71 #include "G4CoupledTransportation.hh" 75 int main(
int argc,
char** argv)
78 G4UIExecutive* ui =
nullptr;
80 ui =
new G4UIExecutive(argc, argv);
85 G4Random::setTheEngine(
new CLHEP::RanecuEngine);
89 #ifdef USE_MULTITHREADED 90 G4MTRunManager * runManager =
new G4MTRunManager;
92 G4VSteppingVerbose::SetInstance(
new F01SteppingVerbose);
93 G4RunManager * runManager =
new G4RunManager;
99 F01DetectorConstruction* detector =
new F01DetectorConstruction();
102 runManager->SetUserInitialization(detector);
106 auto plHelper = G4PhysicsListHelper::GetPhysicsListHelper();
107 plHelper->UseLowLooperThresholds();
112 G4VModularPhysicsList* physicsList =
new FTFP_BERT;
113 physicsList->RegisterPhysics(
new G4StepLimiterPhysics());
114 runManager->SetUserInitialization(physicsList);
117 runManager->SetUserInitialization(
new F01ActionInitialization(detector));
120 auto runAction=
new F01RunAction();
121 runAction->SetWarningEnergy( 10.0 * CLHEP::keV );
125 runAction->SetImportantEnergy( 0.1 * CLHEP::MeV );
126 runAction->SetNumberOfTrials( 30 );
132 runManager->SetUserAction(runAction);
135 G4EmParameters::Instance()->SetVerbose(-1);
136 G4HadronicProcessStore::Instance()->SetVerbose(0);
140 runManager->Initialize();
144 G4VisManager* visManager =
new G4VisExecutive;
147 visManager->Initialize();
151 G4UImanager* UImanager = G4UImanager::GetUIpointer();
155 G4String command =
"/control/execute ";
157 UImanager->ApplyCommand(command+fileName);
161 UImanager->ApplyCommand(
"/control/execute init_vis.mac");
163 UImanager->ApplyCommand(
"/control/execute gui.mac");
int main(int argc, char **argv)