34#include "G4RunManager.hh"
35#include "G4RunManagerFactory.hh"
37#include "G4UImanager.hh"
38#include "G4UIsession.hh"
39#include "G4UIterminal.hh"
41#include "G4VModularPhysicsList.hh"
42#include "FTFP_BERT.hh"
43#include "G4StepLimiterPhysics.hh"
45#include "Randomize.hh"
52#include "G4UIExecutive.hh"
53#include "G4VisExecutive.hh"
64int main(
int argc,
char** argv) {
68 G4cout<<
" ========== Running exampleVecGeomNav ================ " << G4endl
69 <<
" GDML geometry file = " <<
parGDMLFile << G4endl
71 <<
" Use VecGeom (VG) navigation = " <<
parUseVecGeom << G4endl
72 <<
" Compare G4 vs VG navigation = " <<
parCompareG4 << G4endl
73 <<
" ===================================================== " << G4endl;
81 = G4RunManagerFactory::CreateRunManager( G4RunManagerType::Serial);
91 runManager->SetUserInitialization(detector);
97 runManager->SetUserInitialization(physicsList);
106 G4String command =
"/control/execute ";
122 visManager->Initialize();
127 uiExec->SessionStart();
138 <<
" ================================================================= " << G4endl
139 <<
" Final random number = " << G4UniformRand() << G4endl
140 <<
" ================================================================= " << G4endl
152 std::cout <<
"\n " << std::setw(100) << std::setfill(c)
153 <<
"" << std::setfill(
' ') << std::endl;
158 std::cout <<
" Geant4 application to demonstrate interface to VecGeom Navigation. \n"
160 <<
" Two modes: \n\n"
161 <<
" * 1 parameter this is treated as Geant4 macro file \n"
163 <<
" * Multiple Parameters: \n"
164 <<
" at least one of the following: \n"
165 <<
" -m : the standard Geant4 macro file \n"
166 <<
" -i : interactive (after batch, if any) \n"
167 <<
" optionally one of the following: \n"
168 <<
" -v : flag ==> run using VecGeom navigation (default). \n"
169 <<
" -o : flag ==> run using Geant4 navigation. \n"
170 <<
" -c : flag ==> compare VecGeom and Geant4 navigation"
171 <<
" (and report differences.) \n"
172 <<
" and other(s): \n"
173 <<
" -g : GDML file with geometry \n"
192 for ( G4int i=1; i<argc; ++i ) {
199 G4cerr <<
" Parse Error: '-m' cannot be last argument. Use it : -m <filename>" << G4endl;
204 else if (
G4String(argv[i]) ==
"-g" ) {
206 G4cout <<
" arg-parsing: GDML file name= " <<
parGDMLFile << G4endl;
209 G4cerr <<
" Parse Error: '-m' cannot be last argument. Use it : -m <filename>" << G4endl;
218 G4cerr <<
" Unknown argument : " << argv[i] << G4endl;
226 G4cerr <<
" *** ERROR : either interactive mode or a Geant4 macro file is required. "
Definition of the VG01ActionInitialization class.
Definition of the VG01DetectorConstruction class.
Definition of the VG01SteppingVerboseWithDir class.
Action initialization class.
void SetUseVecGeom(bool b)
void SetGDMLFileName(const G4String &gdmlfile)
static G4bool parUseVecGeom
void horizontal_line(char c)
static G4bool parInteractive
static G4bool parCompareG4
static std::string parGDMLFile
void GetInputArguments(int argc, char **argv)
static std::string parMacroFileName