From 291d33ac14e2f861698dced7ae3874a2a3cd5d84 Mon Sep 17 00:00:00 2001 From: Markus Frank <Markus.Frank@cern.ch> Date: Fri, 23 Jun 2023 12:13:46 +0200 Subject: [PATCH] Add example readme --- examples/DDCAD/README.md | 18 ++++++++++++++++++ examples/DDCAD/scripts/DD4hep_Issue_1134.py | 5 ++--- 2 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 examples/DDCAD/README.md diff --git a/examples/DDCAD/README.md b/examples/DDCAD/README.md new file mode 100644 index 000000000..63c668537 --- /dev/null +++ b/examples/DDCAD/README.md @@ -0,0 +1,18 @@ + + +DDCAD examples +============== + +## Issue 1134 +Corresponding example is DD4hep_Issue_1134 + +Geometry is here: examples/DDCAD/compact/DD4hep_Issue_1134.xml + +To visualize: $> geoDisplay <installation>/examples/DDCAD/compact/DD4hep_Issue_1134.xml + +Basic simulation activation: $> python <installation>/examples/DDCAD/scripts/DD4hep_Issue_1134.py + +ddsim: $> `which python` `which ddsim` --compactFile ../checkout/examples/DDCAD/compact/DD4hep_Issue_1134.xml --enableG4Gun --runType shell + + + diff --git a/examples/DDCAD/scripts/DD4hep_Issue_1134.py b/examples/DDCAD/scripts/DD4hep_Issue_1134.py index 761b9e2f4..8b033cf86 100644 --- a/examples/DDCAD/scripts/DD4hep_Issue_1134.py +++ b/examples/DDCAD/scripts/DD4hep_Issue_1134.py @@ -14,7 +14,7 @@ import os import time import DDG4 from DDG4 import OutputLevel as Output -from g4units import GeV, MeV, m +from g4units import GeV """ @@ -59,10 +59,9 @@ def run(): # Configure I/O geant4.setupROOTOutput('RootOutput', 'DD4hep_Issue_1134_' + time.strftime('%Y-%m-%d_%H-%M')) - # Setup particle gun gun = geant4.setupGun("Gun", particle='e+', energy=20 * GeV, multiplicity=1) - + gun.OutputLevel = Output.INFO # Now build the physics list: phys = geant4.setupPhysics('QGSP_BERT') ph = DDG4.PhysicsList(kernel, str('Geant4PhysicsList/Myphysics')) -- GitLab