Import Geant4 10.5.0.beta source tree
This commit is contained in:
@@ -28,9 +28,10 @@
|
||||
//
|
||||
//
|
||||
// $Id: TestEm1.cc,v 1.16 2010-04-06 11:11:24 maire Exp $
|
||||
//
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
#include "G4Types.hh"
|
||||
|
||||
#ifdef G4MULTITHREADED
|
||||
#include "G4MTRunManager.hh"
|
||||
@@ -46,22 +47,21 @@
|
||||
#include "ActionInitialization.hh"
|
||||
#include "SteppingVerbose.hh"
|
||||
|
||||
#ifdef G4VIS_USE
|
||||
#include "G4VisExecutive.hh"
|
||||
#endif
|
||||
|
||||
#ifdef G4UI_USE
|
||||
#include "G4UIExecutive.hh"
|
||||
#endif
|
||||
#include "G4VisExecutive.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
|
||||
int main(int argc,char** argv) {
|
||||
|
||||
|
||||
//detect interactive mode (if no arguments) and define UI session
|
||||
G4UIExecutive* ui = nullptr;
|
||||
if (argc == 1) ui = new G4UIExecutive(argc,argv);
|
||||
|
||||
//choose the Random engine
|
||||
G4Random::setTheEngine(new CLHEP::RanecuEngine);
|
||||
|
||||
// Construct the default run manager
|
||||
|
||||
//construct the default run manager
|
||||
#ifdef G4MULTITHREADED
|
||||
G4MTRunManager* runManager = new G4MTRunManager;
|
||||
runManager->SetNumberOfThreads(G4Threading::G4GetNumberOfCores());
|
||||
@@ -71,48 +71,37 @@ int main(int argc,char** argv) {
|
||||
G4RunManager* runManager = new G4RunManager;
|
||||
#endif
|
||||
|
||||
// set mandatory initialization classes
|
||||
//set mandatory initialization classes
|
||||
DetectorConstruction* det= new DetectorConstruction;
|
||||
runManager->SetUserInitialization(det);
|
||||
|
||||
|
||||
PhysicsList* phys = new PhysicsList;
|
||||
runManager->SetUserInitialization(phys);
|
||||
|
||||
runManager->SetUserInitialization(new ActionInitialization(det));
|
||||
|
||||
// get the pointer to the User Interface manager
|
||||
G4UImanager* UI = G4UImanager::GetUIpointer();
|
||||
runManager->SetUserInitialization(new ActionInitialization(det));
|
||||
|
||||
if (argc!=1) // batch mode
|
||||
{
|
||||
G4String command = "/control/execute ";
|
||||
G4String fileName = argv[1];
|
||||
UI->ApplyCommand(command+fileName);
|
||||
}
|
||||
|
||||
else //define visualization and UI terminal for interactive mode
|
||||
{
|
||||
#ifdef G4VIS_USE
|
||||
G4VisManager* visManager = new G4VisExecutive;
|
||||
visManager->Initialize();
|
||||
#endif
|
||||
|
||||
#ifdef G4UI_USE
|
||||
G4UIExecutive * ui = new G4UIExecutive(argc,argv);
|
||||
ui->SessionStart();
|
||||
delete ui;
|
||||
#endif
|
||||
|
||||
#ifdef G4VIS_USE
|
||||
delete visManager;
|
||||
#endif
|
||||
}
|
||||
//initialize visualization
|
||||
G4VisManager* visManager = nullptr;
|
||||
|
||||
// job termination
|
||||
//
|
||||
//get the pointer to the User Interface manager
|
||||
G4UImanager* UImanager = G4UImanager::GetUIpointer();
|
||||
|
||||
if (ui) {
|
||||
//interactive mode
|
||||
visManager = new G4VisExecutive;
|
||||
visManager->Initialize();
|
||||
ui->SessionStart();
|
||||
delete ui;
|
||||
}
|
||||
else {
|
||||
//batch mode
|
||||
G4String command = "/control/execute ";
|
||||
G4String fileName = argv[1];
|
||||
UImanager->ApplyCommand(command+fileName);
|
||||
}
|
||||
|
||||
//job termination
|
||||
delete visManager;
|
||||
delete runManager;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -13,8 +13,18 @@ track of all tags.
|
||||
----------------------------------------------------------
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
17-12-17 mma (exhadr04-V10-03-02)
|
||||
09-05-18 B. Morgan (exhadr04-V10-04-03)
|
||||
- Include G4Types before use of G4MULTITHREADED. For forward
|
||||
compatibility with move to #defines over -D for G4 preprocessor
|
||||
symbols.
|
||||
|
||||
05-04-18 mma (exhadr04-V10-04-02)
|
||||
- Hadr04.cc : set visualisation only in interactive session.
|
||||
|
||||
16-03-18 mma (exhadr04-V10-04-01)
|
||||
- Hadr04.cc : remove G4UI_USE and G4VIS_USE
|
||||
|
||||
17-12-17 mma (exhadr04-V10-04-00)
|
||||
- NeutronHPphysics : use pManager->GetProcess(processName)
|
||||
|
||||
11-04-17 mma (exhadr04-V10-03-01)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
############################################
|
||||
|
||||
**************************************************************
|
||||
Geant4 version Name: geant4-10-04-patch-02 (25-May-2018)
|
||||
Geant4 version Name: geant4-10-05-beta-01 (29-June-2018)
|
||||
Copyright : Geant4 Collaboration
|
||||
References : NIM A 506 (2003), 250-303
|
||||
: IEEE-TNS 53 (2006), 270-278
|
||||
@@ -169,7 +169,7 @@ G4GeometryManager::ReportVoxelStats -- Voxel Statistics
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 1000
|
||||
User=22.01s Real=22.82s Sys=0s
|
||||
User=15.650000s Real=15.724807s Sys=0.010000s
|
||||
|
||||
The run is 1000 neutron of 2 MeV through 50 cm of Water_ts (density: 1 g/cm3 )
|
||||
|
||||
|
||||
Reference in New Issue
Block a user