Geant4 Cross Reference |
1 ####################################################################### 2 # MACRO FILE NAME: exN03Vis13.mac # 3 # # 4 # AUTHOR(S): John Allison # 5 # # 6 # DATE: 18th August 2006 # 7 # # 8 # CONTENTS: Time development of an electromagnetic shower. # 9 # # 10 # USAGE: # 11 # cp -pr <install-dir>/geant4/examples/basic/B4/macros/visTutor . # 12 # <place-of-binary>/exampleB4a -m visTutor/exN03Vis13.mac # 13 # # 14 # REQUIRED PLATFORMS & SOFTWARES: Mac/Unix with X-Windows, OpenGL # 15 # # 16 ####################################################################### 17 18 /control/verbose 2 19 /vis/verbose confirmations 20 /run/initialize 21 22 /vis/open OGL 600x600-0+0 23 /vis/drawVolume 24 25 # Disable auto refresh and quieten vis messages whilst scene and 26 # trajectories are established: 27 /vis/viewer/set/autoRefresh false 28 /vis/verbose errors 29 30 /vis/viewer/set/viewpointThetaPhi 90. 180. 31 /vis/scene/add/eventID 32 /vis/scene/add/trajectories rich 33 34 # Set up drawByParticleID with time slicing 35 /vis/modeling/trajectories/create/drawByParticleID EmShowerByParticleID 36 /vis/modeling/trajectories/EmShowerByParticleID/set e- red 37 /vis/modeling/trajectories/EmShowerByParticleID/set e+ blue 38 /vis/modeling/trajectories/EmShowerByParticleID/set pi- cyan 39 /vis/modeling/trajectories/EmShowerByParticleID/set pi+ magenta 40 #/vis/modeling/trajectories/EmShowerByParticleID/default/setDrawStepPts true 41 /vis/modeling/trajectories/EmShowerByParticleID/default/setStepPtsSize 5 42 #/vis/modeling/trajectories/EmShowerByParticleID/default/setDrawAuxPts true 43 /vis/modeling/trajectories/EmShowerByParticleID/default/setAuxPtsSize 5 44 /control/alias interval 0.01 45 /control/alias halfInterval 0.005 46 /vis/modeling/trajectories/EmShowerByParticleID/default/setTimeSliceInterval {interval} ns 47 /vis/modeling/trajectories/list 48 49 # Remove gammas 50 /vis/filtering/trajectories/create/particleFilter EmShowerFilter 51 /vis/filtering/trajectories/EmShowerFilter/add gamma 52 /vis/filtering/trajectories/EmShowerFilter/invert true 53 54 # Re-establish auto refreshing and verbosity: 55 /vis/viewer/set/autoRefresh true 56 /vis/verbose warnings 57 58 # Create trajectories 59 /gun/energy 10 GeV 60 /vis/viewer/set/globalLineWidthScale 2 61 /run/beamOn 62 63 # Run time sequence 64 /vis/viewer/set/timeWindow/fadeFactor 1 65 /vis/viewer/set/timeWindow/displayHeadTime true 66 # The trajectories can appear of jump ahead of the light front because 67 # their time range overlaps the viewer's time range. To mitigate this 68 # effect of discrete time intervals, advance the light front by half the 69 # trajectories interval... 70 /vis/viewer/set/timeWindow/displayLightFront true 0 0 -90 mm -{halfInterval} ns 71 /vis/viewer/panTo -9 0 cm 72 /vis/viewer/zoomTo 2 73 /control/alias timeRange 0.1 74 /control/alias dz 0.3 75 # Switch off auto-refresh to avoid refresh on /vis/viewer/pan in loop. 76 # (Then force refresh in loop.) 77 /vis/viewer/set/autoRefresh 0 78 /vis/verbose errors 79 /control/verbose 0 80 /control/loop visTutor/exN03Vis13.loop endTime 0 0.7 0.001 81 /control/verbose 2 82 /vis/verbose confirmations