Presentation is loading. Please wait.

Presentation is loading. Please wait.

15 Sept 2007 J. Perl Overview of Geant4 Visualization 1 HepRep/HepRApp DAWN OpenGL Overview of Geant4 Visualization Geant4 Mini-Tutorial Hebden Bridge.

Similar presentations


Presentation on theme: "15 Sept 2007 J. Perl Overview of Geant4 Visualization 1 HepRep/HepRApp DAWN OpenGL Overview of Geant4 Visualization Geant4 Mini-Tutorial Hebden Bridge."— Presentation transcript:

1 15 Sept 2007 J. Perl Overview of Geant4 Visualization 1 HepRep/HepRApp DAWN OpenGL Overview of Geant4 Visualization Geant4 Mini-Tutorial Hebden Bridge 15 September 2007 Joseph Perl, SLAC

2 15 Sept 2007 J. Perl Overview of Geant4 Visualization 2 DAWN HepRep/FRED OpenInventor RayTracer Sorry, Vis Talks always need two pages of Cover Graphics

3 15 Sept 2007 3J. Perl Overview of Geant4 VisualizationContents Overview of Visualization Driver Choices Visualization Commands Enhanced Trajectory Drawing Trajectory and Hit Filtering Smooth and Rich Trajectories Movies Volume Rendering Coming in Next Year: Visualization of Fields References

4 15 Sept 2007 4J. Perl Overview of Geant4 Visualization Quick Overview of Visualization Driver Choices Geant4 comes with Seven visualization drivers: OpenGL OpenInventor HepRep DAWN VRML RayTracer ASCIITree I’ll show you some quick overview slides now. References section will show you other talks with more details on individual drivers and commands. Different drivers are appropriate for different needs The set of commands the user sees are consistent regardless of the driver

5 15 Sept 2007 5J. Perl Overview of Geant4 Visualization Quick Overview of Visualization Driver Choices Geant4 comes with Seven visualization drivers: OpenGL OpenInventor HepRep DAWN VRML RayTracer ASCIITree I’ll show you some quick overview slides now. References section will show you other talks with more details on individual drivers and commands. Different drivers are appropriate for different needs The set of commands the user sees are consistent regardless of the driver

6 15 Sept 2007 6J. Perl Overview of Geant4 Visualization Quick response with flexible camera control to study geometries, trajectories and hits OpenGL and OpenInventor Widely available world standards for fast, photo-realistic rendering.

7 15 Sept 2007 7J. Perl Overview of Geant4 Visualization High-quality Output for Publications DAWN DAWN Developed specifically for Geant4. Not fast, but the highest quality rendering available anywhere. Excellent for publications.

8 15 Sept 2007 8J. Perl Overview of Geant4 Visualization Interactive Picking to Get More Information on Visualized Objects HepRep HepRep Reuses interactive HepRep browser applications already developed for other user communities (BaBar and GLAST). Explore hierarchies, pick to show attributes, apply cuts and labels.

9 15 Sept 2007 9J. Perl Overview of Geant4 Visualization Understand Complex Boolean Solids and Transparent or Reflective Surfaces RayTracer Reuses Geant4’s own tracking to shoot photons through the geometry

10 15 Sept 2007 10J. Perl Overview of Geant4 Visualization 3D Format Suitable for Web Distribution VRML Many VRML browsers available, some as web plug-ins

