34 #include "G4RunManager.hh" 35 #include "G4UImanager.hh" 36 #include "Randomize.hh" 42 #include "EventAction.hh" 43 #include "TrackingAction.hh" 44 #include "SteppingAction.hh" 45 #include "SteppingVerbose.hh" 46 #include "StackingAction.hh" 48 #include "G4UIExecutive.hh" 49 #include "G4VisExecutive.hh" 53 int main(
int argc,
char** argv) {
56 G4UIExecutive* ui =
nullptr;
57 if (argc == 1) ui =
new G4UIExecutive(argc,argv);
60 CLHEP::HepRandom::setTheEngine(
new CLHEP::RanecuEngine);
63 G4VSteppingVerbose::SetInstance(
new SteppingVerbose);
66 G4RunManager * runManager =
new G4RunManager;
71 runManager->SetUserInitialization(detector);
72 runManager->SetUserInitialization(
new PhysicsList());
78 runManager->SetUserAction(primary);
82 runManager->SetUserAction(runaction);
85 EventAction* eventaction =
new EventAction(runaction);
86 runManager->SetUserAction(eventaction);
89 TrackingAction* trackingaction =
new TrackingAction(runaction);
90 runManager->SetUserAction(trackingaction);
93 SteppingAction* steppingaction =
new SteppingAction(runaction, eventaction);
94 runManager->SetUserAction(steppingaction);
97 StackingAction* stackingaction =
new StackingAction();
98 runManager->SetUserAction(stackingaction);
101 G4VisManager* visManager =
nullptr;
104 G4UImanager* UImanager = G4UImanager::GetUIpointer();
108 visManager =
new G4VisExecutive;
109 visManager->Initialize();
115 G4String command =
"/control/execute ";
117 UImanager->ApplyCommand(command+fileName);
TConfigurablePhysicsList< ModularPhysicsList > PhysicsList
int main(int argc, char **argv)