Geant4 Cross Reference |
1 # Macro file for the visualization setting in 1 # Macro file for the visualization setting in the initialization phase 2 # of the B1 example when running in interactiv 2 # of the B1 example when running in interactive mode 3 # 3 # 4 4 5 # Open a viewer << 5 # Use these open statements to open selected visualization 6 /vis/open << 6 # 7 # This opens the default viewer - see examples << 7 # Use this open statement to create an OpenGL view: 8 # more comprehensive overview of options. Also << 8 #/vis/open OGL 800x600-0+0 #600x600-0+0 >> 9 # This is enough for a 2.5 keV electron >> 10 /vis/ogl/set/displayListLimit 10000000 >> 11 # >> 12 # Use this open statement to create an OpenInventor view: >> 13 #/vis/open OI >> 14 # >> 15 # Use this open statement to create a .prim file suitable for >> 16 # viewing in DAWN: >> 17 #/vis/open DAWNFILE >> 18 # >> 19 # Use this open statement to create a .heprep file suitable for >> 20 # viewing in HepRApp: >> 21 #/vis/open HepRepFile >> 22 # >> 23 # Use this open statement to create a .wrl file suitable for >> 24 # viewing in a VRML viewer: >> 25 #/vis/open VRML2FILE 9 # 26 # 10 # Disable auto refresh and quieten vis message 27 # Disable auto refresh and quieten vis messages whilst scene and 11 # trajectories are established: 28 # trajectories are established: 12 /vis/viewer/set/autoRefresh false 29 /vis/viewer/set/autoRefresh false 13 /vis/verbose errors 30 /vis/verbose errors 14 # 31 # 15 # Draw geometry: 32 # Draw geometry: 16 /vis/drawVolume 33 /vis/drawVolume 17 # 34 # 18 # Specify view angle: 35 # Specify view angle: 19 /vis/viewer/set/viewpointVector -1 0 0 36 /vis/viewer/set/viewpointVector -1 0 0 20 /vis/viewer/set/lightsVector -1 5 -30 37 /vis/viewer/set/lightsVector -1 5 -30 21 /vis/viewer/zoomTo 1.7 38 /vis/viewer/zoomTo 1.7 22 # 39 # 23 # Specify style (surface, wireframe, auxiliary 40 # Specify style (surface, wireframe, auxiliary edges,...) 24 /vis/viewer/set/style wireframe 41 /vis/viewer/set/style wireframe 25 /vis/viewer/set/auxiliaryEdge true 42 /vis/viewer/set/auxiliaryEdge true 26 /vis/viewer/set/lineSegmentsPerCircle 100 43 /vis/viewer/set/lineSegmentsPerCircle 100 27 # 44 # 28 # Draw smooth trajectories at end of event, sh 45 # Draw smooth trajectories at end of event, showing trajectory points 29 # as markers 2 pixels wide: 46 # as markers 2 pixels wide: 30 /vis/scene/add/trajectories rich #smooth 47 /vis/scene/add/trajectories rich #smooth 31 #/vis/modeling/trajectories/create/drawByCharg 48 #/vis/modeling/trajectories/create/drawByCharge 32 #/vis/modeling/trajectories/drawByCharge-0/def 49 #/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true 33 #/vis/modeling/trajectories/drawByCharge-0/def 50 #/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2 34 #/vis/modeling/trajectories/drawByCharge-0/def 51 #/vis/modeling/trajectories/drawByCharge-0/default/setTimeSliceInterval 1 s 35 # (if too many tracks cause core dump => /trac 52 # (if too many tracks cause core dump => /tracking/storeTrajectory 0) 36 53 37 /vis/modeling/trajectories/create/drawByPartic 54 /vis/modeling/trajectories/create/drawByParticleID 38 55 39 /vis/modeling/trajectories/drawByParticleID-0/ 56 /vis/modeling/trajectories/drawByParticleID-0/default/setDrawStepPts false 40 /vis/modeling/trajectories/drawByParticleID-0/ 57 /vis/modeling/trajectories/drawByParticleID-0/default/setStepPtsSize 1 41 58 42 /vis/modeling/trajectories/drawByParticleID-0/ 59 /vis/modeling/trajectories/drawByParticleID-0/set e- red 43 /vis/modeling/trajectories/drawByParticleID-0/ 60 /vis/modeling/trajectories/drawByParticleID-0/set proton green 44 /vis/modeling/trajectories/drawByParticleID-0/ 61 /vis/modeling/trajectories/drawByParticleID-0/set alpha green 45 /vis/modeling/trajectories/drawByParticleID-0/ 62 /vis/modeling/trajectories/drawByParticleID-0/set H green 46 63 47 /vis/modeling/trajectories/drawByParticleID-0/ 64 /vis/modeling/trajectories/drawByParticleID-0/set OH magenta 48 /vis/modeling/trajectories/drawByParticleID-0/ 65 /vis/modeling/trajectories/drawByParticleID-0/set H3O yellow 49 /vis/modeling/trajectories/drawByParticleID-0/ 66 /vis/modeling/trajectories/drawByParticleID-0/set e_aq blue 50 /vis/modeling/trajectories/drawByParticleID-0/ 67 /vis/modeling/trajectories/drawByParticleID-0/set H2O2 green 51 /vis/modeling/trajectories/drawByParticleID-0/ 68 /vis/modeling/trajectories/drawByParticleID-0/set H white 52 /vis/modeling/trajectories/drawByParticleID-0/ 69 /vis/modeling/trajectories/drawByParticleID-0/set H_2 white 53 70 54 /vis/modeling/trajectories/drawByParticleID-0/ 71 /vis/modeling/trajectories/drawByParticleID-0/default/setTimeSliceInterval 0.1 ns 55 72 56 #/vis/modeling/trajectories/select drawByCharg 73 #/vis/modeling/trajectories/select drawByCharge-0 57 74 58 # Use to draw just selected types of radicals 75 # Use to draw just selected types of radicals 59 #/vis/filtering/trajectories/create/particleFi 76 #/vis/filtering/trajectories/create/particleFilter 60 #/vis/filtering/trajectories/particleFilter-0/ 77 #/vis/filtering/trajectories/particleFilter-0/add e- 61 #/vis/filtering/trajectories/particleFilter-0/ 78 #/vis/filtering/trajectories/particleFilter-0/add e_aq 62 79 63 # (if too many tracks cause core dump => /trac 80 # (if too many tracks cause core dump => /tracking/storeTrajectory 0) 64 # 81 # 65 # Draw hits at end of event: 82 # Draw hits at end of event: 66 #/vis/scene/add/hits 83 #/vis/scene/add/hits 67 # 84 # 68 # To draw only gammas: 85 # To draw only gammas: 69 #/vis/filtering/trajectories/create/particleFi 86 #/vis/filtering/trajectories/create/particleFilter 70 #/vis/filtering/trajectories/particleFilter-0/ 87 #/vis/filtering/trajectories/particleFilter-0/add gamma 71 # 88 # 72 # To invert the above, drawing all particles e 89 # To invert the above, drawing all particles except gammas, 73 # keep the above two lines but also add: 90 # keep the above two lines but also add: 74 #/vis/filtering/trajectories/particleFilter-0/ 91 #/vis/filtering/trajectories/particleFilter-0/invert true 75 # 92 # 76 # Many other options are available with /vis/m 93 # Many other options are available with /vis/modeling and /vis/filtering. 77 # For example, to select colour by particle ID 94 # For example, to select colour by particle ID: 78 #/vis/modeling/trajectories/create/drawByParti 95 #/vis/modeling/trajectories/create/drawByParticleID 79 #/vis/modeling/trajectories/drawByParticleID-0 96 #/vis/modeling/trajectories/drawByParticleID-0/default/setDrawStepPts true 80 # To select or override default colours (note: 97 # To select or override default colours (note: e+ is blue by default): 81 #/vis/modeling/trajectories/list 98 #/vis/modeling/trajectories/list 82 #/vis/modeling/trajectories/drawByParticleID-0 99 #/vis/modeling/trajectories/drawByParticleID-0/set e+ yellow 83 # 100 # 84 # To superimpose all of the events from a give 101 # To superimpose all of the events from a given run: 85 /vis/scene/endOfEventAction accumulate 102 /vis/scene/endOfEventAction accumulate 86 # 103 # 87 # Decorations 104 # Decorations 88 # Name 105 # Name 89 /vis/set/textColour green 106 /vis/set/textColour green 90 /vis/set/textLayout right 107 /vis/set/textLayout right 91 # or, if your system does not support right-ad 108 # or, if your system does not support right-adjustment 92 #/vis/scene/add/text2D 0.9 -0.9 12 ! ! chem3 109 #/vis/scene/add/text2D 0.9 -0.9 12 ! ! chem3 93 /vis/set/textLayout # Revert to normal (lef 110 /vis/set/textLayout # Revert to normal (left adjusted) layout 94 /vis/set/textColour # Revert to default tex 111 /vis/set/textColour # Revert to default text colour (blue) 95 # 112 # 96 # Axes, scale, etc. 113 # Axes, scale, etc. 97 #/vis/scene/add/scale # Simple scale line 114 #/vis/scene/add/scale # Simple scale line 98 #/vis/scene/add/eventID # Drawn at end of even 115 #/vis/scene/add/eventID # Drawn at end of event 99 #/vis/scene/add/date # Date stamp 116 #/vis/scene/add/date # Date stamp 100 #/vis/scene/add/logo2D # Simple logo 117 #/vis/scene/add/logo2D # Simple logo 101 #/vis/scene/add/logo # 3D logo 118 #/vis/scene/add/logo # 3D logo 102 #/vis/scene/add/axes -1 -1 -1 1 micrometer 119 #/vis/scene/add/axes -1 -1 -1 1 micrometer 103 #/vis/scene/add/axes 0 0 0 1 nm # Simple axe 120 #/vis/scene/add/axes 0 0 0 1 nm # Simple axes: x=red, y=green, z=blue. # MODIF ------------------------ 104 # 121 # 105 # Frame 122 # Frame 106 #/vis/set/colour red 123 #/vis/set/colour red 107 #/vis/set/lineWidth 2 124 #/vis/set/lineWidth 2 108 #/vis/scene/add/frame # Simple frame arond t 125 #/vis/scene/add/frame # Simple frame arond the view 109 /vis/set/colour # Revert to default col 126 /vis/set/colour # Revert to default colour (white) 110 /vis/set/lineWidth # Revert to default lin 127 /vis/set/lineWidth # Revert to default line width (1.) 111 # 128 # 112 # Attach text to one edge of Shape1, with a sm 129 # Attach text to one edge of Shape1, with a small, fixed offset 113 #/vis/scene/add/text 0 6 -4 cm 18 4 4 Shape1 130 #/vis/scene/add/text 0 6 -4 cm 18 4 4 Shape1 114 # Attach text to one corner of Shape2, with a 131 # Attach text to one corner of Shape2, with a small, fixed offset 115 #/vis/scene/add/text 6 7 10 cm 18 4 4 Shape2 132 #/vis/scene/add/text 6 7 10 cm 18 4 4 Shape2 116 # 133 # 117 # To get nice view 134 # To get nice view 118 #/vis/geometry/set/visibility World 0 true #ch 135 #/vis/geometry/set/visibility World 0 true #changement 119 #/vis/geometry/set/visibility Envelope 0 false 136 #/vis/geometry/set/visibility Envelope 0 false #changement 120 #/vis/viewer/set/style wireframe #surface 137 #/vis/viewer/set/style wireframe #surface 121 #/vis/viewer/set/hiddenMarker true 138 #/vis/viewer/set/hiddenMarker true 122 #/vis/viewer/set/viewpointThetaPhi 95 170 139 #/vis/viewer/set/viewpointThetaPhi 95 170 123 /vis/viewer/set/viewpointThetaPhi -70 0 140 /vis/viewer/set/viewpointThetaPhi -70 0 >> 141 >> 142 /tracking/storeTrajectory 3 124 143 125 # 144 # 126 # Re-establish auto refreshing and verbosity: 145 # Re-establish auto refreshing and verbosity: 127 /vis/viewer/set/autoRefresh true 146 /vis/viewer/set/autoRefresh true 128 /vis/verbose warnings 147 /vis/verbose warnings 129 # 148 # 130 # For file-based drivers, use this to create a 149 # For file-based drivers, use this to create an empty detector view: 131 #/vis/viewer/flush 150 #/vis/viewer/flush 132 151 133 /vis/set/textLayout centre 152 /vis/set/textLayout centre 134 /vis/scene/add/scale 153 /vis/scene/add/scale 135 /vis/viewer/set/targetPoint 20 10 0 nm 154 /vis/viewer/set/targetPoint 20 10 0 nm 136 /vis/viewer/set/background white 155 /vis/viewer/set/background white 137 156