Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
eic_tutorial
Manage
Activity
Members
Labels
Plan
Issues
9
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
EIC
tutorials
eic_tutorial
Commits
71eb8521
Commit
71eb8521
authored
4 years ago
by
Whitney Armstrong
Browse files
Options
Downloads
Patches
Plain Diff
modified: links.md
modified: part3/simulating_detectors.md
parent
efedcb81
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/docs/links.md
+4
-1
4 additions, 1 deletion
src/docs/links.md
src/docs/part3/simulating_detectors.md
+32
-2
32 additions, 2 deletions
src/docs/part3/simulating_detectors.md
with
36 additions
and
3 deletions
src/docs/links.md
+
4
−
1
View file @
71eb8521
...
...
@@ -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/
)
This diff is collapsed.
Click to expand it.
src/docs/part3/simulating_detectors.md
+
32
−
2
View file @
71eb8521
...
...
@@ -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
()
```
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment