Skip to content
Snippets Groups Projects
Commit 71eb8521 authored by Whitney Armstrong's avatar Whitney Armstrong
Browse files

modified: links.md

	modified:   part3/simulating_detectors.md
parent efedcb81
No related branches found
No related tags found
No related merge requests found
......@@ -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/)
......@@ -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()
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment