geant4 visualization commandsgeant4.slac.stanford.edu/presentations/vis/g4viscommands.pdf · geant4...

54
11 January 2011 Geant4 Visualization Commands J. Perl 1 DAWN OpenGL Geant4 Visualization Commands Basic Visualization Commands Joseph Perl, SLAC HepRep/HepRApp Geant4 v9.4

Upload: doanthuy

Post on 13-Feb-2018

217 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Geant4 Visualization Commandsgeant4.slac.stanford.edu/Presentations/vis/G4VisCommands.pdf · Geant4 Visualization Tutorial using the DAWN Event Display ... Simplest Command Sequence

11 January 2011 Geant4 Visualization Commands J. Perl 1

DAWN

OpenGL

Geant4 Visualization Commands

BasicVisualizationCommands

Joseph Perl, SLACHepRep/HepRApp

Geant4 v9.4

Page 2: Geant4 Visualization Commandsgeant4.slac.stanford.edu/Presentations/vis/G4VisCommands.pdf · Geant4 Visualization Tutorial using the DAWN Event Display ... Simplest Command Sequence

11 January 2011 2Geant4 Visualization Commands J. Perl

How this Document Fits withHow this Document Fits withOther Tutorial MaterialsOther Tutorial Materials

This presentation can be used on its own, but gives the mostThis presentation can be used on its own, but gives the mostcomprehensive introduction to Geant4 visualization when used as part ofcomprehensive introduction to Geant4 visualization when used as part ofthe following full set of documents:the following full set of documents: Introduction to Geant4 VisualizationIntroduction to Geant4 Visualization Geant4 Installation GuidesGeant4 Installation Guides Geant4 Visualization Tutorial using the HepRApp HepRep BrowserGeant4 Visualization Tutorial using the HepRApp HepRep Browser Geant4 Visualization Tutorial using the DAWN Event DisplayGeant4 Visualization Tutorial using the DAWN Event Display Geant4 Visualization Tutorial using the OpenGL Event DisplayGeant4 Visualization Tutorial using the OpenGL Event Display Geant4 Visualization CommandsGeant4 Visualization Commands Geant4 Advanced VisualizationGeant4 Advanced Visualization See the URLS at the end of this presentationSee the URLS at the end of this presentation

Page 3: Geant4 Visualization Commandsgeant4.slac.stanford.edu/Presentations/vis/G4VisCommands.pdf · Geant4 Visualization Tutorial using the DAWN Event Display ... Simplest Command Sequence

11 January 2011 3Geant4 Visualization Commands J. Perl

WhatWhat’’s in this Presentations in this Presentation

This presentation covers the most basic commands for This presentation covers the most basic commands for Geant Geant VisualizationVisualization(plus a few interesting small digressions)(plus a few interesting small digressions)

Further presentations cover more advanced topicsFurther presentations cover more advanced topics(see references at the end of this presentation)(see references at the end of this presentation)

Geant4 Advanced Visualization:Geant4 Advanced Visualization: Visualization AttributesVisualization Attributes

to control color, line style, etc.to control color, line style, etc. toto represent particle type, charge, etc.represent particle type, charge, etc.

Trajectory ModelingTrajectory Modeling Advanced Trajectory ModelingAdvanced Trajectory Modeling Trajectory and Hit FilteringTrajectory and Hit Filtering Controlling level of detail in geometryControlling level of detail in geometry Section planesSection planes Reviewing kept eventsReviewing kept events Standalone visualizationStandalone visualization

How to Make a MovieHow to Make a Movie

Page 4: Geant4 Visualization Commandsgeant4.slac.stanford.edu/Presentations/vis/G4VisCommands.pdf · Geant4 Visualization Tutorial using the DAWN Event Display ... Simplest Command Sequence

11 January 2011 4Geant4 Visualization Commands J. Perl

Simplest ExampleSimplest Example

Visualize your geometry in OpenGL:Visualize your geometry in OpenGL: /vis/open OGL/vis/open OGL /vis/drawVolume/vis/drawVolume

Page 5: Geant4 Visualization Commandsgeant4.slac.stanford.edu/Presentations/vis/G4VisCommands.pdf · Geant4 Visualization Tutorial using the DAWN Event Display ... Simplest Command Sequence

11 January 2011 5Geant4 Visualization Commands J. Perl

# Use this open statement to create an OpenGL view# Use this open statement to create an OpenGL view::/vis/open /vis/open OGLOGL 600x600-0+0 600x600-0+0### Use this open statement to create a .prim file suitable for viewing in DAWN:# Use this open statement to create a .prim file suitable for viewing in DAWN:#/vis/open DAWNFILE#/vis/open DAWNFILE### Use this open statement to create a .heprep file suitable for viewing in HepRApp:# Use this open statement to create a .heprep file suitable for viewing in HepRApp:#/vis/open HepRepFile#/vis/open HepRepFile### Use this open statement to create a .# Use this open statement to create a .wrl wrl file suitable for viewing in a VRML viewer:file suitable for viewing in a VRML viewer:#/vis/open VRML2FILE#/vis/open VRML2FILE### Disable auto refresh and # Disable auto refresh and quieten quieten vis messages whilst scene and trajectories are established:vis messages whilst scene and trajectories are established:/vis/viewer/set/autoRefresh /vis/viewer/set/autoRefresh falsefalse/vis/verbose errors/vis/verbose errors### Draw geometry:# Draw geometry:/vis/drawVolume/vis/drawVolume

Most examples will come with a visualization macro as follows (1 of 3)Most examples will come with a visualization macro as follows (1 of 3)

Page 6: Geant4 Visualization Commandsgeant4.slac.stanford.edu/Presentations/vis/G4VisCommands.pdf · Geant4 Visualization Tutorial using the DAWN Event Display ... Simplest Command Sequence

11 January 2011 6Geant4 Visualization Commands J. Perl

# Specify view angle:# Specify view angle:##/vis/viewer/set/viewpointThetaPhi /vis/viewer/set/viewpointThetaPhi 90. 0.90. 0.### Specify zoom value:# Specify zoom value:#/vis/viewer/zoom 2.#/vis/viewer/zoom 2.### Specify style (surface or wireframe):# Specify style (surface or wireframe):#/vis/viewer/set/style wireframe#/vis/viewer/set/style wireframe### Draw coordinate axes:# Draw coordinate axes:#/vis/scene/add/axes 0 0 0 1 m#/vis/scene/add/axes 0 0 0 1 m### Draw smooth trajectories at end of event, showing trajectory points as markers 2 pixels wide:# Draw smooth trajectories at end of event, showing trajectory points as markers 2 pixels wide:/vis/scene/add/trajectories smooth/vis/scene/add/trajectories smooth/vis/modeling/trajectories/create/drawByCharge/vis/modeling/trajectories/create/drawByCharge/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2# (if too many tracks cause core dump => # (if too many tracks cause core dump => /tracking/storeTrajectory /tracking/storeTrajectory 0)0)### Draw hits at end of event:# Draw hits at end of event:#/vis/scene/add/hits#/vis/scene/add/hits

Most examples will come with a visualization macro as follows (2 of 3)Most examples will come with a visualization macro as follows (2 of 3)

Page 7: Geant4 Visualization Commandsgeant4.slac.stanford.edu/Presentations/vis/G4VisCommands.pdf · Geant4 Visualization Tutorial using the DAWN Event Display ... Simplest Command Sequence

11 January 2011 7Geant4 Visualization Commands J. Perl

# # To draw only gammas:# # To draw only gammas:##/vis/filtering/trajectories/create/particleFilter/vis/filtering/trajectories/create/particleFilter#/vis/filtering/trajectories/particleFilter-0/add gamma#/vis/filtering/trajectories/particleFilter-0/add gamma### To invert the above, drawing all particles except gammas, keep the above two lines but also add:# To invert the above, drawing all particles except gammas, keep the above two lines but also add:#/vis/filtering/trajectories/particleFilter-0/invert true#/vis/filtering/trajectories/particleFilter-0/invert true### Many other options are available with /vis/modeling and /vis/filtering.# Many other options are available with /vis/modeling and /vis/filtering.# For example, to select colour by particle ID:# For example, to select colour by particle ID:#/vis/modeling/trajectories/create/drawByParticleID#/vis/modeling/trajectories/create/drawByParticleID#/vis/modeling/trajectories/drawByParticleID-0/set e- blue#/vis/modeling/trajectories/drawByParticleID-0/set e- blue### To superimpose all of the events from a given run:# To superimpose all of the events from a given run:##/vis/scene/endOfEventAction /vis/scene/endOfEventAction accumulateaccumulate### Re-establish auto refreshing and verbosity:# Re-establish auto refreshing and verbosity:/vis/viewer/set/autoRefresh /vis/viewer/set/autoRefresh truetrue/vis/verbose warnings/vis/verbose warnings### For file-based drivers, use this to create an empty detector view:# For file-based drivers, use this to create an empty detector view:#/vis/viewer/flush#/vis/viewer/flush

Most examples will come with a visualization macro as follows (3 of 3)Most examples will come with a visualization macro as follows (3 of 3)

Page 8: Geant4 Visualization Commandsgeant4.slac.stanford.edu/Presentations/vis/G4VisCommands.pdf · Geant4 Visualization Tutorial using the DAWN Event Display ... Simplest Command Sequence

11 January 2011 8Geant4 Visualization Commands J. Perl

/vis/open /vis/open OGLOGL 600x600-0+ 600x600-0+00#/vis/open DAWNFILE#/vis/open DAWNFILE#/vis/open HepRepFile#/vis/open HepRepFile#/vis/open VRML2FILE#/vis/open VRML2FILE/vis/viewer/set/autoRefresh /vis/viewer/set/autoRefresh falsefalse/vis/verbose errors/vis/verbose errors/vis/drawVolume/vis/drawVolume##/vis/viewer/set/viewpointThetaPhi /vis/viewer/set/viewpointThetaPhi 90. 0.90. 0.#/vis/viewer/zoom 2.#/vis/viewer/zoom 2.#/vis/viewer/set/style wireframe#/vis/viewer/set/style wireframe#/vis/scene/add/axes 0 0 0 1 m#/vis/scene/add/axes 0 0 0 1 m/vis/scene/add/trajectories smooth/vis/scene/add/trajectories smooth/vis/modeling/trajectories/create/drawByCharge/vis/modeling/trajectories/create/drawByCharge/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2#/vis/scene/add/hits#/vis/scene/add/hits##/vis/filtering/trajectories/create/particleFilter/vis/filtering/trajectories/create/particleFilter#/vis/filtering/trajectories/particleFilter-0/add gamma#/vis/filtering/trajectories/particleFilter-0/add gamma#/vis/filtering/trajectories/particleFilter-0/invert true#/vis/filtering/trajectories/particleFilter-0/invert true#/vis/modeling/trajectories/create/drawByParticleID#/vis/modeling/trajectories/create/drawByParticleID#/vis/modeling/trajectories/drawByParticleID-0/set e- blue#/vis/modeling/trajectories/drawByParticleID-0/set e- blue##/vis/scene/endOfEventAction /vis/scene/endOfEventAction accumulateaccumulate/vis/viewer/set/autoRefresh /vis/viewer/set/autoRefresh truetrue/vis/verbose warnings/vis/verbose warnings#/vis/viewer/flush#/vis/viewer/flush

HereHere’’s that long macro with thes that long macro with thecomments removed.comments removed.

II’’ll cover all of this commands inll cover all of this commands inthis presentation.this presentation.

Page 9: Geant4 Visualization Commandsgeant4.slac.stanford.edu/Presentations/vis/G4VisCommands.pdf · Geant4 Visualization Tutorial using the DAWN Event Display ... Simplest Command Sequence

11 January 2011 9Geant4 Visualization Commands J. Perl

/vis/open /vis/open OGLOGL 600x600-0+ 600x600-0+00#/vis/open DAWNFI#/vis/open DAWNFILELE#/vis/open HepRepFile#/vis/open HepRepFile#/vis/open VRML2FILE#/vis/open VRML2FILE/vis/viewer/set/autoRefresh /vis/viewer/set/autoRefresh falsefalse/vis/verbose errors/vis/verbose errors/vis/drawVolume/vis/drawVolume##/vis/viewer/set/viewpointThetaPhi /vis/viewer/set/viewpointThetaPhi 90. 0.90. 0.#/vis/viewer/zoom 2.#/vis/viewer/zoom 2.#/vis/viewer/set/style wireframe#/vis/viewer/set/style wireframe#/vis/scene/add/axes 0 0 0 1 m#/vis/scene/add/axes 0 0 0 1 m/vis/scene/add/trajectories smooth/vis/scene/add/trajectories smooth/vis/modeling/trajectories/create/drawByCharge/vis/modeling/trajectories/create/drawByCharge/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2#/vis/scene/add/hits#/vis/scene/add/hits##/vis/filtering/trajectories/create/particleFilter/vis/filtering/trajectories/create/particleFilter#/vis/filtering/trajectories/particleFilter-0/add gamma#/vis/filtering/trajectories/particleFilter-0/add gamma#/vis/filtering/trajectories/particleFilter-0/invert true#/vis/filtering/trajectories/particleFilter-0/invert true#/vis/modeling/trajectories/create/drawByParticleID#/vis/modeling/trajectories/create/drawByParticleID#/vis/modeling/trajectories/drawByParticleID-0/set e- blue#/vis/modeling/trajectories/drawByParticleID-0/set e- blue##/vis/scene/endOfEventAction /vis/scene/endOfEventAction accumulateaccumulate/vis/viewer/set/autoRefresh /vis/viewer/set/autoRefresh truetrue/vis/verbose warnings/vis/verbose warnings#/vis/viewer/flush#/vis/viewer/flush

Simplest Command SequenceSimplest Command Sequence

Page 10: Geant4 Visualization Commandsgeant4.slac.stanford.edu/Presentations/vis/G4VisCommands.pdf · Geant4 Visualization Tutorial using the DAWN Event Display ... Simplest Command Sequence

11 January 2011 10Geant4 Visualization Commands J. Perl

To Open VisualizationTo Open Visualization

To Open a DriverTo Open a Driver /vis/open <driver name>/vis/open <driver name>

for examplefor example /vis/open OGL/vis/open OGL /vis/open DAWNFILE/vis/open DAWNFILE /vis/open HepRepFile/vis/open HepRepFile /vis/open VRML2FILE/vis/open VRML2FILE

The set of available drivers is listed when you first start Geant4,The set of available drivers is listed when you first start Geant4,but you can also get this list with the command:but you can also get this list with the command: help /vis/openhelp /vis/open

For the OpenGL drivers, there are options with very slightly different behavior:For the OpenGL drivers, there are options with very slightly different behavior: OGLS: use OpenGLOGLS: use OpenGL’’s s ““StoredStored”” mode. mode. OGLI: use OpenGLOGLI: use OpenGL’’s s ““ImmediateImmediate”” mode. mode. OGL: same as OGLS unless starts using too much memory, then switches to OGLIOGL: same as OGLS unless starts using too much memory, then switches to OGLI Most users will not notice any difference. It has to do with whether Geant4 needs to resendMost users will not notice any difference. It has to do with whether Geant4 needs to resend

all of the graphics information to the OpenGL driver for every new picture (Immediateall of the graphics information to the OpenGL driver for every new picture (Immediatemode) or can just send the new parts of the picture, getting the rest from storage already inmode) or can just send the new parts of the picture, getting the rest from storage already inthe OpenGL driver (Stored mode).the OpenGL driver (Stored mode).

And if you have Qt or Motif libraries installed and configured, OGL will use these.And if you have Qt or Motif libraries installed and configured, OGL will use these. DonDon’’t worry about this for now, but if you have problems with one mode, try the other.t worry about this for now, but if you have problems with one mode, try the other.

Page 11: Geant4 Visualization Commandsgeant4.slac.stanford.edu/Presentations/vis/G4VisCommands.pdf · Geant4 Visualization Tutorial using the DAWN Event Display ... Simplest Command Sequence

11 January 2011 11Geant4 Visualization Commands J. Perl

More about Open, and about DrawVolumeMore about Open, and about DrawVolume Some drivers have additional options at openSome drivers have additional options at open

e.g., for OpenGL, can specify size and location of windowe.g., for OpenGL, can specify size and location of window/vis/open OGL 600x600-0+0/vis/open OGL 600x600-0+0

You can open more than one viewer at a time:You can open more than one viewer at a time: /vis/open OGL/vis/open OGL /vis/open HepRepFile/vis/open HepRepFile To see what viewers you then have:To see what viewers you then have:

/vis/viewer/list/vis/viewer/list To select which viewer is the current one:To select which viewer is the current one:

/vis/viewer/select viewer-0/vis/viewer/select viewer-0 /vis/viewer/select viewer-1/vis/viewer/select viewer-1

All other vis commands affect only the currently selected viewerAll other vis commands affect only the currently selected viewer

To draw the entire detector geometry:To draw the entire detector geometry: /vis/drawVolume/vis/drawVolume

There are many additional options to let you draw only a selected subset of theThere are many additional options to let you draw only a selected subset of thedetector geometry.detector geometry. See separate presentation, Geant4 Advanced VisualizationSee separate presentation, Geant4 Advanced Visualization

Page 12: Geant4 Visualization Commandsgeant4.slac.stanford.edu/Presentations/vis/G4VisCommands.pdf · Geant4 Visualization Tutorial using the DAWN Event Display ... Simplest Command Sequence

11 January 2011 12Geant4 Visualization Commands J. Perl

/vis/open /vis/open OGLOGL 600x600-0+ 600x600-0+00#/vis/open DAWNFILE#/vis/open DAWNFILE#/vis/open HepRepFile#/vis/open HepRepFile#/vis/open VRML2FILE#/vis/open VRML2FILE/vis/viewer/set/autoRefresh /vis/viewer/set/autoRefresh falsefalse/vis/verbose errors/vis/verbose errors/vis/drawVolume/vis/drawVolume##/vis/viewer/set/viewpointThetaPhi /vis/viewer/set/viewpointThetaPhi 90. 0.90. 0.#/vis/viewer/zoom 2.#/vis/viewer/zoom 2.#/vis/viewer/set/style wireframe#/vis/viewer/set/style wireframe#/vis/scene/add/axes 0 0 0 1 m#/vis/scene/add/axes 0 0 0 1 m/vis/scene/add/trajectories smooth/vis/scene/add/trajectories smooth/vis/modeling/trajectories/create/drawByCharge/vis/modeling/trajectories/create/drawByCharge/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2#/vis/scene/add/hits#/vis/scene/add/hits##/vis/filtering/trajectories/create/particleFilter/vis/filtering/trajectories/create/particleFilter#/vis/filtering/trajectories/particleFilter-0/add gamma#/vis/filtering/trajectories/particleFilter-0/add gamma#/vis/filtering/trajectories/particleFilter-0/invert true#/vis/filtering/trajectories/particleFilter-0/invert true#/vis/modeling/trajectories/create/drawByParticleID#/vis/modeling/trajectories/create/drawByParticleID#/vis/modeling/trajectories/drawByParticleID-0/set e- blue#/vis/modeling/trajectories/drawByParticleID-0/set e- blue##/vis/scene/endOfEventAction /vis/scene/endOfEventAction accumulateaccumulate/vis/viewer/set/autoRefresh /vis/viewer/set/autoRefresh truetrue/vis/verbose warnings/vis/verbose warnings#/vis/viewer/flush#/vis/viewer/flush

What weWhat we’’ve covered so farve covered so far

Page 13: Geant4 Visualization Commandsgeant4.slac.stanford.edu/Presentations/vis/G4VisCommands.pdf · Geant4 Visualization Tutorial using the DAWN Event Display ... Simplest Command Sequence

11 January 2011 13Geant4 Visualization Commands J. Perl

/vis/open /vis/open OGLOGL 600x600-0+ 600x600-0+00#/vis/open DAWNFILE#/vis/open DAWNFILE#/vis/open HepRepFile#/vis/open HepRepFile#/vis/open VRML2FILE#/vis/open VRML2FILE/vis/viewer/set/autoRefresh /vis/viewer/set/autoRefresh falsefalse/vis/verbose errors/vis/verbose errors/vis/drawVolume/vis/drawVolume/vis/viewer/set/viewpointThetaPhi /vis/viewer/set/viewpointThetaPhi 90. 0.90. 0./vis/viewer/zoom 2./vis/viewer/zoom 2./vis/viewer/set/style wireframe/vis/viewer/set/style wireframe#/vis/scene/add/axes 0 0 0 1 m#/vis/scene/add/axes 0 0 0 1 m/vis/scene/add/trajectories smooth/vis/scene/add/trajectories smooth/vis/modeling/trajectories/create/drawByCharge/vis/modeling/trajectories/create/drawByCharge/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2#/vis/scene/add/hits#/vis/scene/add/hits##/vis/filtering/trajectories/create/particleFilter/vis/filtering/trajectories/create/particleFilter#/vis/filtering/trajectories/particleFilter-0/add gamma#/vis/filtering/trajectories/particleFilter-0/add gamma#/vis/filtering/trajectories/particleFilter-0/invert true#/vis/filtering/trajectories/particleFilter-0/invert true#/vis/modeling/trajectories/create/drawByParticleID#/vis/modeling/trajectories/create/drawByParticleID#/vis/modeling/trajectories/drawByParticleID-0/set e- blue#/vis/modeling/trajectories/drawByParticleID-0/set e- blue##/vis/scene/endOfEventAction /vis/scene/endOfEventAction accumulateaccumulate/vis/viewer/set/autoRefresh /vis/viewer/set/autoRefresh truetrue/vis/verbose warnings/vis/verbose warnings#/vis/viewer/flush#/vis/viewer/flush

Controlling the viewpoint and zoomControlling the viewpoint and zoom

Page 14: Geant4 Visualization Commandsgeant4.slac.stanford.edu/Presentations/vis/G4VisCommands.pdf · Geant4 Visualization Tutorial using the DAWN Event Display ... Simplest Command Sequence

11 January 2011 14Geant4 Visualization Commands J. Perl

The /vis/viewer/The /vis/viewer/…… Commands Commands Only needed if using an immediate viewer, such as OpenGL

For HepRepFile or DAWNFILE, these sorts of adjustments are made later,in the HepRApp or DAWN viewer programs

Set view angles /vis/viewer/set/viewpointThetaPhi <theta_angle> <phi_angle> for example

/vis/viewer/set/viewpointThetaPhi 90. 0.

Zoom /vis/viewer/zoom <scale factor> for example

/vis/viewer/zoom 2.

Reset viewpoint /vis/viewer/reset

Set drawing style /vis/viewer/set/style <style> for example

/vis/viewer/set/style wireframe /vis/viewer/set/style surface

but note that this will not affect volumes that have style explicitly forced by“setForceWireframe” or “setForceSolid” commands in the c++ code

Page 15: Geant4 Visualization Commandsgeant4.slac.stanford.edu/Presentations/vis/G4VisCommands.pdf · Geant4 Visualization Tutorial using the DAWN Event Display ... Simplest Command Sequence

11 January 2011 15Geant4 Visualization Commands J. Perl

