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