Main program of the exoticphysics/monopole example.
More...
#include "G4RunManager.hh"
#include "G4UImanager.hh"
#include "Randomize.hh"
#include "globals.hh"
#include "DetectorConstruction.hh"
#include "G4MonopolePhysics.hh"
#include "G4PhysListFactory.hh"
#include "G4VModularPhysicsList.hh"
#include "PrimaryGeneratorAction.hh"
#include "RunAction.hh"
#include "TrackingAction.hh"
#include "SteppingAction.hh"
Go to the source code of this file.
|
int | main (int argc, char **argv) |
|
Main program of the exoticphysics/monopole example.
Definition in file monopole.cc.
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 59 of file monopole.cc.
References s.
64 CLHEP::HepRandom::setTheEngine(
new CLHEP::RanluxEngine);
67 G4RunManager * runManager =
new G4RunManager;
71 G4PhysListFactory factory;
72 G4VModularPhysicsList* phys = factory.ReferencePhysList();
75 G4MonopolePhysics * theMonopole =
new G4MonopolePhysics();
76 phys->RegisterPhysics(theMonopole);
80 G4VisManager* visManager = 0;
84 G4UImanager* UImanager = G4UImanager::GetUIpointer();
88 if(argc > 2) { s = argv[2]; }
89 UImanager->ApplyCommand(
"/control/verbose 1");
90 UImanager->ApplyCommand(
"/monopole/setup "+s);
95 runManager->SetUserInitialization(det);
96 runManager->SetUserInitialization(phys);
99 runManager->SetUserAction(kin);
104 runManager->SetUserAction(run =
new RunAction(det, kin));
105 runManager->SetUserAction(
new TrackingAction(run));
106 runManager->SetUserAction(
new SteppingAction(run));
110 G4String command =
"/control/execute ";
112 UImanager->ApplyCommand(command+fileName);
118 visManager =
new G4VisExecutive;
119 visManager->Initialize();
122 G4UIExecutive* ui =
new G4UIExecutive(argc, argv);