12 May 2007 Geant4 Visualization Commands J. Perl 1 DAWN OpenGL Geant4 Visualization Commands Basic Visualization Commands Joseph Perl, SLAC HepRep/HepRApp.

Slides:



Advertisements
Similar presentations
1 CSC 551: Web Programming Spring 2004 client-side programming with JavaScript  scripts vs. programs  JavaScript vs. JScript vs. VBScript  common tasks.
Advertisements

The Web Warrior Guide to Web Design Technologies
11 January 2011 Geant4 Visualization Commands J. Perl 1 DAWN OpenGL Geant4 Visualization Commands Basic Visualization Commands Makoto Asai (SLAC) slides.
Geometry Control – Modifying and Relimiting; Using Axes and Transformation Ideas Chapter 2: 2.4 & 2.5 R. Lindeke IE 1225.
Introduction to Geant4 Visualization
10 January 2011 Introduction to Geant4 Visualization J. Perl 1 DAWN OpenGL So many options, it needs three title pages Introduction to Geant4 Visualization.
12 Dec 2006 J. Perl Recent Developments in Geant4 Vis 1 HepRep/WIRED DAWN OpenGL Recent Developments in Geant4 Visualization Geant4 Lecture Course Tsukuba,
Automating Tasks With Macros
April 2007 J. Perl Geant4 Review 2007: Visualization 1 HepRep/HepRApp DAWN OpenGL Geant4 Review 2007: Visualization Geant4 Review April at CERN.
12 January 2011 Geant4 Advanced Visualization J. Perl 1 DAWN OpenGL How to Control the Drawing Style and Filtering of Detector Geometry and Trajectories,
15 Sept 2007 J. Perl Overview of Geant4 Visualization 1 HepRep/HepRApp DAWN OpenGL Overview of Geant4 Visualization Geant4 Mini-Tutorial Hebden Bridge.
14 June 2010 Introduction to Geant4 Visualization J. Perl 1 DAWN OpenGL So many options, it needs two title pages Introduction to Geant4 Visualization.
14 User Documents and Examples I SLAC Geant4 Tutorial 3 November 2009 Dennis Wright Geant4 V9.2.p02.
12 May 2007 J. Perl Future Plans for Geant4 Visualization 1 HepRep/HepRApp DAWN OpenGL Future Plans for Geant4 Visualization What’s Planned for the Next.
18th September 2007New Features in G4 Visualisation Hebden Bridge 1 Visualisation New or improved features 2007 Smooth trajectories Event keeping Picking.
Geant4 Visualization Review
11 May 2007 J. Perl How to Make a Movie 1 Geant4 Visualization Special Topic: How to Make a Movie Joseph Perl SLAC.
10 Nov 2006 J. Perl How to Make a Movie 1 Geant4 Visualization Special Topic: How to Make a Movie Geant4 Spenvis Joint Workshop Joseph Perl SLAC.
Introduction to Geant4 Visualization
DB Audit Expert v1.1 for Oracle Copyright © SoftTree Technologies, Inc. This presentation is for DB Audit Expert for Oracle version 1.1 which.
Chapter 9 Introduction to ActionScript 3.0. Chapter 9 Lessons 1.Understand ActionScript Work with instances of movie clip symbols 3.Use code snippets.
Creating a MagicInfo Pro Screen Template
LATTICE TECHNOLOGY, INC. For Version 9.0 and later XVL Web Master Tutorial For Version 9.0 and later.
Visualisation and (G)UI Authors: Hajime Yoshida and Satoshi Tanaka.
Moodle (Course Management Systems). Assignments 1 Assignments are a refreshingly simple method for collecting student work. They are a simple and flexible.
06/10/ Working with Data. 206/10/2015 Learning Objectives Explain the circumstances when the following might be useful: Disabling buttons and.
Tutorial 111 The Visual Studio.NET Environment The major differences between Visual Basic 6.0 and Visual Basic.NET are the latter’s support for true object-oriented.
S. Guatelli, CPS Innovations, Knoxville, 13 th -21 st January Brachytherapy exercise.
Pedro Arce Introducción a GEANT4 1 GAMOS tutorial Plug-in’s Exercises Pedro Arce Dubois CIEMAT
Fluidix Getting Started with Fluidix © 2008 Adam MacDonald, Dr. David Pink, StFX University, OneZero Software.
S. Guatelli, M.G Pia, INFN Genova G. Cosmo, S. Guatelli, M.G Pia Salamanca, July 2002
Computer Literacy BASICS: A Comprehensive Guide to IC 3, 5 th Edition Lesson 19 Organizing and Enhancing Worksheets 1 Morrison / Wells / Ruffolo.
Geant4 Visualization 1 OpenGL DAWN VRML. Visualization Visualization Seeing what one does usually helps One can visualize geometry, hits, trajectories.
Topic 1 Object Oriented Programming. 1-2 Objectives To review the concepts and terminology of object-oriented programming To discuss some features of.
Chapter 11: Block References and Attributes. After completing this Chapter, you will be able to use the following features: Create and insert block references.
WIRED 4 An extensible generic Event Display Mark Donszelmann SLAC, Stanford, U.S.A. CHEP2004, 27 september – 1 october Interlaken, Switzerland.
7 June 2005 Visualization & GGE Demo J. Perl 1 HepRep/WIRED DAWN OpenGL Geant4 Visualization & GGE Demo Joseph Perl, SLAC.
Programming with Microsoft Visual Basic th Edition
3D Viewers Two main uses: –Detector/event exploration – interactivity priority (15fps min). –Generate presentation material (still/movie renders) – quality.
12 October 2006 G4Vis: Status, New Features and Issues 1 HepRep/WIRED DAWN OpenGL G4Vis: Status, New Features and Issues Geant4 Collaboration Workshop.
Chapter 9 Advanced Assembly Modeling Techniques. After completing this chapter, you will be able to perform the following: –Create design view representations.
Chapter 9 Advanced Assembly Modeling Techniques. After completing this chapter, you will be able to perform the following: –Create sketch blocks –Create.
C++ / G4MICE Course Session 5 Materials in G4MICE Units in G4MICE Visualisation in G4MICE G4MICE Modelling.
Graphics Concepts CS 2302, Fall /17/20142 Drawing in Android.
PACS NHSC Data Processing Workshop – Pasadena 10 th - 14 th Sep 2012 HIPE Introduction and Setup for SPIRE David Shupe, NHSC/IPAC on behalf of the SPIRE.
Securing and Sharing Workbooks Lesson 11. The Review Tab Microsoft Excel provides several layers of security and protection that enable you to control.
May 20, 2005Wah-kai Ngai1 Basic Visualization Tutorial Using Geant4.
Chapter 9 Advanced Assembly Modeling Techniques. After completing this chapter, you will be able to perform the following: –Create sketch blocks –Create.
Geant4 examples Sébastien Incerti On behalf of the Geant4 collaboration with special thanks to Luciano Pandola, INFN.
Project 5: Using Pop-Up Windows Essentials for Design JavaScript Level One Michael Brooks.
Update G4builder issues Talk written almost entirely by Stan Bentvelsen with a few updates from Christopher Lester ATLAS G4 Workshop December 2000 CAMBRIDGE.
IMS 3253: Controls 1 Dr. Lawrence West, MIS Dept., University of Central Florida Topics Check Boxes Radio Buttons Date Time Picker Masked.
Visualisation, (G)UI and Analysis The full set of lecture notes of this Geant4 Course is available at
June 4-8, G4 Paris Visualization II P. Gueye/J. Perl 1 DAWN OpenGL Geant4 Visualization Commands Basic Visualization Commands Paul Guèye, HU Courtesy:
Geometry 3 I.Hrivnacova IPN, Orsay Most slides thanks to M. Asai, SLAC Cours Paris June 2007.
1 CW11 Visualizing ACE3P Results in ParaView Greg Schussman Menlo Park, CA October 10, 2011.
Chapter 9 Advanced Assembly Modeling Techniques. After completing this chapter, you will be able to perform the following: –Create design view representations.
Starting with an example PART I Set your environment up and get a Geant4 example.
New and Recent Features of Geant4 Visualisation 2016 Sep 2016John Allison -- G4 Workshop Ferrara1.
Reading and Writing Image Files
Reviewing Documents Guided Lesson.
User Documents and Examples I
Visualisation and (G)UI
Introduction to Events
Geant4 Visualization Commands
Geant4 Advanced Visualization
The full set of lecture notes of this Geant4 Course is available at
Visualisation, (G)UI and Analysis
GAMOS tutorial Plug-in’s Exercises
WIRED 4 Event Display Linear Collider Simulation Workshop
Presentation transcript:

