Print available base physics lists and EM options.
More...
#include "G4PhysListFactory.hh"
#include "G4String.hh"
#include "G4ios.hh"
#include <vector>
Go to the source code of this file.
|
int | main (int argc, char **argv) |
|
Print available base physics lists and EM options.
Usage:
./listPLOptions [-b base lists ] [-em em options ] [-v verbose]
-b list available base physics lists
-em list available EM options */
// -v precede lists with a title
/**
- Date
- 20/01/2025
- Author
- I. Hrivnacova; IJCLab, Orsay
Definition in file listPLOptions.cxx.
◆ main()
int main |
( |
int | argc, |
|
|
char ** | argv ) |
Definition at line 52 of file listPLOptions.cxx.
53{
54
55
56 if (argc > 5) {
57 PrintUsage();
58 return 1;
59 }
60
61 G4bool baseLists = false;;
62 G4bool emOptions = false;
64 for (G4int i = 1; i < argc; ++i) {
65 if (G4String(argv[i]) == "-b")
66 baseLists = true;
67 else if (G4String(argv[i]) == "-em")
68 emOptions = true;
69 else if (G4String(argv[i]) == "-v")
71 else {
72 PrintUsage();
73 return 1;
74 }
75 }
76
77 if ( (! baseLists) && (! emOptions) ) {
78 PrintUsage();
79 return 1;
80 }
81
82
83 G4PhysListFactory factory;
84
85 if (baseLists) {
87 G4cout << "Base physics lists: ";
88 }
89 PrintNameList(factory.AvailablePhysLists());
90 }
91
92 if (emOptions) {
94 G4cout << "EM Options: ";
95 }
96 PrintNameList(factory.AvailablePhysListsEM());
97 }
98}