Geant4 Cross Reference |
1 # -------------------------------------------- 1 # ---------------------------------------------- 2 # Example macro file for the GammaRayTel 2 # Example macro file for the GammaRayTel 3 # Visualization with VRML 3 # Visualization with VRML 4 # -------------------------------------------- 4 # ---------------------------------------------- 5 # Authors: R.Giannitrapani, F.Longo and G.Sant 5 # Authors: R.Giannitrapani, F.Longo and G.Santin 6 # -------------------------------------------- 6 # ---------------------------------------------- 7 7 8 # 8 # 9 # Sets some default verbose 9 # Sets some default verbose 10 # and initializes the graphic. 10 # and initializes the graphic. 11 # 11 # 12 /control/verbose 2 12 /control/verbose 2 13 /control/saveHistory 13 /control/saveHistory 14 /run/verbose 2 14 /run/verbose 2 15 /run/initialize << 16 /gun/sourceGen true 15 /gun/sourceGen true 17 16 18 # Set a very high time threshold to allow all << 17 19 /process/had/rdm/thresholdForVeryLongDecayTime << 18 /control/execute emlowe.mac >> 19 >> 20 /run/initialize 20 21 21 /gun/particle mu- 22 /gun/particle mu- 22 /gun/energy 100 MeV 23 /gun/energy 100 MeV 23 /gun/vertexRadius 30. cm 24 /gun/vertexRadius 30. cm 24 /gun/sourceType 2 25 /gun/sourceType 2 25 /gun/direction 0 0 -1 26 /gun/direction 0 0 -1 26 27 27 # You can modify the geometry of the telescope 28 # You can modify the geometry of the telescope via a messenger 28 29 >> 30 /control/execute emstd.mac 29 /payload/setNbOfTKRLayers 10 31 /payload/setNbOfTKRLayers 10 30 /payload/update 32 /payload/update 31 33 32 # Use this open statement to create a .wrl fil << 34 33 # viewing in a VRML viewer: << 34 /vis/open VRML2FILE << 35 # << 36 ## Open a viewer << 37 #/vis/open << 38 ## This opens the default viewer - see example << 39 ## more comprehensive overview of options. Als << 40 # << 41 # Disable auto refresh and quieten vis message << 42 # trajectories are established: << 43 /vis/viewer/set/autoRefresh false << 44 /vis/verbose errors << 45 # 35 # 46 # Draw geometry: << 36 # Create a scene handler for a specific graphics system >> 37 /vis/open VRML2FILE >> 38 #/vis/open OGLIX >> 39 >> 40 /vis/viewer/reset >> 41 /vis/viewer/set/viewpointThetaPhi 90 0 >> 42 >> 43 # Visualize of the whole detector geometry 47 /vis/drawVolume 44 /vis/drawVolume >> 45 >> 46 # for drawing the tracks >> 47 # if too many tracks cause core dump => storeTrajectory 0 >> 48 /tracking/storeTrajectory 1 >> 49 48 # 50 # 49 # Specify view angle: << 51 # Flush visualization 50 /vis/viewer/set/viewpointThetaPhi 90. 0. << 52 /vis/viewer/update 51 # << 52 # Specify zoom value: << 53 #/vis/viewer/zoom 2. << 54 # << 55 # Specify style (surface or wireframe): << 56 #/vis/viewer/set/style wireframe << 57 # << 58 # Draw coordinate axes: << 59 #/vis/scene/add/axes 0 0 0 1 m << 60 # << 61 # Draw smooth trajectories at end of event, sh << 62 # as markers 2 pixels wide: << 63 /vis/scene/add/trajectories smooth << 64 /vis/modeling/trajectories/create/drawByCharge << 65 /vis/modeling/trajectories/drawByCharge-0/defa << 66 /vis/modeling/trajectories/drawByCharge-0/defa << 67 # (if too many tracks cause core dump => /trac << 68 # << 69 # Draw hits at end of event: << 70 #/vis/scene/add/hits << 71 # << 72 # To draw only gammas: << 73 #/vis/filtering/trajectories/create/particleFi << 74 #/vis/filtering/trajectories/particleFilter-0/ << 75 # << 76 # To invert the above, drawing all particles e << 77 # keep the above two lines but also add: << 78 #/vis/filtering/trajectories/particleFilter-0/ << 79 # << 80 # Many other options are available with /vis/m << 81 # For example, to select colour by particle ID << 82 #/vis/modeling/trajectories/create/drawByParti << 83 #/vis/modeling/trajectories/drawByParticleID-0 << 84 # << 85 # To superimpose all of the events from a give << 86 #/vis/scene/endOfEventAction accumulate << 87 # << 88 # Re-establish auto refreshing and verbosity: << 89 /vis/viewer/set/autoRefresh true << 90 /vis/verbose warnings << 91 # << 92 # For file-based drivers, use this to create a << 93 #/vis/viewer/flush << 94 53 95 /run/beamOn 10 54 /run/beamOn 10 >> 55 >> 56 >> 57 >> 58 >> 59 >> 60