12 May 2007 Geant4 Visualization Commands J. Perl 1 DAWN OpenGL Geant4 Visualization Commands Basic Visualization Commands Joseph Perl, SLAC HepRep/HepRApp

12 May Geant4 Visualization Commands J. Perl How this Document Fits with Other Tutorial Materials This presentation can be used on its own, but gives the most comprehensive introduction to Geant4 visualization when used as part of the following full set of documents: This presentation can be used on its own, but gives the most comprehensive introduction to Geant4 visualization when used as part of the following full set of documents: Introduction to Geant4 Visualization Introduction to Geant4 Visualization Introduction to Geant4 Visualization Introduction to Geant4 Visualization Geant4 Installation Guides Geant4 Installation Guides Geant4 Installation Guides Geant4 Installation Guides Geant4 Visualization Tutorial using the HepRApp HepRep Browser Geant4 Visualization Tutorial using the HepRApp HepRep Browser Geant4 Visualization Tutorial using the HepRApp HepRep Browser Geant4 Visualization Tutorial using the HepRApp HepRep Browser Geant4 Visualization Tutorial using the DAWN Event Display Geant4 Visualization Tutorial using the DAWN Event Display Geant4 Visualization Tutorial using the DAWN Event Display Geant4 Visualization Tutorial using the DAWN Event Display Geant4 Visualization Tutorial using the OpenGL Event Display Geant4 Visualization Tutorial using the OpenGL Event Display Geant4 Visualization Tutorial using the OpenGL Event Display Geant4 Visualization Tutorial using the OpenGL Event Display Geant4 Visualization Commands Geant4 Visualization Commands Geant4 Visualization Commands Geant4 Visualization Commands Geant4 Advanced Visualization Geant4 Advanced Visualization Geant4 Advanced Visualization Geant4 Advanced Visualization See the URLS at the end of this presentation See the URLS at the end of this presentation This presentation discusses seven visualization drivers: This presentation discusses seven visualization drivers: OpenGL OpenGL OpenInventor OpenInventor HepRep HepRep DAWN DAWN VRML VRML RayTracer RayTracer ASCIITree ASCIITree

