77 G4RunManager * runManager =
new G4RunManager();
87 runManager->SetUserInitialization(myQweakSimExperiment);
91 G4PhysListFactory factory;
92 G4VModularPhysicsList* physlist = factory.GetReferencePhysList(
"QGSP_BERT_LIV");
93 physlist->RegisterPhysics(
new G4OpticalPhysics());
94 #if G4VERSION_NUMBER < 1000
95 physlist->RegisterPhysics(
new G4StepLimiterBuilder());
97 physlist->RegisterPhysics(
new G4StepLimiterPhysics());
100 #if USE_CUSTOM_NUCLEAR_SCATTERING
104 runManager->SetUserInitialization(physlist);
115 runManager->SetUserAction(
new QweakSimEventAction(myQweakSimAnalysis, myQweakSimUserInformation) );
118 runManager->StoreRandomNumberStatusToG4Event(1);
121 runManager->Initialize();
122 G4UIsession* session = 0;
128 #if defined(G4UI_USE_QT)
129 session =
new G4UIQt(argc,argv);
130 #elif defined(G4UI_USE_XM)
131 session =
new G4UIXm(argc,argv);
132 #elif defined(G4UI_USE_WIN32)
133 session =
new G4UIWin32();
134 #elif defined(G4UI_USE_TCSH)
135 session =
new G4UIterminal(
new G4UItcsh);
137 session =
new G4UIterminal();
155 G4VisManager* visManager =
new G4VisExecutive;
157 visManager ->Initialize();
162 G4UImanager * UI = G4UImanager::GetUIpointer();
169 #if defined(G4UI_USE_XM) || defined(G4UI_USE_WIN32) || defined(G4UI_USE_QT)
171 UI->ApplyCommand(
"/control/execute gui.mac");
174 session->SessionStart();
180 visManager->SetVerboseLevel(
"quiet");
182 G4String command =
"/control/execute ";
183 G4String fileName = argv[1];
184 UI->ApplyCommand(command+fileName);
main class of QweakSim. All experiment components are are placed here.
Deal with primary particle generation and inject it in the detector.
Adds additional information to primary/secondary track before track starts stepping.
Defines actions at the beginning and the end of run.
Handling of the output ROOT file.
Mainly filling/storing the hit event structure at the end of an event.