diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..bd7e6bd --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +docs/rmg-commands.rst linguist-generated=true diff --git a/docs/g4manual2rst.py b/docs/g4manual2rst.py new file mode 100755 index 0000000..f60e0fa --- /dev/null +++ b/docs/g4manual2rst.py @@ -0,0 +1,69 @@ +#!/bin/python + +"""Convert an output file of remage-doc-dump to a rst file.""" + +import math +import re +import sys + +if len(sys.argv) < 2: + msg = "need to pass an original file" + raise ValueError(msg) + +path = sys.argv[1] + +outlines = ["remage macro command reference", "=" * 31, ""] +infile = open(path, "rt") +inlines = [line.strip("\n") for line in infile] + + +def remove_whitespace_lines_end(lines: list): + for i in range(len(lines) - 1, 0, -1): + if lines[i].strip() not in ("", "::"): + break + del lines[i] + + +idx = 0 +in_cmdblock = False +lastlevel = -1 + +for line in inlines: + if re.match(r"Command directory path : /RMG/", line): + remove_whitespace_lines_end(outlines) + outlines.extend(["", line, "-" * len(line), ""]) + in_cmdblock = True + lastlevel = -1 + elif re.match(r"Command /RMG/", line): + remove_whitespace_lines_end(outlines) + outlines.extend(["", line, "^" * len(line), ""]) + in_cmdblock = True + lastlevel = -1 + elif in_cmdblock and (line == "Guidance :"): + pass + elif in_cmdblock and (inlines[idx - 1] == "Guidance :") and not line.startswith(" " * 2): + outlines.extend([line, ""]) + elif in_cmdblock and line == " Commands : " and not inlines[idx + 1].startswith(" " * 4): + pass + elif in_cmdblock and line != "": + stripped_line = line.strip() + indent = math.ceil((len(line) - len(stripped_line)) / 2) + if indent > lastlevel + 1: # parts of the output have the wrong indentation. + indent = lastlevel + 1 + m = re.match(r"(.*)( [:* ] ?)(.*)?$", line) + if m: + g = list(m.groups()) + sep = g[1].strip() + fmt = "**" if sep == ":" else "*" + if len(g) > 1: + g[0] = f"{fmt}{g[0].strip()}{fmt}" + g[1] = ": " + if len(g) > 2 and g[2] != "": + g[2] = f"``{g[2].strip()}``" + stripped_line = "".join(g) + outlines.append(" " * indent + "* " + stripped_line) + lastlevel = indent + idx += 1 + +outfile = open("rmg-commands.rst", "wt") +outfile.writelines([l + "\n" for l in outlines]) diff --git a/docs/index.rst b/docs/index.rst index 80b9309..177d660 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -104,6 +104,7 @@ Next steps :maxdepth: 2 api/index + Geant4 command interface Good ol' Doxygen .. |remage| replace:: *remage* diff --git a/docs/rmg-commands.rst b/docs/rmg-commands.rst new file mode 100644 index 0000000..bf5ac28 --- /dev/null +++ b/docs/rmg-commands.rst @@ -0,0 +1,1074 @@ +remage macro command reference +=============================== + +Command directory path : /RMG/ +------------------------------ + +* **Sub-directories**: + * */RMG/Manager/*: ``General commands for controlling the application`` + * */RMG/Output/*: ``Commands for controlling the simulation output`` + * */RMG/Processes/*: ``Commands for controlling physics processes`` + * */RMG/Geometry/*: ``Commands for controlling geometry definitions`` + * */RMG/Generator/*: ``Commands for controlling generators`` + * */RMG/Confinement/*: ``...Title not available...`` + +Command directory path : /RMG/Manager/ +-------------------------------------- + +General commands for controlling the application + +* **Sub-directories**: + * */RMG/Manager/Logging/*: ``Commands for controlling application logging`` + * */RMG/Manager/Randomization/*: ``Commands for controlling randomization settings`` + * *Interactive*: ``Enable interactive mode`` + * *PrintProgressModulo*: ``How many processed events before progress information is displayed`` + +Command /RMG/Manager/Interactive +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Enable interactive mode + +* **Parameter**: ``interactive`` + * **Parameter type**: ``b`` + * **Omittable**: ``True`` + * **Default value**: ``true`` + +Command /RMG/Manager/PrintProgressModulo +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +How many processed events before progress information is displayed + +* **Range of parameters**: ``n > 0`` +* **Parameter**: ``n`` + * **Parameter type**: ``i`` + * **Omittable**: ``False`` + +Command directory path : /RMG/Manager/Logging/ +---------------------------------------------- + +Commands for controlling application logging + +* **Sub-directories**: + * *LogLevel*: ``Set verbosity level of application log`` + +Command /RMG/Manager/Logging/LogLevel +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Set verbosity level of application log + +* **Parameter**: ``level`` + * **Parameter type**: ``s`` + * **Omittable**: ``False`` + * **Candidates**: ``debug detail summary warning error fatal nothing`` + +Command directory path : /RMG/Manager/Randomization/ +---------------------------------------------------- + +Commands for controlling randomization settings + +* **Sub-directories**: + * *RandomEngine*: ``Select the random engine (CLHEP)`` + * *Seed*: ``Select the initial seed for randomization (CLHEP::HepRandom::setTheSeed)`` + * *InternalSeed*: ``Select the initial seed for randomization by using the internal CLHEP table`` + * *UseSystemEntropy*: ``Select a random initial seed from system entropy`` + +Command /RMG/Manager/Randomization/RandomEngine +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Select the random engine (CLHEP) + +* **Parameter**: ``name`` + * **Parameter type**: ``s`` + * **Omittable**: ``False`` + +Command /RMG/Manager/Randomization/Seed +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Select the initial seed for randomization (CLHEP::HepRandom::setTheSeed) + +* **Range of parameters**: ``n >= 0`` +* **Parameter**: ``n`` + * **Parameter type**: ``i`` + * **Omittable**: ``False`` + * **Default value**: ``1`` + +Command /RMG/Manager/Randomization/InternalSeed +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Select the initial seed for randomization by using the internal CLHEP table + +* **Range of parameters**: ``index >= 0 && index < 430`` +* **Parameter**: ``index`` + * **Parameter type**: ``i`` + * **Omittable**: ``False`` + +Command /RMG/Manager/Randomization/UseSystemEntropy +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Select a random initial seed from system entropy + +Command directory path : /RMG/Output/ +------------------------------------- + +Commands for controlling the simulation output + +* **Sub-directories**: + * */RMG/Output/Germanium/*: ``Commands for controlling output from hits in germanium detectors.`` + * */RMG/Output/Vertex/*: ``Commands for controlling output of primary vertices.`` + * */RMG/Output/Scintillator/*: ``Commands for controlling output from hits in scintillator detectors.`` + * *FileName*: ``Set output file name for object persistency`` + * *NtuplePerDetector*: ``Create a ntuple for each sensitive detector to store hits. Otherwise, store all hits of one detector type in one ntuple.`` + +Command /RMG/Output/FileName +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Set output file name for object persistency + +* **Parameter**: ``filename`` + * **Parameter type**: ``s`` + * **Omittable**: ``False`` + +Command /RMG/Output/NtuplePerDetector +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Create a ntuple for each sensitive detector to store hits. Otherwise, store all hits of one detector type in one ntuple. + +* **Parameter**: ``tree_per_det`` + * **Parameter type**: ``b`` + * **Omittable**: ``False`` + +Command directory path : /RMG/Output/Germanium/ +----------------------------------------------- + +Commands for controlling output from hits in germanium detectors. + +* **Sub-directories**: + * *SetEdepCutLow*: ``Set a lower energy cut that has to be met for this event to be stored.`` + * *SetEdepCutHigh*: ``Set an upper energy cut that has to be met for this event to be stored.`` + * *AddDetectorForEdepThreshold*: ``Take this detector into account for the filtering by /EdepThreshold.`` + * *DiscardPhotonsIfNoGermaniumEdep*: ``Discard optical photons (before simulating them), if no edep in germanium detectors.`` + +Command /RMG/Output/Germanium/SetEdepCutLow +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Set a lower energy cut that has to be met for this event to be stored. + +* **Parameter**: ``threshold`` + * **Parameter type**: ``d`` + * **Omittable**: ``False`` +* **Parameter**: ``Unit`` + * **Parameter type**: ``s`` + * **Omittable**: ``True`` + * **Default value**: ``keV`` + * **Candidates**: ``eV keV MeV GeV TeV PeV meV J electronvolt kiloelectronvolt megaelectronvolt gigaelectronvolt teraelectronvolt petaelectronvolt millielectronVolt joule`` + +Command /RMG/Output/Germanium/SetEdepCutHigh +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Set an upper energy cut that has to be met for this event to be stored. + +* **Parameter**: ``threshold`` + * **Parameter type**: ``d`` + * **Omittable**: ``False`` +* **Parameter**: ``Unit`` + * **Parameter type**: ``s`` + * **Omittable**: ``True`` + * **Default value**: ``keV`` + * **Candidates**: ``eV keV MeV GeV TeV PeV meV J electronvolt kiloelectronvolt megaelectronvolt gigaelectronvolt teraelectronvolt petaelectronvolt millielectronVolt joule`` + +Command /RMG/Output/Germanium/AddDetectorForEdepThreshold +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Take this detector into account for the filtering by /EdepThreshold. + +* **Parameter**: ``det_uid`` + * **Parameter type**: ``i`` + * **Omittable**: ``False`` + +Command /RMG/Output/Germanium/DiscardPhotonsIfNoGermaniumEdep +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Discard optical photons (before simulating them), if no edep in germanium detectors. + +* **Parameter**: ``value`` + * **Parameter type**: ``b`` + * **Omittable**: ``False`` + +Command directory path : /RMG/Output/Vertex/ +-------------------------------------------- + +Commands for controlling output of primary vertices. + +* **Sub-directories**: + * *StorePrimaryParticleInformation*: ``Store information on primary particle details (not only vertex data).`` + * *SkipPrimaryVertexOutput*: ``Do not store vertex/primary particle data.`` + +Command /RMG/Output/Vertex/StorePrimaryParticleInformation +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Store information on primary particle details (not only vertex data). + +* **Parameter**: ``value`` + * **Parameter type**: ``b`` + * **Omittable**: ``False`` + +Command /RMG/Output/Vertex/SkipPrimaryVertexOutput +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Do not store vertex/primary particle data. + +* **Parameter**: ``value`` + * **Parameter type**: ``b`` + * **Omittable**: ``False`` + +Command directory path : /RMG/Output/Scintillator/ +-------------------------------------------------- + +Commands for controlling output from hits in scintillator detectors. + +* **Sub-directories**: + * *SetEdepCutLow*: ``Set a lower energy cut that has to be met for this event to be stored.`` + * *SetEdepCutHigh*: ``Set an upper energy cut that has to be met for this event to be stored.`` + * *AddDetectorForEdepThreshold*: ``Take this detector into account for the filtering by /EdepThreshold.`` + +Command /RMG/Output/Scintillator/SetEdepCutLow +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Set a lower energy cut that has to be met for this event to be stored. + +* **Parameter**: ``threshold`` + * **Parameter type**: ``d`` + * **Omittable**: ``False`` +* **Parameter**: ``Unit`` + * **Parameter type**: ``s`` + * **Omittable**: ``True`` + * **Default value**: ``keV`` + * **Candidates**: ``eV keV MeV GeV TeV PeV meV J electronvolt kiloelectronvolt megaelectronvolt gigaelectronvolt teraelectronvolt petaelectronvolt millielectronVolt joule`` + +Command /RMG/Output/Scintillator/SetEdepCutHigh +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Set an upper energy cut that has to be met for this event to be stored. + +* **Parameter**: ``threshold`` + * **Parameter type**: ``d`` + * **Omittable**: ``False`` +* **Parameter**: ``Unit`` + * **Parameter type**: ``s`` + * **Omittable**: ``True`` + * **Default value**: ``keV`` + * **Candidates**: ``eV keV MeV GeV TeV PeV meV J electronvolt kiloelectronvolt megaelectronvolt gigaelectronvolt teraelectronvolt petaelectronvolt millielectronVolt joule`` + +Command /RMG/Output/Scintillator/AddDetectorForEdepThreshold +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Take this detector into account for the filtering by /EdepThreshold. + +* **Parameter**: ``det_uid`` + * **Parameter type**: ``i`` + * **Omittable**: ``False`` + +Command directory path : /RMG/Processes/ +---------------------------------------- + +Commands for controlling physics processes + +* **Sub-directories**: + * */RMG/Processes/Stepping/*: ``Commands for controlling physics processes`` + * *Realm*: ``Set simulation realm (cut values for particles in (sensitive) detector`` + * *OpticalPhysics*: ``Add optical processes to the physics list`` + * *LowEnergyEMPhysics*: ``Add low energy electromagnetic processes to the physics list`` + * *HadronicPhysics*: ``Add hadronic processes to the physics list`` + * *ThermalScattering*: ``Use thermal scattering cross sections for neutrons`` + * *EnableGammaAngularCorrelation*: ``Set correlated gamma emission flag`` + * *GammaTwoJMAX*: ``Set max 2J for sampling of angular correlations`` + * *StoreICLevelData*: ``Store e- internal conversion data`` + +Command /RMG/Processes/Realm +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Set simulation realm (cut values for particles in (sensitive) detector + +* **Parameter**: ``realm`` + * **Parameter type**: ``s`` + * **Omittable**: ``False`` + * **Candidates**: ``DoubleBetaDecay DarkMatter CosmicRays LArScintillation`` + +Command /RMG/Processes/OpticalPhysics +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Add optical processes to the physics list + +* **Parameter**: ``value`` + * **Parameter type**: ``b`` + * **Omittable**: ``False`` + +Command /RMG/Processes/LowEnergyEMPhysics +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Add low energy electromagnetic processes to the physics list + +* **Parameter**: ``arg0`` + * **Parameter type**: ``s`` + * **Omittable**: ``False`` + * **Default value**: ``Livermore`` + * **Candidates**: ``Option1 Option2 Option3 Option4 Penelope Livermore LivermorePolarized None`` + +Command /RMG/Processes/HadronicPhysics +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Add hadronic processes to the physics list + +* **Parameter**: ``arg0`` + * **Parameter type**: ``s`` + * **Omittable**: ``False`` + * **Default value**: ``Shielding`` + * **Candidates**: ``QGSP_BIC_HP QGSP_BERT_HP FTFP_BERT_HP Shielding None`` + +Command /RMG/Processes/ThermalScattering +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Use thermal scattering cross sections for neutrons + +* **Parameter**: ``arg0`` + * **Parameter type**: ``b`` + * **Omittable**: ``False`` + * **Candidates**: ``0 1`` + +Command /RMG/Processes/EnableGammaAngularCorrelation +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Set correlated gamma emission flag + +* **Parameter**: ``arg0`` + * **Parameter type**: ``b`` + * **Omittable**: ``False`` + * **Candidates**: ``0 1`` + +Command /RMG/Processes/GammaTwoJMAX +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Set max 2J for sampling of angular correlations + +* **Range of parameters**: ``x > 0`` +* **Parameter**: ``x`` + * **Parameter type**: ``i`` + * **Omittable**: ``False`` + +Command /RMG/Processes/StoreICLevelData +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Store e- internal conversion data + +* **Parameter**: ``arg0`` + * **Parameter type**: ``b`` + * **Omittable**: ``False`` + * **Candidates**: ``0 1`` + +Command directory path : /RMG/Processes/Stepping/ +------------------------------------------------- + +Commands for controlling physics processes + +* **Sub-directories**: + * *DaughterNucleusMaxLifetime*: ``Determines which unstable daughter nuclei will be killed, if they are at rest, depending on their lifetime.`` + +Command /RMG/Processes/Stepping/DaughterNucleusMaxLifetime +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Determines which unstable daughter nuclei will be killed, if they are at rest, depending on their lifetime. + +* This applies to the defined lifetime of the nucleus, and not on the sampled actual halflife of the simulated particle. +* Set to -1 to disable this feature. +* **Parameter**: ``max_lifetime`` + * **Parameter type**: ``d`` + * **Omittable**: ``False`` + * **Default value**: ``-1`` +* **Parameter**: ``Unit`` + * **Parameter type**: ``s`` + * **Omittable**: ``True`` + * **Default value**: ``us`` + * **Candidates**: ``s ms us ns ps min h d y second millisecond microsecond nanosecond picosecond minute hour day year`` + +Command directory path : /RMG/Geometry/ +--------------------------------------- + +Commands for controlling geometry definitions + +* **Sub-directories**: + * *GDMLDisableOverlapCheck*: ``Disable the automatic overlap check after loading a GDML file`` + * *GDMLOverlapCheckNumPoints*: ``Change the number of points sampled for overlap checks`` + * *IncludeGDMLFile*: ``Use GDML file for geometry definition`` + * *PrintListOfLogicalVolumes*: ``Print list of defined physical volumes`` + * *PrintListOfPhysicalVolumes*: ``Print list of defined physical volumes`` + * *RegisterDetector*: ``register a sensitive detector`` + +Command /RMG/Geometry/GDMLDisableOverlapCheck +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Disable the automatic overlap check after loading a GDML file + +* **Parameter**: ``value`` + * **Parameter type**: ``b`` + * **Omittable**: ``False`` + +Command /RMG/Geometry/GDMLOverlapCheckNumPoints +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Change the number of points sampled for overlap checks + +* **Parameter**: ``value`` + * **Parameter type**: ``i`` + * **Omittable**: ``False`` + +Command /RMG/Geometry/IncludeGDMLFile +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Use GDML file for geometry definition + +* **Parameter**: ``filename`` + * **Parameter type**: ``s`` + * **Omittable**: ``False`` + +Command /RMG/Geometry/PrintListOfLogicalVolumes +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Print list of defined physical volumes + +Command /RMG/Geometry/PrintListOfPhysicalVolumes +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Print list of defined physical volumes + +Command /RMG/Geometry/RegisterDetector +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +register a sensitive detector + +* **Parameter**: ``type`` +* Detector type + * **Parameter type**: ``s`` + * **Omittable**: ``False`` + * **Candidates**: ``Germanium Optical Scintillator`` +* **Parameter**: ``pv_name`` +* Detector physical volume + * **Parameter type**: ``s`` + * **Omittable**: ``False`` +* **Parameter**: ``uid`` +* unique detector id + * **Parameter type**: ``i`` + * **Omittable**: ``False`` +* **Parameter**: ``copy_nr`` +* copy nr (default 0) + * **Parameter type**: ``i`` + * **Omittable**: ``True`` + * **Default value**: ``0`` +* **Parameter**: ``allow_id_reuse`` +* append this volume to a previously allocated unique detector id, instead of erroring out. + * **Parameter type**: ``b`` + * **Omittable**: ``True`` + * **Default value**: ``false`` + +Command directory path : /RMG/Generator/ +---------------------------------------- + +Commands for controlling generators + +* **Sub-directories**: + * */RMG/Generator/MUSUNCosmicMuons/*: ``Commands for controlling the MUSUN µ generator`` + * */RMG/Generator/CosmicMuons/*: ``Commands for controlling the µ generator`` + * */RMG/Generator/Confinement/*: ``Commands for controlling primary confinement`` + * *Confine*: ``Select primary confinement strategy`` + * *Select*: ``Select event generator`` + +Command /RMG/Generator/Confine +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Select primary confinement strategy + +* **Parameter**: ``strategy`` + * **Parameter type**: ``s`` + * **Omittable**: ``False`` + * **Candidates**: ``UnConfined Volume FromFile`` + +Command /RMG/Generator/Select +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Select event generator + +* **Parameter**: ``generator`` + * **Parameter type**: ``s`` + * **Omittable**: ``False`` + * **Candidates**: ``G4gun GPS BxDecay0 CosmicMuons MUSUNCosmicMuons UserDefined Undefined`` + +Command directory path : /RMG/Generator/MUSUNCosmicMuons/ +--------------------------------------------------------- + +Commands for controlling the MUSUN µ generator + +* **Sub-directories**: + * *SetMUSUNFile*: ``Set the MUSUN input file`` + +Command /RMG/Generator/MUSUNCosmicMuons/SetMUSUNFile +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Set the MUSUN input file + +* **Parameter**: ``MUSUNFileName`` + * **Parameter type**: ``s`` + * **Omittable**: ``False`` + +Command directory path : /RMG/Generator/CosmicMuons/ +---------------------------------------------------- + +Commands for controlling the µ generator + +* **Sub-directories**: + * *SkyShape*: ``Geometrical shape of the µ generation surface`` + * *SkyPlaneSize*: ``Length of the side of the sky, if it has a planar shape`` + * *SkyPlaneHeight*: ``Height of the sky, if it has a planar shape`` + * *MomentumMin*: ``Minimum momentum of the generated muon`` + * *MomentumMax*: ``Maximum momentum of the generated muon`` + * *ThetaMin*: ``Minimum azimutal angle of the generated muon momentum`` + * *ThetaMax*: ``Maximum azimutal angle of the generated muon momentum`` + * *PhiMin*: ``Minimum zenith angle of the generated muon momentum`` + * *PhiMax*: ``Maximum zenith angle of the generated muon momentum`` + * *SpherePositionThetaMin*: ``Minimum azimutal angle of the generated muon position on the sphere`` + * *SpherePositionThetaMax*: ``Maximum azimutal angle of the generated muon position on the sphere`` + * *SpherePositionPhiMin*: ``Minimum zenith angle of the generated muon position on the sphere`` + * *SpherePositionPhiMax*: ``Maximum zenith angle of the generated muon position on the sphere`` + +Command /RMG/Generator/CosmicMuons/SkyShape +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Geometrical shape of the µ generation surface + +* **Parameter**: ``shape`` + * **Parameter type**: ``s`` + * **Omittable**: ``False`` + * **Candidates**: ``Plane Sphere`` + +Command /RMG/Generator/CosmicMuons/SkyPlaneSize +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Length of the side of the sky, if it has a planar shape + +* **Range of parameters**: ``l > 0`` +* **Parameter**: ``l`` + * **Parameter type**: ``d`` + * **Omittable**: ``False`` +* **Parameter**: ``Unit`` + * **Parameter type**: ``s`` + * **Omittable**: ``True`` + * **Default value**: ``m`` + * **Candidates**: ``pc km m cm mm um nm Ang fm parsec kilometer meter centimeter millimeter micrometer nanometer angstrom fermi`` + +Command /RMG/Generator/CosmicMuons/SkyPlaneHeight +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Height of the sky, if it has a planar shape + +* **Range of parameters**: ``l > 0`` +* **Parameter**: ``l`` + * **Parameter type**: ``d`` + * **Omittable**: ``False`` +* **Parameter**: ``Unit`` + * **Parameter type**: ``s`` + * **Omittable**: ``True`` + * **Default value**: ``m`` + * **Candidates**: ``pc km m cm mm um nm Ang fm parsec kilometer meter centimeter millimeter micrometer nanometer angstrom fermi`` + +Command /RMG/Generator/CosmicMuons/MomentumMin +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Minimum momentum of the generated muon + +* **Range of parameters**: ``p >= 0 && p < 1000`` +* **Parameter**: ``p`` + * **Parameter type**: ``d`` + * **Omittable**: ``False`` +* **Parameter**: ``Unit`` + * **Parameter type**: ``s`` + * **Omittable**: ``True`` + * **Default value**: ``GeV/c`` + * **Candidates**: ``eV/c keV/c MeV/c GeV/c TeV/c eV/c keV/c MeV/c GeV/c TeV/c`` + +Command /RMG/Generator/CosmicMuons/MomentumMax +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Maximum momentum of the generated muon + +* **Range of parameters**: ``p > 0 && p <= 1000`` +* **Parameter**: ``p`` + * **Parameter type**: ``d`` + * **Omittable**: ``False`` +* **Parameter**: ``Unit`` + * **Parameter type**: ``s`` + * **Omittable**: ``True`` + * **Default value**: ``GeV/c`` + * **Candidates**: ``eV/c keV/c MeV/c GeV/c TeV/c eV/c keV/c MeV/c GeV/c TeV/c`` + +Command /RMG/Generator/CosmicMuons/ThetaMin +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Minimum azimutal angle of the generated muon momentum + +* **Range of parameters**: ``a >= 0 && a < 90`` +* **Parameter**: ``a`` + * **Parameter type**: ``d`` + * **Omittable**: ``False`` +* **Parameter**: ``Unit`` + * **Parameter type**: ``s`` + * **Omittable**: ``True`` + * **Default value**: ``deg`` + * **Candidates**: ``rad mrad deg radian milliradian degree`` + +Command /RMG/Generator/CosmicMuons/ThetaMax +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Maximum azimutal angle of the generated muon momentum + +* **Range of parameters**: ``a > 0 && a <= 90`` +* **Parameter**: ``a`` + * **Parameter type**: ``d`` + * **Omittable**: ``False`` +* **Parameter**: ``Unit`` + * **Parameter type**: ``s`` + * **Omittable**: ``True`` + * **Default value**: ``deg`` + * **Candidates**: ``rad mrad deg radian milliradian degree`` + +Command /RMG/Generator/CosmicMuons/PhiMin +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Minimum zenith angle of the generated muon momentum + +* **Range of parameters**: ``a >= 0 && a < 360`` +* **Parameter**: ``a`` + * **Parameter type**: ``d`` + * **Omittable**: ``False`` +* **Parameter**: ``Unit`` + * **Parameter type**: ``s`` + * **Omittable**: ``True`` + * **Default value**: ``deg`` + * **Candidates**: ``rad mrad deg radian milliradian degree`` + +Command /RMG/Generator/CosmicMuons/PhiMax +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Maximum zenith angle of the generated muon momentum + +* **Range of parameters**: ``a > 0 && a <= 360`` +* **Parameter**: ``a`` + * **Parameter type**: ``d`` + * **Omittable**: ``False`` +* **Parameter**: ``Unit`` + * **Parameter type**: ``s`` + * **Omittable**: ``True`` + * **Default value**: ``deg`` + * **Candidates**: ``rad mrad deg radian milliradian degree`` + +Command /RMG/Generator/CosmicMuons/SpherePositionThetaMin +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Minimum azimutal angle of the generated muon position on the sphere + +* **Range of parameters**: ``a >= 0 && a < 90`` +* **Parameter**: ``a`` + * **Parameter type**: ``d`` + * **Omittable**: ``False`` +* **Parameter**: ``Unit`` + * **Parameter type**: ``s`` + * **Omittable**: ``True`` + * **Default value**: ``deg`` + * **Candidates**: ``rad mrad deg radian milliradian degree`` + +Command /RMG/Generator/CosmicMuons/SpherePositionThetaMax +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Maximum azimutal angle of the generated muon position on the sphere + +* **Range of parameters**: ``a > 0 && a <= 90`` +* **Parameter**: ``a`` + * **Parameter type**: ``d`` + * **Omittable**: ``False`` +* **Parameter**: ``Unit`` + * **Parameter type**: ``s`` + * **Omittable**: ``True`` + * **Default value**: ``deg`` + * **Candidates**: ``rad mrad deg radian milliradian degree`` + +Command /RMG/Generator/CosmicMuons/SpherePositionPhiMin +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Minimum zenith angle of the generated muon position on the sphere + +* **Range of parameters**: ``a >= 0 && a < 360`` +* **Parameter**: ``a`` + * **Parameter type**: ``d`` + * **Omittable**: ``False`` +* **Parameter**: ``Unit`` + * **Parameter type**: ``s`` + * **Omittable**: ``True`` + * **Default value**: ``deg`` + * **Candidates**: ``rad mrad deg radian milliradian degree`` + +Command /RMG/Generator/CosmicMuons/SpherePositionPhiMax +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Maximum zenith angle of the generated muon position on the sphere + +* **Range of parameters**: ``a > 0 && a <= 360`` +* **Parameter**: ``a`` + * **Parameter type**: ``d`` + * **Omittable**: ``False`` +* **Parameter**: ``Unit`` + * **Parameter type**: ``s`` + * **Omittable**: ``True`` + * **Default value**: ``deg`` + * **Candidates**: ``rad mrad deg radian milliradian degree`` + +Command directory path : /RMG/Generator/Confinement/ +---------------------------------------------------- + +Commands for controlling primary confinement + +* **Sub-directories**: + * */RMG/Generator/Confinement/Physical/*: ``Commands for setting physical volumes up for primary confinement`` + * */RMG/Generator/Confinement/Geometrical/*: ``Commands for setting geometrical volumes up for primary confinement`` + * *Reset*: ``Reset all parameters of vertex confinement, so that it can be reconfigured.`` + * *SampleOnSurface*: ``If true (or omitted argument), sample on the surface of solids`` + * *SamplingMode*: ``Select sampling mode for volume confinement`` + * *MaxSamplingTrials*: ``Set maximum number of attempts for sampling primary positions in a volume`` + * *ForceContainmentCheck*: ``If true (or omitted argument), perform a containment check even after sampling from a natively sampleable object. This is only an extra sanity check that does not alter the behaviour.`` + +Command /RMG/Generator/Confinement/Reset +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Reset all parameters of vertex confinement, so that it can be reconfigured. + +Command /RMG/Generator/Confinement/SampleOnSurface +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +If true (or omitted argument), sample on the surface of solids + +* **Parameter**: ``flag`` + * **Parameter type**: ``b`` + * **Omittable**: ``True`` + +Command /RMG/Generator/Confinement/SamplingMode +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Select sampling mode for volume confinement + +* **Parameter**: ``mode`` + * **Parameter type**: ``s`` + * **Omittable**: ``False`` + * **Candidates**: ``IntersectPhysicalWithGeometrical UnionAll`` + +Command /RMG/Generator/Confinement/MaxSamplingTrials +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Set maximum number of attempts for sampling primary positions in a volume + +* **Range of parameters**: ``N > 0`` +* **Parameter**: ``N`` + * **Parameter type**: ``i`` + * **Omittable**: ``False`` + +Command /RMG/Generator/Confinement/ForceContainmentCheck +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +If true (or omitted argument), perform a containment check even after sampling from a natively sampleable object. This is only an extra sanity check that does not alter the behaviour. + +* **Parameter**: ``flag`` + * **Parameter type**: ``b`` + * **Omittable**: ``True`` + +Command directory path : /RMG/Generator/Confinement/Physical/ +------------------------------------------------------------- + +Commands for setting physical volumes up for primary confinement + +* **Sub-directories**: + * *AddVolume*: ``Add physical volume(s) to sample primaries from.`` + +Command /RMG/Generator/Confinement/Physical/AddVolume +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Add physical volume(s) to sample primaries from. + +* **Parameter**: ``regex`` + * **Parameter type**: ``s`` + * **Omittable**: ``False`` +* **Parameter**: ``copy_nr_regex`` + * **Parameter type**: ``s`` + * **Omittable**: ``True`` + +Command directory path : /RMG/Generator/Confinement/Geometrical/ +---------------------------------------------------------------- + +Commands for setting geometrical volumes up for primary confinement + +* **Sub-directories**: + * */RMG/Generator/Confinement/Geometrical/Sphere/*: ``Commands for setting geometrical dimensions of a sampling sphere`` + * */RMG/Generator/Confinement/Geometrical/Cylinder/*: ``Commands for setting geometrical dimensions of a sampling cylinder`` + * */RMG/Generator/Confinement/Geometrical/Box/*: ``Commands for setting geometrical dimensions of a sampling box`` + * *AddSolid*: ``Add geometrical solid to sample primaries from`` + * *CenterPositionX*: ``Set center position (X coordinate)`` + * *CenterPositionY*: ``Set center position (Y coordinate)`` + * *CenterPositionZ*: ``Set center position (Z coordinate)`` + +Command /RMG/Generator/Confinement/Geometrical/AddSolid +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Add geometrical solid to sample primaries from + +* **Parameter**: ``solid`` + * **Parameter type**: ``s`` + * **Omittable**: ``False`` + * **Candidates**: ``Sphere Cylinder Box`` + +Command /RMG/Generator/Confinement/Geometrical/CenterPositionX +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Set center position (X coordinate) + +* **Parameter**: ``value`` + * **Parameter type**: ``d`` + * **Omittable**: ``False`` +* **Parameter**: ``Unit`` + * **Parameter type**: ``s`` + * **Omittable**: ``True`` + * **Default value**: ``cm`` + * **Candidates**: ``pc km m cm mm um nm Ang fm parsec kilometer meter centimeter millimeter micrometer nanometer angstrom fermi`` + +Command /RMG/Generator/Confinement/Geometrical/CenterPositionY +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Set center position (Y coordinate) + +* **Parameter**: ``value`` + * **Parameter type**: ``d`` + * **Omittable**: ``False`` +* **Parameter**: ``Unit`` + * **Parameter type**: ``s`` + * **Omittable**: ``True`` + * **Default value**: ``cm`` + * **Candidates**: ``pc km m cm mm um nm Ang fm parsec kilometer meter centimeter millimeter micrometer nanometer angstrom fermi`` + +Command /RMG/Generator/Confinement/Geometrical/CenterPositionZ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Set center position (Z coordinate) + +* **Parameter**: ``value`` + * **Parameter type**: ``d`` + * **Omittable**: ``False`` +* **Parameter**: ``Unit`` + * **Parameter type**: ``s`` + * **Omittable**: ``True`` + * **Default value**: ``cm`` + * **Candidates**: ``pc km m cm mm um nm Ang fm parsec kilometer meter centimeter millimeter micrometer nanometer angstrom fermi`` + +Command directory path : /RMG/Generator/Confinement/Geometrical/Sphere/ +----------------------------------------------------------------------- + +Commands for setting geometrical dimensions of a sampling sphere + +* **Sub-directories**: + * *InnerRadius*: ``Set inner radius`` + * *OuterRadius*: ``Set outer radius`` + +Command /RMG/Generator/Confinement/Geometrical/Sphere/InnerRadius +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Set inner radius + +* **Range of parameters**: ``L >= 0`` +* **Parameter**: ``L`` + * **Parameter type**: ``d`` + * **Omittable**: ``False`` +* **Parameter**: ``Unit`` + * **Parameter type**: ``s`` + * **Omittable**: ``True`` + * **Default value**: ``cm`` + * **Candidates**: ``pc km m cm mm um nm Ang fm parsec kilometer meter centimeter millimeter micrometer nanometer angstrom fermi`` + +Command /RMG/Generator/Confinement/Geometrical/Sphere/OuterRadius +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Set outer radius + +* **Range of parameters**: ``L > 0`` +* **Parameter**: ``L`` + * **Parameter type**: ``d`` + * **Omittable**: ``False`` +* **Parameter**: ``Unit`` + * **Parameter type**: ``s`` + * **Omittable**: ``True`` + * **Default value**: ``cm`` + * **Candidates**: ``pc km m cm mm um nm Ang fm parsec kilometer meter centimeter millimeter micrometer nanometer angstrom fermi`` + +Command directory path : /RMG/Generator/Confinement/Geometrical/Cylinder/ +------------------------------------------------------------------------- + +Commands for setting geometrical dimensions of a sampling cylinder + +* **Sub-directories**: + * *InnerRadius*: ``Set inner radius`` + * *OuterRadius*: ``Set outer radius`` + * *Height*: ``Set height`` + * *StartingAngle*: ``Set starting angle`` + * *SpanningAngle*: ``Set spanning angle`` + +Command /RMG/Generator/Confinement/Geometrical/Cylinder/InnerRadius +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Set inner radius + +* **Range of parameters**: ``L >= 0`` +* **Parameter**: ``L`` + * **Parameter type**: ``d`` + * **Omittable**: ``False`` +* **Parameter**: ``Unit`` + * **Parameter type**: ``s`` + * **Omittable**: ``True`` + * **Default value**: ``cm`` + * **Candidates**: ``pc km m cm mm um nm Ang fm parsec kilometer meter centimeter millimeter micrometer nanometer angstrom fermi`` + +Command /RMG/Generator/Confinement/Geometrical/Cylinder/OuterRadius +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Set outer radius + +* **Range of parameters**: ``L > 0`` +* **Parameter**: ``L`` + * **Parameter type**: ``d`` + * **Omittable**: ``False`` +* **Parameter**: ``Unit`` + * **Parameter type**: ``s`` + * **Omittable**: ``True`` + * **Default value**: ``cm`` + * **Candidates**: ``pc km m cm mm um nm Ang fm parsec kilometer meter centimeter millimeter micrometer nanometer angstrom fermi`` + +Command /RMG/Generator/Confinement/Geometrical/Cylinder/Height +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Set height + +* **Range of parameters**: ``L > 0`` +* **Parameter**: ``L`` + * **Parameter type**: ``d`` + * **Omittable**: ``False`` +* **Parameter**: ``Unit`` + * **Parameter type**: ``s`` + * **Omittable**: ``True`` + * **Default value**: ``cm`` + * **Candidates**: ``pc km m cm mm um nm Ang fm parsec kilometer meter centimeter millimeter micrometer nanometer angstrom fermi`` + +Command /RMG/Generator/Confinement/Geometrical/Cylinder/StartingAngle +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Set starting angle + +* **Parameter**: ``A`` + * **Parameter type**: ``d`` + * **Omittable**: ``False`` +* **Parameter**: ``Unit`` + * **Parameter type**: ``s`` + * **Omittable**: ``True`` + * **Default value**: ``deg`` + * **Candidates**: ``rad mrad deg radian milliradian degree`` + +Command /RMG/Generator/Confinement/Geometrical/Cylinder/SpanningAngle +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Set spanning angle + +* **Parameter**: ``A`` + * **Parameter type**: ``d`` + * **Omittable**: ``False`` +* **Parameter**: ``Unit`` + * **Parameter type**: ``s`` + * **Omittable**: ``True`` + * **Default value**: ``deg`` + * **Candidates**: ``rad mrad deg radian milliradian degree`` + +Command directory path : /RMG/Generator/Confinement/Geometrical/Box/ +-------------------------------------------------------------------- + +Commands for setting geometrical dimensions of a sampling box + +* **Sub-directories**: + * *XLength*: ``Set X length`` + * *YLength*: ``Set Y length`` + * *ZLength*: ``Set Z length`` + +Command /RMG/Generator/Confinement/Geometrical/Box/XLength +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Set X length + +* **Range of parameters**: ``L > 0`` +* **Parameter**: ``L`` + * **Parameter type**: ``d`` + * **Omittable**: ``False`` +* **Parameter**: ``Unit`` + * **Parameter type**: ``s`` + * **Omittable**: ``True`` + * **Default value**: ``cm`` + * **Candidates**: ``pc km m cm mm um nm Ang fm parsec kilometer meter centimeter millimeter micrometer nanometer angstrom fermi`` + +Command /RMG/Generator/Confinement/Geometrical/Box/YLength +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Set Y length + +* **Range of parameters**: ``L > 0`` +* **Parameter**: ``L`` + * **Parameter type**: ``d`` + * **Omittable**: ``False`` +* **Parameter**: ``Unit`` + * **Parameter type**: ``s`` + * **Omittable**: ``True`` + * **Default value**: ``cm`` + * **Candidates**: ``pc km m cm mm um nm Ang fm parsec kilometer meter centimeter millimeter micrometer nanometer angstrom fermi`` + +Command /RMG/Generator/Confinement/Geometrical/Box/ZLength +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Set Z length + +* **Range of parameters**: ``L > 0`` +* **Parameter**: ``L`` + * **Parameter type**: ``d`` + * **Omittable**: ``False`` +* **Parameter**: ``Unit`` + * **Parameter type**: ``s`` + * **Omittable**: ``True`` + * **Default value**: ``cm`` + * **Candidates**: ``pc km m cm mm um nm Ang fm parsec kilometer meter centimeter millimeter micrometer nanometer angstrom fermi`` + +Command directory path : /RMG/Confinement/ +------------------------------------------ + +* **Sub-directories**: + * */RMG/Confinement/FromFile/*: ``Commands for controlling reading event vertex positions from file`` + +Command directory path : /RMG/Confinement/FromFile/ +--------------------------------------------------- + +Commands for controlling reading event vertex positions from file + +* **Sub-directories**: + * *FileName*: ``Set name of the file containing vertex positions. See the documentation for a specification of the format.`` + +Command /RMG/Confinement/FromFile/FileName +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Set name of the file containing vertex positions. See the documentation for a specification of the format. + +* **Parameter**: ``filename`` + * **Parameter type**: ``s`` + * **Omittable**: ``False`` diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ab360b9..34f9cf6 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -117,6 +117,14 @@ add_executable(remage-cli ${_root}/src/remage.cc) target_link_libraries(remage-cli PUBLIC remage) set_target_properties(remage-cli PROPERTIES OUTPUT_NAME remage) +# executable for dumping all docs +add_executable(remage-doc-dump EXCLUDE_FROM_ALL ${_root}/src/remage-doc-dump.cc) +target_link_libraries(remage-doc-dump PUBLIC remage) +set_target_properties(remage-doc-dump PROPERTIES OUTPUT_NAME remage-doc-dump) +if(BxDecay0_FOUND) + target_link_libraries(remage-doc-dump PRIVATE BxDecay0::BxDecay0_Geant4) +endif() + # install CMake targets install( TARGETS remage diff --git a/src/RMGGermaniumOutputScheme.cc b/src/RMGGermaniumOutputScheme.cc index cd35e4c..6e6a6fa 100644 --- a/src/RMGGermaniumOutputScheme.cc +++ b/src/RMGGermaniumOutputScheme.cc @@ -196,7 +196,8 @@ void RMGGermaniumOutputScheme::DefineCommands() { .SetStates(G4State_Idle); fMessenger->DeclareProperty("DiscardPhotonsIfNoGermaniumEdep", fDiscardPhotonsIfNoGermaniumEdep) - .SetGuidance("Disable the automatic overlap check after loading a GDML file") + .SetGuidance( + "Discard optical photons (before simulating them), if no edep in germanium detectors.") .SetStates(G4State_Idle); } diff --git a/src/RMGVertexConfinement.cc b/src/RMGVertexConfinement.cc index c3dca53..072453c 100644 --- a/src/RMGVertexConfinement.cc +++ b/src/RMGVertexConfinement.cc @@ -688,7 +688,7 @@ void RMGVertexConfinement::DefineCommands() { ->DeclareProperty("ForceContainmentCheck", fForceContainmentCheck) .SetGuidance("If true (or omitted argument), perform a containment check even after sampling " "from a natively sampleable object. This is only an extra sanity check that does" - "not alter the behaviour.") + " not alter the behaviour.") .SetParameterName("flag", true) .SetStates(G4State_PreInit, G4State_Idle) .SetToBeBroadcasted(true); diff --git a/src/remage-doc-dump.cc b/src/remage-doc-dump.cc new file mode 100644 index 0000000..c26a643 --- /dev/null +++ b/src/remage-doc-dump.cc @@ -0,0 +1,82 @@ +// Copyright (C) 2022 Luigi Pertoldi +// +// This program is free software: you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License as published by the Free +// Software Foundation, either version 3 of the License, or (at your option) any +// later version. +// +// This program is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +// details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program. If not, see . + +#include +#include +#include +#include + +#include "G4UImanager.hh" + +#include "RMGGeneratorCosmicMuons.hh" +#include "RMGGeneratorMUSUNCosmicMuons.hh" +#include "RMGGermaniumOutputScheme.hh" +#include "RMGLog.hh" +#include "RMGManager.hh" +#include "RMGOpticalOutputScheme.hh" +#include "RMGScintillatorOutputScheme.hh" +#include "RMGVOutputScheme.hh" +#include "RMGVertexConfinement.hh" +#include "RMGVertexFromFile.hh" +#include "RMGVertexOutputScheme.hh" + +void init_extra() { + // initialize non-default things that have messengers. + // add here other things in the future. + + // output schemes + new RMGGermaniumOutputScheme(); + new RMGOpticalOutputScheme(); + new RMGVertexOutputScheme(); + new RMGScintillatorOutputScheme(); + // generators + new RMGGeneratorMUSUNCosmicMuons(); + new RMGGeneratorCosmicMuons(); + // confinments + new RMGVertexConfinement(); + new RMGVertexFromFile(); +} + +int main(int argc, char** argv) { + std::string dir = "."; + if (argc > 1) dir = argv[1]; + + RMGLog::SetLogLevel(RMGLog::summary); + + RMGManager manager("remage-doc-dump", argc, argv); + manager.Initialize(); + + init_extra(); + + if (dir != ".") { + RMGLog::Out(RMGLog::summary, "Set output directory to ", dir); + auto path = std::filesystem::path(dir); + std::filesystem::create_directories(path); + std::filesystem::current_path(path); + } + + auto UI = G4UImanager::GetUIpointer(); + RMGLog::Out(RMGLog::summary, "Export HTML"); + UI->ApplyCommand("/control/createHTML /RMG/"); + + RMGLog::Out(RMGLog::summary, "Export TXT"); + std::ofstream out("rmg-manual.txt"); + std::streambuf* coutbuf = std::cout.rdbuf(); + std::cout.rdbuf(out.rdbuf()); + UI->ApplyCommand("/control/manual /RMG/"); + std::cout.rdbuf(coutbuf); +} + +// vim: tabstop=2 shiftwidth=2 expandtab