33 #include "G4RunManager.hh" 34 #include "G4UImanager.hh" 35 #include "Randomize.hh" 42 #include "TrackingAction.hh" 43 #include "SteppingAction.hh" 44 #include "SteppingVerbose.hh" 46 #include "G4UIExecutive.hh" 47 #include "G4VisExecutive.hh" 51 int main(
int argc,
char** argv) {
54 G4UIExecutive* ui =
nullptr;
55 if (argc == 1) ui =
new G4UIExecutive(argc,argv);
58 CLHEP::HepRandom::setTheEngine(
new CLHEP::RanecuEngine);
61 G4VSteppingVerbose::SetInstance(
new SteppingVerbose);
64 G4RunManager * runManager =
new G4RunManager;
71 runManager->SetUserInitialization(det);
72 runManager->SetUserInitialization(phys);
78 TrackingAction*
track =
new TrackingAction(det,run);
79 SteppingAction* step =
new SteppingAction(det,run);
81 runManager->SetUserAction(kin);
82 runManager->SetUserAction(run);
83 runManager->SetUserAction(track);
84 runManager->SetUserAction(step);
87 G4VisManager* visManager =
nullptr;
90 G4UImanager* UImanager = G4UImanager::GetUIpointer();
94 visManager =
new G4VisExecutive;
95 visManager->Initialize();
96 UImanager->ApplyCommand(
"/control/execute vis.mac");
102 G4String command =
"/control/execute ";
104 UImanager->ApplyCommand(command+fileName);
TConfigurablePhysicsList< ModularPhysicsList > PhysicsList
int main(int argc, char **argv)