3 #include "G4RunManager.hh" 4 #include "G4UImanager.hh" 5 #include "G4UIExecutive.hh" 6 #include "G4UIterminal.hh" 8 #ifdef G4VIS_USE_OPENGLQT 11 #ifdef G4VIS_USE_OPENGLXM 15 #include "G4ParticleDefinition.hh" 16 #include "G4ParticleTypes.hh" 17 #include "G4DecayTable.hh" 18 #include "G4KL3DecayChannel.hh" 19 #include "G4StepLimiter.hh" 20 #include "G4ParticleTable.hh" 22 #include "G4ProcessManager.hh" 23 #include "G4ParticleDefinition.hh" 24 #include "G4VEnergyLossProcess.hh" 29 #include "G4PhysListFactory.hh" 51 G4cout <<
"" << G4endl;
52 G4cout <<
"-------------------------------------------------" << G4endl;
53 G4cout <<
"G4LBNF Help" << G4endl;
54 G4cout <<
"Usage:" << G4endl;
55 G4cout <<
" /path/to/g4lbne --input /path/to/inputfile ";
56 G4cout <<
"--physicslist physlistname /path/to/macrofile" << G4endl;
57 G4cout <<
"ALTERNATELY: " << G4endl;
58 G4cout <<
" /path/to/g4lbne -i /path/to/inputfile -p physlistname ";
59 G4cout <<
"/path/to/macrofile " << G4endl;
60 G4cout <<
"The default physics list is QGSP_BERT" << G4endl;
61 G4cout <<
"The options --help or -h display this message " << G4endl;
62 G4cout <<
"-------------------------------------------------" << G4endl;
63 G4cout <<
"" << G4endl;
69 G4String macroFileName =
"";
70 G4String inputFileName =
"";
71 G4String physListName =
"QGSP_BERT";
79 static struct option long_options[] = {
81 {
"input", required_argument, 0, 0},
82 {
"physicslist", required_argument, 0, 0},
85 c = getopt_long(argc, argv,
"hi:p:", long_options, &option_index);
94 inputFileName = optarg;
97 physListName = optarg;
106 inputFileName = optarg;
109 physListName = optarg;
114 G4cout <<
"Setting macroFile to " << argv[argc-1] << G4endl;
115 macroFileName = argv[argc-1];
137 G4UImanager* UI = G4UImanager::GetUIpointer();
144 runManager->SetUserInitialization(theDetector);
149 G4VisManager* visManager =
new LBNEVisManager;
150 visManager->Initialize();
170 G4UIExecutive* ui =
new G4UIExecutive(argc,argv);
177 G4String
command =
"/control/execute ";
178 G4cout <<
"Executing " << command+macroFileName << G4endl;
179 UI->ApplyCommand(command+macroFileName);
183 G4cout<<
"Delete RunManager"<<G4endl;
void SetPhysicsList(std::string &val)
static LBNEVolumePlacements * Instance()
static VersionAndContext * Instance()
static LBNESurveyor * Instance()
void SetPhysicsListName(G4String &t)
void SetMacroFileName(std::string &val)
int main(int argc, char **argv)
static LBNEPlacementMessenger * Instance()