Main program of the channeling example.
More...
#include "G4RunManager.hh"
#include "G4ScoringManager.hh"
#include "G4UImanager.hh"
#include "Randomize.hh"
#include "ExExChDetectorConstruction.hh"
#include "ExExChPrimaryGeneratorAction.hh"
#include "ExExChTrackingAction.hh"
#include "ExExChStackingAction.hh"
#include "ExExChEventAction.hh"
#include "ExExChRunAction.hh"
#include "ExExChPhysicsList.hh"
#include "QGSP_BERT.hh"
Go to the source code of this file.
|
int | main (int argc, char **argv) |
|
Main program of the channeling example.
Definition in file channeling.cc.
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 67 of file channeling.cc.
70 #ifdef G4MULTITHREADED 71 G4MTRunManager* runManager =
new G4MTRunManager;
74 runManager->SetNumberOfThreads(atoi(argv[2]));
77 G4cout <<
"MT MODE ON " << runManager->GetNumberOfThreads() << G4endl;
79 G4RunManager* runManager =
new G4RunManager;
80 G4cout <<
"MT MODE OFF" << G4endl;
84 G4ScoringManager * scManager = G4ScoringManager::GetScoringManager();
85 scManager->SetVerboseLevel(0);
88 #ifndef G4MULTITHREADED 89 CLHEP::HepRandom::setTheEngine(
new CLHEP::RanecuEngine);
93 G4VUserDetectorConstruction* detector =
94 new ExExChDetectorConstruction;
95 runManager->SetUserInitialization(detector);
96 runManager->SetUserInitialization(
new ExExChPhysicsList());
98 #ifndef G4MULTITHREADED 100 runManager->SetUserAction(
new ExExChPrimaryGeneratorAction());
101 runManager->SetUserAction(
new ExExChEventAction());
102 runManager->SetUserAction(
new ExExChStackingAction());
103 runManager->SetUserAction(
new ExExChTrackingAction());
104 runManager->SetUserAction(
new ExExChRunAction());
106 runManager->SetUserInitialization(
107 new ExExChUserActionInitialization());
111 G4UImanager* UI = G4UImanager::GetUIpointer();
115 G4String command =
"/control/execute ";
117 UI->ApplyCommand(command+fileName);
123 G4VisManager* visManager =
new G4VisExecutive;
124 visManager->Initialize();
128 G4UIExecutive * ui =
new G4UIExecutive(argc,argv);