/vis/open /vis/open OGLOGL 600x600-0+ 600x600-0+00#/vis/open DAWNFILE#/vis/open DAWNFILE#/vis/open HepRepFile#/vis/open HepRepFile#/vis/open VRML2FILE#/vis/open VRML2FILE/vis/viewer/set/autoRefresh /vis/viewer/set/autoRefresh falsefalse/vis/verbose errors/vis/verbose errors/vis/drawVolume/vis/drawVolume/vis/viewer/set/viewpointThetaPhi /vis/viewer/set/viewpointThetaPhi 90. 0.90. 0./vis/viewer/zoom 2./vis/viewer/zoom 2./vis/viewer/set/style wireframe/vis/viewer/set/style wireframe#/vis/scene/add/axes 0 0 0 1 m#/vis/scene/add/axes 0 0 0 1 m/vis/scene/add/trajectories smooth/vis/scene/add/trajectories smooth/vis/modeling/trajectories/create/drawByCharge/vis/modeling/trajectories/create/drawByCharge/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2#/vis/scene/add/hits#/vis/scene/add/hits##/vis/filtering/trajectories/create/particleFilter/vis/filtering/trajectories/create/particleFilter#/vis/filtering/trajectories/particleFilter-0/add gamma#/vis/filtering/trajectories/particleFilter-0/add gamma#/vis/filtering/trajectories/particleFilter-0/invert true#/vis/filtering/trajectories/particleFilter-0/invert true#/vis/modeling/trajectories/create/drawByParticleID#/vis/modeling/trajectories/create/drawByParticleID#/vis/modeling/trajectories/drawByParticleID-0/set e- blue#/vis/modeling/trajectories/drawByParticleID-0/set e- blue##/vis/scene/endOfEventAction /vis/scene/endOfEventAction accumulateaccumulate/vis/viewer/set/autoRefresh /vis/viewer/set/autoRefresh truetrue/vis/verbose warnings/vis/verbose warnings#/vis/viewer/flush#/vis/viewer/flush

What weWhat we’’ve covered so farve covered so far

Page 16: Geant4 Visualization Commandsgeant4.slac.stanford.edu/Presentations/vis/G4VisCommands.pdf · Geant4 Visualization Tutorial using the DAWN Event Display ... Simplest Command Sequence

11 January 2011 16Geant4 Visualization Commands J. Perl

/vis/open /vis/open OGLOGL 600x600-0+ 600x600-0+00#/vis/open DAWNFILE#/vis/open DAWNFILE#/vis/open HepRepFile#/vis/open HepRepFile#/vis/open VRML2FILE#/vis/open VRML2FILE/vis/viewer/set/autoRefresh /vis/viewer/set/autoRefresh falsefalse/vis/verbose errors/vis/verbose errors/vis/drawVolume/vis/drawVolume/vis/viewer/set/viewpointThetaPhi /vis/viewer/set/viewpointThetaPhi 90. 0.90. 0./vis/viewer/zoom 2./vis/viewer/zoom 2./vis/viewer/set/style wireframe/vis/viewer/set/style wireframe/vis/scene/add/axes 0 0 0 1 m/vis/scene/add/axes 0 0 0 1 m/vis/scene/add/trajectories /vis/scene/add/trajectories smoothsmooth/vis/modeling/trajectories/create/drawByCharge/vis/modeling/trajectories/create/drawByCharge/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2/vis/scene/add/hits/vis/scene/add/hits##/vis/filtering/trajectories/create/particleFilter/vis/filtering/trajectories/create/particleFilter#/vis/filtering/trajectories/particleFilter-0/add gamma#/vis/filtering/trajectories/particleFilter-0/add gamma#/vis/filtering/trajectories/particleFilter-0/invert true#/vis/filtering/trajectories/particleFilter-0/invert true#/vis/modeling/trajectories/create/drawByParticleID#/vis/modeling/trajectories/create/drawByParticleID#/vis/modeling/trajectories/drawByParticleID-0/set e- blue#/vis/modeling/trajectories/drawByParticleID-0/set e- blue##/vis/scene/endOfEventAction /vis/scene/endOfEventAction accumulateaccumulate/vis/viewer/set/autoRefresh /vis/viewer/set/autoRefresh truetrue/vis/verbose warnings/vis/verbose warnings#/vis/viewer/flush#/vis/viewer/flush

Add axes, trajectories and hitsAdd axes, trajectories and hits

Page 17: Geant4 Visualization Commandsgeant4.slac.stanford.edu/Presentations/vis/G4VisCommands.pdf · Geant4 Visualization Tutorial using the DAWN Event Display ... Simplest Command Sequence

11 January 2011 17Geant4 Visualization Commands J. Perl

Axes, Trajectories and HitsAxes, Trajectories and Hits AxesAxes

/vis/scene/add/axes </vis/scene/add/axes <x_originx_origin> <> <y_originy_origin> <> <z_originz_origin> <size> <units>> <size> <units> for examplefor example

/vis/scene/add/axes 0 0 0 1 m/vis/scene/add/axes 0 0 0 1 m

TrajectoriesTrajectories /vis/scene/add/trajectories/vis/scene/add/trajectories By default, trajectories are redrawn at every eventBy default, trajectories are redrawn at every event

/run/beamOn 1/run/beamOn 1

HitsHits /vis/scene/add/hits/vis/scene/add/hits

Note that not all examples contain code to create hits,Note that not all examples contain code to create hits,so in some cases this command will add nothing to the displayso in some cases this command will add nothing to the display

Page 18: Geant4 Visualization Commandsgeant4.slac.stanford.edu/Presentations/vis/G4VisCommands.pdf · Geant4 Visualization Tutorial using the DAWN Event Display ... Simplest Command Sequence

11 January 2011 18Geant4 Visualization Commands J. Perl

/vis/open /vis/open OGLOGL 600x600-0+ 600x600-0+00#/vis/open DAWNFILE#/vis/open DAWNFILE#/vis/open HepRepFile#/vis/open HepRepFile#/vis/open VRML2FILE#/vis/open VRML2FILE/vis/viewer/set/autoRefresh /vis/viewer/set/autoRefresh falsefalse/vis/verbose errors/vis/verbose errors/vis/drawVolume/vis/drawVolume/vis/viewer/set/viewpointThetaPhi /vis/viewer/set/viewpointThetaPhi 90. 0.90. 0./vis/viewer/zoom 2./vis/viewer/zoom 2./vis/viewer/set/style wireframe/vis/viewer/set/style wireframe/vis/scene/add/axes 0 0 0 1 m/vis/scene/add/axes 0 0 0 1 m/vis/scene/add/trajectories/vis/scene/add/trajectories smooth smooth/vis/modeling/trajectories/create/drawByCharge/vis/modeling/trajectories/create/drawByCharge/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2/vis/scene/add/hits/vis/scene/add/hits##/vis/filtering/trajectories/create/particleFilter/vis/filtering/trajectories/create/particleFilter#/vis/filtering/trajectories/particleFilter-0/add gamma#/vis/filtering/trajectories/particleFilter-0/add gamma#/vis/filtering/trajectories/particleFilter-0/invert true#/vis/filtering/trajectories/particleFilter-0/invert true#/vis/modeling/trajectories/create/drawByParticleID#/vis/modeling/trajectories/create/drawByParticleID#/vis/modeling/trajectories/drawByParticleID-0/set e- blue#/vis/modeling/trajectories/drawByParticleID-0/set e- blue##/vis/scene/endOfEventAction /vis/scene/endOfEventAction accumulateaccumulate/vis/viewer/set/autoRefresh /vis/viewer/set/autoRefresh truetrue/vis/verbose warnings/vis/verbose warnings#/vis/viewer/flush#/vis/viewer/flush

What weWhat we’’ve covered so farve covered so far

Page 19: Geant4 Visualization Commandsgeant4.slac.stanford.edu/Presentations/vis/G4VisCommands.pdf · Geant4 Visualization Tutorial using the DAWN Event Display ... Simplest Command Sequence

11 January 2011 19Geant4 Visualization Commands J. Perl

/vis/open /vis/open OGLOGL 600x600-0+ 600x600-0+00#/vis/open DAWNFILE#/vis/open DAWNFILE#/vis/open HepRepFile#/vis/open HepRepFile#/vis/open VRML2FILE#/vis/open VRML2FILE/vis/viewer/set/autoRefresh /vis/viewer/set/autoRefresh falsefalse/vis/verbose errors/vis/verbose errors/vis/drawVolume/vis/drawVolume/vis/viewer/set/viewpointThetaPhi /vis/viewer/set/viewpointThetaPhi 90. 0.90. 0./vis/viewer/zoom 2./vis/viewer/zoom 2./vis/viewer/set/style wireframe/vis/viewer/set/style wireframe/vis/scene/add/axes 0 0 0 1 m/vis/scene/add/axes 0 0 0 1 m/vis/scene/add/trajectories/vis/scene/add/trajectories smooth smooth/vis/modeling/trajectories/create/drawByCharge/vis/modeling/trajectories/create/drawByCharge/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2/vis/scene/add/hits/vis/scene/add/hits##/vis/filtering/trajectories/create/particleFilter/vis/filtering/trajectories/create/particleFilter#/vis/filtering/trajectories/particleFilter-0/add gamma#/vis/filtering/trajectories/particleFilter-0/add gamma#/vis/filtering/trajectories/particleFilter-0/invert true#/vis/filtering/trajectories/particleFilter-0/invert true/vis/modeling/trajectories/create/drawByParticleID/vis/modeling/trajectories/create/drawByParticleID/vis/modeling/trajectories/drawByParticleID-0/set e- blue/vis/modeling/trajectories/drawByParticleID-0/set e- blue/vis/scene/endOfEventAction /vis/scene/endOfEventAction accumulateaccumulate/vis/viewer/set/autoRefresh /vis/viewer/set/autoRefresh truetrue/vis/verbose warnings/vis/verbose warnings#/vis/viewer/flush#/vis/viewer/flush

Visualizing step pointsVisualizing step points

Page 20: Geant4 Visualization Commandsgeant4.slac.stanford.edu/Presentations/vis/G4VisCommands.pdf · Geant4 Visualization Tutorial using the DAWN Event Display ... Simplest Command Sequence

11 January 2011 20Geant4 Visualization Commands J. Perl

Visualizing Step PointsVisualizing Step Points By default, the trajectory is drawn just as a lineBy default, the trajectory is drawn just as a line

To also show the step points:To also show the step points: /vis/modeling/trajectories/create/drawByCharge/vis/modeling/trajectories/create/drawByCharge /vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true /vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2 This syntax is complicated because it actually supports many more options on howThis syntax is complicated because it actually supports many more options on how

trajectories and step points should be modeled.trajectories and step points should be modeled. See separate presentation, Geant4 Advanced VisualizationSee separate presentation, Geant4 Advanced Visualization

Trajectories and step points can contain additional,Trajectories and step points can contain additional,non-displayed informationnon-displayed information such as particle id, momentum, etc.such as particle id, momentum, etc. shown when you pick on the trajectory in some visualization drivers.shown when you pick on the trajectory in some visualization drivers.

This set of information can be made richer by specifying rich trajectories:This set of information can be made richer by specifying rich trajectories: /vis/scene/add/trajectories rich/vis/scene/add/trajectories rich

Page 21: Geant4 Visualization Commandsgeant4.slac.stanford.edu/Presentations/vis/G4VisCommands.pdf · Geant4 Visualization Tutorial using the DAWN Event Display ... Simplest Command Sequence

11 January 2011 21Geant4 Visualization Commands J. Perl

Rich Trajectory Has Details on Every Step PointRich Trajectory Has Details on Every Step Point

Page 22: Geant4 Visualization Commandsgeant4.slac.stanford.edu/Presentations/vis/G4VisCommands.pdf · Geant4 Visualization Tutorial using the DAWN Event Display ... Simplest Command Sequence

11 January 2011 22Geant4 Visualization Commands J. Perl

Rich Trajectory and PointsRich Trajectory and PointsG4RichTrajectory:G4RichTrajectory: Extra:Extra:

Creator Process NameCreator Process Name Creator Process Type NameCreator Process Type Name Charge (Ch): unit: e+Charge (Ch): unit: e+ Ending Process NameEnding Process Name Ending Process Type NameEnding Process Type Name Final kinetic energyFinal kinetic energy Final Next Volume PathFinal Next Volume Path Final Volume PathFinal Volume Path

