g4system
Loading...
Searching...
No Matches
g4system_options.cc
Go to the documentation of this file.
1// g4system_options.cc : option definitions for the g4system module.
12#include "g4system_options.h"
13#include "g4systemConventions.h"
14#include "gsystem_options.h"
15
16// project goption to a system
17namespace g4system {
18// returns array of options definitions
20 // Aggregate options from this module, factories, and the base gsystem module.
23
24 // Pull in shared system options (database, geometry system handling, etc.).
26
27 // Backup material option:
28 // - used when a volume requests a material that is not defined in the Geant4 material tables
29 // - default behavior is controlled by NO_USE_DEFAULT_MATERIAL
30 std::string help =
31 "Material to be used if some volume requested a non-defined material.\n\n";
32 help += "By default GEMC will exit with error.\n";
33 help += "Example: -useBackupMaterial=G4_Air\n";
34 goptions.defineOption(GVariable("useBackupMaterial", NO_USE_DEFAULT_MATERIAL,
35 "Backup material"), help);
36
37 // Human-readable switches used for diagnostics and validation.
38 goptions.defineSwitch("showPredefinedMaterials", "log GEMC Predefined Materials");
39 goptions.defineSwitch("printSystemsMaterials", "print the materials used in this simulation");
40 goptions.defineSwitch("checkOverlaps", "check geant4 volume overlaps at construction time");
41
42 // Overlap checking mode:
43 // - 0 disables overlap checks
44 // - 1 enables overlap checking at placement time
45 // - 2 uses Geant4 overlap validator with default surface sampling
46 // - N>100 uses Geant4 overlap validator with N surface points
47 help = "Check for overlaps at physical volume construction.\n\n";
48 help += "Possible values are:\n";
49 help += " - 0 (default): no check.\n";
50 help += " - 1: check for overlaps at physical volume construction.\n";
51 help += " - 2: use the geant4 overlap validator with the default number of points on the surface\n";
52 help += " - Any N greater than 100: use the geant4 overlap validator with N points on the surface\n";
53 goptions.defineOption(GVariable("check_overlaps", 0, "check overlaps"), help);
54
55 return goptions;
56}
57}
Conventions, labels, and error codes used by the g4system geometry/material layer.
#define NO_USE_DEFAULT_MATERIAL
Option definitions for the g4system module (geometry/material construction layer).
constexpr const char * G4SYSTEM_LOGGER
Logger name used by the module-level builder (e.g. G4World).
constexpr const char * G4SFACTORY_LOGGER
Logger name used by object factories (e.g. G4ObjectsFactory derived classes).
GOptions defineOptions()
Define command-line/configuration options for the g4system module.
GOptions defineOptions()