11 15 Sept 2007 11J. Perl Overview of Geant4 Visualization Tools to Understand Geometry Hierarchies ASCIITree, HepRep /vis/ASCIITree/Verbose 4 /vis/ASCIITree/Verbose 4 /vis/viewer/flush /vis/viewer/flush "HadCalorimeterPhysical":0 / "HadCalorimeterLogical" / "HadCalorimeterBox"(G4Box), 1.8 m3, 11.35 g/cm3 "HadCalorimeterPhysical":0 / "HadCalorimeterLogical" / "HadCalorimeterBox"(G4Box), 1.8 m3, 11.35 g/cm3 "HadCalColumnPhysical":-1 (10 replicas) / "HadCalColumnLogical" / "HadCalColumnBox"(G4Box), 180000 cm3, 11.35 g/cm3 "HadCalColumnPhysical":-1 (10 replicas) / "HadCalColumnLogical" / "HadCalColumnBox"(G4Box), 180000 cm3, 11.35 g/cm3 "HadCalCellPhysical":-1 (2 replicas) / "HadCalCellLogical" / "HadCalCellBox"(G4Box), 90000 cm3, 11.35 g/cm3 "HadCalCellPhysical":-1 (2 replicas) / "HadCalCellLogical" / "HadCalCellBox"(G4Box), 90000 cm3, 11.35 g/cm3 "HadCalLayerPhysical":-1 (20 replicas) / "HadCalLayerLogical" / "HadCalLayerBox"(G4Box), 4500 cm3, 11.35 g/cm3 "HadCalLayerPhysical":-1 (20 replicas) / "HadCalLayerLogical" / "HadCalLayerBox"(G4Box), 4500 cm3, 11.35 g/cm3 "HadCalScintiPhysical":0 / "HadCalScintiLogical" / "HadCalScintiBox"(G4Box), 900 cm3, 1.032 g/cm3 "HadCalScintiPhysical":0 / "HadCalScintiLogical" / "HadCalScintiBox"(G4Box), 900 cm3, 1.032 g/cm3

12 15 Sept 2007 12J. Perl Overview of Geant4 Visualization Example Visualization Command Sequences Visualize a detector in OpenGL: Visualize a detector in OpenGL: /vis/open OGLIX /vis/open OGLIX /vis/drawVolume /vis/drawVolume Visualize trajectories and hits for 10 events using HepRep Visualize trajectories and hits for 10 events using HepRep /vis/open HepRepFile /vis/open HepRepFile /vis/drawVolume /vis/drawVolume /vis/scene/add/trajectories /vis/scene/add/trajectories /vis/scene/add/hits /vis/scene/add/hits /run/beamOn 10 /run/beamOn 10 The step-by-step Geant4 Installation Tutorials tell you enough commands to get you started: The step-by-step Geant4 Installation Tutorials tell you enough commands to get you started: geant4.slac.stanford.edu/installation geant4.slac.stanford.edu/installation A more detailed discussion of commands can be found in: A more detailed discussion of commands can be found in: geant4.slac.stanford.edu/Presentations/vis/G4VisCommands.pdf geant4.slac.stanford.edu/Presentations/vis/G4VisCommands.pdf geant4.slac.stanford.edu/Presentations/vis/G4VisAdvanced.pdf geant4.slac.stanford.edu/Presentations/vis/G4VisAdvanced.pdf

13 15 Sept 2007 13J. Perl Overview of Geant4 Visualization Controlling Detail Level of Detector Geometry By default, /vis/drawVolume will draw the entire detector geometry. This is equivalent to the commands: By default, /vis/drawVolume will draw the entire detector geometry. This is equivalent to the commands: /vis/scene/create /vis/scene/create /vis/scene/add/volume world /vis/scene/add/volume world You can specify additional arguments to limit the amount of geometry detail shown: You can specify additional arguments to limit the amount of geometry detail shown: /vis/scene/add/volume [ ] [ ] [ ] /vis/scene/add/volume [ ] [ ] [ ] 1st parameter: volume name (default "world"). 1st parameter: volume name (default "world"). 2nd parameter: copy number (default -1 meaning first occurrence of physical-volume-name is selected. 2nd parameter: copy number (default -1 meaning first occurrence of physical-volume-name is selected. 3rd parameter: depth of descending geometry hierarchy (default G4Scene::UNLIMITED (-1)). 3rd parameter: depth of descending geometry hierarchy (default G4Scene::UNLIMITED (-1)). Still more arguments can be given to specify a clipping volume. Still more arguments can be given to specify a clipping volume. vis/scene/add/volume world -1 -1 box km 0 1 0 1 0 1 will draw the world with the positive octant cut away. vis/scene/add/volume world -1 -1 box km 0 1 0 1 0 1 will draw the world with the positive octant cut away.

14 15 Sept 2007 14J. Perl Overview of Geant4 Visualization Command Guidance Complete guidance on all commands is available from the command line: Complete guidance on all commands is available from the command line: Idle> help Idle> 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) /mydet/ A01 detector setup control commands. 11) /mydet/ 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, -n:n level back ) : Type the number ( 0:end, -n:n level back ) :

15 15 Sept 2007 15J. Perl Overview of Geant4 Visualization Guidance Detail Guidance is hierarchical, providing full detail on all commands. Guidance is hierarchical, providing full detail on all commands. Command /vis/open Command /vis/open Creates a scene handler ready for drawing. Creates a scene handler ready for drawing. The scene handler becomes current (the name is auto-generated). The scene handler becomes current (the name is auto-generated). Parameter : graphics-system-name Parameter : graphics-system-name Parameter type : s Parameter type : s Omittable : False Omittable : False Candidates : ATree DAWNFILE GAGTree HepRepXML HepRepFile RayTracer VRML1FILE VRML2FILE OGLIX OGLSX Candidates : ATree DAWNFILE GAGTree HepRepXML HepRepFile RayTracer VRML1FILE VRML2FILE OGLIX OGLSX Parameter : window-size-hint Parameter : window-size-hint pixels pixels Parameter type : i Parameter type : i Omittable : True Omittable : True Default value : 600 Default 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 - digit or string (1st character defines): 10) verbose * Simple graded message scheme - digit or string (1st character defines): 11) drawTree * (DTREE) Creates a scene consisting of this physical volume and produces a representation of the geometry hierarchy. 11) drawTree * (DTREE) Creates a scene consisting of this physical volume and produces a representation of the geometry 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 physical volume and asks the current viewer to draw it. 13) drawVolume * Creates a scene consisting of this 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, voxels and readout geometry. 15) specify * Draws logical volume with Boolean components, voxels and readout geometry.

16 15 Sept 2007 16J. Perl Overview of Geant4 Visualization Creator Process — muIoni — Decay — annihil — eIoni — brem Momentum (MeV) — 0-1 — 1-10 — 10-20 — 20-30 — 30-50 — 50+ Charge — +1 — 0 — -1 Interactive Control of Trajectory Drawing Model

17 15 Sept 2007 17J. Perl Overview of Geant4 Visualization Sample Commands: generic trajectory model # Create a generic model (will get default name of generic-0) # From here we can set overall defaults for things like line color, # whether to show step points or just the trajectory line, etc. /vis/modeling/trajectories/create/generic # Configure the generic model to colour all trajectories cyan and to show step points /vis/modeling/trajectories/generic-0/default/setDrawStepPts true /vis/modeling/trajectories/generic-0/default/setStepPtsSize 16 /vis/modeling/trajectories/generic-0/default/setLineColour cyan /vis/modeling/trajectories/generic-0/default/setStepPtsColour red

18 15 Sept 2007 18J. Perl Overview of Geant4 Visualization Sample Commands: drawByCharge model # Create a drawByCharge model (will get default name of drawCharge-0) /vis/modeling/trajectories/create/drawByCharge # Create another drawByCharge model with an explicit name of testChargeModel /vis/modeling/trajectories/create/drawByCharge testChargeModel # We can now go on to configure these two different drawByCharge models and then # can choose to visualize using either one of them at any time # Configure drawByCharge-0 model /vis/modeling/trajectories/drawByCharge-0/set 1 red /vis/modeling/trajectories/drawByCharge-0/set -1 red /vis/modeling/trajectories/drawByCharge-0/set 0 white # Configure testCharge model through G4Colour components /vis/modeling/trajectories/testChargeModel/setRGBA 1 0 1 1 1 /vis/modeling/trajectories/testChargeModel/setRGBA -1 0.5 0.5 0.5 1 /vis/modeling/trajectories/testChargeModel/setRGBA 0 1 1 0 1 # List available models /vis/modeling/trajectories/list # select drawByCharge-0 to be current /vis/modeling/trajectories/select drawByCharge-0

19 15 Sept 2007 19J. Perl Overview of Geant4 Visualization Momentum (MeV) — 0-2.5 — 2.5-5 — 5-7.5 — 7.5-10 — 10-10.25 — 12.5+ Interactive Control of Trajectory and Hit Filtering IMag > 2.5 MeV IMag > 2.5 MeV, particle = gamma

20 15 Sept 2007 20J. Perl Overview of Geant4 Visualization Sample Macro Commands /vis/modeling/trajectories/drawByAttribute-0/setAttribute IMag /vis/modeling/trajectories/drawByAttribute-0/addInterval interval1 0.0 keV 2.5MeV /vis/modeling/trajectories/drawByAttribute-0/addInterval interval2 2.5 MeV 5 MeV /vis/modeling/trajectories/drawByAttribute-0/addInterval interval3 5 MeV 7.5 MeV /vis/modeling/trajectories/drawByAttribute-0/addInterval interval4 7.5 MeV 10 MeV /vis/modeling/trajectories/drawByAttribute-0/addInterval interval5 10 MeV 12.5 MeV /vis/modeling/trajectories/drawByAttribute-0/addInterval interval6 12.5 MeV 10000 MeV /vis/modeling/trajectories/drawByAttribute-0/interval1/setLineColourRGBA 0.8 0 0.8 1 /vis/modeling/trajectories/drawByAttribute-0/interval2/setLineColourRGBA 0.23 0.41 1 1 /vis/modeling/trajectories/drawByAttribute-0/interval3/setLineColourRGBA 0 1 0 1 /vis/modeling/trajectories/drawByAttribute-0/interval4/setLineColourRGBA 1 1 0 1 /vis/modeling/trajectories/drawByAttribute-0/interval5/setLineColourRGBA 1 0.3 0 1 /vis/modeling/trajectories/drawByAttribute-0/interval6/setLineColourRGBA 1 0 0 1 /vis/filtering/trajectories/create/attributeFilter /vis/filtering/trajectories/attributeFilter-0/setAttribute IMag /vis/filtering/trajectories/attributeFilter-0/addInterval 2.5 MeV 1000 MeV /vis/filtering/trajectories/create/particleFilter /vis/filtering/trajectories/particleFilter-0/add gamma Momentum interval based colour scale Momentum filter Gamma filter Configure visualisation properties Momentum filter

21 15 Sept 2007 21J. Perl Overview of Geant4 Visualization Extra Information Available from the Trajectory Most users use the standard G4Trajectory Smooth Trajectory adds auxiliary points to allow smoother line in visualization (not Geant4 Steps, no physics at auxiliary points) Useful when trajectories are highly curved due to magnetic fields Rich Trajectory encodes additional information at every step point Control via: /vis/scene/add/trajectories /vis/scene/add/trajectories smooth /vis/scene/add/trajectories rich /vis/scene/add/trajectories smooth rich If you actually want to display the trajectory points, you need to issue the appropriate trajectory modeling commands, such as: /vis/modeling/trajectories/create/generic /vis/modeling/trajectories/generic-0/default/setDrawStepPts true /vis/modeling/trajectories/generic-0/default/setStepPtsSize 16 /vis/modeling/trajectories/generic-0/default/setStepPtsColour red

22 15 Sept 2007 22J. Perl Overview of Geant4 Visualization Regular versus Smooth Trajectory Regular Trajectory is a polyline made up of only the actual steps used by Geant4 Smooth Trajectory includes additional points to make the polyline appear smoother. These additional points are not Geant4 steps. They are only used by visualization.

23 15 Sept 2007 23J. Perl Overview of Geant4 Visualization Smooth Trajectory for Vis in Magnetic Fields Yellow dots are the actual step points used by Geant4 Magenta dots are auxiliary points added just for purposes of visualization

24 15 Sept 2007 24J. Perl Overview of Geant4 Visualization Rich Trajectory

25 15 Sept 2007 25J. Perl Overview of Geant4 Visualization Movies: Stitched Together from Multiple Stills http://www.hep.man.ac.uk/u/johna/pub/Geant4/Movies/g4RayTracer.mpg

26 15 Sept 2007 26J. Perl Overview of Geant4 Visualization Movies: Live from Geant4 OpenGL

27 15 Sept 2007 27J. Perl Overview of Geant4 Visualization gMocren - to Visualization Volume Data Geant4 has been interfaced to a commercial tool for visualization of voxel data. Free to all Geant4 users. Does not actually function as integral part of the Geant4 visualization system. Implemented as a G4 example, outputs data in form appropriate for gMocren Ayumi Saitoh, Akinori Kimura, Satoshi Takana

