diff --git a/src/docs/links.md b/src/docs/links.md index 7dde024876cdb3444161d45452411b156fc746d1..76306558cae2f6b3c3081bfc4e89223a1638bd0a 100644 --- a/src/docs/links.md +++ b/src/docs/links.md @@ -43,5 +43,8 @@ https://indico.cern.ch/event/258092/contributions/1588579/attachments/454221/629 ## Others ### gaudi -https://gaudi-framework.readthedocs.io/en/latest/index.html + +- [Gaudi Read-the-docs](https://gaudi-framework.readthedocs.io/en/latest/index.html) +- [Gaudi HPX Discussion](https://indico.cern.ch/event/532371/) +- [Gaudo 2016 workshop](https://indico.cern.ch/event/556551/) diff --git a/src/docs/part3/simulating_detectors.md b/src/docs/part3/simulating_detectors.md index 68440738c7131bd6dc977d9a1d1be0c22ca12dd5..aa7b43ab1e05d118940ff297332c5aeb40032c9d 100644 --- a/src/docs/part3/simulating_detectors.md +++ b/src/docs/part3/simulating_detectors.md @@ -36,7 +36,6 @@ or XML should be straightforward. To be completed. ```python -#!/usr/bin/env python from __future__ import absolute_import, unicode_literals import os import time @@ -159,7 +158,38 @@ if __name__ == "__main__": ### Setup using XML -To be completed. +A lot of the setup can be off loaded to XML files. + +For example, the above setup can be run as followed: + +```python +from __future__ import absolute_import, unicode_literals +import os +import time +import logging +import DDG4 +from DDG4 import OutputLevel as Output +from g4units import keV, GeV, mm, ns, MeV + +def run(): + #os.environ['G4UI_USE_TCSH'] = "1" + kernel = DDG4.Kernel() + description = kernel.detectorDescription() + + kernel.loadGeometry(str("file:" + "solid_sidis.xml")) + kernel.loadXML(str("file:solid/sim/field.xml")) + kernel.loadXML(str("file:solid/sim/sequences.xml")) + kernel.loadXML(str("file:solid/sim/physics.xml")) + + kernel.configure() + kernel.initialize() + + kernel.run() + kernel.terminate() + +if __name__ == "__main__": + run() +```