12 May Geant4 Visualization Commands J. Perl What’s in this Presentation This presentation covers just enough about Geant4 Visualization Commands to get you started (plus a few interesting small digressions) This presentation covers just enough about Geant4 Visualization Commands to get you started (plus a few interesting small digressions) Further presentations cover more advanced topics Further presentations cover more advanced topics modeling modeling filtering filtering movies movies etc. etc. See references at the end of this presentation See references at the end of this presentation

12 May Geant4 Visualization Commands J. Perl Visualization Commands Open a visualization driver, such as: Open a visualization driver, such as: /vis/open HepRepFile /vis/open HepRepFile Add the detector geometry Add the detector geometry /vis/drawVolume /vis/drawVolume  If using an immediate viewer, such as OpenGL, set camera parameters and drawing style (wireframe/surface), such as: /vis/viewer/set/style wireframe /vis/viewer/set/style wireframe /vis/viewer/set/viewpointThetaPhi /vis/viewer/set/viewpointThetaPhi Declare what data should be added to the scene (default is to just add full set of detector volumes) Declare what data should be added to the scene (default is to just add full set of detector volumes) /vis/scene/add/trajectories /vis/scene/add/trajectories /vis/scene/add/hits /vis/scene/add/hits Run simulation with appropriate options to store trajectory information: Run simulation with appropriate options to store trajectory information: /run/beamOn 1 /run/beamOn 1 Execute the visualization (done automatically with each /run/beamOn, but needed by some drivers if you want to output geometry without running an event): Execute the visualization (done automatically with each /run/beamOn, but needed by some drivers if you want to output geometry without running an event): /vis/viewer/flush /vis/viewer/flush  If using an external viewer, such as for HepRepFile or DAWNFILE: import the.heprep or.prim file into HepRApp or DAWN, set camera parameters, drawing style, etc., view the visualization import the.heprep or.prim file into HepRApp or DAWN, set camera parameters, drawing style, etc., view the visualization