Already in regular Trajectory:Already in regular Trajectory: Track IDTrack ID Initial kinetic energyInitial kinetic energy Initial momentum magnitudeInitial momentum magnitude Initial momentumInitial momentum Initial Next Volume PathInitial Next Volume Path Initial Volume PathInitial Volume Path No. of pointsNo. of points PDG EncodingPDG Encoding Parent IDParent ID Particle NameParticle Name

G4RichTrajectoryPoint:G4RichTrajectoryPoint: Extra:Extra:

Auxiliary Point PositionAuxiliary Point Position Process Defined StepProcess Defined Step Process Type DefinedProcess Type Defined PositionPosition Post-step-point global timePost-step-point global time Post-step Volume PathPost-step Volume Path Pre-step-point global timePre-step-point global time Pre-step Volume PathPre-step Volume Path Remaining EnergyRemaining Energy Total Energy DepositTotal Energy Deposit

Already in regular Already in regular TrajectoryPointTrajectoryPoint nothing is included by defaultnothing is included by default

Page 23: Geant4 Visualization Commandsgeant4.slac.stanford.edu/Presentations/vis/G4VisCommands.pdf · Geant4 Visualization Tutorial using the DAWN Event Display ... Simplest Command Sequence

11 January 2011 23Geant4 Visualization Commands J. Perl

/vis/open /vis/open OGLOGL 600x600-0+ 600x600-0+00#/vis/open DAWNFILE#/vis/open DAWNFILE#/vis/open HepRepFile#/vis/open HepRepFile#/vis/open VRML2FILE#/vis/open VRML2FILE/vis/viewer/set/autoRefresh /vis/viewer/set/autoRefresh falsefalse/vis/verbose errors/vis/verbose errors/vis/drawVolume/vis/drawVolume/vis/viewer/set/viewpointThetaPhi /vis/viewer/set/viewpointThetaPhi 90. 0.90. 0./vis/viewer/zoom 2./vis/viewer/zoom 2./vis/viewer/set/style wireframe/vis/viewer/set/style wireframe/vis/scene/add/axes 0 0 0 1 m/vis/scene/add/axes 0 0 0 1 m/vis/scene/add/trajectories/vis/scene/add/trajectories smooth smooth/vis/modeling/trajectories/create/drawByCharge/vis/modeling/trajectories/create/drawByCharge/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2/vis/scene/add/hits/vis/scene/add/hits##/vis/filtering/trajectories/create/particleFilter/vis/filtering/trajectories/create/particleFilter#/vis/filtering/trajectories/particleFilter-0/add gamma#/vis/filtering/trajectories/particleFilter-0/add gamma#/vis/filtering/trajectories/particleFilter-0/invert true#/vis/filtering/trajectories/particleFilter-0/invert true#/vis/modeling/trajectories/create/drawByParticleID#/vis/modeling/trajectories/create/drawByParticleID#/vis/modeling/trajectories/drawByParticleID-0/set e- blue#/vis/modeling/trajectories/drawByParticleID-0/set e- blue##/vis/scene/endOfEventAction /vis/scene/endOfEventAction accumulateaccumulate/vis/viewer/set/autoRefresh /vis/viewer/set/autoRefresh truetrue/vis/verbose warnings/vis/verbose warnings#/vis/viewer/flush#/vis/viewer/flush

What weWhat we’’ve covered so farve covered so far

Page 24: Geant4 Visualization Commandsgeant4.slac.stanford.edu/Presentations/vis/G4VisCommands.pdf · Geant4 Visualization Tutorial using the DAWN Event Display ... Simplest Command Sequence

11 January 2011 24Geant4 Visualization Commands J. Perl

/vis/open /vis/open OGLOGL 600x600-0+ 600x600-0+00#/vis/open DAWNFILE#/vis/open DAWNFILE#/vis/open HepRepFile#/vis/open HepRepFile#/vis/open VRML2FILE#/vis/open VRML2FILE/vis/viewer/set/autoRefresh /vis/viewer/set/autoRefresh falsefalse/vis/verbose errors/vis/verbose errors/vis/drawVolume/vis/drawVolume/vis/viewer/set/viewpointThetaPhi /vis/viewer/set/viewpointThetaPhi 90. 0.90. 0./vis/viewer/zoom 2./vis/viewer/zoom 2./vis/viewer/set/style wireframe/vis/viewer/set/style wireframe/vis/scene/add/axes 0 0 0 1 m/vis/scene/add/axes 0 0 0 1 m/vis/scene/add/trajectories/vis/scene/add/trajectories smoothsmooth/vis/modeling/trajectories/create/drawByCharge/vis/modeling/trajectories/create/drawByCharge/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2/vis/scene/add/hits/vis/scene/add/hits##/vis/filtering/trajectories/create/particleFilter/vis/filtering/trajectories/create/particleFilter#/vis/filtering/trajectories/particleFilter-0/add gamma#/vis/filtering/trajectories/particleFilter-0/add gamma#/vis/filtering/trajectories/particleFilter-0/invert true#/vis/filtering/trajectories/particleFilter-0/invert true/vis/modeling/trajectories/create/drawByParticleID/vis/modeling/trajectories/create/drawByParticleID/vis/modeling/trajectories/drawByParticleID-0/set e- blue/vis/modeling/trajectories/drawByParticleID-0/set e- blue/vis/scene/endOfEventAction /vis/scene/endOfEventAction accumulateaccumulate/vis/viewer/set/autoRefresh /vis/viewer/set/autoRefresh truetrue/vis/verbose warnings/vis/verbose warnings#/vis/viewer/flush#/vis/viewer/flush

Smooth TrajectoriesSmooth Trajectories

Page 25: Geant4 Visualization Commandsgeant4.slac.stanford.edu/Presentations/vis/G4VisCommands.pdf · Geant4 Visualization Tutorial using the DAWN Event Display ... Simplest Command Sequence

11 January 2011 25Geant4 Visualization Commands J. Perl

Regular versus Smooth TrajectoryRegular versus Smooth Trajectory

Yellow are the actual step points used by Geant4Magenta are auxiliary points added just for purposes of visualization

Page 26: Geant4 Visualization Commandsgeant4.slac.stanford.edu/Presentations/vis/G4VisCommands.pdf · Geant4 Visualization Tutorial using the DAWN Event Display ... Simplest Command Sequence

11 January 2011 26Geant4 Visualization Commands J. Perl

Smooth TrajectoriesSmooth Trajectories

By default, the trajectory is represented as a series of line segments fromBy default, the trajectory is represented as a series of line segments fromone step point to the next.one step point to the next. For the case of strong fields, this may result in jagged looking tracks.For the case of strong fields, this may result in jagged looking tracks.

Can ask visualization to smooth the lines with:Can ask visualization to smooth the lines with: /vis/scene/add/trajectories smooth/vis/scene/add/trajectories smooth The extra points are not actual Geant4 step points.The extra points are not actual Geant4 step points.

Smooth does not change how Geant4 actually does its stepping.Smooth does not change how Geant4 actually does its stepping.These extra These extra ““auxiliary pointsauxiliary points”” are only added to make a smoother line. are only added to make a smoother line.

Trajectories can be smooth, rich or both:Trajectories can be smooth, rich or both: /vis/scene/add/trajectories smooth rich/vis/scene/add/trajectories smooth rich

WeWe’’ll cover more details on this in a later presentationll cover more details on this in a later presentation

Page 27: Geant4 Visualization Commandsgeant4.slac.stanford.edu/Presentations/vis/G4VisCommands.pdf · Geant4 Visualization Tutorial using the DAWN Event Display ... Simplest Command Sequence

11 January 2011 27Geant4 Visualization Commands J. Perl

Smooth Trajectory Makes Big Difference forSmooth Trajectory Makes Big Difference forTrajectories that Loop in a Magnetic FieldTrajectories that Loop in a Magnetic Field

Yellow dots are the actual step points used by Geant4 Magenta dots are auxiliary points added just for purposes of visualization

Page 28: Geant4 Visualization Commandsgeant4.slac.stanford.edu/Presentations/vis/G4VisCommands.pdf · Geant4 Visualization Tutorial using the DAWN Event Display ... Simplest Command Sequence

11 January 2011 28Geant4 Visualization Commands J. Perl

/vis/open /vis/open OGLOGL 600x600-0+ 600x600-0+00#/vis/open DAWNFILE#/vis/open DAWNFILE#/vis/open HepRepFile#/vis/open HepRepFile#/vis/open VRML2FILE#/vis/open VRML2FILE/vis/viewer/set/autoRefresh /vis/viewer/set/autoRefresh falsefalse/vis/verbose errors/vis/verbose errors/vis/drawVolume/vis/drawVolume/vis/viewer/set/viewpointThetaPhi /vis/viewer/set/viewpointThetaPhi 90. 0.90. 0./vis/viewer/zoom 2./vis/viewer/zoom 2./vis/viewer/set/style wireframe/vis/viewer/set/style wireframe/vis/scene/add/axes 0 0 0 1 m/vis/scene/add/axes 0 0 0 1 m/vis/scene/add/trajectories smooth/vis/scene/add/trajectories smooth/vis/modeling/trajectories/create/drawByCharge/vis/modeling/trajectories/create/drawByCharge/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2/vis/scene/add/hits/vis/scene/add/hits##/vis/filtering/trajectories/create/particleFilter/vis/filtering/trajectories/create/particleFilter#/vis/filtering/trajectories/particleFilter-0/add gamma#/vis/filtering/trajectories/particleFilter-0/add gamma#/vis/filtering/trajectories/particleFilter-0/invert true#/vis/filtering/trajectories/particleFilter-0/invert true/vis/modeling/trajectories/create/drawByParticleID/vis/modeling/trajectories/create/drawByParticleID/vis/modeling/trajectories/drawByParticleID-0/set e- blue/vis/modeling/trajectories/drawByParticleID-0/set e- blue/vis/scene/endOfEventAction /vis/scene/endOfEventAction accumulateaccumulate/vis/viewer/set/autoRefresh /vis/viewer/set/autoRefresh truetrue/vis/verbose warnings/vis/verbose warnings#/vis/viewer/flush#/vis/viewer/flush

What weWhat we’’ve covered so farve covered so far

Page 29: Geant4 Visualization Commandsgeant4.slac.stanford.edu/Presentations/vis/G4VisCommands.pdf · Geant4 Visualization Tutorial using the DAWN Event Display ... Simplest Command Sequence

11 January 2011 29Geant4 Visualization Commands J. Perl

/vis/open /vis/open OGLOGL 600x600-0+ 600x600-0+00#/vis/open DAWNFILE#/vis/open DAWNFILE#/vis/open HepRepFile#/vis/open HepRepFile#/vis/open VRML2FILE#/vis/open VRML2FILE/vis/viewer/set/autoRefresh /vis/viewer/set/autoRefresh falsefalse/vis/verbose errors/vis/verbose errors/vis/drawVolume/vis/drawVolume/vis/viewer/set/viewpointThetaPhi /vis/viewer/set/viewpointThetaPhi 90. 0.90. 0./vis/viewer/zoom 2./vis/viewer/zoom 2./vis/viewer/set/style wireframe/vis/viewer/set/style wireframe/vis/scene/add/axes 0 0 0 1 m/vis/scene/add/axes 0 0 0 1 m/vis/scene/add/trajectories smooth/vis/scene/add/trajectories smooth/vis/modeling/trajectories/create/drawByCharge/vis/modeling/trajectories/create/drawByCharge/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2/vis/scene/add/hits/vis/scene/add/hits##/vis/filtering/trajectories/create/particleFilter/vis/filtering/trajectories/create/particleFilter#/vis/filtering/trajectories/particleFilter-0/add gamma#/vis/filtering/trajectories/particleFilter-0/add gamma#/vis/filtering/trajectories/particleFilter-0/invert true#/vis/filtering/trajectories/particleFilter-0/invert true/vis/modeling/trajectories/create/drawByParticleID/vis/modeling/trajectories/create/drawByParticleID/vis/modeling/trajectories/drawByParticleID-0/set e- blue/vis/modeling/trajectories/drawByParticleID-0/set e- blue##/vis/scene/endOfEventAction /vis/scene/endOfEventAction accumulateaccumulate/vis/viewer/set/autoRefresh /vis/viewer/set/autoRefresh truetrue/vis/verbose warnings/vis/verbose warnings#/vis/viewer/flush#/vis/viewer/flush

Basic trajectory modelingBasic trajectory modeling

Page 30: Geant4 Visualization Commandsgeant4.slac.stanford.edu/Presentations/vis/G4VisCommands.pdf · Geant4 Visualization Tutorial using the DAWN Event Display ... Simplest Command Sequence

11 January 2011 30Geant4 Visualization Commands J. Perl

Basic Trajectory ModelingBasic Trajectory Modeling By default, trajectories are color-coded by charge

positive = blue neutral = green negative = red

But you can choose other modeling options, such as color by particle ID /vis/modeling/trajectories/create/drawByParticleID/vis/modeling/trajectories/create/drawByParticleID /vis/modeling/trajectories/drawByParticleID-0/set e- blue/vis/modeling/trajectories/drawByParticleID-0/set e- blue

Right now, when you first turn on drawByParticleID, all particles are set to grey, and you thenhave to assign any colors you want.

Starting in the next release, the default will be to already assign some color codes (which youcan then override if you want to).

The new defaults will be equivalent to: /vis/modeling/trajectories/drawByParticleID-0/set e- red/vis/modeling/trajectories/drawByParticleID-0/set e- red /vis/modeling/trajectories/drawByParticleID-0/set e+ blue/vis/modeling/trajectories/drawByParticleID-0/set e+ blue /vis/modeling/trajectories/drawByParticleID-0/set/vis/modeling/trajectories/drawByParticleID-0/set proton cyanproton cyan /vis/modeling/trajectories/drawByParticleID-0/set gamma green/vis/modeling/trajectories/drawByParticleID-0/set gamma green /vis/modeling/trajectories/drawByParticleID-0/set neutron yellow/vis/modeling/trajectories/drawByParticleID-0/set neutron yellow /vis/modeling/trajectories/drawByParticleID-0/set pi+ magenta/vis/modeling/trajectories/drawByParticleID-0/set pi+ magenta /vis/modeling/trajectories/drawByParticleID-0/set pi- magenta/vis/modeling/trajectories/drawByParticleID-0/set pi- magenta /vis/modeling/trajectories/drawByParticleID-0/set pi0 magenta/vis/modeling/trajectories/drawByParticleID-0/set pi0 magenta # and everything else still grey# and everything else still grey

Page 31: Geant4 Visualization Commandsgeant4.slac.stanford.edu/Presentations/vis/G4VisCommands.pdf · Geant4 Visualization Tutorial using the DAWN Event Display ... Simplest Command Sequence

11 January 2011 31Geant4 Visualization Commands J. Perl

/vis/open /vis/open OGLOGL 600x600-0+ 600x600-0+00#/vis/open DAWNFILE#/vis/open DAWNFILE#/vis/open HepRepFile#/vis/open HepRepFile#/vis/open VRML2FILE#/vis/open VRML2FILE/vis/viewer/set/autoRefresh /vis/viewer/set/autoRefresh falsefalse/vis/verbose errors/vis/verbose errors/vis/drawVolume/vis/drawVolume/vis/viewer/set/viewpointThetaPhi /vis/viewer/set/viewpointThetaPhi 90. 0.90. 0./vis/viewer/zoom 2./vis/viewer/zoom 2./vis/viewer/set/style wireframe/vis/viewer/set/style wireframe/vis/scene/add/axes 0 0 0 1 m/vis/scene/add/axes 0 0 0 1 m/vis/scene/add/trajectories smooth/vis/scene/add/trajectories smooth/vis/modeling/trajectories/create/drawByCharge/vis/modeling/trajectories/create/drawByCharge/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2/vis/scene/add/hits/vis/scene/add/hits##/vis/filtering/trajectories/create/particleFilter/vis/filtering/trajectories/create/particleFilter#/vis/filtering/trajectories/particleFilter-0/add gamma#/vis/filtering/trajectories/particleFilter-0/add gamma#/vis/filtering/trajectories/particleFilter-0/invert true#/vis/filtering/trajectories/particleFilter-0/invert true/vis/modeling/trajectories/create/drawByParticleID/vis/modeling/trajectories/create/drawByParticleID/vis/modeling/trajectories/drawByParticleID-0/set e- blue/vis/modeling/trajectories/drawByParticleID-0/set e- blue/vis/scene/endOfEventAction /vis/scene/endOfEventAction accumulateaccumulate/vis/viewer/set/autoRefresh /vis/viewer/set/autoRefresh truetrue/vis/verbose warnings/vis/verbose warnings#/vis/viewer/flush#/vis/viewer/flush

What weWhat we’’ve covered so farve covered so far

Page 32: Geant4 Visualization Commandsgeant4.slac.stanford.edu/Presentations/vis/G4VisCommands.pdf · Geant4 Visualization Tutorial using the DAWN Event Display ... Simplest Command Sequence

11 January 2011 32Geant4 Visualization Commands J. Perl

/vis/open /vis/open OGLOGL 600x600-0+ 600x600-0+00#/vis/open DAWNFILE#/vis/open DAWNFILE#/vis/open HepRepFile#/vis/open HepRepFile#/vis/open VRML2FILE#/vis/open VRML2FILE/vis/viewer/set/autoRefresh /vis/viewer/set/autoRefresh falsefalse/vis/verbose errors/vis/verbose errors/vis/drawVolume/vis/drawVolume/vis/viewer/set/viewpointThetaPhi /vis/viewer/set/viewpointThetaPhi 90. 0.90. 0./vis/viewer/zoom 2./vis/viewer/zoom 2./vis/viewer/set/style wireframe/vis/viewer/set/style wireframe/vis/scene/add/axes 0 0 0 1 m/vis/scene/add/axes 0 0 0 1 m/vis/scene/add/trajectories smooth/vis/scene/add/trajectories smooth/vis/modeling/trajectories/create/drawByCharge/vis/modeling/trajectories/create/drawByCharge/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2/vis/scene/add/hits/vis/scene/add/hits##/vis/filtering/trajectories/create/particleFilter/vis/filtering/trajectories/create/particleFilter#/vis/filtering/trajectories/particleFilter-0/add gamma#/vis/filtering/trajectories/particleFilter-0/add gamma#/vis/filtering/trajectories/particleFilter-0/invert true#/vis/filtering/trajectories/particleFilter-0/invert true/vis/modeling/trajectories/create/drawByParticleID/vis/modeling/trajectories/create/drawByParticleID/vis/modeling/trajectories/drawByParticleID-0/set e- blue/vis/modeling/trajectories/drawByParticleID-0/set e- blue/vis/scene/endOfEventAction /vis/scene/endOfEventAction accumulateaccumulate/vis/viewer/set/autoRefresh /vis/viewer/set/autoRefresh truetrue/vis/verbose warnings/vis/verbose warnings#/vis/viewer/flush#/vis/viewer/flush

Accumulating trajectories and hitsAccumulating trajectories and hits

Page 33: Geant4 Visualization Commandsgeant4.slac.stanford.edu/Presentations/vis/G4VisCommands.pdf · Geant4 Visualization Tutorial using the DAWN Event Display ... Simplest Command Sequence

11 January 2011 33Geant4 Visualization Commands J. Perl

Accumulating Trajectories and HitsAccumulating Trajectories and Hits

By default, you will get a drawing after each event. To instead get just oneBy default, you will get a drawing after each event. To instead get just onedrawing with all of the accumulated events from that rundrawing with all of the accumulated events from that run /vis/scene/endOfEventAction /vis/scene/endOfEventAction accumulateaccumulate

This overrides the defaultThis overrides the default /vis/scene/endOfEventAction /vis/scene/endOfEventAction refreshrefresh

To even suppress that one drawing from the end of the /run/beamOn, useTo even suppress that one drawing from the end of the /run/beamOn, use /vis/scene/endOfRunAction /vis/scene/endOfRunAction accumulateaccumulate

This overrides the defaultThis overrides the default /vis/scene/endOfRunAction /vis/scene/endOfRunAction refreshrefresh

When you actually want to draw, you then have to explicitly issue theWhen you actually want to draw, you then have to explicitly issue thecommandcommand /vis/viewer/flush/vis/viewer/flush

Page 34: Geant4 Visualization Commandsgeant4.slac.stanford.edu/Presentations/vis/G4VisCommands.pdf · Geant4 Visualization Tutorial using the DAWN Event Display ... Simplest Command Sequence

11 January 2011 34Geant4 Visualization Commands J. Perl

/vis/open /vis/open OGLOGL 600x600-0+ 600x600-0+00#/vis/open DAWNFILE#/vis/open DAWNFILE#/vis/open HepRepFile#/vis/open HepRepFile#/vis/open VRML2FILE#/vis/open VRML2FILE/vis/viewer/set/autoRefresh /vis/viewer/set/autoRefresh falsefalse/vis/verbose errors/vis/verbose errors/vis/drawVolume/vis/drawVolume/vis/viewer/set/viewpointThetaPhi /vis/viewer/set/viewpointThetaPhi 90. 0.90. 0./vis/viewer/zoom 2./vis/viewer/zoom 2./vis/viewer/set/style wireframe/vis/viewer/set/style wireframe/vis/scene/add/axes 0 0 0 1 m/vis/scene/add/axes 0 0 0 1 m/vis/scene/add/trajectories smooth/vis/scene/add/trajectories smooth/vis/modeling/trajectories/create/drawByCharge/vis/modeling/trajectories/create/drawByCharge/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2/vis/scene/add/hits/vis/scene/add/hits##/vis/filtering/trajectories/create/particleFilter/vis/filtering/trajectories/create/particleFilter#/vis/filtering/trajectories/particleFilter-0/add gamma#/vis/filtering/trajectories/particleFilter-0/add gamma#/vis/filtering/trajectories/particleFilter-0/invert true#/vis/filtering/trajectories/particleFilter-0/invert true/vis/modeling/trajectories/create/drawByParticleID/vis/modeling/trajectories/create/drawByParticleID/vis/modeling/trajectories/drawByParticleID-0/set e- blue/vis/modeling/trajectories/drawByParticleID-0/set e- blue/vis/scene/endOfEventAction /vis/scene/endOfEventAction accumulateaccumulate/vis/viewer/set/autoRefresh /vis/viewer/set/autoRefresh truetrue/vis/verbose warnings/vis/verbose warnings#/vis/viewer/flush#/vis/viewer/flush

What weWhat we’’ve covered so farve covered so far

Page 35: Geant4 Visualization Commandsgeant4.slac.stanford.edu/Presentations/vis/G4VisCommands.pdf · Geant4 Visualization Tutorial using the DAWN Event Display ... Simplest Command Sequence

11 January 2011 35Geant4 Visualization Commands J. Perl

/vis/open /vis/open OGLOGL 600x600-0+ 600x600-0+00#/vis/open DAWNFILE#/vis/open DAWNFILE#/vis/open HepRepFile#/vis/open HepRepFile#/vis/open VRML2FILE#/vis/open VRML2FILE/vis/viewer/set/autoRefresh /vis/viewer/set/autoRefresh falsefalse/vis/verbose errors/vis/verbose errors/vis/drawVolume/vis/drawVolume/vis/viewer/set/viewpointThetaPhi /vis/viewer/set/viewpointThetaPhi 90. 0.90. 0./vis/viewer/zoom 2./vis/viewer/zoom 2./vis/viewer/set/style wireframe/vis/viewer/set/style wireframe/vis/scene/add/axes 0 0 0 1 m/vis/scene/add/axes 0 0 0 1 m/vis/scene/add/trajectories smooth/vis/scene/add/trajectories smooth/vis/modeling/trajectories/create/drawByCharge/vis/modeling/trajectories/create/drawByCharge/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2/vis/scene/add/hits/vis/scene/add/hits/vis/filtering/trajectories/create/particleFilter/vis/filtering/trajectories/create/particleFilter/vis/filtering/trajectories/particleFilter-0/add gamma/vis/filtering/trajectories/particleFilter-0/add gamma/vis/filtering/trajectories/particleFilter-0/invert true/vis/filtering/trajectories/particleFilter-0/invert true/vis/modeling/trajectories/create/drawByParticleID/vis/modeling/trajectories/create/drawByParticleID/vis/modeling/trajectories/drawByParticleID-0/set e- blue/vis/modeling/trajectories/drawByParticleID-0/set e- blue/vis/scene/endOfEventAction /vis/scene/endOfEventAction accumulateaccumulate/vis/viewer/set/autoRefresh /vis/viewer/set/autoRefresh truetrue/vis/verbose warnings/vis/verbose warnings#/vis/viewer/flush#/vis/viewer/flush

Filtering TrajectoriesFiltering Trajectories

Page 36: Geant4 Visualization Commandsgeant4.slac.stanford.edu/Presentations/vis/G4VisCommands.pdf · Geant4 Visualization Tutorial using the DAWN Event Display ... Simplest Command Sequence

11 January 2011 36Geant4 Visualization Commands J. Perl

Filtering TrajectoriesFiltering Trajectories

By default, all trajectories are drawnBy default, all trajectories are drawn

You apply a filter so that only certain trajectories are drawn:You apply a filter so that only certain trajectories are drawn: /vis/filtering/trajectories/create/particleFilter/vis/filtering/trajectories/create/particleFilter /vis/filtering/trajectories/particleFilter-0/add gamma/vis/filtering/trajectories/particleFilter-0/add gamma

The aboveThe above adds a filter that only allows gammas to drawadds a filter that only allows gammas to draw To instead do the opposite, drawing To instead do the opposite, drawing everying everying except gammas,except gammas,

include the above, but also addinclude the above, but also add the following:the following: /vis/filtering/trajectories/particleFilter-0/invert true/vis/filtering/trajectories/particleFilter-0/invert true

WeWe’’ll cover more details on this in a later presentationll cover more details on this in a later presentation(including how to filter hits)(including how to filter hits)

Page 37: Geant4 Visualization Commandsgeant4.slac.stanford.edu/Presentations/vis/G4VisCommands.pdf · Geant4 Visualization Tutorial using the DAWN Event Display ... Simplest Command Sequence

11 January 2011 37Geant4 Visualization Commands J. Perl

/vis/open /vis/open OGLOGL 600x600-0+ 600x600-0+00#/vis/open DAWNFILE#/vis/open DAWNFILE#/vis/open HepRepFile#/vis/open HepRepFile#/vis/open VRML2FILE#/vis/open VRML2FILE/vis/viewer/set/autoRefresh /vis/viewer/set/autoRefresh falsefalse/vis/verbose errors/vis/verbose errors/vis/drawVolume/vis/drawVolume/vis/viewer/set/viewpointThetaPhi /vis/viewer/set/viewpointThetaPhi 90. 0.90. 0./vis/viewer/zoom 2./vis/viewer/zoom 2./vis/viewer/set/style wireframe/vis/viewer/set/style wireframe/vis/scene/add/axes 0 0 0 1 m/vis/scene/add/axes 0 0 0 1 m/vis/scene/add/trajectories smooth/vis/scene/add/trajectories smooth/vis/modeling/trajectories/create/drawByCharge/vis/modeling/trajectories/create/drawByCharge/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2/vis/scene/add/hits/vis/scene/add/hits/vis/filtering/trajectories/create/particleFilter/vis/filtering/trajectories/create/particleFilter/vis/filtering/trajectories/particleFilter-0/add gamma/vis/filtering/trajectories/particleFilter-0/add gamma/vis/filtering/trajectories/particleFilter-0/invert true/vis/filtering/trajectories/particleFilter-0/invert true/vis/modeling/trajectories/create/drawByParticleID/vis/modeling/trajectories/create/drawByParticleID/vis/modeling/trajectories/drawByParticleID-0/set e- blue/vis/modeling/trajectories/drawByParticleID-0/set e- blue/vis/scene/endOfEventAction /vis/scene/endOfEventAction accumulateaccumulate/vis/viewer/set/autoRefresh /vis/viewer/set/autoRefresh truetrue/vis/verbose warnings/vis/verbose warnings#/vis/viewer/flush#/vis/viewer/flush

What weWhat we’’ve covered so farve covered so far

Page 38: Geant4 Visualization Commandsgeant4.slac.stanford.edu/Presentations/vis/G4VisCommands.pdf · Geant4 Visualization Tutorial using the DAWN Event Display ... Simplest Command Sequence

11 January 2011 38Geant4 Visualization Commands J. Perl

/vis/open /vis/open OGLOGL 600x600-0+ 600x600-0+00#/vis/open DAWNFILE#/vis/open DAWNFILE#/vis/open HepRepFile#/vis/open HepRepFile#/vis/open VRML2FILE#/vis/open VRML2FILE/vis/viewer/set/autoRefresh /vis/viewer/set/autoRefresh falsefalse/vis/verbose errors/vis/verbose errors/vis/drawVolume/vis/drawVolume/vis/viewer/set/viewpointThetaPhi /vis/viewer/set/viewpointThetaPhi 90. 0.90. 0./vis/viewer/zoom 2./vis/viewer/zoom 2./vis/viewer/set/style wireframe/vis/viewer/set/style wireframe/vis/scene/add/axes 0 0 0 1 m/vis/scene/add/axes 0 0 0 1 m/vis/scene/add/trajectories smooth/vis/scene/add/trajectories smooth/vis/modeling/trajectories/create/drawByCharge/vis/modeling/trajectories/create/drawByCharge/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2/vis/scene/add/hits/vis/scene/add/hits/vis/filtering/trajectories/create/particleFilter/vis/filtering/trajectories/create/particleFilter/vis/filtering/trajectories/particleFilter-0/add gamma/vis/filtering/trajectories/particleFilter-0/add gamma/vis/filtering/trajectories/particleFilter-0/invert true/vis/filtering/trajectories/particleFilter-0/invert true/vis/modeling/trajectories/create/drawByParticleID/vis/modeling/trajectories/create/drawByParticleID/vis/modeling/trajectories/drawByParticleID-0/set e- blue/vis/modeling/trajectories/drawByParticleID-0/set e- blue/vis/scene/endOfEventAction /vis/scene/endOfEventAction accumulateaccumulate/vis/viewer/set/autoRefresh /vis/viewer/set/autoRefresh truetrue/vis/verbose warnings/vis/verbose warnings/vis/viewer/flush/vis/viewer/flush

To force output of a new fileTo force output of a new file

Page 39: Geant4 Visualization Commandsgeant4.slac.stanford.edu/Presentations/vis/G4VisCommands.pdf · Geant4 Visualization Tutorial using the DAWN Event Display ... Simplest Command Sequence

11 January 2011 39Geant4 Visualization Commands J. Perl

To ForceTo Force Output of a New FileOutput of a New File

There are two classes of Geant4 visualization drivers:There are two classes of Geant4 visualization drivers: Immediate drivers: draw directly to the screen (such as OpenGL)Immediate drivers: draw directly to the screen (such as OpenGL) File-based drivers: create a file on disk (HepRepFile, VRML2FILE)File-based drivers: create a file on disk (HepRepFile, VRML2FILE)

You open this file later in that separate applicationYou open this file later in that separate application

For immediate driversFor immediate drivers you see the results or your /vis commands immediatelyyou see the results or your /vis commands immediately

For the file-based driversFor the file-based drivers the default is to only create a new file (showing your changes) when you dothe default is to only create a new file (showing your changes) when you do

/run/beamOn/run/beamOn

If you want to see visualization at some other time, If you want to see visualization at some other time, such as after you set upsuch as after you set upgeometry, but before you do /run/beamOn, use:geometry, but before you do /run/beamOn, use: /vis/viewer/flush/vis/viewer/flush

Page 40: Geant4 Visualization Commandsgeant4.slac.stanford.edu/Presentations/vis/G4VisCommands.pdf · Geant4 Visualization Tutorial using the DAWN Event Display ... Simplest Command Sequence

11 January 2011 40Geant4 Visualization Commands J. Perl

/vis/open /vis/open OGLOGL 600x600-0+ 600x600-0+00#/vis/open DAWNFILE#/vis/open DAWNFILE#/vis/open HepRepFile#/vis/open HepRepFile#/vis/open VRML2FILE#/vis/open VRML2FILE/vis/viewer/set/autoRefresh /vis/viewer/set/autoRefresh falsefalse/vis/verbose errors/vis/verbose errors/vis/drawVolume/vis/drawVolume/vis/viewer/set/viewpointThetaPhi /vis/viewer/set/viewpointThetaPhi 90. 0.90. 0./vis/viewer/zoom 2./vis/viewer/zoom 2./vis/viewer/set/style wireframe/vis/viewer/set/style wireframe/vis/scene/add/axes 0 0 0 1 m/vis/scene/add/axes 0 0 0 1 m/vis/scene/add/trajectories smooth/vis/scene/add/trajectories smooth/vis/modeling/trajectories/create/drawByCharge/vis/modeling/trajectories/create/drawByCharge/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2/vis/scene/add/hits/vis/scene/add/hits/vis/filtering/trajectories/create/particleFilter/vis/filtering/trajectories/create/particleFilter/vis/filtering/trajectories/particleFilter-0/add gamma/vis/filtering/trajectories/particleFilter-0/add gamma/vis/filtering/trajectories/particleFilter-0/invert true/vis/filtering/trajectories/particleFilter-0/invert true/vis/modeling/trajectories/create/drawByParticleID/vis/modeling/trajectories/create/drawByParticleID/vis/modeling/trajectories/drawByParticleID-0/set e- blue/vis/modeling/trajectories/drawByParticleID-0/set e- blue/vis/scene/endOfEventAction /vis/scene/endOfEventAction accumulateaccumulate/vis/viewer/set/autoRefresh /vis/viewer/set/autoRefresh truetrue/vis/verbose warnings/vis/verbose warnings/vis/viewer/flush/vis/viewer/flush

What weWhat we’’ve covered so farve covered so far

Page 41: Geant4 Visualization Commandsgeant4.slac.stanford.edu/Presentations/vis/G4VisCommands.pdf · Geant4 Visualization Tutorial using the DAWN Event Display ... Simplest Command Sequence

11 January 2011 41Geant4 Visualization Commands J. Perl

/vis/open /vis/open OGLOGL 600x600-0+ 600x600-0+00#/vis/open DAWNFILE#/vis/open DAWNFILE#/vis/open HepRepFile#/vis/open HepRepFile#/vis/open VRML2FILE#/vis/open VRML2FILE/vis/viewer/set/autoRefresh /vis/viewer/set/autoRefresh falsefalse/vis/verbose errors/vis/verbose errors/vis/drawVolume/vis/drawVolume/vis/viewer/set/viewpointThetaPhi /vis/viewer/set/viewpointThetaPhi 90. 0.90. 0./vis/viewer/zoom 2./vis/viewer/zoom 2./vis/viewer/set/style wireframe/vis/viewer/set/style wireframe/vis/scene/add/axes 0 0 0 1 m/vis/scene/add/axes 0 0 0 1 m/vis/scene/add/trajectories smooth/vis/scene/add/trajectories smooth/vis/modeling/trajectories/create/drawByCharge/vis/modeling/trajectories/create/drawByCharge/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2/vis/scene/add/hits/vis/scene/add/hits/vis/filtering/trajectories/create/particleFilter/vis/filtering/trajectories/create/particleFilter/vis/filtering/trajectories/particleFilter-0/add gamma/vis/filtering/trajectories/particleFilter-0/add gamma/vis/filtering/trajectories/particleFilter-0/invert true/vis/filtering/trajectories/particleFilter-0/invert true/vis/modeling/trajectories/create/drawByParticleID/vis/modeling/trajectories/create/drawByParticleID/vis/modeling/trajectories/drawByParticleID-0/set e- blue/vis/modeling/trajectories/drawByParticleID-0/set e- blue/vis/scene/endOfEventAction /vis/scene/endOfEventAction accumulateaccumulate/vis/viewer/set/autoRefresh /vis/viewer/set/autoRefresh truetrue/vis/verbose warnings/vis/verbose warnings#/vis/viewer/flush#/vis/viewer/flush

