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