Import Geant4 10.0.0 source tree
This commit is contained in:
@@ -23,13 +23,20 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
// $Id: Microdosimetry.cc,v 1.4 2010/10/06 14:39:41 sincerti Exp $
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// This example is provided by the Geant4-DNA collaboration
|
||||
// Any report or published results obtained using the Geant4-DNA software
|
||||
// shall cite the following Geant4-DNA collaboration publication:
|
||||
// Med. Phys. 37 (2010) 4692-4708
|
||||
// The Geant4-DNA web site is available at http://geant4-dna.org
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
#include "G4RunManager.hh"
|
||||
#ifdef G4MULTITHREADED
|
||||
#include "G4MTRunManager.hh"
|
||||
#else
|
||||
#include "G4RunManager.hh"
|
||||
#endif
|
||||
|
||||
#include "G4UImanager.hh"
|
||||
#include "G4UIterminal.hh"
|
||||
#include "G4UItcsh.hh"
|
||||
@@ -38,49 +45,49 @@
|
||||
#include "G4VisExecutive.hh"
|
||||
#endif
|
||||
|
||||
#include "ActionInitialization.hh"
|
||||
#include "DetectorConstruction.hh"
|
||||
#include "PhysicsList.hh"
|
||||
#include "PrimaryGeneratorAction.hh"
|
||||
#include "RunAction.hh"
|
||||
#include "SteppingAction.hh"
|
||||
#include "SteppingVerbose.hh"
|
||||
#include "HistoManager.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
int main(int argc,char** argv)
|
||||
{
|
||||
// Choose the Random engine
|
||||
|
||||
G4Random::setTheEngine(new CLHEP::RanecuEngine);
|
||||
|
||||
// Construct the default run manager
|
||||
G4RunManager * runManager = new G4RunManager;
|
||||
|
||||
#ifdef G4MULTITHREADED
|
||||
G4MTRunManager* runManager = new G4MTRunManager;
|
||||
runManager->SetNumberOfThreads(2);
|
||||
#else
|
||||
G4RunManager* runManager = new G4RunManager;
|
||||
#endif
|
||||
|
||||
// Set mandatory user initialization classes
|
||||
|
||||
DetectorConstruction* detector = new DetectorConstruction;
|
||||
runManager->SetUserInitialization(detector);
|
||||
|
||||
runManager->SetUserInitialization(new PhysicsList);
|
||||
|
||||
// Set mandatory user action classes
|
||||
PrimaryGeneratorAction* primary = new PrimaryGeneratorAction(detector);
|
||||
runManager->SetUserAction(primary);
|
||||
|
||||
HistoManager* histo = new HistoManager();
|
||||
|
||||
// Set optional user action classes
|
||||
RunAction* RunAct = new RunAction(detector,histo);
|
||||
runManager->SetUserAction(RunAct);
|
||||
|
||||
runManager->SetUserAction(new SteppingAction(RunAct,detector,primary,histo));
|
||||
// User action initialization
|
||||
|
||||
runManager->SetUserInitialization(new ActionInitialization(detector));
|
||||
|
||||
// Initialize G4 kernel
|
||||
|
||||
runManager->Initialize();
|
||||
|
||||
#ifdef G4VIS_USE
|
||||
G4VisManager* visManager = new G4VisExecutive;
|
||||
visManager->Initialize();
|
||||
#endif
|
||||
|
||||
// Initialize G4 kernel
|
||||
runManager->Initialize();
|
||||
|
||||
remove ("dna.root");
|
||||
|
||||
// Get the pointer to the User Interface manager
|
||||
|
||||
G4UImanager* UI = G4UImanager::GetUIpointer();
|
||||
|
||||
if (argc==1) // Define UI session for interactive mode.
|
||||
|
||||
Reference in New Issue
Block a user