Import Geant4 11.2.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2023-06-30 09:09:57 +02:00
parent aef78ca386
commit dd1f179cda
3780 changed files with 212808 additions and 142780 deletions
@@ -30,31 +30,29 @@
// Created by Joanna Weng 26.11.2004
// G4 includes
#include "G4Types.hh"
#include "G4ios.hh"
#include "G4Timer.hh"
#include "G4UImanager.hh"
#include "G4RunManagerFactory.hh"
#include "G4Timer.hh"
#include "G4Types.hh"
#include "G4UImanager.hh"
#include "G4ios.hh"
// my project
#include "ExGflash2DetectorConstruction.hh"
#include "ExGflash2ParallelWorld.hh"
#include "ExGflashActionInitialization.hh"
#include "FTFP_BERT.hh"
#include "G4FastSimulationPhysics.hh"
#include "G4VisExecutive.hh"
#include "G4FastSimulationPhysics.hh"
#include "G4UIExecutive.hh"
#include "G4VisExecutive.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
int main(int argc,char** argv)
int main(int argc, char** argv)
{
// Instantiate G4UIExecutive if interactive mode
G4UIExecutive* ui = nullptr;
if ( argc == 1 ) {
if (argc == 1) {
ui = new G4UIExecutive(argc, argv);
}
@@ -62,17 +60,17 @@ int main(int argc,char** argv)
G4Timer timer;
timer.Start();
G4cout<<"+-------------------------------------------------------+"<<G4endl;
G4cout<<"| |"<<G4endl;
G4cout<<"| This is an example of Shower |"<<G4endl;
G4cout<<"| Parameterization with GFLASH |"<<G4endl;
G4cout<<"+-------------------------------------------------------+"<<G4endl;
G4cout << "+-------------------------------------------------------+" << G4endl;
G4cout << "| |" << G4endl;
G4cout << "| This is an example of Shower |" << G4endl;
G4cout << "| Parameterization with GFLASH |" << G4endl;
G4cout << "+-------------------------------------------------------+" << G4endl;
auto* runManager = G4RunManagerFactory::CreateRunManager();
runManager->SetNumberOfThreads(1);
// 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);
@@ -82,7 +80,7 @@ int main(int argc,char** argv)
G4VModularPhysicsList* physicsList = new FTFP_BERT();
// -- Create a fast simulation physics constructor, used to augment
// -- the above physics list to allow for fast simulation:
G4FastSimulationPhysics* fastSimulationPhysics = new G4FastSimulationPhysics();
auto fastSimulationPhysics = new G4FastSimulationPhysics();
// -- We now configure the fastSimulationPhysics object.
// -- The gflash model (GFlashShowerModel, see ExGflashDetectorConstruction.cc)
// -- is applicable to e+ and e- : we augment the physics list for these
@@ -95,7 +93,7 @@ int main(int argc,char** argv)
// -- (will happen at initialization of the run manager)
// -- for physics process construction, the fast simulation
// -- configuration will be applied as well.
physicsList->RegisterPhysics( fastSimulationPhysics );
physicsList->RegisterPhysics(fastSimulationPhysics);
runManager->SetUserInitialization(physicsList);
// Action initialization:
@@ -109,16 +107,16 @@ int main(int argc,char** argv)
runManager->Initialize();
UImanager->ApplyCommand("/Step/Verbose 0");
if (ui) // Define UI terminal for interactive mode
if (ui) // Define UI terminal for interactive mode
{
UImanager->ApplyCommand("/control/execute vis.mac");
ui->SessionStart();
delete ui;
}
else // Batch mode
else // Batch mode
{
G4String s=*(argv+1);
UImanager->ApplyCommand("/control/execute "+s);
G4String s = *(argv + 1);
UImanager->ApplyCommand("/control/execute " + s);
}
delete visManager;
@@ -128,7 +126,7 @@ int main(int argc,char** argv)
G4cout << G4endl;
G4cout << "******************************************";
G4cout << G4endl;
G4cout << "Total Real Elapsed Time is: "<< timer.GetRealElapsed();
G4cout << "Total Real Elapsed Time is: " << timer.GetRealElapsed();
G4cout << G4endl;
G4cout << "Total System Elapsed Time: " << timer.GetSystemElapsed();
G4cout << G4endl;