Geant4 Cross Reference |
1 ############################################## 1 ################################################### 2 # Visualization of detector geometry and event 2 # Visualization of detector geometry and events 3 ############################################## 3 ################################################### 4 4 5 /run/initialize 5 /run/initialize 6 # 6 # 7 # Open a viewer << 7 # Use this open statement to create an OpenGL view: 8 /vis/open << 8 /vis/open OGL 600x600-0+0 9 # This opens the default viewer - see examples << 9 # 10 # more comprehensive overview of options. Also << 10 # Use this open statement to create a .prim file suitable for >> 11 # viewing in DAWN: >> 12 #/vis/open DAWNFILE >> 13 # >> 14 # Use this open statement to create a .heprep file suitable for >> 15 # viewing in HepRApp: >> 16 #/vis/open HepRepFile >> 17 # >> 18 # Use this open statement to create a .wrl file suitable for >> 19 # viewing in a VRML viewer: >> 20 #/vis/open VRML2FILE 11 # 21 # 12 # Disable auto refresh and quieten vis message 22 # Disable auto refresh and quieten vis messages whilst scene and 13 # trajectories are established: 23 # trajectories are established: 14 /vis/viewer/set/autoRefresh false 24 /vis/viewer/set/autoRefresh false 15 /vis/verbose errors 25 /vis/verbose errors 16 # 26 # 17 # Draw geometry: 27 # Draw geometry: 18 /vis/drawVolume 28 /vis/drawVolume 19 # 29 # 20 # Specify view angle: 30 # Specify view angle: 21 #/vis/viewer/set/viewpointThetaPhi 90. 0. 31 #/vis/viewer/set/viewpointThetaPhi 90. 0. 22 # 32 # 23 # Specify zoom value: 33 # Specify zoom value: 24 /vis/viewer/zoom 1.5 34 /vis/viewer/zoom 1.5 25 # 35 # 26 # Specify style (surface or wireframe): 36 # Specify style (surface or wireframe): 27 #/vis/viewer/set/style wireframe 37 #/vis/viewer/set/style wireframe 28 # 38 # 29 # Draw coordinate axes: 39 # Draw coordinate axes: 30 #/vis/scene/add/axes 0 0 0 1 m 40 #/vis/scene/add/axes 0 0 0 1 m 31 # 41 # 32 # Draw smooth trajectories at end of event, sh 42 # Draw smooth trajectories at end of event, showing trajectory points 33 # as markers 2 pixels wide: 43 # as markers 2 pixels wide: 34 /vis/scene/add/trajectories smooth 44 /vis/scene/add/trajectories smooth 35 /vis/modeling/trajectories/create/drawByCharge 45 /vis/modeling/trajectories/create/drawByCharge 36 /vis/modeling/trajectories/drawByCharge-0/defa 46 /vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true 37 /vis/modeling/trajectories/drawByCharge-0/defa 47 /vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2 38 # (if too many tracks cause core dump => /trac 48 # (if too many tracks cause core dump => /tracking/storeTrajectory 0) 39 # 49 # 40 # Draw hits at end of event: 50 # Draw hits at end of event: 41 #/vis/scene/add/hits 51 #/vis/scene/add/hits 42 # 52 # 43 # To draw only gammas: 53 # To draw only gammas: 44 #/vis/filtering/trajectories/create/particleFi 54 #/vis/filtering/trajectories/create/particleFilter 45 #/vis/filtering/trajectories/particleFilter-0/ 55 #/vis/filtering/trajectories/particleFilter-0/add gamma 46 # 56 # 47 # To invert the above, drawing all particles e 57 # To invert the above, drawing all particles except gammas, 48 # keep the above two lines but also add: 58 # keep the above two lines but also add: 49 #/vis/filtering/trajectories/particleFilter-0/ 59 #/vis/filtering/trajectories/particleFilter-0/invert true 50 # 60 # 51 # Many other options are available with /vis/m 61 # Many other options are available with /vis/modeling and /vis/filtering. 52 # For example, to select colour by particle ID 62 # For example, to select colour by particle ID: 53 #/vis/modeling/trajectories/create/drawByParti 63 #/vis/modeling/trajectories/create/drawByParticleID 54 #/vis/modeling/trajectories/drawByParticleID-0 64 #/vis/modeling/trajectories/drawByParticleID-0/set e- blue 55 # 65 # 56 # To superimpose all of the events from a give 66 # To superimpose all of the events from a given run: 57 /vis/scene/endOfEventAction accumulate 67 /vis/scene/endOfEventAction accumulate 58 # 68 # 59 # Re-establish auto refreshing and verbosity: 69 # Re-establish auto refreshing and verbosity: 60 /vis/viewer/set/autoRefresh true 70 /vis/viewer/set/autoRefresh true 61 /vis/verbose warnings 71 /vis/verbose warnings 62 # 72 # 63 # For file-based drivers, use this to create a 73 # For file-based drivers, use this to create an empty detector view: 64 #/vis/viewer/flush 74 #/vis/viewer/flush 65 # 75 # 66 #hard coded position and direction for gun 76 #hard coded position and direction for gun 67 /gun/position 0 0 -0.1 mm 77 /gun/position 0 0 -0.1 mm 68 /gun/direction 1 0 0 78 /gun/direction 1 0 0 69 79 70 #if you want make a run with particle 80 #if you want make a run with particle 71 #/tracking/verbose 1 81 #/tracking/verbose 1 72 /run/beamOn 10 82 /run/beamOn 10 73 # 83 # 74 84