12 May Geant4 Visualization Commands J. Perl Example Visualization Command Sequences Visualize a detector in OpenGL (Linux or Mac): Visualize a detector in OpenGL (Linux or Mac): /vis/open OGLIX /vis/open OGLIX /vis/drawVolume /vis/drawVolume Visualize a detector in OpenGL (Windows): Visualize a detector in OpenGL (Windows): /vis/open OGLSWin32 /vis/open OGLSWin32 /vis/drawVolume /vis/drawVolume Visualize trajectories and hits for 10 events using HepRep/HepRApp Visualize trajectories and hits for 10 events using HepRep/HepRApp /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

12 May Geant4 Visualization Commands J. Perl 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 ) :

12 May Geant4 Visualization Commands J. Perl 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.

12 May Geant4 Visualization Commands J. Perl Details of the /vis/open Command To Open a Driver To Open a Driver /vis/open /vis/open for example for example /vis/open OGLIX /vis/open OGLIX /vis/open HepRepFile /vis/open HepRepFile /vis/open DAWNFILE /vis/open DAWNFILE The set of available drivers is listed when you first start Geant4, but you can also get this list with the command: The set of available drivers is listed when you first start Geant4, but you can also get this list with the command: help /vis/open help /vis/open You can open more than one driver at a time: You can open more than one driver at a time: /vis/open OGLIX /vis/open OGLIX /vis/open HepRepFile /vis/open HepRepFile /vis/viewer/list /vis/viewer/list /vis/viewer/select viewer-0 /vis/viewer/select viewer-0 /vis/viewer/select viewer-1 /vis/viewer/select viewer-1

12 May Geant4 Visualization Commands J. Perl Details of the /vis/viewer/… Commands To Set Camera Parameters and Drawing Style. To Set Camera Parameters and Drawing Style. Only needed if using an immediate viewer, such as OpenGL 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 For HepRepFile or DAWNFILE, these sorts of adjustments are made later, in the HepRApp or DAWN viewer programs Reset viewpoint Reset viewpoint /vis/viewer/reset /vis/viewer/reset Set view angles Set view angles /vis/viewer/set/viewpointThetaPhi /vis/viewer/set/viewpointThetaPhi for example for example /vis/viewer/set/viewpointThetaPhi /vis/viewer/set/viewpointThetaPhi Set drawing style Set drawing style /vis/viewer/set/style /vis/viewer/set/style for example for example /vis/viewer/set/style wireframe /vis/viewer/set/style wireframe /vis/viewer/set/style surface /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 but note that this will not affect volumes that have style explicitly forced by “setForceWireframe” or “setForceSolid” commands in the c++ code