28 15 Sept 2007 28J. Perl Overview of Geant4 Visualization Project Lead: Jane Tinslay Coming Soon: Visualization of Fields

29 15 Sept 2007 29J. Perl Overview of Geant4 Visualization References and Further Resources

30 15 Sept 2007 30J. Perl Overview of Geant4 Visualization Geant4 Visualization Resources Geant4 Installation Guides  http://geant4.slac.stanford.edu/installation Hands on HepRApp Tutorial  http://geant4.slac.stanford.edu/Presentations/vis/G4HepRAppTutorial/G4HepRAppTutorial.html Hands on DAWN Tutorial  http://geant4.slac.stanford.edu/Presentations/vis/G4DAWNTutorial/G4DAWNTutorial.html Hands on OpenGL Tutorial  http://geant4.slac.stanford.edu/Presentations/vis/G4OpenGLTutorial/G4OpenGLTutorial.html Introduction to Geant4 Visualization  http://geant4.slac.stanford.edu/Presentations/vis/G4VisIntroduction.ppt (and.pdf) Geant4 Visualization Commands  http://geant4.slac.stanford.edu/Presentations/vis/G4VisCommands.ppt (and.pdf) Geant4 Advanced Visualization  http://geant4.slac.stanford.edu/Presentations/vis/G4VisAdvanced.ppt (and.pdf) How to Make a Movie  http://geant4.slac.stanford.edu/Presentations/vis/HowToMakeAMovie.ppt (and.pdf) Visualization Chapter of the Geant4 User’s Guide for Application Developers  http://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

31 15 Sept 2007 31J. Perl Overview of Geant4 Visualization References OpenScientist Home Page http://openscientist.lal.in2p3.fr OpenScientist Home Page http://openscientist.lal.in2p3.fr http://openscientist.lal.in2p3.fr HepRep: a generic interface definition for HEP event display representables http://www.slac.stanford.edu/~perl/heprep HepRep: a generic interface definition for HEP event display representables http://www.slac.stanford.edu/~perl/heprep http://www.slac.stanford.edu/~perl/heprep HepRApp HepRep Browser http://www.slac.stanford.edu/~perl/HepRApp HepRApp HepRep Browser http://www.slac.stanford.edu/~perl/HepRApp http://www.slac.stanford.edu/~perl/HepRApp Wired4 JAS Plug-In http://wired.freehep.org Wired4 JAS Plug-In http://wired.freehep.org Fred: oh no, another event display (a HepRep client) http://www.fisica.uniud.it/~glast/FRED Fred: oh no, another event display (a HepRep client) http://www.fisica.uniud.it/~glast/FRED DAWN Home Page http://geant4.kek.jp/~tanaka/DAWN/About_DAWN.html DAWN Home Page http://geant4.kek.jp/~tanaka/DAWN/About_DAWN.html http://geant4.kek.jp/~tanaka/DAWN/About_DAWN.html DAWNCUT Home Page http://geant4.kek.jp/~tanaka/DAWN/About_DAWNCUT.html DAWNCUT Home Page http://geant4.kek.jp/~tanaka/DAWN/About_DAWNCUT.html http://geant4.kek.jp/~tanaka/DAWN/About_DAWNCUT.html DAVID Home Page http://geant4.kek.jp/~tanaka/DAWN/About_DAVID.html DAVID Home Page http://geant4.kek.jp/~tanaka/DAWN/About_DAVID.html http://geant4.kek.jp/~tanaka/DAWN/About_DAVID.html Satoshi Tanaka’s GEANT4 Ritsumeikan University Group Home Page (more information on DAWN, sample PRIM files, images, etc.) http://geant4.kek.jp/~tanaka/ Satoshi Tanaka’s GEANT4 Ritsumeikan University Group Home Page (more information on DAWN, sample PRIM files, images, etc.) http://geant4.kek.jp/~tanaka/ http://geant4.kek.jp/~tanaka/


Download ppt "15 Sept 2007 J. Perl Overview of Geant4 Visualization 1 HepRep/HepRApp DAWN OpenGL Overview of Geant4 Visualization Geant4 Mini-Tutorial Hebden Bridge."

Similar presentations


Ads by Google