Geant4 Cross Reference |
1 ############################################## 1 ################################################### 2 # Visualization of detector geometry and event 2 # Visualization of detector geometry and events 3 ############################################## 3 ################################################### 4 4 >> 5 # create empty scene >> 6 /vis/scene/create >> 7 5 # reading Geometry from STEP file 8 # reading Geometry from STEP file 6 /mydet/StepFile mbb 9 /mydet/StepFile mbb 7 /run/initialize 10 /run/initialize 8 11 9 # Open a viewer << 12 # Create a scene handler for a specific graphics system 10 /vis/open << 13 /vis/open OGL 11 # This opens the default viewer - see examples << 14 #/vis/open VRML2FILE 12 # more comprehensive overview of options. Also << 13 15 14 # draw scene 16 # draw scene 15 /vis/viewer/zoom 5 17 /vis/viewer/zoom 5 16 /vis/viewer/set/viewpointThetaPhi 45 45 deg 18 /vis/viewer/set/viewpointThetaPhi 45 45 deg 17 #/vis/viewer/set/viewpointThetaPhi 90 -25 deg 19 #/vis/viewer/set/viewpointThetaPhi 90 -25 deg 18 /vis/viewer/flush 20 /vis/viewer/flush 19 /vis/drawVolume 21 /vis/drawVolume 20 22 21 #if you want to see trajectories and hits poin 23 #if you want to see trajectories and hits points 22 /vis/scene/add/trajectories 24 /vis/scene/add/trajectories 23 /vis/modeling/trajectories/create/drawByCharge 25 /vis/modeling/trajectories/create/drawByCharge 24 /vis/modeling/trajectories/drawByCharge-0/defa 26 /vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true 25 /vis/modeling/trajectories/drawByCharge-0/defa 27 /vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 0.2 26 28 27 # (if you prefer not refreshing each event, un 29 # (if you prefer not refreshing each event, uncomment next line) 28 /vis/scene/endOfEventAction accumulate 30 /vis/scene/endOfEventAction accumulate 29 31 30 #hard coded position and direction for gun 32 #hard coded position and direction for gun 31 /gun/position 0 0 -0.1 mm 33 /gun/position 0 0 -0.1 mm 32 /gun/direction 1 0.1 0.1 34 /gun/direction 1 0.1 0.1 33 35 34 #if you want make a run with particle 36 #if you want make a run with particle 35 #/tracking/verbose 1 37 #/tracking/verbose 1 36 /run/beamOn 10 38 /run/beamOn 10 37 # 39 # 38 40