12 May Geant4 Visualization Commands J. Perl More Details of the /vis/viewer/… Commands Zoom Zoom /vis/viewer/zoom /vis/viewer/zoom for example for example /vis/viewer/zoom 2. /vis/viewer/zoom 2. Some drivers support different zoom along different axes (e.g., zoom more in X and Y but not in Z) Some drivers support different zoom along different axes (e.g., zoom more in X and Y but not in Z) /vis/viewer/scale /vis/viewer/scale Some drivers allow you to section the view, that is, cut it away along a specified plane (but this generally works only for simple geometries) Some drivers allow you to section the view, that is, cut it away along a specified plane (but this generally works only for simple geometries) /vis/viewer/set/sectionPlane [on|off] [unit of point] /vis/viewer/set/sectionPlane [on|off] [unit of point] e.g., for a y-z plane at x = 1 cm: /vis/viewer/set/sectionPlane on cm e.g., for a y-z plane at x = 1 cm: /vis/viewer/set/sectionPlane on cm 1 0 0

12 May Geant4 Visualization Commands J. Perl Hidden 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 are affected by this feature. You can control whether this removal is done and whether trajectories and hits are affected by this feature. By default, hidden line removal is disabled By default, hidden line removal is disabled To turn on hidden line removal To turn on hidden line removal /vis/viewer/set/hiddenEdge 1 /vis/viewer/set/hiddenEdge 1 This hides edges of geometry, but lets trajectories through. This hides edges of geometry, but lets trajectories through. To hide trajectories and hits as well To hide trajectories and hits as well /vis/viewer/set/hiddenMarker 1 /vis/viewer/set/hiddenMarker 1

12 May Geant4 Visualization Commands J. Perl 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 box km will draw the world with the positive octant cut away. vis/scene/add/volume world box km will draw the world with the positive octant cut away.

12 May Geant4 Visualization Commands J. Perl Even more Control over Level of Detail in Detector Geometry Additional commands allow finer control including whether or not to draw Boolean components, voxels and readout geometries: Additional commands allow finer control including whether or not to draw Boolean components, voxels and readout geometries: /vis/specify [depth-of-descent] [ ] [ ] [ ] /vis/scene/add/logicalVolume [ ] [ ] [ ] Culling allows you to specify that covered daughters or low density volumes are omitted: Culling allows you to specify that covered daughters or low density volumes are omitted: /vis/viewer/set/culling global|coveredDaughters|invisible|density [true|false] [density] [unit] HepRepFile will still include these culled objects, but just make them initially invisible. Idea is that you might later decide you want to see these. To really omit them from the HepRepFile, as you may wish to do to make the file smaller, set the environment variable before you run: G4HEPREPFILE_CULL=1

12 May Geant4 Visualization Commands J. Perl Details of Visualizing Trajectories and Hits To add trajectories or hits to the scene To add trajectories or hits to the scene /vis/scene/add/trajectories /vis/scene/add/trajectories /vis/scene/add/hits /vis/scene/add/hits Run using the command Run using the command /run/beamOn /run/beamOn If you place a number after beamOn, the run will go for that many events If you place a number after beamOn, the run will go for that many events /run/beamOn 10 /run/beamOn 10

12 May Geant4 Visualization Commands J. Perl Accumulating Trajectories and Hits By default, you will get a drawing after each event. To instead get just one drawing with all of the accumulated events from that run By default, you will get a drawing after each event. To instead get just one drawing with all of the accumulated events from that run /vis/scene/endOfEventAction accumulate /vis/scene/endOfEventAction accumulate This overrides the default This overrides the default /vis/scene/endOfEventAction refresh /vis/scene/endOfEventAction refresh To even suppress that one drawing from the end of the /run/beamOn, use To even suppress that one drawing from the end of the /run/beamOn, use /vis/scene/endOfRunAction accumulate /vis/scene/endOfRunAction accumulate This overrides the default This overrides the default /vis/scene/endOfRunAction refresh /vis/scene/endOfRunAction refresh When you actually want to draw, you then have to explicitly issue the command When you actually want to draw, you then have to explicitly issue the command /vis/viewer/flush /vis/viewer/flush

