Main program of the hadronic/Hadr08 example.
More...
#include "G4Types.hh"
#include "DetectorConstruction.hh"
#include "FTFP_BERT.hh"
#include "FTFP_INCLXX.hh"
#include "G4UImanager.hh"
#include "G4RunManager.hh"
#include "ActionInitialization.hh"
#include "G4UIExecutive.hh"
#include "G4GenericBiasingPhysics.hh"
Go to the source code of this file.
|
int | main (int argc, char **argv) |
|
Main program of the hadronic/Hadr08 example.
Definition in file Hadr08.cc.
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 50 of file Hadr08.cc.
52 G4UIExecutive* ui =
nullptr;
54 ui =
new G4UIExecutive(argc, argv);
57 #ifdef G4MULTITHREADED 58 G4MTRunManager * runManager =
new G4MTRunManager;
59 runManager->SetNumberOfThreads(4);
60 G4cout<<
"+-------------------------------------------------------+"<<G4endl;
61 G4cout<<
"| Constructing MT run manager |"<<G4endl;
62 G4cout<<
"+-------------------------------------------------------+"<<G4endl;
64 G4RunManager * runManager =
new G4RunManager;
65 G4cout<<
"+-------------------------------------------------------+"<<G4endl;
66 G4cout<<
"| Constructing sequential run manager |"<<G4endl;
67 G4cout<<
"+-------------------------------------------------------+"<<G4endl;
71 runManager->SetUserInitialization( detector );
73 FTFP_BERT* physicsList =
new FTFP_BERT;
76 G4GenericBiasingPhysics* biasingPhysics =
new G4GenericBiasingPhysics;
77 biasingPhysics->Bias(
"proton" );
78 biasingPhysics->Bias(
"neutron" );
79 biasingPhysics->Bias(
"pi+" );
80 biasingPhysics->Bias(
"pi-" );
81 physicsList->RegisterPhysics( biasingPhysics );
83 runManager->SetUserInitialization( physicsList );
84 runManager->SetUserInitialization(
new ActionInitialization );
86 runManager->Initialize();
92 G4String command =
"/control/execute ";
94 G4UImanager * UImanager = G4UImanager::GetUIpointer();
95 UImanager->ApplyCommand(command+fileName);