Import Geant4 10.7.0 source tree
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# Setup the project
|
||||
cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
|
||||
cmake_minimum_required(VERSION 3.8...3.18)
|
||||
if(${CMAKE_VERSION} VERSION_LESS 3.12)
|
||||
cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
|
||||
endif()
|
||||
project(gflash2)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
@@ -29,19 +29,15 @@
|
||||
//
|
||||
// Created by Joanna Weng 26.11.2004
|
||||
|
||||
// G4 includes
|
||||
// G4 includes
|
||||
#include "G4Types.hh"
|
||||
#include "G4ios.hh"
|
||||
#include "G4Timer.hh"
|
||||
#include "G4UImanager.hh"
|
||||
|
||||
#ifdef G4MULTITHREADED
|
||||
#include "G4MTRunManager.hh"
|
||||
#else
|
||||
#include "G4RunManager.hh"
|
||||
#endif
|
||||
#include "G4RunManagerFactory.hh"
|
||||
|
||||
// my project
|
||||
// my project
|
||||
#include "ExGflash2DetectorConstruction.hh"
|
||||
#include "ExGflash2ParallelWorld.hh"
|
||||
#include "ExGflashActionInitialization.hh"
|
||||
@@ -55,7 +51,7 @@
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
int main(int argc,char** argv)
|
||||
{
|
||||
{
|
||||
// Instantiate G4UIExecutive if interactive mode
|
||||
G4UIExecutive* ui = nullptr;
|
||||
if ( argc == 1 ) {
|
||||
@@ -65,30 +61,18 @@ int main(int argc,char** argv)
|
||||
// timer to see GFlash performance
|
||||
G4Timer timer;
|
||||
timer.Start();
|
||||
|
||||
|
||||
G4cout<<"+-------------------------------------------------------+"<<G4endl;
|
||||
G4cout<<"| |"<<G4endl;
|
||||
G4cout<<"| This is an example of Shower |"<<G4endl;
|
||||
G4cout<<"| Parameterization with GFLASH |"<<G4endl;
|
||||
G4cout<<"+-------------------------------------------------------+"<<G4endl;
|
||||
|
||||
|
||||
|
||||
#ifdef G4MULTITHREADED
|
||||
G4MTRunManager * runManager = new G4MTRunManager;
|
||||
auto* runManager = G4RunManagerFactory::CreateRunManager();
|
||||
runManager->SetNumberOfThreads(1);
|
||||
G4cout<<"+-------------------------------------------------------+"<<G4endl;
|
||||
G4cout<<"| Constructing MT run manager |"<<G4endl;
|
||||
G4cout<<"+-------------------------------------------------------+"<<G4endl;
|
||||
#else
|
||||
G4RunManager * runManager = new G4RunManager;
|
||||
G4cout<<"+-------------------------------------------------------+"<<G4endl;
|
||||
G4cout<<"| Constructing sequential run manager |"<<G4endl;
|
||||
G4cout<<"+-------------------------------------------------------+"<<G4endl;
|
||||
#endif
|
||||
|
||||
|
||||
// UserInitialization classes (mandatory)
|
||||
G4cout<<"# GFlash Example: Detector Construction"<<G4endl;
|
||||
G4cout<<"# GFlash Example: Detector Construction"<<G4endl;
|
||||
auto detector = new ExGflash2DetectorConstruction();
|
||||
detector->RegisterParallelWorld(new ExGflash2ParallelWorld("parallelWorld"));
|
||||
runManager->SetUserInitialization(detector);
|
||||
@@ -124,22 +108,22 @@ int main(int argc,char** argv)
|
||||
UImanager->ApplyCommand("/run/verbose 0");
|
||||
runManager->Initialize();
|
||||
UImanager->ApplyCommand("/Step/Verbose 0");
|
||||
|
||||
|
||||
if (ui) // Define UI terminal for interactive mode
|
||||
{
|
||||
{
|
||||
UImanager->ApplyCommand("/control/execute vis.mac");
|
||||
ui->SessionStart();
|
||||
delete ui;
|
||||
}
|
||||
else // Batch mode
|
||||
{
|
||||
{
|
||||
G4String s=*(argv+1);
|
||||
UImanager->ApplyCommand("/control/execute "+s);
|
||||
}
|
||||
|
||||
|
||||
delete visManager;
|
||||
delete runManager;
|
||||
|
||||
|
||||
timer.Stop();
|
||||
G4cout << G4endl;
|
||||
G4cout << "******************************************";
|
||||
@@ -152,7 +136,7 @@ int main(int argc,char** argv)
|
||||
G4cout << G4endl;
|
||||
G4cout << "******************************************";
|
||||
G4cout << G4endl;
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user