12 May Geant4 Visualization Commands J. Perl Reviewing Kept Events If you have accumulated several events in your visualization, you can still go back afterwards and view the events individually. For each event, you can execute various vis commands to rotate, zoom, output to a different vis driver, etc. If you have accumulated several events in your visualization, you can still go back afterwards and view the events individually. For each event, you can execute various vis commands to rotate, zoom, output to a different vis driver, etc. /vis/reviewKeptEvents /vis/reviewKeptEvents Each time you type “continue”, you will get to the next kept event. Each time you type “continue”, you will get to the next kept event. To quit reviewing events: To quit reviewing events: /vis/abortReviewKeptEvents /vis/abortReviewKeptEvents and then again type “continue” and then again type “continue” You can also use a command or c++ calls to force keeping of specific events regardless of how visualization is accumulating them. You can also use a command or c++ calls to force keeping of specific events regardless of how visualization is accumulating them. e.g., keep events based on a particular hit or trigger pattern e.g., keep events based on a particular hit or trigger pattern From the command line: From the command line: /event/keepCurrentEvent /event/keepCurrentEvent From C++ From C++ G4EventManager->KeepTheCurrentEvent() G4EventManager->KeepTheCurrentEvent() This feature makes it easy to do a large run and then recall for visualization only those events that are of interest This feature makes it easy to do a large run and then recall for visualization only those events that are of interest

12 May Geant4 Visualization Commands J. Perl Compound Commands To allow you to work quickly, Geant4 visualization lets you issue the equivalent of several common commands at one time by using a “compound command”. To allow you to work quickly, Geant4 visualization lets you issue the equivalent of several common commands at one time by using a “compound command”. Some of the commands you have already seen in this presentation are actually compound commands: Some of the commands you have already seen in this presentation are actually 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

12 May Geant4 Visualization Commands J. Perl Geant4 Visualization in Standalone Mode The Geant4 Visualization system can be used on its own - without the rest of Geant4. The Geant4 Visualization system can be used on its own - without the rest of Geant4. Build something “by hand” from the Geant4 geometry primitives and placement apparatus, but without any of the main parts of Geant4 such as detector construction, run manager or physics list. Build something “by hand” from the Geant4 geometry primitives and placement apparatus, but without any of the main parts of Geant4 such as detector construction, run manager or physics list. Still preserves all of the interactive apparatus of the visualization system. Still preserves all of the interactive apparatus of the visualization system. From next Geant4 release (Geant4.8.0) there will be an example: /examples/extended/visualization/standalone From next Geant4 release (Geant4.8.0) there will be an example: /examples/extended/visualization/standalone // Simple box... pVisManager->Draw(G4Box("box",2*m,2*m,2*m), G4VisAttributes(G4Colour(1,1,0))); // Boolean solid... G4Box boxA("boxA",3*m,3*m,3*m); G4Box boxB("boxB",1*m,1*m,1*m); G4SubtractionSolid subtracted("subtracted_boxes",&boxA,&boxB, G4Translate3D(3*m,3*m,3*m)); pVisManager->Draw(subtracted, G4VisAttributes(G4Colour(0,1,1)), G4Translate3D(-6*m,-6*m,-6*m));

12 May Geant4 Visualization Commands J. Perl Complete List of 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. 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. 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., type help and then type the appropriate number for “vis”). To see the complete set of commands, use the interactive command guidance (i.e., type help and then type the appropriate number for “vis”). Note that many of the command details are only loaded into the help system once you start 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.

12 May Geant4 Visualization Commands J. Perl Geant4 Visualization Resources Geant4 Installation Guides  Hands on HepRApp Tutorial  Hands on DAWN Tutorial  Hands on OpenGL Tutorial  Geant4 Visualization Commands  (and.pdf) Geant4 Advanced Visualization  (and.pdf) How to Make a Movie  (and.pdf) Visualization Chapter of the Geant4 User’s Guide for Application Developers  List of Visualization Commands:  AllResources/Control/UIcommands/_vis_.html For Questions or Comments: Geant4 Visualization Online Forum: 