source: trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/Visualization/visdrivers.xml @ 1211

Last change on this file since 1211 was 1211, checked in by garnier, 15 years ago

CVS update

File size: 46.4 KB
Line 
1<!-- ******************************************************** -->
2<!--                                                          -->
3<!--  [History]                                               -->
4<!--    Changed by: Dennis Wright, 27-Nov-2001                -->
5<!--    Converted to DocBook: Katsuya Amako, Aug-2006         -->
6<!--    Updates for Qt and HepRApp: Joseph Perl, Dec-2008     -->
7<!--    Added a reference: Laurent Garnier, Dec-2009          -->
8<!--                                                          -->
9<!-- ******************************************************** -->
10
11
12<!-- ******************* Section (Level#1) ****************** -->
13<sect1 id="sect.VisDrv">
14<title>
15The Visualization Drivers
16</title>
17
18<para>
19As explained in the
20<!-- !!! xref linkend=""/ or ulink url="" -->
21Introduction to Visualization
22<!-- !! /ulink (remove this tag for xref) -->
23, Geant4 provides many different choices of
24visualization systems. Features and notes on each driver are
25briefly described here along with links to detailed web pages for
26the various drivers.
27</para>
28
29<para>
30Details are given below for:
31
32<itemizedlist spacing="compact">
33  <listitem><para>
34    <xref linkend="sect.VisDrv.OpenGL" />
35    OpenGL
36  </para></listitem>
37  <listitem><para>
38    <xref linkend="sect.VisDrv.Qt" />
39    Qt
40  </para></listitem>
41  <listitem><para>
42    <xref linkend="sect.VisDrv.OpenInv" />
43    OpenInventor
44  </para></listitem>
45  <listitem><para>
46    <xref linkend="sect.VisDrv.HepRep" />
47    HepRepFile
48  </para></listitem>
49  <listitem><para>
50    <xref linkend="sect.VisDrv.HepRepXML" />
51    HepRepXML
52  </para></listitem>
53  <listitem><para>
54    <xref linkend="sect.VisDrv.DAWN" />
55    DAWN
56  </para></listitem>
57  <listitem><para>
58    <xref linkend="sect.VisDrv.VRML" />
59    VRML
60  </para></listitem>
61  <listitem><para>
62    <xref linkend="sect.VisDrv.RayTrc" />
63    RayTracer
64  </para></listitem>
65  <listitem><para>
66    <xref linkend="sect.VisDrv.DetTree" />
67    ASCIITree
68  </para></listitem>
69  <listitem><para>
70    <xref linkend="sect.VisDrv.GAGTree" />
71    GAGTree
72  </para></listitem>
73  <listitem><para>
74    <xref linkend="sect.VisDrv.XMLTree" />
75    XMLTree
76  </para></listitem>
77</itemizedlist>
78</para>
79
80
81<!-- ******************* Section (Level#2) ****************** -->
82<sect2 id="sect.VisDrv.Avail">
83<title>
84Availability of drivers on the supported systems
85</title>
86
87<para>
88<xref linkend="table.VisDrv_1" /> lists required graphics systems
89and supported platforms for the various visualization drivers
90
91<table id="table.VisDrv_1">
92<title>
93Required graphics systems and supported platforms for the various
94visualization drivers.
95</title>
96
97<tgroup cols="3">
98  <tbody>
99  <row>
100    <entry>
101      <emphasis role="bold">Driver</emphasis>
102    </entry>
103    <entry>
104      <emphasis role="bold">Required Graphics System</emphasis>
105    </entry>
106    <entry>
107      <emphasis role="bold">Platform</emphasis>
108    </entry>
109  </row>
110  <row>
111    <entry>
112      OpenGL-Xlib
113    </entry>
114    <entry>
115      OpenGL
116    </entry>
117    <entry>
118      Linux, UNIX, Mac with Xlib
119    </entry>
120  </row>
121  <row>
122    <entry>
123      OpenGL-Motif
124    </entry>
125    <entry>
126      OpenGL
127    </entry>
128    <entry>
129      Linux, UNIX, Mac with Motif
130    </entry>
131  </row>
132  <row>
133    <entry>
134      OpenGL-Win32
135    </entry>
136    <entry>
137      OpenGL
138    </entry>
139    <entry>
140      Windows
141    </entry>
142  </row>
143  <row>
144    <entry>
145      Qt
146    </entry>
147    <entry>
148      Qt, OpenGL
149    </entry>
150    <entry>
151      Linux, UNIX, Mac, Windows
152    </entry>
153  </row>
154  <row>
155    <entry>
156      OpenInventor-X
157    </entry>
158    <entry>
159      OpenInventor, OpenGL
160    </entry>
161    <entry>
162      Linux, UNIX, Mac with Xlib or Motif
163    </entry>
164  </row>
165  <row>
166    <entry>
167      OpenInventor-Win32
168    </entry>
169    <entry>
170      OpenInventor, OpenGL
171    </entry>
172    <entry>
173      Windows
174    </entry>
175  </row>
176  <row>
177    <entry>
178      HepRep
179    </entry>
180    <entry>
181      HepRApp, FRED or WIRED4 HepRep Browser
182    </entry>
183    <entry>
184      Linux, UNIX, Mac, Windows
185    </entry>
186  </row>
187  <row>
188    <entry>
189      DAWNFILE
190    </entry>
191    <entry>
192      Fukui Renderer DAWN
193    </entry>
194    <entry>
195      Linux, UNIX, Mac, Windows
196    </entry>
197  </row>
198  <row>
199    <entry>
200      DAWN-Network
201    </entry>
202    <entry>
203      Fukui Renderer DAWN
204    </entry>
205    <entry>
206      Linux, UNIX
207    </entry>
208  </row>
209  <row>
210    <entry>
211      VRMLFILE
212    </entry>
213    <entry>
214      any VRML viewer
215    </entry>
216    <entry>
217      Linux, UNIX, Mac, Windows
218    </entry>
219  </row>
220  <row>
221    <entry>
222      VRML-Network
223    </entry>
224    <entry>
225      any network-enabled VRML viewer
226    </entry>
227    <entry>
228      Linux, UNIX
229    </entry>
230  </row>
231  <row>
232    <entry>
233      RayTracer
234    </entry>
235    <entry>
236      any JPEG viewer
237    </entry>
238    <entry>
239      Linux, UNIX, Mac, Windows
240    </entry>
241  </row>
242  <row>
243    <entry>
244      ASCIITree
245    </entry>
246    <entry>
247      none
248    </entry>
249    <entry>
250      Linux, UNIX, Mac, Windows
251    </entry>
252  </row>
253  <row>
254    <entry>
255      GAGTree
256    </entry>
257    <entry>
258      GAG
259    </entry>
260    <entry>
261      Linux, UNIX, Mac, Windows
262    </entry>
263  </row>
264  <row>
265    <entry>
266      XMLTree
267    </entry>
268    <entry>
269      any XML viewer
270    </entry>
271    <entry>
272      Linux, UNIX, Mac, Windows
273    </entry>
274  </row>
275  </tbody>
276</tgroup>
277</table>
278</para>
279
280</sect2>
281
282
283<!-- ******************* Section (Level#2) ****************** -->
284<sect2 id="sect.VisDrv.OpenGL">
285<title>
286OpenGL
287</title>
288
289<para>
290These drivers have been developed by John Allison and Andrew
291Walkden (University of Manchester). It is an interface to the de
292facto standard 3D graphics library, OpenGL. It is well suited for
293real-time fast visualization and demonstration. Fast visualization
294is realized with hardware acceleration, reuse of shapes stored in a
295display list, etc. NURBS visualization is also supported.
296</para>
297
298<para>
299Several versions of the OpenGL drivers are prepared. Versions
300for Xlib, Motif and Win32 platforms are available by default. For
301each version, there are two modes: immediate mode and stored mode.
302The former has no limitation on data size, and the latter is fast
303for visualizing large data repetitively, and so is suitable for
304animation.
305</para>
306
307<para>
308Output can be exported to EPS (both vector and pixel graphics)
309using vis/ogl/printEPS.
310</para>
311<para>
312More informations can be found here :  <xref linkend="sect.VisCntCmmd.SvVwPs" />
313</para>
314
315<para>
316If you don't have Motif or Qt, all control is done from Geant4
317commands:
318
319<?soft-pagebreak ?>
320<informalexample>
321<programlisting>
322     /vis/open OGLIX
323     /vis/viewer/set/viewpointThetaPhi 70 20
324     /vis/viewer/zoom 2
325     etc.
326</programlisting>
327</informalexample>
328</para>
329
330<para>
331But if you have Motif libraries, you can control Geant4 from Motif
332widgets:
333
334<informalexample>
335<programlisting>
336     /vis/open OGLIXm
337</programlisting>
338</informalexample>
339</para>
340
341<para>
342If you have Qt, see the Qt section below.
343</para>
344
345<para>
346The OpenGL driver added Smooth shading and Transparency since
347Geant4 release 8.0.
348</para>
349
350<para>
351<emphasis role="bold">Further information (OpenGL and Mesa):</emphasis>
352
353<itemizedlist spacing="compact">
354  <listitem><para>
355    <ulink url="http://www.opengl.org/">
356    http://www.opengl.org/
357    </ulink>
358  </para></listitem>
359  <listitem><para>
360    <ulink url="http://www.mesa3d.org">
361    http://www.mesa3d.org
362    </ulink>
363  </para></listitem>
364  <listitem><para>
365    <ulink url="http://geant4.slac.stanford.edu/Presentations/vis/G4OpenGLTutorial/G4OpenGLTutorial.html">
366    Geant4 Visualization Tutorial
367    </ulink>
368    using the OpenGL Graphics System
369  </para></listitem>
370</itemizedlist>
371</para>
372
373</sect2>
374
375
376<!-- ******************* Section (Level#2) ****************** -->
377<sect2 id="sect.VisDrv.Qt">
378<title>
379Qt
380</title>
381
382<para>
383This driver has been developed by Laurent Garnier (IN2P3, LAL Orsay). 
384It is an interface to the powerful application framework, Qt, now free on most 
385platforms. This driver also requires the OpenGL library.
386</para><para>
387The Qt driver is well suited for real-time fast visualization and demonstration.
388Fast visualization is realized with hardware acceleration, reuse of shapes stored in a
389display list, etc. NURBS visualization is also supported. All OpenGL 
390features are implemented in the Qt driver, but one also gets mouse
391control of rotation/translation/zoom, the ability to save your scene in many formats
392(both vector and pixel graphics) and an easy interface for making movies.
393</para><para> 
394Two display modes are available: immediate mode and stored mode.
395The former has no limitation on data size, and the latter is fast
396for visualizing large data repetitively, and so is suitable for
397animation.
398</para>
399
400<para>
401To see the visualization window :
402
403<?soft-pagebreak ?>
404<informalexample>
405<programlisting>
406     /vis/open OGLSQt  (for Stored mode)
407or
408     /vis/open OGLIQt  (for Immediate mode)
409</programlisting>
410</informalexample>
411</para>
412
413<para>
414<emphasis role="bold">Further information (Qt):</emphasis>
415<itemizedlist spacing="compact">
416  <listitem><para>
417    <ulink url="http://trolltech.com/">
418    Qt
419    </ulink>
420  </para></listitem>
421  <listitem><para>
422    <ulink url="http://users.lal.in2p3.fr/garnier/G4QtTutorial.html">
423    Geant4 Visualization Tutorial
424    </ulink>
425    using the Qt Driver
426  </para></listitem>
427</itemizedlist>
428</para>
429</sect2>
430
431
432<!-- ******************* Section (Level#2) ****************** -->
433<sect2 id="sect.VisDrv.OpenInv">
434<title>
435OpenInventor
436</title>
437
438<para>
439These drivers were developed by Jeff Kallenbach (FNAL) and Guy
440Barrand (IN2P3) based on the
441<ulink url="http://www-pat.fnal.gov/graphics/HEPVis/www">
442Hepvis class library
443</ulink>
444 originated by Joe Boudreau (Pittsburgh University). The
445OpenInventor drivers and the Hepvis class library are based on the
446well-established OpenInventor technology for scientific
447visualization. They have high extendibility. They support high
448interactivity, e.g., attribute e diting of picked objects. Some
449OpenInventor viewers support "stereoscopic" effects.
450</para>
451
452<para>
453It is also possible to save a visualized 3D scene as an
454OpenInventor-formatted file, and re-visualize the scene
455afterwards.
456</para>
457
458<para>
459Because it is connected directly to the Geant4 kernel, using
460same language as that kernel (C++), OpenInventor systems can have
461direct access to Geant4 data (geometry, trajectories, etc.).
462</para>
463
464<para>
465Because OpenInventor uses OpenGL for rendering, it supports
466lighting and transparency.
467</para>
468
469<para>
470OpenInventor provides thumbwheel control to rotate and zoom.
471</para>
472
473<para>
474OpenInventor supports picking to ask about data. [Control
475Clicking] on a volume turns on rendering of that volume's
476daughters. [Shift Clicking] a daughter turns that rendering off: If
477modeling opaque solid, effect is like opening a box to look
478inside.
479</para>
480
481<para>
482<emphasis role="bold">Further information (HEPVis and OpenScientist):</emphasis>
483
484<itemizedlist spacing="compact">
485  <listitem><para>
486    Geant4 Inventor Visualization with OpenScientist
487    <ulink url="http://openscientist.lal.in2p3.fr/v15r0/html/osc_g4_vis_ui.html">
488    http://openscientist.lal.in2p3.fr/v15r0/html/osc_g4_vis_ui.html
489    </ulink>
490  </para></listitem>
491  <listitem><para>
492    Overall OpenScientist Home
493    <ulink url="http://openscientist.lal.in2p3.fr/v15r0/html/osc_g4_vis_ui.html">
494    http://openscientist.lal.in2p3.fr/v15r0/html/osc_g4_vis_ui.html
495    </ulink>
496  </para></listitem>
497  <listitem><para>
498    HEPVis
499    <ulink url="http://www-pat.fnal.gov/graphics/HEPVis/www">
500    http://www-pat.fnal.gov/graphics/HEPVis/www
501    </ulink>
502  </para></listitem>
503</itemizedlist>
504</para>
505
506<para>
507<emphasis role="bold">Further information (OpenInventor):</emphasis>
508
509<itemizedlist spacing="compact">
510  <listitem><para>
511    <ulink url="http://oss.sgi.com/projects/inventor">
512      http://oss.sgi.com/projects/inventor
513    </ulink>
514  </para></listitem>
515  <listitem><para>
516    Josie Wernecke, "The Inventor Mentor", Addison Wesley
517    (ISBN 0-201-62495-8)
518  </para></listitem>
519  <listitem><para>
520    Josie Wernecke, "The Inventor Toolmaker", Addison Wesley
521    (ISBN 0-201-62493-1)
522  </para></listitem>
523  <listitem><para>
524    "The Open Inventor C++ Reference Manual", Addison Wesley
525    (ISBN 0-201-62491-5)
526  </para></listitem>
527</itemizedlist>
528</para>
529
530</sect2>
531
532
533<!-- ******************* Section (Level#2) ****************** -->
534<sect2 id="sect.VisDrv.HepRep">
535<title>
536HepRepFile
537</title>
538
539<para>
540The HepRepFile driver creates a HepRep XML file in the HepRep1
541format suitable for viewing with the
542<ulink url="http://www.slac.stanford.edu/~perl/HepRApp/">
543HepRApp</ulink> HepRep Browser.
544</para>
545
546<para>
547The HepRep graphics format is further described at
548<ulink url="http://www.slac.stanford.edu/~perl/heprep">
549http://www.slac.stanford.edu/~perl/heprep
550</ulink>
551.
552</para>
553
554<para>
555To write just the detector geometry to this file, use the
556command:
557
558<informalexample>
559<programlisting>
560     /vis/viewer/flush
561</programlisting>
562</informalexample>
563</para>
564
565<para>
566Or, to also include trajectories and hits (after the appropriate
567/vis/viewer/add/trajectories or /vis/viewer/add/hits commands),
568just issue:
569
570<informalexample>
571<programlisting>
572     /run/beamOn 1
573</programlisting>
574</informalexample>
575</para>
576
577<para>
578HepRepFile will write a file called G4Data0.heprep to the
579current directory. Each subsequent file will have a file name like
580G4Data1.heprep, G4Data2.heprep, etc.
581</para>
582
583<para>
584View the file using the HepRApp HepRep Browser, available from:
585</para>
586<para>
587<ulink url="http://www.slac.stanford.edu/~perl/HepRApp/">
588http://www.slac.stanford.edu/~perl/HepRApp/
589</ulink>
590.
591</para>
592
593<para>
594HepRApp allows you to pick on volumes, trajectories and hits to
595find out their associated HepRep Attributes, such as volume name,
596particle ID, momentum, etc. These same attributes can be displayed
597as labels on the relevant objects, and you can make visibility cuts
598based on these attributes ("show me only the photons", or "omit any
599volumes made of iron").
600</para>
601
602<para>
603HepRApp can read heprep files in zipped format as well as
604unzipped, so you can save space by applying gzip to the heprep
605file. This will reduce the file to about five percent of its
606original size.
607</para>
608
609<para>
610Several environment variables are available to override some of
611HepRepFile's defaults
612
613<itemizedlist spacing="compact">
614  <listitem><para>
615    You can specify a different directory for the heprep output
616    files by setting the environment variable G4HEPREPFILE_DIR, as in:
617
618    <informalexample>
619    <programlisting>
620     export G4HEPREPFILE_DIR=someOtherDir/someOtherSubDir
621    </programlisting>
622    </informalexample>
623  </para></listitem>
624  <listitem><para>
625    You can specify a different file name (the part before the
626    number) by setting the environment variable G4HEPREPFILE_NAME, as in:
627
628    <informalexample>
629    <programlisting>
630     export G4HEPREPFILE_NAME=myFileName
631    </programlisting>
632    </informalexample>
633
634    which will produce files named myFileName0.heprep,
635    myFileName1.heprep, etc.
636  </para></listitem>
637  <listitem><para>
638    You can specify that each file should overwrite the previous
639    file (always rewriting to the same file name) by setting the
640    environment variable G4HEPREPFILE_OVERWRITE, as in:
641
642    <informalexample>
643    <programlisting>
644     export G4HEPREPFILE_OVERWRITE=1
645    </programlisting>
646    </informalexample>
647
648    This may be useful in some automated applications where you always
649    want to see the latest output file in the same location.
650  </para></listitem>
651</itemizedlist>
652
653<?soft-pagebreak ?>
654<itemizedlist>
655  <listitem><para>
656    Geant4 visualization supports a concept called "culling", by
657    which certain parts of the detector can be made invisible. Since
658    you may want to control visibility from the HepRep browser, turning
659    on visibility of detector parts that had defaulted to be invisible,
660    the HepRepFile driver does not omit these invisible detector parts
661    from the HepRep file. But for very large files, if you know that
662    you will never want to make these parts visible, you can choose to
663    have them left entirely out of the file. Set the environment
664    variable G4HEPREPFILE_CULL, as in:
665
666    <informalexample>
667    <programlisting>
668     export G4HEPREPFILE_CULL=1
669    </programlisting>
670    </informalexample>
671  </para></listitem>
672</itemizedlist>
673</para>
674
675<para>
676<emphasis role="bold">Further information:</emphasis>
677
678<itemizedlist spacing="compact">
679  <listitem><para>
680    HepRApp Users Home Page:
681    <para>
682    <ulink url="http://www.slac.stanford.edu/~perl/HepRApp/">
683    http://www.slac.stanford.edu/~perl/HepRApp/
684    </ulink>
685    .
686    </para>
687  </para></listitem>
688  <listitem><para>
689    HepRep graphics format:
690    <para>
691    <ulink url="http://www.slac.stanford.edu/~perl/heprep">
692    http://www.slac.stanford.edu/~perl/heprep
693    </ulink>
694    </para>
695  </para></listitem>
696  <listitem><para>
697    Geant4 Visualization Tutorial using the HepRApp HepRep Browser
698    <para>
699    <ulink url="http://geant4.slac.stanford.edu/Presentations/vis/G4HepRAppTutorial/G4HepRAppTutorial.html">
700    http://geant4.slac.stanford.edu/Presentations/vis/G4HepRAppTutorial/G4HepRAppTutorial.html
701    </ulink>
702    </para>
703  </para></listitem>
704</itemizedlist>
705</para>
706
707</sect2>
708
709
710<!-- ******************* Section (Level#2) ****************** -->
711<sect2 id="sect.VisDrv.HepRepXML">
712<title>
713HepRepXML
714</title>
715
716<para>
717The HepRepXML driver creates a HepRep file in the HepRep2 format
718suitable for viewing with the
719<ulink url="http://wired.freehep.org/index.html">
720WIRED4
721</ulink>
722 Plugin to the JAS3 Analysis System or the
723<ulink url="http://www.fisica.uniud.it/~glast/FRED/">
724FRED
725</ulink>
726 event display.
727</para>
728
729<para>
730This driver can write both Binary HepRep (.bheprep) and XML
731HepRep (.heprep) files. Binary HepRep files are a one-to-one
732translation of XML HepRep files, but they are considerably shorter
733and faster to parse by a HepRepViewer such as WIRED 4.
734</para>
735
736<para>
737Both Binary HepRep and XML HepRep can be compressed using the
738standard zlib library if linked into Geant4 using G4LIB_USE_ZLIB.
739If a standard zlib is not available (WIN32-VC for instance) you
740should also set G4LIB_BUILD_ZLIB to build G4zlib included with
741Geant4.
742</para>
743
744<para>
745HepRep files (Binary and XML) can contain multiple HepRep
746events/geometries. If the file contains more than one HepRep it is
747not strictly XML anymore. Files can be written in .heprep.zip,
748.heprep.gz or .heprep format and their binary versions
749.bheprep.zip, .bheprep.gz or .bheprep.
750</para>
751
752<para>
753The .heprep.zip is the default for file output, the .heprep is
754the default for stdout and stderr.
755</para>
756
757<para>
758(Optional) To set the filename with a particular extension such
759as: .heprep.zip, .heprep.gz, .heprep, .bheprep.zip, .bheprep.gz or
760.bheprep use for instance:
761
762<informalexample>
763<programlisting>
764     /vis/scene/create filename.bheprep.zip
765</programlisting>
766</informalexample>
767</para>
768
769<para>
770(Optional) To create separate files for each event, you can set
771a suffix such as "-0001" to start writing files from
772filename-0001.bheprep.zip to filename-9999.bheprep.zip (or up),
773while "-55-sub" will start write files filename-55-sub.bheprep.zip
774to filename-99-sub.bheprep.zip (or up).
775
776<informalexample>
777<programlisting>
778     /vis/heprep/setEventNumberSuffix -0001
779</programlisting>
780</informalexample>
781</para>
782
783<para>
784(Note: suffix has to contain at least one digit)
785</para>
786
787<para>
788(Optional) To route the HepRep XML output to stdout (or stderr),
789by default uncompressed, use:
790
791<informalexample>
792<programlisting>
793     /vis/scene/create stdout
794</programlisting>
795</informalexample>
796</para>
797
798<para>
799(Optional) To add attributes to each point on a trajectory, use:
800
801<informalexample>
802<programlisting>
803     /vis/heprep/addPointAttributes 1
804</programlisting>
805</informalexample>
806</para>
807
808<para>
809Be aware that this may increase the size of the output
810dramatically.
811</para>
812
813<para>
814(Optional) You may use the commands:
815
816<informalexample>
817<programlisting>
818     /vis/viewer/zoom                            to set an initial zoom factor
819
820     /vis/viewer/set/viewpointThetaPhi           to set an initial view point
821
822     /vis/heprep/setCoordinateSystem uvw         to change the coordinate system, where uvw
823                                                 can be "xyz", "zxy", ...
824</programlisting>
825</informalexample>
826</para>
827
828<para>
829(Optional) You may decide to write .zip files with events and
830geometry separated (but linked). This results in a smaller zip
831file, as the geometry is only written once. Use the command:
832
833<informalexample>
834<programlisting>
835     /vis/heprep/appendGeometry false
836</programlisting>
837</informalexample>
838</para>
839
840<para>
841(Optional) To close the file, remove the SceneHandler, use:
842
843<informalexample>
844<programlisting>
845     /vis/sceneHandler/remove scene-handler-0
846</programlisting>
847</informalexample>
848</para>
849
850<para>
851Limitations: Only one SceneHandler can exist at any time,
852connected to a single Viewer. Since the HepRep format is a model
853rather than a view this is not a real limitation. In WIRED 4 you
854can create as many views (SceneHandlers) as you like.
855</para>
856
857<para>
858<emphasis role="bold">Further information:</emphasis>
859
860<itemizedlist spacing="compact">
861  <listitem><para>
862    <ulink url="http://wired.freehep.org/index.html">
863    WIRED4</ulink> Plugin to the JAS3 Analysis System
864  </para></listitem>
865  <listitem><para>
866    <ulink url="http://www.fisica.uniud.it/~glast/FRED/">
867    FRED</ulink> event display
868  </para></listitem>
869  <listitem><para>
870    HepRep graphics format:
871    <para>
872    <ulink url="http://www.slac.stanford.edu/~perl/heprep">
873    http://www.slac.stanford.edu/~perl/heprep
874    </ulink>
875    </para>
876  </para></listitem>
877</itemizedlist>
878</para>
879
880</sect2>
881
882
883<!-- ******************* Section (Level#2) ****************** -->
884<sect2 id="sect.VisDrv.DAWN">
885<title>
886DAWN
887</title>
888
889<para>
890The DAWN drivers are interfaces to
891<ulink url="http://geant4.kek.jp/GEANT4/vis/DAWN/About_DAWN.html">
892Fukui Renderer DAWN</ulink>, which has been developed by Satoshi Tanaka,
893Minato Kawaguti et al (Fukui University). It is a vectorized 3D
894PostScript processor, and so well suited to prepare technical high
895quality outputs for presentation and/or documentation. It is also
896useful for precise debugging of detector geometry. Remote
897visualization, off-line re-visualization, cut view, and many other
898useful functions of detector simulation are supported. A DAWN
899process is automatically invoked as a co-process of Geant4 when
900visualization is performed, and 3D data are passed with
901inter-process communication, via a file, or the TCP/IP socket.
902</para>
903
904<para>
905When Geant4 Visualization is performed with the DAWN driver, the
906visualized view is automatically saved to a file named
907<literal>g4.eps</literal> in the current directory, which describes a
908vectorized (Encapsulated) PostScript data of the view.
909</para>
910
911<para>
912There are two kinds of DAWN drivers, the DAWNFILE driver and the
913DAWN-Network driver. The DAWNFILE driver is usually recommended,
914since it is faster and safer in the sense that it is not affected
915by network conditions.
916</para>
917
918<para>
919The DAWNFILE driver sends 3D data to DAWN via an intermediate
920file, named <literal>g4.prim</literal> in the current directory. The file
921<literal>g4.prim</literal> can be re-visualized later without the help of
922Geant4. This is done by invoking DAWN by hand:
923
924<informalexample>
925<programlisting>
926     % dawn g4.prim
927</programlisting>
928</informalexample>
929</para>
930
931<para>
932DAWN files can also serve as input to two additional programs:
933
934<itemizedlist spacing="compact">
935  <listitem><para>
936    A standalone program, DAWNCUT, can perform a planar cut on a
937    DAWN image. DAWNCUT takes as input a .prim file and some cut
938    parameters. Its output is a new .prim file to which the cut has
939    been applied.
940  </para></listitem>
941  <listitem><para>
942    Another standalone program, DAVID, can show you any volume
943    overlap errors in your geometry. DAVID takes as input a .prim file
944    and outputs a new .prim file in which overlapping volumes have been
945    highlighted. The use of DAVID is described in section
946    <xref linkend="sect.Geom.Overlap" /> of this manual.
947  </para></listitem>
948</itemizedlist>
949</para>
950
951<para>
952The DAWN-Network driver is almost the same as the DAWNFILE
953driver except that
954
955<itemizedlist spacing="compact">
956  <listitem><para>
957    3D data are passed to DAWN via the TCP/IP the socket (default)
958    or the named pipe, and that,
959  </para></listitem>
960</itemizedlist>
961</para>
962
963<para>
964If you have not set up network configurations of your host machine,
965set the environment variable <literal>G4DAWN_NAMED_PIPE</literal> to "1",
966e.g., <literal>% setenv G4DAWN_NAMED_PIPE 1</literal>. This setting switches
967the default socket connection to the named-pipe connection within
968the same host machine. The DAWN-Network driver also saves the 3D
969data to the file <literal>g4.prim</literal> in the current directory.
970</para>
971
972</sect2>
973
974
975<!-- ******************* Section (Level#2) ****************** -->
976<sect2 id="sect.VisDrv.RemDAWN">
977<title>
978Remote Visualization with the DAWN-Network Driver
979</title>
980
981<para>
982Visualization in Geant4 is considered to be "remote" when it is
983performed on a machine other than the Geant4 host. Some of the
984visualization drivers support this feature.
985</para>
986
987<para>
988Usually, the visualization host is your local host, while the
989Geant4 host is a remote host where you log in, for example, with
990the <literal>telnet</literal> command. This enables distributed
991processing of Geant4 visualization, avoiding the transfer of large
992amounts of visualization data to your terminal display via the
993network. This section describes how to perform remote Geant4
994visualization with the DAWN-Network driver. In order to do it,
995you must install the Fukui Renderer DAWN on your local host
996beforehand.
997</para>
998
999<para>
1000The following steps realize remote Geant4 visualization viewed
1001by DAWN.
1002
1003<orderedlist spacing="compact">
1004  <listitem><para>
1005    Invoke DAWN with "-G" option on your local host:
1006
1007    <informalexample>
1008    <programlisting>
1009       Local_Host&gt; dawn -G
1010    </programlisting>
1011    </informalexample>
1012
1013    This invokes DAWN with the network connection mode.
1014  </para></listitem>
1015  <listitem><para>
1016    Login to the remote host where a Geant4 executable is placed.
1017  </para></listitem>
1018  <listitem><para>
1019    Set an environment variable on the remote host as follows:
1020
1021    <informalexample>
1022    <programlisting>
1023       Remote_Host&gt; setenv G4DAWN_HOST_NAME local_host_name
1024    </programlisting>
1025    </informalexample>
1026
1027    For example, if you are working in the local host named
1028    "arkoop.kek.jp", set this environment variable as follows:
1029
1030    <informalexample>
1031    <programlisting>
1032       Remote_Host&gt; setenv G4DAWN_HOST_NAME arkoop.kek.jp
1033    </programlisting>
1034    </informalexample>
1035
1036    This tells a Geant4 process running on the remote host where Geant4
1037    Visualization should be performed, i.e., where the visualized views
1038    should be displayed.
1039  </para></listitem>
1040  <listitem><para>
1041    Invoke a Geant4 process and perform visualization with the
1042    DAWN-Network driver. For example:
1043
1044    <informalexample>
1045    <programlisting>
1046       Idle&gt; /vis/open DAWN
1047       Idle&gt; /vis/drawVolume
1048       Idle&gt; /vis/viewer/flush
1049    </programlisting>
1050    </informalexample>     
1051  </para></listitem>
1052</orderedlist>
1053</para>
1054
1055<para>
1056In step 4, 3D scene data are sent from the remote host to the
1057local host as
1058<ulink url="http://geant4.kek.jp/GEANT4/vis/DAWN/G4PRIM_FORMAT_24/">
1059DAWN-formatted data</ulink>, and the local DAWN will visualize the data. The
1060transferred data are saved as a file named <literal>g4.prim</literal> in the
1061current directory of the local host.
1062</para>
1063
1064<para>
1065<emphasis role="bold">Further information:</emphasis>
1066
1067<itemizedlist spacing="compact">
1068  <listitem><para>
1069    <ulink url="http://geant4.kek.jp/GEANT4/vis/DAWN/About_DAWN.html">
1070    http://geant4.kek.jp/GEANT4/vis/DAWN/About_DAWN.html
1071    </ulink>
1072  </para></listitem>
1073  <listitem><para>
1074    <ulink url="http://geant4.kek.jp/GEANT4/vis/DAWN/G4PRIM_FORMAT_24/">
1075    http://geant4.kek.jp/GEANT4/vis/DAWN/G4PRIM_FORMAT_24/
1076    </ulink>
1077  </para></listitem>
1078</itemizedlist>
1079</para>
1080
1081<para>
1082<emphasis role="bold">Further information:</emphasis>
1083
1084<itemizedlist spacing="compact">
1085  <listitem><para>
1086    Fukui Renderer DAWN:
1087    <para>
1088    <ulink url="http://geant4.kek.jp/GEANT4/vis/DAWN/About_DAWN.html">
1089    http://geant4.kek.jp/GEANT4/vis/DAWN/About_DAWN.html
1090    </ulink>
1091    </para>
1092  </para></listitem>
1093  <listitem><para>
1094    The DAWNFILE driver:
1095    <para>
1096    <ulink url="http://geant4.kek.jp/GEANT4/vis/GEANT4/DAWNFILE_driver.html">
1097    http://geant4.kek.jp/GEANT4/vis/GEANT4/DAWNFILE_driver.html
1098    </ulink>
1099    </para>
1100  </para></listitem>
1101  <listitem><para>
1102    The DAWN-Network driver:
1103    <para>
1104    <ulink url="http://geant4.kek.jp/GEANT4/vis/GEANT4/DAWNNET_driver.html">
1105    http://geant4.kek.jp/GEANT4/vis/GEANT4/DAWNNET_driver.html
1106    </ulink>
1107    </para>
1108  </para></listitem>
1109  <listitem><para>
1110    Environmental variables to customize DAWN and DAWN drivers:
1111    <para>
1112    <ulink url="http://geant4.kek.jp/GEANT4/vis/DAWN/DAWN_ENV.html">
1113    http://geant4.kek.jp/GEANT4/vis/DAWN/DAWN_ENV.html
1114    </ulink>
1115    </para>
1116    <para>
1117    <ulink url="http://geant4.kek.jp/GEANT4/vis/GEANT4/g4vis_on_linux.html">
1118    http://geant4.kek.jp/GEANT4/vis/GEANT4/g4vis_on_linux.html
1119    </ulink>
1120    </para>
1121  </para></listitem>
1122  <listitem><para>
1123    DAWN format (g4.prim format) manual:
1124    <para>
1125    <ulink url="http://geant4.kek.jp/GEANT4/vis/DAWN/G4PRIM_FORMAT_24/">
1126    http://geant4.kek.jp/GEANT4/vis/DAWN/G4PRIM_FORMAT_24/
1127    </ulink>
1128    </para>
1129  </para></listitem>
1130  <listitem><para>
1131    Geant4 Fukui University Group Home Page:
1132    <para>
1133    <ulink url="http://geant4.kek.jp/GEANT4/vis/">
1134    http://geant4.kek.jp/GEANT4/vis/
1135    </ulink>
1136    </para>
1137  </para></listitem>
1138  <listitem><para>
1139    DAWNCUT:
1140    <para>
1141    <ulink url="http://geant4.kek.jp/GEANT4/vis/DAWN/About_DAWNCUT.html">
1142    http://geant4.kek.jp/GEANT4/vis/DAWN/About_DAWNCUT.html
1143    </ulink>
1144    </para>
1145  </para></listitem>
1146  <listitem><para>
1147   DAVID:
1148   <para>
1149   <ulink url="http://geant4.kek.jp/GEANT4/vis/DAWN/About_DAVID.html">
1150   http://geant4.kek.jp/GEANT4/vis/DAWN/About_DAVID.html
1151   </ulink>
1152   </para> 
1153  </para></listitem>
1154  <listitem><para>
1155    Geant4 Visualization Tutorial using the DAWN Renderer:
1156    <para>
1157    <ulink url="http://geant4.slac.stanford.edu/Presentations/vis/GDAWNTutorial/G4DAWNTutorial.html">
1158    http://geant4.slac.stanford.edu/Presentations/vis/GDAWNTutorial/G4DAWNTutorial.html
1159    </ulink>
1160    </para>
1161  </para></listitem>
1162</itemizedlist>
1163</para>
1164
1165</sect2>
1166
1167
1168<!-- ******************* Section (Level#2) ****************** -->
1169<sect2 id="sect.VisDrv.VRML">
1170<title>
1171VRML
1172</title>
1173
1174<para>
1175These drivers were developed by Satoshi Tanaka and Yasuhide Sawada
1176(Fukui University). They generate VRML files, which describe 3D
1177scenes to be visualized with a proper VRML viewer, at either a
1178local or a remote host. It realizes virtual-reality visualization
1179with your WWW browser. There are many excellent VRML viewers, which
1180enable one to perform interactive spinning of detectors, walking
1181and/or flying inside detectors or particle showers, interactive
1182investigation of detailed detector geometry etc.
1183</para>
1184
1185<para>
1186There are two kinds of VRML drivers: the VRMLFILE driver, and
1187the VRML-Network driver. The VRMLFILE driver is usually
1188recommended, since it is faster and safer in the sense that it is
1189not affected by network conditions.
1190</para>
1191
1192<para>
1193The VRMLFILE driver sends 3D data to your VRML viewer, which is
1194running on the same host machine as Geant4, via an intermediate
1195file named <literal>g4.wrl</literal> created in the current directory. This
1196file can be re-visualization afterwards. In visualization, the name
1197of the VRML viewer should be specified by setting the environment
1198variable <literal>G4VRML_VIEWER</literal> beforehand. For example,
1199
1200<informalexample>
1201<programlisting>
1202     % setenv G4VRML_VIEWER  "netscape"
1203</programlisting>
1204</informalexample>
1205</para>
1206
1207<para>
1208Its default value is <literal>NONE</literal>, which means that no viewer
1209is invoked and only the file <literal>g4.wrl</literal> is generated.
1210</para>
1211
1212
1213<!-- ******* Bridgehead ******* -->
1214<bridgehead renderas='sect4'>
1215Remote Visualization with the VRML-Network Driver
1216</bridgehead>
1217
1218<para>
1219Visualization in Geant4 is considered to be "remote" when it is
1220performed on a machine other than the Geant4 host. Some of the
1221visualization drivers support this feature.
1222</para>
1223
1224<para>
1225Usually, the visualization host is your local host, while the
1226Geant4 host is a remote host where you log in, for example, with
1227the <literal>telnet</literal> command. This enables distributed processing of
1228Geant4 visualization, avoiding the transfer of large amounts of
1229visualization data to your terminal display via the network.
1230</para>
1231
1232<para>
1233In order to perform remote visualization with the VRML-Network
1234driver, the following must be installed on your local host
1235beforehand:
1236
1237<orderedlist spacing="compact">
1238  <listitem><para>
1239    a VRML viewer
1240  </para></listitem>
1241  <listitem><para>
1242    the Java application <literal>g4vrmlview</literal>.
1243  </para></listitem>
1244</orderedlist>
1245</para>
1246
1247<para>
1248The Java application <literal>g4vrmlview</literal> is included as part of the
1249Geant4 package and is located at:
1250
1251<informalexample>
1252<programlisting>
1253     source/visualization/VRML/g4vrmlview/
1254</programlisting>
1255</informalexample>
1256</para>
1257
1258<para>
1259Installation instructions for <literal>g4vrmlview</literal> can be found in
1260the <literal>README</literal> file there, or on the WWW page below.
1261</para>
1262
1263<para>
1264The following steps realize remote Geant4 visualization
1265displayed with your local VRML browser:
1266
1267<orderedlist spacing="compact">
1268  <listitem><para>
1269    Invoke the <literal>g4vrmlview</literal> on your local host, giving a
1270    VRML viewer name as its argument:
1271
1272    <informalexample>
1273<programlisting>
1274       Local_Host&gt; java g4vrmlview  VRML_viewer_name
1275    </programlisting>
1276</informalexample>
1277
1278    For example, if you want to use the Netscape browser as your VRML
1279    viewer, execute <literal>g4vrmlview</literal> as follows:
1280
1281    <informalexample>
1282    <programlisting>
1283       Local_Host&gt; java g4vrmlview  netscape
1284    </programlisting>
1285    </informalexample>
1286
1287    Of course, the command path to the VRML viewer should be properly set.
1288  </para></listitem>
1289  <listitem><para>
1290    Log in to the remote host where a Geant4 executable is placed.
1291  </para></listitem>
1292  <listitem><para>
1293    Set an environment variable on the remote host as follows:
1294
1295    <informalexample>
1296    <programlisting>
1297       Remote_Host&gt; setenv G4VRML_HOST_NAME local_host_name
1298    </programlisting>
1299    </informalexample>
1300
1301    For example, if you are working on the local host named
1302    "arkoop.kek.jp", set this environment variable as follows:
1303
1304    <informalexample>
1305    <programlisting>
1306       Remote_Host&gt; setenv G4VRML_HOST_NAME arkoop.kek.jp
1307    </programlisting>
1308    </informalexample>
1309
1310    This tells a Geant4 process running on the remote host where Geant4
1311    Visualization should be performed, i.e., where the visualized views
1312    should be displayed.
1313  </para></listitem>
1314  <listitem><para>
1315    Invoke a Geant4 process and perform visualization with the
1316    VRML-Network driver. For example:
1317
1318    <informalexample>
1319    <programlisting>
1320       Idle&gt; /vis/open VRML2
1321       Idle&gt; /vis/drawVolume
1322       Idle&gt; /vis/viewer/update
1323    </programlisting>
1324    </informalexample>       
1325  </para></listitem>
1326</orderedlist>
1327</para>
1328
1329<para>
1330In step 4, 3D scene data are sent from the remote host to the
1331local host as VRML-formatted data, and the VRML viewer specified in
1332step 3 is invoked by the <literal>g4vrmlview</literal> process to visualize
1333the VRML data. The transferred VRML data are saved as a file named
1334<literal>g4.wrl</literal> in the current directory of the local host.
1335</para>
1336
1337<para>
1338<emphasis role="bold">Further information:</emphasis>
1339
1340<?soft-pagebreak ?>
1341<itemizedlist spacing="compact">
1342  <listitem><para>
1343    <ulink url="http://geant4.kek.jp/GEANT4/vis/GEANT4/VRML_net_driver.html">
1344    http://geant4.kek.jp/GEANT4/vis/GEANT4/VRML_net_driver.html
1345    </ulink>
1346  </para></listitem>
1347</itemizedlist>
1348</para>
1349
1350<para>
1351<emphasis role="bold">Further information (VRML drivers):</emphasis>
1352
1353<?soft-pagebreak ?>
1354<itemizedlist spacing="compact">
1355  <listitem><para>
1356    <ulink url="http://geant4.kek.jp/GEANT4/vis/GEANT4/VRML_file_driver.html">
1357    http://geant4.kek.jp/GEANT4/vis/GEANT4/VRML_file_driver.html
1358    </ulink>
1359  </para></listitem>
1360  <listitem><para>
1361    <ulink url="http://geant4.kek.jp/GEANT4/vis/GEANT4/VRML_net_driver.html">
1362    http://geant4.kek.jp/GEANT4/vis/GEANT4/VRML_net_driver.html
1363    </ulink>
1364  </para></listitem>
1365</itemizedlist>
1366</para>
1367
1368<para>
1369<emphasis role="bold">Sample VRML files:</emphasis>
1370
1371<?soft-pagebreak ?>
1372<itemizedlist spacing="compact">
1373  <listitem><para>
1374    <ulink url="http://geant4.kek.jp/GEANT4/vis/GEANT4/VRML2_FIG/">
1375    http://geant4.kek.jp/GEANT4/vis/GEANT4/VRML2_FIG/
1376    </ulink>
1377  </para></listitem>
1378</itemizedlist>
1379</para>
1380
1381<para>
1382<emphasis role="bold">Further information (VRML language and browsers):</emphasis>
1383
1384<itemizedlist spacing="compact">
1385  <listitem><para>
1386    <ulink url="http://www.vrmlsite.com/">http://www.vrmlsite.com/
1387    </ulink>
1388  </para></listitem>
1389</itemizedlist>
1390</para>
1391
1392</sect2>
1393
1394
1395<!-- ******************* Section (Level#2) ****************** -->
1396<sect2 id="sect.VisDrv.RayTrc">
1397<title>
1398RayTracer
1399</title>
1400
1401<para>
1402This driver was developed by Makoto Asai and Minamimoto (Hirosihma
1403Instutute of Technology). It performs ray-tracing visualization
1404using the tracking routines of Geant4. It is, therefore, available
1405for every kinds of shapes/solids which Geant4 can handle. It is
1406also utilized for debugging the user's geometry for the tracking
1407routines of Geant4. It is well suited for photo-realistic high
1408quality output for presentation, and for intuitive debugging of
1409detector geometry. It produces a JPEG file. This driver is by
1410default listed in the available visualization drivers of user's
1411application.
1412</para>
1413
1414<para>
1415Some pieces of geometries may fail to show up in other
1416visualization drivers (due to algorithms those drivers use to
1417compute visualizable shapes and polygons), but RayTracer can handle
1418any geometry that the Geant4 navigator can handle.
1419</para>
1420
1421<para>
1422Because RayTracer in essence takes over Geant4's tracking
1423routines for its own use, RayTracer cannot be used to visualize
1424Trajectories or hits.
1425</para>
1426
1427<para>
1428An X-Window version, called RayTracerX, can be selected by
1429setting <literal>G4VIS_BUILD_RATRACERX_DRIVER</literal> at Geant4 library
1430build time and <literal>G4VIS_USE_RAYTRACERX</literal> at application (user
1431code) build time (assuming you use the standard visualization
1432manager, <literal>G4VisExecutive</literal>, or an equally smart vis manager).
1433RayTracerX builds the same jpeg file as RayTracer, but
1434simultaneously renders to screen so you can watch as rendering
1435grows progressively smoother.
1436</para>
1437
1438<para>
1439RayTracer has its own built-in commands -
1440<literal>/vis/rayTracer/</literal>.... Alternatively, you can treat it as a
1441normal vis system and use <literal>/vis/viewer/</literal>... commands,
1442e.g:
1443
1444<informalexample>
1445<programlisting>
1446  /vis/open RayTracerX
1447  /vis/drawVolume
1448  /vis/viewer/set/viewpointThetaPhi 30 30
1449  /vis/viewer/refresh
1450</programlisting>
1451</informalexample>
1452</para>
1453
1454<para>
1455The view parameters are translated into the necessary RayTracer
1456parameters.
1457</para>
1458
1459<para>
1460RayTracer is compute intensive. If you are unsure of a good
1461viewing angle or zoom factor, you might be advised to choose them
1462with a faster renderer, such as OpenGL, and transfer the view
1463parameters with <literal>/vis/viewer/set/all</literal>:
1464
1465<informalexample>
1466<programlisting>
1467  /vis/open OGLSXm  # or any of the OGL options.  Opens, say, viewer-0.
1468  /vis/drawVolume
1469  /vis/viewer/zoom  # plus any /vis/viewer/commands that get you the view you want.
1470  /vis/open RayTracerX
1471  /vis/viewer/set/all viewer-0
1472  /vis/viewer/refresh
1473</programlisting>
1474</informalexample>
1475</para>
1476
1477</sect2>
1478
1479
1480<!-- ******************* Section (Level#2) ****************** -->
1481<sect2 id="sect.VisDrv.DetTree">
1482<title>
1483Visualization of detector geometry tree
1484</title>
1485
1486<para>
1487ASCIITREE is a visualization driver that is not actually graphical
1488but that dumps the volume hierarchy as a simple text tree.
1489</para>
1490
1491<para>
1492Each call to /vis/viewer/flush or /vis/drawTree will dump the
1493tree.
1494</para>
1495
1496<para>
1497ASCIITree has command to control its verbosity,
1498<literal>/vis/ASCIITree/verbose</literal>. The verbosity value controls the
1499amount of information available, e.g., physical volume name alone,
1500or also logical volume and solid names. If the volume is
1501"sensitive" and/or has a "readout geometry", this may also be
1502indicated. Also, the mass of the physical volume tree(s) can be
1503printed (but beware - higher verbosity levels can be
1504computationally intensive).
1505</para>
1506
1507<para>
1508At verbosity level 4, ASCIITree calculates the mass of the
1509complete geometry tree taking into account daughters up to the
1510depth specified for each physical volume. The calculation involves
1511subtracting the mass of that part of the mother that is occupied by
1512each daughter and then adding the mass of the daughter, and so on
1513down the hierarchy.
1514
1515<informalexample>
1516<programlisting>
1517     /vis/ASCIITree/Verbose 4
1518     /vis/viewer/flush
1519     "HadCalorimeterPhysical":0 / "HadCalorimeterLogical" / "HadCalorimeterBox"(G4Box),
1520                                  1.8 m3 , 11.35 g/cm3
1521     "HadCalColumnPhysical":-1 (10 replicas) / "HadCalColumnLogical" / "HadCalColumnBox"(G4Box),
1522                                               180000 cm3, 11.35 g/cm3
1523     "HadCalCellPhysical":-1 (2 replicas) / "HadCalCellLogical" / "HadCalCellBox"(G4Box),
1524                                            90000 cm3, 11.35 g/cm3
1525     "HadCalLayerPhysical":-1 (20 replicas) / "HadCalLayerLogical" / "HadCalLayerBox"(G4Box),
1526                                              4500 cm3, 11.35 g/cm3
1527     "HadCalScintiPhysical":0 / "HadCalScintiLogical" / "HadCalScintiBox"(G4Box),
1528                                900 cm3, 1.032 g/cm3
1529     
1530     Calculating mass(es)...
1531     Overall volume of "worldPhysical":0, is 2400 m3
1532     Mass of tree to unlimited depth is 22260.5 kg
1533</programlisting>
1534</informalexample>
1535</para>
1536
1537<para>
1538Some more examples of ASCIITree in action:
1539
1540<informalexample>
1541<programlisting>
1542     Idle&gt; /vis/ASCIITree/verbose 1
1543     Idle&gt; /vis/drawTree
1544     #  Set verbosity with "/vis/ASCIITree/verbose
1545     #    &lt;  10: - does not print daughters of repeated placements, does not repeat replicas.
1546     #    &gt;= 10: prints all physical volumes.
1547     #  The level of detail is given by verbosity%10:
1548     #  for each volume:
1549     #    &gt;=  0: physical volume name.
1550     #    &gt;=  1: logical volume name (and names of sensitive detector and readout geometry, if any).
1551     #    &gt;=  2: solid name and type.
1552     #    &gt;=  3: volume and density.
1553     #    &gt;=  5: daughter-subtracted volume and mass.
1554     #  and in the summary at the end of printing:
1555     #    &gt;=  4: daughter-included mass of top physical volume(s) in scene to depth specified.
1556     .....
1557     "Calorimeter", copy no. 0, belongs to logical volume "Calorimeter"
1558       "Layer", copy no. -1, belongs to logical volume "Layer" (10 replicas)
1559         "Absorber", copy no. 0, belongs to logical volume "Absorber"
1560           "Gap", copy no. 0, belongs to logical volume "Gap"
1561     .....
1562     Idle&gt; /vis/ASCIITree/verbose 15
1563     Idle&gt; /vis/drawTree
1564     ....
1565      "tube_phys":0 / "tube_L" / "tube"(G4Tubs), 395841 cm3, 1.782 mg/cm3,
1566                                9.6539e-08 mm3, 1.72032e-10 mg
1567        "divided_tube_phys":0 / "divided_tube_L" / "divided_tube"(G4Tubs), 65973.4 cm3,
1568                                1.782 mg/cm3, 7587.54 cm3, 13.521 g
1569          "divided_tube_inset_phys":0 / "divided_tube_inset_L" / "divided_tube_inset"(G4Tubs),
1570                                        58385.9 cm3, 1.782 mg/cm3, 6.03369e-09 mm3, 1.0752e-11 mg
1571            "sub_divided_tube_phys":0 / "sub_divided_tube_L" / "sub_divided_tube"(G4Tubs),
1572                                        14596.5 cm3, 1.782 mg/cm3, 12196.5 cm3, 21.7341 g
1573     .....
1574     Calculating mass(es)...
1575     Overall volume of "expHall_P":0, is 8000 m3  and the daughter-included mass to unlimited depth
1576                                      is 78414 kg
1577     .....
1578</programlisting>
1579</informalexample>
1580</para>
1581
1582<para>
1583For the complete list of commands and options, see the
1584<ulink url="./AllResources/Control/UIcommands/_vis_.html">
1585Control...UICommands</ulink>  section of this user guide.
1586</para>
1587
1588</sect2>
1589
1590
1591<!-- ******************* Section (Level#2) ****************** -->
1592<sect2 id="sect.VisDrv.GAGTree">
1593<title>
1594GAG Tree
1595</title>
1596
1597<para>
1598The GAGTree driver provides a listing of the detector geometry tree
1599within GAG, the Geant Adaptive GUI, (
1600<ulink url="http://erpc1.naruto-u.ac.jp/~geant4">
1601http://erpc1.naruto-u.ac.jp/~geant4
1602</ulink>
1603). GAG allows "folding/un-folding" a part of the geometry tree, using
1604the <emphasis>Tree Widget</emphasis> in Java:
1605
1606<informalfigure id="fig.VisDrv_1">
1607<mediaobject>
1608  <imageobject role="fo">
1609    <imagedata fileref="./AllResources/Visualization/visualization.src/gagtree.jpg" 
1610               format="JPG" contentwidth="12.0cm" align="center" />
1611  </imageobject>
1612  <imageobject role="html">
1613    <imagedata fileref="./AllResources/Visualization/visualization.src/gagtree.jpg"
1614               format="JPG" align="center" />
1615  </imageobject>
1616</mediaobject>
1617</informalfigure>
1618</para>
1619
1620</sect2>
1621
1622
1623<!-- ******************* Section (Level#2) ****************** -->
1624<sect2 id="sect.VisDrv.XMLTree">
1625<title>
1626XML Tree
1627</title>
1628
1629<para>
1630The XML description of the geometry tree can be created in Geant4
1631by the XML Tree driver. The XML source can also be edited on the
1632fly. The created XML files are visualizable with any XML browser
1633(in Windows, a good XML viewer is <emphasis>XML Notepad</emphasis>).
1634
1635<itemizedlist spacing="compact">
1636  <listitem><para>
1637    Folding and un-folding:
1638
1639    <informalfigure id="fig.VisDrv_2">
1640    <mediaobject>
1641      <imageobject role="fo">
1642        <imagedata fileref="./AllResources/Visualization/visualization.src/xmlnp.jpg" 
1643                   format="JPG" contentwidth="12.0cm" align="center" />
1644      </imageobject>
1645      <imageobject role="html">
1646        <imagedata fileref="./AllResources/Visualization/visualization.src/xmlnp.jpg"
1647                   format="JPG" align="center" />
1648        </imageobject>
1649    </mediaobject>
1650    </informalfigure>
1651  </para></listitem>
1652</itemizedlist>
1653
1654<?soft-pagebreak ?>
1655<itemizedlist>
1656  <listitem><para>
1657    Searching a string:
1658
1659    <informalfigure id="fig.VisDrv_3">
1660    <mediaobject>
1661      <imageobject role="fo">
1662        <imagedata fileref="./AllResources/Visualization/visualization.src/xmlnpfind.jpg" 
1663                   format="JPG" contentwidth="12.0cm" align="center" />
1664      </imageobject>
1665      <imageobject role="html">
1666        <imagedata fileref="./AllResources/Visualization/visualization.src/xmlnpfind.jpg"
1667                   format="JPG" align="center" />
1668      </imageobject>
1669    </mediaobject>
1670    </informalfigure>
1671  </para></listitem>
1672</itemizedlist>
1673</para>
1674
1675
1676</sect2>
1677</sect1>
Note: See TracBrowser for help on using the repository browser.