To avoid excessive redrawing onTo avoid excessive redrawing onimmediate viewersimmediate viewers

Page 42: Geant4 Visualization Commandsgeant4.slac.stanford.edu/Presentations/vis/G4VisCommands.pdf · Geant4 Visualization Tutorial using the DAWN Event Display ... Simplest Command Sequence

11 January 2011 42Geant4 Visualization Commands J. Perl

To Avoid Excessive RedrawingTo Avoid Excessive Redrawing

By default, immediate viewers will redraw after every vis commandBy default, immediate viewers will redraw after every vis commandthat might change the view, such as:that might change the view, such as: /vis/drawVolume/vis/drawVolume /vis/viewer/set/viewpointThetaPhi /vis/viewer/set/viewpointThetaPhi 90. 0.90. 0. /vis/viewer/zoom 2./vis/viewer/zoom 2. /vis/viewer/set/style wireframe/vis/viewer/set/style wireframe /vis/scene/add/axes 0 0 0 1 m/vis/scene/add/axes 0 0 0 1 m

If the geometry is very complex (such as in some imported patient geometries forIf the geometry is very complex (such as in some imported patient geometries formedical applications), this can result in slow performancemedical applications), this can result in slow performance the above would redraw five timesthe above would redraw five times

ToTo temporarily turn off this redrawing:temporarily turn off this redrawing: /vis/viewer/set/autoRefresh /vis/viewer/set/autoRefresh falsefalse

And then once everything is set up:And then once everything is set up: /vis/viewer/set/autoRefresh /vis/viewer/set/autoRefresh truetrue

Note that there is no need for a /vis/viewer/flush at that point, since the Note that there is no need for a /vis/viewer/flush at that point, since the autoRefreshautoRefreshtrue will trigger atrue will trigger a redrawredraw

Page 43: Geant4 Visualization Commandsgeant4.slac.stanford.edu/Presentations/vis/G4VisCommands.pdf · Geant4 Visualization Tutorial using the DAWN Event Display ... Simplest Command Sequence

11 January 2011 43Geant4 Visualization Commands J. Perl

/vis/open /vis/open OGLOGL 600x600-0+ 600x600-0+00#/vis/open DAWNFILE#/vis/open DAWNFILE#/vis/open HepRepFile#/vis/open HepRepFile#/vis/open VRML2FILE#/vis/open VRML2FILE/vis/viewer/set/autoRefresh /vis/viewer/set/autoRefresh falsefalse/vis/verbose errors/vis/verbose errors/vis/drawVolume/vis/drawVolume/vis/viewer/set/viewpointThetaPhi /vis/viewer/set/viewpointThetaPhi 90. 0.90. 0./vis/viewer/zoom 2./vis/viewer/zoom 2./vis/viewer/set/style wireframe/vis/viewer/set/style wireframe/vis/scene/add/axes 0 0 0 1 m/vis/scene/add/axes 0 0 0 1 m/vis/scene/add/trajectories smooth/vis/scene/add/trajectories smooth/vis/modeling/trajectories/create/drawByCharge/vis/modeling/trajectories/create/drawByCharge/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2/vis/scene/add/hits/vis/scene/add/hits/vis/filtering/trajectories/create/particleFilter/vis/filtering/trajectories/create/particleFilter/vis/filtering/trajectories/particleFilter-0/add gamma/vis/filtering/trajectories/particleFilter-0/add gamma/vis/filtering/trajectories/particleFilter-0/invert true/vis/filtering/trajectories/particleFilter-0/invert true/vis/modeling/trajectories/create/drawByParticleID/vis/modeling/trajectories/create/drawByParticleID/vis/modeling/trajectories/drawByParticleID-0/set e- blue/vis/modeling/trajectories/drawByParticleID-0/set e- blue/vis/scene/endOfEventAction /vis/scene/endOfEventAction accumulateaccumulate/vis/viewer/set/autoRefresh /vis/viewer/set/autoRefresh truetrue/vis/verbose warnings/vis/verbose warnings#/vis/viewer/flush#/vis/viewer/flush

What weWhat we’’ve covered so farve covered so far

Page 44: Geant4 Visualization Commandsgeant4.slac.stanford.edu/Presentations/vis/G4VisCommands.pdf · Geant4 Visualization Tutorial using the DAWN Event Display ... Simplest Command Sequence

11 January 2011 44Geant4 Visualization Commands J. Perl

/vis/open /vis/open OGLOGL 600x600-0+ 600x600-0+00#/vis/open DAWNFILE#/vis/open DAWNFILE#/vis/open HepRepFile#/vis/open HepRepFile#/vis/open VRML2FILE#/vis/open VRML2FILE/vis/viewer/set/autoRefresh /vis/viewer/set/autoRefresh falsefalse/vis/verbose errors/vis/verbose errors/vis/drawVolume/vis/drawVolume/vis/viewer/set/viewpointThetaPhi /vis/viewer/set/viewpointThetaPhi 90. 0.90. 0./vis/viewer/zoom 2./vis/viewer/zoom 2./vis/viewer/set/style wireframe/vis/viewer/set/style wireframe/vis/scene/add/axes 0 0 0 1 m/vis/scene/add/axes 0 0 0 1 m/vis/scene/add/trajectories smooth/vis/scene/add/trajectories smooth/vis/modeling/trajectories/create/drawByCharge/vis/modeling/trajectories/create/drawByCharge/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2/vis/scene/add/hits/vis/scene/add/hits/vis/filtering/trajectories/create/particleFilter/vis/filtering/trajectories/create/particleFilter/vis/filtering/trajectories/particleFilter-0/add gamma/vis/filtering/trajectories/particleFilter-0/add gamma/vis/filtering/trajectories/particleFilter-0/invert true/vis/filtering/trajectories/particleFilter-0/invert true/vis/modeling/trajectories/create/drawByParticleID/vis/modeling/trajectories/create/drawByParticleID/vis/modeling/trajectories/drawByParticleID-0/set e- blue/vis/modeling/trajectories/drawByParticleID-0/set e- blue/vis/scene/endOfEventAction /vis/scene/endOfEventAction accumulateaccumulate/vis/viewer/set/autoRefresh /vis/viewer/set/autoRefresh truetrue/vis/verbose warnings/vis/verbose warnings#/vis/viewer/flush#/vis/viewer/flush

To turn off unwanted visualizationTo turn off unwanted visualizationmessages on the consolemessages on the console

Page 45: Geant4 Visualization Commandsgeant4.slac.stanford.edu/Presentations/vis/G4VisCommands.pdf · Geant4 Visualization Tutorial using the DAWN Event Display ... Simplest Command Sequence

11 January 2011 45Geant4 Visualization Commands J. Perl

To Turn off Unwanted Visualization MessagesTo Turn off Unwanted Visualization Messages

You can control how many messages visualization puts on theYou can control how many messages visualization puts on theconsole by:console by: /vis/verbose <level>/vis/verbose <level>0) quiet, // Nothing is printed.0) quiet, // Nothing is printed.1) startup, // Startup and 1) startup, // Startup and endup endup messages are printed...messages are printed...2) errors, // ...and errors...2) errors, // ...and errors...3) warnings, // ...and warnings...3) warnings, // ...and warnings...4) confirmations, // ...and confirming messages...4) confirmations, // ...and confirming messages...5) parameters, // ...and parameters of scenes and views...5) parameters, // ...and parameters of scenes and views...6) all // ...and everything available.6) all // ...and everything available.

Page 46: Geant4 Visualization Commandsgeant4.slac.stanford.edu/Presentations/vis/G4VisCommands.pdf · Geant4 Visualization Tutorial using the DAWN Event Display ... Simplest Command Sequence

11 January 2011 46Geant4 Visualization Commands J. Perl

/vis/open /vis/open OGLOGL 600x600-0+ 600x600-0+00#/vis/open DAWNFILE#/vis/open DAWNFILE#/vis/open HepRepFile#/vis/open HepRepFile#/vis/open VRML2FILE#/vis/open VRML2FILE/vis/viewer/set/autoRefresh /vis/viewer/set/autoRefresh falsefalse/vis/verbose errors/vis/verbose errors/vis/drawVolume/vis/drawVolume/vis/viewer/set/viewpointThetaPhi /vis/viewer/set/viewpointThetaPhi 90. 0.90. 0./vis/viewer/zoom 2./vis/viewer/zoom 2./vis/viewer/set/style wireframe/vis/viewer/set/style wireframe/vis/scene/add/axes 0 0 0 1 m/vis/scene/add/axes 0 0 0 1 m/vis/scene/add/trajectories smooth/vis/scene/add/trajectories smooth/vis/modeling/trajectories/create/drawByCharge/vis/modeling/trajectories/create/drawByCharge/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2/vis/scene/add/hits/vis/scene/add/hits/vis/filtering/trajectories/create/particleFilter/vis/filtering/trajectories/create/particleFilter/vis/filtering/trajectories/particleFilter-0/add gamma/vis/filtering/trajectories/particleFilter-0/add gamma/vis/filtering/trajectories/particleFilter-0/invert true/vis/filtering/trajectories/particleFilter-0/invert true/vis/modeling/trajectories/create/drawByParticleID/vis/modeling/trajectories/create/drawByParticleID/vis/modeling/trajectories/drawByParticleID-0/set e- blue/vis/modeling/trajectories/drawByParticleID-0/set e- blue/vis/scene/endOfEventAction /vis/scene/endOfEventAction accumulateaccumulate/vis/viewer/set/autoRefresh /vis/viewer/set/autoRefresh truetrue/vis/verbose warnings/vis/verbose warnings#/vis/viewer/flush#/vis/viewer/flush

WeWe’’ve covered all of itve covered all of it

Now on to some extra topicsNow on to some extra topics

Page 47: Geant4 Visualization Commandsgeant4.slac.stanford.edu/Presentations/vis/G4VisCommands.pdf · Geant4 Visualization Tutorial using the DAWN Event Display ... Simplest Command Sequence

11 January 2011 47Geant4 Visualization Commands J. Perl

Printing from OpenGLPrinting from OpenGL Each of the visualization drivers provides its own way to print files.Each of the visualization drivers provides its own way to print files.

RayTracer directly produces a gif fileRayTracer directly produces a gif file OpenInventor, HepRep, DAWN and VRML rely on external application toOpenInventor, HepRep, DAWN and VRML rely on external application to

provide a rich set of printing optionsprovide a rich set of printing options OpenGL printing is less obvious but quite powerfulOpenGL printing is less obvious but quite powerful

The OpenGL drivers can directly produce PostScript graphicsThe OpenGL drivers can directly produce PostScript graphics Options for both Vector and BitmappedOptions for both Vector and Bitmapped

Open your GL viewer and set up the view as usualOpen your GL viewer and set up the view as usual /vis/open OGL/vis/open OGL /vis/drawVolume/vis/drawVolume /vis/viewer/zoom 2./vis/viewer/zoom 2. /vis/viewer/set/viewpointThetaPhi /vis/viewer/set/viewpointThetaPhi 30. 30.30. 30.

Then printThen print /vis/ogl/printEPS/vis/ogl/printEPS

Extra options allows you to control output style and transparencyExtra options allows you to control output style and transparency /vis/ogl/set/printMode /vis/ogl/set/printMode vectored or vectored or pixmappixmap /vis/ogl/set/transparency /vis/ogl/set/transparency True or FalseTrue or False

Page 48: Geant4 Visualization Commandsgeant4.slac.stanford.edu/Presentations/vis/G4VisCommands.pdf · Geant4 Visualization Tutorial using the DAWN Event Display ... Simplest Command Sequence

