| [807] | 1 | # ----------------------------------------------
|
|---|
| 2 | # Example macro file for the GammaRayTel
|
|---|
| 3 | # Visualization with OpenGL
|
|---|
| 4 | # ----------------------------------------------
|
|---|
| 5 | # Authors: R.Giannitrapani, F.Longo and G.Santin
|
|---|
| 6 | # ----------------------------------------------
|
|---|
| 7 |
|
|---|
| 8 | #
|
|---|
| 9 | # Sets some default verbose
|
|---|
| 10 | # and initializes the graphic.
|
|---|
| 11 | #
|
|---|
| 12 | /control/verbose 1
|
|---|
| 13 | /control/saveHistory
|
|---|
| 14 | /run/verbose 1
|
|---|
| 15 | /gun/sourceGen true
|
|---|
| [1230] | 16 | /control/execute emstd.mac
|
|---|
| 17 |
|
|---|
| [807] | 18 | /run/initialize
|
|---|
| 19 |
|
|---|
| [1230] | 20 | /particle/select gamma
|
|---|
| [807] | 21 | /gun/vertexRadius 25. cm
|
|---|
| 22 | /gun/sourceType 2
|
|---|
| 23 |
|
|---|
| 24 |
|
|---|
| 25 | # You can modify the geometry of the telescope via a messenger
|
|---|
| 26 |
|
|---|
| 27 | #/payload/setNbOfTKRLayers 15
|
|---|
| 28 | #/payload/update
|
|---|
| 29 |
|
|---|
| [1313] | 30 | # Use this open statement to create an OpenGL view:
|
|---|
| 31 | /vis/open OGL 600x600-0+0
|
|---|
| [807] | 32 | #
|
|---|
| [1313] | 33 | # Use this open statement to create a .prim file suitable for
|
|---|
| 34 | # viewing in DAWN:
|
|---|
| 35 | #/vis/open DAWNFILE
|
|---|
| 36 | #
|
|---|
| 37 | # Use this open statement to create a .heprep file suitable for
|
|---|
| 38 | # viewing in HepRApp:
|
|---|
| [807] | 39 | #/vis/open HepRepFile
|
|---|
| [1313] | 40 | #
|
|---|
| 41 | # Use this open statement to create a .wrl file suitable for
|
|---|
| 42 | # viewing in a VRML viewer:
|
|---|
| 43 | #/vis/open VRML2FILE
|
|---|
| 44 | #
|
|---|
| 45 | # Disable auto refresh and quieten vis messages whilst scene and
|
|---|
| 46 | # trajectories are established:
|
|---|
| 47 | /vis/viewer/set/autoRefresh false
|
|---|
| 48 | /vis/verbose errors
|
|---|
| 49 | #
|
|---|
| 50 | # Draw geometry:
|
|---|
| [807] | 51 | /vis/drawVolume
|
|---|
| 52 | #
|
|---|
| [1313] | 53 | # Specify view angle:
|
|---|
| 54 | /vis/viewer/set/viewpointThetaPhi 90. 0.
|
|---|
| 55 | #
|
|---|
| 56 | # Specify zoom value:
|
|---|
| 57 | #/vis/viewer/zoom 2.
|
|---|
| 58 | #
|
|---|
| 59 | # Specify style (surface or wireframe):
|
|---|
| 60 | #/vis/viewer/set/style wireframe
|
|---|
| 61 | #
|
|---|
| 62 | # Draw coordinate axes:
|
|---|
| 63 | #/vis/scene/add/axes 0 0 0 1 m
|
|---|
| 64 | #
|
|---|
| 65 | # Draw smooth trajectories at end of event, showing trajectory points
|
|---|
| 66 | # as markers 2 pixels wide:
|
|---|
| 67 | /vis/scene/add/trajectories smooth
|
|---|
| 68 | /vis/modeling/trajectories/create/drawByCharge
|
|---|
| 69 | /vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true
|
|---|
| 70 | /vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2
|
|---|
| 71 | # (if too many tracks cause core dump => /tracking/storeTrajectory 0)
|
|---|
| 72 | #
|
|---|
| 73 | # Draw hits at end of event:
|
|---|
| 74 | #/vis/scene/add/hits
|
|---|
| 75 | #
|
|---|
| 76 | # To draw only gammas:
|
|---|
| 77 | #/vis/filtering/trajectories/create/particleFilter
|
|---|
| 78 | #/vis/filtering/trajectories/particleFilter-0/add gamma
|
|---|
| 79 | #
|
|---|
| 80 | # To invert the above, drawing all particles except gammas,
|
|---|
| 81 | # keep the above two lines but also add:
|
|---|
| 82 | #/vis/filtering/trajectories/particleFilter-0/invert true
|
|---|
| 83 | #
|
|---|
| 84 | # Many other options are available with /vis/modeling and /vis/filtering.
|
|---|
| 85 | # For example, to select colour by particle ID:
|
|---|
| 86 | #/vis/modeling/trajectories/create/drawByParticleID
|
|---|
| 87 | #/vis/modeling/trajectories/drawByParticleID-0/set e- blue
|
|---|
| 88 | #
|
|---|
| 89 | # To superimpose all of the events from a given run:
|
|---|
| 90 | #/vis/scene/endOfEventAction accumulate
|
|---|
| 91 | #
|
|---|
| 92 | # Re-establish auto refreshing and verbosity:
|
|---|
| 93 | /vis/viewer/set/autoRefresh true
|
|---|
| 94 | /vis/verbose warnings
|
|---|
| 95 | #
|
|---|
| 96 | # For file-based drivers, use this to create an empty detector view:
|
|---|
| 97 | #/vis/viewer/flush
|
|---|
| [807] | 98 |
|
|---|
| 99 | # run 10 events
|
|---|
| 100 | /run/beamOn 10
|
|---|
| 101 |
|
|---|
| 102 |
|
|---|