Allow user to specify the UserPhysicsOptions name/location.
Rather than only having a hard-coded default for the location and name of the "UserPhysicsOptions.xml" configuration file, consider making this something users can set via an environment variable or a command-line flag.
#3 Updated by Robert Hatcher over 4 years ago
While it is true that the name
UserPhysicsOptions.xml is hardcoded into place, the location is not:
./Algorithm/AlgConfigPool.cxx: string glob_params = utils::xml::GetXMLFilePath("UserPhysicsOptions.xml");
GetXMLFilePath() function searches the in the following order:
$GXMLPATHS# due to early confusion about existence of 'S'
$GALGCONF# Hugh's special path
$GENIE/src/FluxDrivers/GNuMINtuple# special for finding flux driver config
NOvA/LArSoft make use of this ability by using a specialized
UserPhysicsOptions.xml that forced GENIE to decay (via Pythia) charmed hadrons and tau leptons by setting up a UPS product, ala:
setup genie_phyopt v2_8_6 -q dkcharmtau (or
dkcharm). They do this because out-of-the-box Geant4 doesn't properly generate decay products for charmed hadrons (and at one point didn't do taus either).
What the system doesn't support is partial & chained
UserPhysicsOptions.xml. That is one can't modify only part of the file and then have it read the base and then override some sections with a partial file. This makes it awkward to support multiple distinct changes (say both something like
M_A and the charm decay). To do this properly one would need to be able to specify alternative names.