| [1209] | 1 | # $Id: vis.mac,v 1.7 2009/11/15 14:48:40 maire Exp $
|
|---|
| [474] | 2 | #
|
|---|
| 3 | # Macro file for the initialization phase of "exampleN03.cc"
|
|---|
| 4 | # when running in interactive mode
|
|---|
| 5 | #
|
|---|
| 6 | # Sets some default verbose
|
|---|
| 7 | #
|
|---|
| 8 | /control/verbose 2
|
|---|
| 9 | /control/saveHistory
|
|---|
| 10 | /run/verbose 2
|
|---|
| 11 | #
|
|---|
| 12 | # create empty scene
|
|---|
| 13 | #
|
|---|
| 14 | /vis/scene/create
|
|---|
| 15 | #
|
|---|
| 16 | # Create a scene handler for a specific graphics system
|
|---|
| 17 | # (Edit the next line(s) to choose another graphic system)
|
|---|
| 18 | #
|
|---|
| 19 | # Use this open statement to get an .eps and .prim files
|
|---|
| 20 | # suitable for viewing in DAWN.
|
|---|
| [609] | 21 | ###/vis/open DAWNFILE
|
|---|
| [474] | 22 | #
|
|---|
| 23 | # Use this open statement instead for OpenGL in immediate mode.
|
|---|
| [1234] | 24 | /vis/open OGLIQt 450x420
|
|---|
| [474] | 25 | #
|
|---|
| 26 | # Use this open statement instead to get a HepRep version 1 file
|
|---|
| 27 | # suitable for viewing in WIRED.
|
|---|
| 28 | #/vis/open HepRepFile
|
|---|
| 29 | #
|
|---|
| 30 | # Use this open statement instead to get a HepRep version 2 file
|
|---|
| 31 | # suitable for viewing in WIRED.
|
|---|
| 32 | #/vis/open HepRepXML
|
|---|
| 33 | #
|
|---|
| 34 | # Output an empty detector
|
|---|
| [1230] | 35 | /gun/energy 10 GeV
|
|---|
| [474] | 36 | /vis/viewer/flush
|
|---|
| 37 | #
|
|---|
| [483] | 38 | # Draw trajectories at end of event, showing trajectory points as
|
|---|
| 39 | # markers of size 2 pixels
|
|---|
| [1209] | 40 | /vis/scene/add/trajectories smooth
|
|---|
| [483] | 41 | /vis/modeling/trajectories/create/drawByCharge
|
|---|
| 42 | /vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true
|
|---|
| 43 | /vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2
|
|---|
| 44 | # (if too many tracks cause core dump => /tracking/storeTrajectory 0)
|
|---|
| [474] | 45 | #
|
|---|
| [483] | 46 | # To draw gammas only
|
|---|
| 47 | #/vis/filtering/trajectories/create/particleFilter
|
|---|
| 48 | #/vis/filtering/trajectories/particleFilter-0/add gamma
|
|---|
| 49 | #
|
|---|
| 50 | # To draw charged particles only
|
|---|
| 51 | #/vis/filtering/trajectories/particleFilter-0/invert true
|
|---|
| 52 | #
|
|---|
| 53 | # Many other options available with /vis/modeling and /vis/filtering.
|
|---|
| 54 | # For example, select colour by particle ID
|
|---|
| 55 | #/vis/modeling/trajectories/create/drawByParticleID
|
|---|
| 56 | #/vis/modeling/trajectories/drawByParticleID-0/set e- red
|
|---|
| 57 | #
|
|---|
| [474] | 58 | /vis/scene/endOfEventAction accumulate
|
|---|
| 59 | #
|
|---|
| 60 | # At end of each run, an automatic flush causes graphical output.
|
|---|
| 61 | #/run/beamOn 1
|
|---|
| 62 | # When you exit Geant4, you will find a file called scene-0.heprep.zip.
|
|---|
| 63 | # Unzipping this will give you three separate HepRep files suitable for
|
|---|
| 64 | # viewing in WIRED.
|
|---|
| 65 | # The first file will contain just detector geometry.
|
|---|
| 66 | # The second file will contain the detector plus one event.
|
|---|
| 67 | # The third file will contain the detector plus ten events.
|
|---|