11 January 2011 48Geant4 Visualization Commands J. Perl

Hidden Line RemovalHidden Line Removal OpenGL supports hidden line removal.OpenGL supports hidden line removal. You can control whether this removal is done and whether trajectories and hits areYou can control whether this removal is done and whether trajectories and hits are

affected by this feature.affected by this feature.

By default, hidden line removal is disabledBy default, hidden line removal is disabled

To turn on hidden line removalTo turn on hidden line removal /vis/viewer/set/hiddenEdge /vis/viewer/set/hiddenEdge 11

This hides edges of geometry,This hides edges of geometry,but lets trajectories through.but lets trajectories through.

To hide trajectories and hits as wellTo hide trajectories and hits as well /vis/viewer/set/hiddenMarker /vis/viewer/set/hiddenMarker 11

Page 49: Geant4 Visualization Commandsgeant4.slac.stanford.edu/Presentations/vis/G4VisCommands.pdf · Geant4 Visualization Tutorial using the DAWN Event Display ... Simplest Command Sequence

11 January 2011 49Geant4 Visualization Commands J. Perl

Transfer ViewTransfer View SettingsSettings Between ViewsBetween Views You can transfer the view settings from one viewer to another.You can transfer the view settings from one viewer to another.

Allows you to use a fast viewer to select a special view,Allows you to use a fast viewer to select a special view,then tell a slower viewer to render this same viewthen tell a slower viewer to render this same view

For example, set up a view in OpenGLFor example, set up a view in OpenGL /vis/open OGL/vis/open OGL

by default, it will give this new viewer the name by default, it will give this new viewer the name ““viewer-0viewer-0”” /vis/drawVolume/vis/drawVolume

Try a few values for zoom to find one that looks goodTry a few values for zoom to find one that looks good /vis/viewer/zoom 2./vis/viewer/zoom 2. /vis/viewer/zoom 1.2/vis/viewer/zoom 1.2

Try a few view angles to find one that looks goodTry a few view angles to find one that looks good /vis/viewer/set/viewpointThetaPhi /vis/viewer/set/viewpointThetaPhi 30. 30.30. 30. /vis/viewer/set/viewpointThetaPhi /vis/viewer/set/viewpointThetaPhi 20. 20.20. 20.

Now render the same view in RayTracerNow render the same view in RayTracer /vis/open RayTracer/vis/open RayTracer /vis/drawVolume/vis/drawVolume /vis/viewer/set/all viewer-0/vis/viewer/set/all viewer-0

where viewer-0 is the default name that was assigned to the OGL viewwhere viewer-0 is the default name that was assigned to the OGL view /vis/viewer/flush/vis/viewer/flush

Page 50: Geant4 Visualization Commandsgeant4.slac.stanford.edu/Presentations/vis/G4VisCommands.pdf · Geant4 Visualization Tutorial using the DAWN Event Display ... Simplest Command Sequence

11 January 2011 50Geant4 Visualization Commands J. Perl

Compound CommandsCompound Commands

To allow you to work quickly, Geant4 visualization lets you issue the equivalent ofTo allow you to work quickly, Geant4 visualization lets you issue the equivalent ofseveral common commands at one time by using a several common commands at one time by using a ““compound commandcompound command””..

Some of the commands you have already seen in this presentation are actuallySome of the commands you have already seen in this presentation are actuallycompound commands:compound commands: /vis/open/vis/open

/vis/sceneHandler/create/vis/sceneHandler/create /vis/viewer/create/vis/viewer/create

/vis/drawVolume/vis/drawVolume /vis/scene/create/vis/scene/create /vis/scene/add/volume/vis/scene/add/volume

/vis/viewer/flush/vis/viewer/flush /vis/viewer/refresh/vis/viewer/refresh /vis/viewer/update/vis/viewer/update

I mention this just so that you will understand other peopleI mention this just so that you will understand other people’’s examples you see thats examples you see thatmay not contain the familiar /vis/open or /vis/drawVolumemay not contain the familiar /vis/open or /vis/drawVolume

Page 51: Geant4 Visualization Commandsgeant4.slac.stanford.edu/Presentations/vis/G4VisCommands.pdf · Geant4 Visualization Tutorial using the DAWN Event Display ... Simplest Command Sequence

11 January 2011 51Geant4 Visualization Commands J. Perl

Command GuidanceCommand Guidance Complete guidance on all commands is available from the command line:Complete guidance on all commands is available from the command line:

Idle> helpIdle> help Command directory path : /Command directory path : / Sub-directories : Sub-directories : 1) /control/ UI control commands. 1) /control/ UI control commands. 2) /units/ Available units. 2) /units/ Available units. 3) /geometry/ Geometry control commands. 3) /geometry/ Geometry control commands. 4) /tracking/ TrackingManager and SteppingManager control commands. 4) /tracking/ TrackingManager and SteppingManager control commands. 5) /event/ EventManager control commands. 5) /event/ EventManager control commands. 6) /run/ Run control commands. 6) /run/ Run control commands. 7) /random/ Random number status control commands. 7) /random/ Random number status control commands. 8) /particle/ Particle control commands. 8) /particle/ Particle control commands. 9) /process/ Process Table control commands. 9) /process/ Process Table control commands. 10) /vis/ Visualization commands. 10) /vis/ Visualization commands. 11) 11) /mydet/ /mydet/ A01 detector setup control commands.A01 detector setup control commands. 12) /hits/ Sensitive detectors and Hits 12) /hits/ Sensitive detectors and Hits 13) /gun/ Particle Gun control commands. 13) /gun/ Particle Gun control commands. Commands : Commands : Type the number ( 0:end, Type the number ( 0:end, -n-n:n level back ) ::n level back ) :

Page 52: Geant4 Visualization Commandsgeant4.slac.stanford.edu/Presentations/vis/G4VisCommands.pdf · Geant4 Visualization Tutorial using the DAWN Event Display ... Simplest Command Sequence

11 January 2011 52Geant4 Visualization Commands J. Perl

Guidance DetailGuidance Detail Guidance is hierarchical, providing full detail on all commands.Guidance is hierarchical, providing full detail on all commands.

Command /vis/openCommand /vis/open

Creates a scene handler ready for drawing.Creates a scene handler ready for drawing. The scene handler becomes currentThe scene handler becomes current

(the name is auto-generated).(the name is auto-generated).

Parameter : graphics-system-nameParameter : graphics-system-name Parameter type : sParameter type : s Omittable : FalseOmittable : False Candidates : ATree DAWNFILECandidates : ATree DAWNFILE

HepRepXMLHepRepXML HepRepFile HepRepFileRayTracer VRML1FILE VRML2FILERayTracer VRML1FILE VRML2FILEgMocrenFile OGL OGLIgMocrenFile OGL OGLI OGLSOGLSRayTracerXRayTracerX

Parameter : window-size-hintParameter : window-size-hint pixelspixels

Parameter type : iParameter type : i Omittable : TrueOmittable : True Default value : 600Default value : 600

Sub-directories :Sub-directories : 1) /vis/ASCIITree/ Commands for ASCIITree control. 1) /vis/ASCIITree/ Commands for ASCIITree control. 2) /vis/GAGTree/ Commands for GAGTree control. 2) /vis/GAGTree/ Commands for GAGTree control. 3) /vis/heprep/ HepRep commands. 3) /vis/heprep/ HepRep commands. 4) /vis/rayTracer/ RayTracer commands. 4) /vis/rayTracer/ RayTracer commands. 5) /vis/scene/ Operations on Geant4 scenes. 5) /vis/scene/ Operations on Geant4 scenes. 6) /vis/sceneHandler/ Operations on Geant4 scene handlers. 6) /vis/sceneHandler/ Operations on Geant4 scene handlers. 7) /vis/viewer/ Operations on Geant4 viewers. 7) /vis/viewer/ Operations on Geant4 viewers. Commands :Commands : 8) enable * Enables/disables visualization system. 8) enable * Enables/disables visualization system. 9) disable * Disables visualization system. 9) disable * Disables visualization system. 10) verbose * Simple graded message scheme - 10) verbose * Simple graded message scheme -

digit or string (1st character defines):digit or string (1st character defines): 11) drawTree * (DTREE) Creates a scene consisting of this 11) drawTree * (DTREE) Creates a scene consisting of this

physical volume and produces a representation of the geometryphysical volume and produces a representation of the geometryhierarchy.hierarchy.

12) drawView * Draw view from this angle, etc. 12) drawView * Draw view from this angle, etc. 13) drawVolume * Creates a scene consisting of this 13) drawVolume * Creates a scene consisting of this

physical volume and asks the current viewer to draw it.physical volume and asks the current viewer to draw it. 14) open * Creates a scene handler ready for drawing. 14) open * Creates a scene handler ready for drawing. 15) specify * Draws logical volume with Boolean components, 15) specify * Draws logical volume with Boolean components,

voxels and readout geometry.voxels and readout geometry.

Page 53: Geant4 Visualization Commandsgeant4.slac.stanford.edu/Presentations/vis/G4VisCommands.pdf · Geant4 Visualization Tutorial using the DAWN Event Display ... Simplest Command Sequence

11 January 2011 53Geant4 Visualization Commands J. Perl

Complete List of CommandsComplete List of Commands This presentation has shown only a very small subset of Geant4 vis commands.This presentation has shown only a very small subset of Geant4 vis commands.

Even for those commands shown, only a few of the options have been presented.Even for those commands shown, only a few of the options have been presented.

Each visualization driver may have its own set of additional commands.Each visualization driver may have its own set of additional commands.

To see the complete set of commands, use the interactive command guidance (i.e.,To see the complete set of commands, use the interactive command guidance (i.e.,type help and then type the appropriate number for type help and then type the appropriate number for ““visvis””).).

Note that many of the command details are only loaded into the help system once youstart using the given command e.g., when you first look at the help for /vis/modeling, you will see only

/vis/modeling/trajectories/create /vis/modeling/trajectories/list

But once you have done your first /vis/modeling/trajectories/create/drawByParticleID

you will see many subcommands such as /vis/modeling/trajectories/drawByParticleID-0/set /vis/modeling/trajectories/drawByParticleID-0/setRGBA etc.

Page 54: Geant4 Visualization Commandsgeant4.slac.stanford.edu/Presentations/vis/G4VisCommands.pdf · Geant4 Visualization Tutorial using the DAWN Event Display ... Simplest Command Sequence

11 January 2011 54Geant4 Visualization Commands J. Perl

Geant4 Visualization ResourcesGeant4 Visualization ResourcesGeant4 Installation Guideshttp://geant4.slac.stanford.edu/installationHands on HepRApp Tutorialhttp://geant4.slac.stanford.edu/Presentations/vis/G4HepRAppTutorial/G4HepRAppTutorial.htmlHands on DAWN Tutorialhttp://geant4.slac.stanford.edu/Presentations/vis/G4DAWNTutorial/G4DAWNTutorial.htmlHands on OpenGL Tutorialhttp://geant4.slac.stanford.edu/Presentations/vis/G4OpenGLTutorial/G4OpenGLTutorial.htmlGeant4 Visualization Commandshttp://geant4.slac.stanford.edu/Presentations/vis/G4VisCommands.ppt (and .pdf)Geant4 Advanced Visualizationhttp://geant4.slac.stanford.edu/Presentations/vis/G4VisAdvanced.ppt (and .pdf)How to Make a Moviehttp://geant4.slac.stanford.edu/Presentations/vis/HowToMakeAMovie.ppt (and .pdf)

Visualization Chapter of the Geant4 User’s Guide for Application Developershttp://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/ForApplicationDeveloper/html/List of Visualization Commands:http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/ForApplicationDeveloper/html/AllResources/Control/UIcommands/_vis_.html

For Questions or Comments: Geant4 Visualization Online Forum:http://geant4-hn.slac.stanford.edu:5090/HyperNews/public/get/visualization.html