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