| 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|---|
| 2 | <!-- -->
|
|---|
| 3 | <HTML>
|
|---|
| 4 | <TITLE>The Visualization Drivers
|
|---|
| 5 | </TITLE>
|
|---|
| 6 | <!-- Changed by: Dennis Wright, 27-Nov-2001 -->
|
|---|
| 7 | <BODY>
|
|---|
| 8 | <TABLE width="100%">
|
|---|
| 9 | <TR>
|
|---|
| 10 | <TD><A href="../../../../Overview/html/index.html">
|
|---|
| 11 | </A>
|
|---|
| 12 | <A HREF="index.html">
|
|---|
| 13 | <IMG SRC="../../../../resources/html/IconsGIF/Contents.gif" ALT="Contents" HEIGHT=16 WIDTH=59></A>
|
|---|
| 14 | <A HREF="visexecutable.html">
|
|---|
| 15 | <IMG SRC="../../../../resources/html/IconsGIF/Previous.gif" ALT="Previous" HEIGHT=16 WIDTH=59></A>
|
|---|
| 16 | <a href="commandcontrol.html">
|
|---|
| 17 | <IMG SRC="../../../../resources/html/IconsGIF/Next.gif" ALT="Next" HEIGHT=16 WIDTH=59></a>
|
|---|
| 18 | </TD>
|
|---|
| 19 |
|
|---|
| 20 | <TD ALIGN="Right"><FONT COLOR="#238E23"><FONT SIZE=-1>
|
|---|
| 21 | <B>Geant4 User's Guide</B><BR>
|
|---|
| 22 | <B>For Application Developers</B><BR>
|
|---|
| 23 | <B>Visualization</B> </FONT></FONT></TD>
|
|---|
| 24 | </TR>
|
|---|
| 25 | </TABLE>
|
|---|
| 26 |
|
|---|
| 27 | <CENTER><FONT COLOR="#238E23"><FONT SIZE=+3>
|
|---|
| 28 | <B>8.3 The Visualization Drivers</B><BR>
|
|---|
| 29 | </FONT></FONT></CENTER>
|
|---|
| 30 | <BR>
|
|---|
| 31 |
|
|---|
| 32 | <HR ALIGN="Center" SIZE="7%"><BR>
|
|---|
| 33 | As explained in the <A HREF="introduction.html#choice">
|
|---|
| 34 | Introduction to Visualization</A>,
|
|---|
| 35 | Geant4 provides many different choices of visualization systems.
|
|---|
| 36 | Features and notes on each driver are briefly described here along with
|
|---|
| 37 | links to detailed web pages for the various drivers.
|
|---|
| 38 |
|
|---|
| 39 | <P>
|
|---|
| 40 | Details are given below for:
|
|---|
| 41 | <UL>
|
|---|
| 42 | <LI><A HREF="#OpenGL">OpenGL</A>
|
|---|
| 43 | <LI><A HREF="#OpenInventor">OpenInventor</A>
|
|---|
| 44 | <LI><A HREF="#HepRepFile">HepRepFile</A>
|
|---|
| 45 | <LI><A HREF="#HepRepXML">HepRepXML</A>
|
|---|
| 46 | <LI><A HREF="#DAWN">DAWN</A>
|
|---|
| 47 | <LI><A HREF="#VRML">VRML</A>
|
|---|
| 48 | <LI><A HREF="#RayTracer">RayTracer</A>
|
|---|
| 49 | <LI><A HREF="#ASCIITree">ASCIITree</A>
|
|---|
| 50 | <LI><A HREF="#GAGTree">GAGTree</A>
|
|---|
| 51 | <LI><A HREF="#XMLTree">XMLTree</A>
|
|---|
| 52 | </UL>
|
|---|
| 53 |
|
|---|
| 54 | <H4>8.3.1 Availability of drivers on the supported systems</H4>
|
|---|
| 55 | <P>
|
|---|
| 56 | Table 8.3.1 lists required graphics systems and supported platforms for the various visualization drivers
|
|---|
| 57 | <P>
|
|---|
| 58 | <TABLE BORDER=2 cellpadding=8>
|
|---|
| 59 | <TR>
|
|---|
| 60 | <TD><B>Driver</B></TD><TD><B>Required Graphics System</B></TD><TD><B>Platform</B></TD></TR>
|
|---|
| 61 | <TR>
|
|---|
| 62 | <TD>OpenGL-Xlib</TD><TD>OpenGL</TD><TD>Linux, Unix, Mac with Xlib</TD></TR>
|
|---|
| 63 | <TR>
|
|---|
| 64 | <TD>OpenGL-Motif</TD><TD>OpenGL</TD><TD>Linux, UNIX, Mac with Motif</TD></TR>
|
|---|
| 65 | <TR>
|
|---|
| 66 | <TD>OpenGL-Win32</TD><TD>OpenGL</TD><TD>Windows</TD></TR>
|
|---|
| 67 | <TR>
|
|---|
| 68 | <TD>OpenInventor-X</TD><TD>OpenInventor, OpenGL</TD><TD>Linux, UNIX, Mac with Xlib or Motif</TD></TR>
|
|---|
| 69 | <TR>
|
|---|
| 70 | <TD>OpenInventor-Win32</TD><TD>OpenInventor, OpenGL</TD><TD>Windows</TD></TR>
|
|---|
| 71 | <TR>
|
|---|
| 72 | <TD>HepRep</TD><TD>WIRED or FRED HepRep Browser</TD><TD>Linux, UNIX, Mac, Windows</TD></TR>
|
|---|
| 73 | <TR>
|
|---|
| 74 | <TD>DAWNFILE </TD><TD>Fukui Renderer DAWN</TD><TD>Linux, Unix, Mac, Windows</TD></TR>
|
|---|
| 75 | <TR>
|
|---|
| 76 | <TD>DAWN-Network</TD><TD>Fukui Renderer DAWN</TD><TD>Linux, UNIX</TD></TR>
|
|---|
| 77 | <TR>
|
|---|
| 78 | <TD>VRMLFILE</TD><TD>any VRML viewer</TD><TD>Linux, UNIX, Mac, Windows</TD></TR>
|
|---|
| 79 | <TR>
|
|---|
| 80 | <TD>VRML-Network</TD><TD>any network-enabled VRML viewer</TD><TD>Linux, UNIX</TD></TR>
|
|---|
| 81 | <TR>
|
|---|
| 82 | <TD>RayTracer</TD><TD>any JPEG viewer</TD><TD>Linux, UNIX, Mac, Windows</TD></TR>
|
|---|
| 83 | <TR>
|
|---|
| 84 | <TD>ASCIITree</TD><TD>none</TD><TD>Linux, UNIX, Mac, Windows</TD></TR>
|
|---|
| 85 | <TR>
|
|---|
| 86 | <TD>GAGTree</TD><TD>GAG</TD><TD>Linux, UNIX, Mac, Windows</TD></TR>
|
|---|
| 87 | <TR>
|
|---|
| 88 | <TD>XMLTree</TD><TD>any XML viewer</TD><TD>Linux, UNIX, Mac, Windows</TD></TR>
|
|---|
| 89 | </TABLE>
|
|---|
| 90 |
|
|---|
| 91 |
|
|---|
| 92 | <P>
|
|---|
| 93 | <H4>8.3.2 <A NAME="OpenGL">OpenGL</A></H4>These drivers have been developed by John
|
|---|
| 94 | Allison and Andrew Walkden (University of Manchester). It is an interface to the
|
|---|
| 95 | de facto standard 3D graphics library, OpenGL. It is well suited for real-time
|
|---|
| 96 | fast visualization and demonstration. Fast visualization is realized with
|
|---|
| 97 | hardware acceleration, reuse of shapes stored in a display list, etc. NURBS
|
|---|
| 98 | visualization is also supported.
|
|---|
| 99 | <P>Several versions of the OpenGL drivers are prepared. Versions for Xlib, Motif
|
|---|
| 100 | and Win32 platforms are available by default. For each version, there are two
|
|---|
| 101 | modes: immediate mode and stored mode. The former has no limitation on data
|
|---|
| 102 | size, and the latter is fast for visualizing large data repetitively, and so is
|
|---|
| 103 | suitable for animation.
|
|---|
| 104 | <P>
|
|---|
| 105 | If you don't have Motif, all control is done from Geant4 commands:
|
|---|
| 106 | <PRE>
|
|---|
| 107 | /vis/open OGLIX
|
|---|
| 108 | /vis/viewer/set/viewpointThetaPhi 70 20
|
|---|
| 109 | /vis/viewer/zoom 2
|
|---|
| 110 | etc.
|
|---|
| 111 | </PRE>
|
|---|
| 112 | But if you have Motif libraries, you can control Geant4 from Motif widgets:
|
|---|
| 113 | <PRE> /vis/open OGLIXm</PRE>
|
|---|
| 114 | <P>The OpenGL driver added Smooth shading and Transparency since Geant4 release 8.0.
|
|---|
| 115 | <P><B>Further information (OpenGL and Mesa):</B><BR>
|
|---|
| 116 | <UL>
|
|---|
| 117 | <LI><A href="http://www.opengl.org/">http://www.opengl.org/</A>
|
|---|
| 118 | <LI><A href="http://www.mesa3d.org">http://www.mesa3d.org</A>
|
|---|
| 119 | <LI><A href="http://geant4.slac.stanford.edu/Presentations/vis/G4OpenGLTutorial/G4OpenGLTutorial.html">Geant4
|
|---|
| 120 | Visualization Tutorial</A> using the OpenGL Graphics System
|
|---|
| 121 | </UL>
|
|---|
| 122 |
|
|---|
| 123 | <P>
|
|---|
| 124 | <H4>8.3.3 <A NAME="OpenInventor">OpenInventor</A></H4>
|
|---|
| 125 | These drivers were developed by Jeff Kallenbach (FNAL) and Guy Barrand (IN2P3)
|
|---|
| 126 | based on the <A href="http://www-pat.fnal.gov/graphics/HEPVis/www">Hepvis class
|
|---|
| 127 | library</A> originated by Joe Boudreau (Pittsburgh University). The
|
|---|
| 128 | OpenInventor drivers and the Hepvis class library are based on the
|
|---|
| 129 | well-established OpenInventor technology for scientific visualization. They
|
|---|
| 130 | have high extendibility. They support high interactivity, e.g., attribute e
|
|---|
| 131 | diting of picked objects. Some OpenInventor viewers support "stereoscopic" effects.
|
|---|
| 132 | <P>
|
|---|
| 133 | It is also possible to save a visualized 3D scene as an OpenInventor-formatted
|
|---|
| 134 | file, and re-visualize the scene afterwards.
|
|---|
| 135 | <P>
|
|---|
| 136 | Because it is connected directly to the Geant4 kernel, using same language as that kernel (C++),
|
|---|
| 137 | OpenInventor systems can have direct access to Geant4 data (geometry, trajectories, etc.).
|
|---|
| 138 | <P>
|
|---|
| 139 | Because OpenInventor uses OpenGL for rendering, it supports lighting and transparency.
|
|---|
| 140 | <P>
|
|---|
| 141 | OpenInventor provides thumbwheel control to rotate and zoom.
|
|---|
| 142 | <P>
|
|---|
| 143 | OpenInventor supports picking to ask about data.
|
|---|
| 144 | [Control Clicking] on a volume turns on rendering of that volume's daughters.
|
|---|
| 145 | [Shift Clicking] a daughter turns that rendering off:
|
|---|
| 146 | If modeling opaque solid, effect is like opening a box to look inside.
|
|---|
| 147 | <P><B>Further information (HEPVis and OpenScientist): </B><BR>
|
|---|
| 148 | <UL>
|
|---|
| 149 | <LI>Geant4 Inventor Visualization with OpenScientist
|
|---|
| 150 | <A href="http://openscientist.lal.in2p3.fr/v15r0/html/osc_g4_vis_ui.html">
|
|---|
| 151 | http://openscientist.lal.in2p3.fr/v15r0/html/osc_g4_vis_ui.html</A> </LI>
|
|---|
| 152 | <LI>Overall OpenScientist Home
|
|---|
| 153 | <A href="http://openscientist.lal.in2p3.fr/v15r0/html/osc_g4_vis_ui.html">
|
|---|
| 154 | http://openscientist.lal.in2p3.fr/v15r0/html/osc_g4_vis_ui.html</A> </LI>
|
|---|
| 155 | <LI>HEPVis<A href="http://www-pat.fnal.gov/graphics/HEPVis/www">http://www-pat.fnal.gov/graphics/HEPVis/www</A> </LI>
|
|---|
| 156 | </UL>
|
|---|
| 157 | <P><B>Further information (OpenInventor):</B><BR>
|
|---|
| 158 | <UL>
|
|---|
| 159 | <LI><A href="http://oss.sgi.com/projects/inventor">http://oss.sgi.com/projects/inventor</A> </LI>
|
|---|
| 160 | <LI>Josie Wernecke, "The Inventor Mentor", Addison Wesley (ISBN 0-201-62495-8) </LI>
|
|---|
| 161 | <LI>Josie Wernecke, "The Inventor Toolmaker", Addison Wesley (ISBN 0-201-62493-1) </LI>
|
|---|
| 162 | <LI>"The Open Inventor C++ Reference Manual", Addison Wesley (ISBN 0-201-62491-5) </LI>
|
|---|
| 163 | </UL>
|
|---|
| 164 |
|
|---|
| 165 |
|
|---|
| 166 | <P>
|
|---|
| 167 | <H4>8.3.4 <A NAME="HepRepFile">HepRepFile</A></H4>
|
|---|
| 168 | The HepRepFile driver creates a HepRep XML file in the HepRep1 format suitable for viewing
|
|---|
| 169 | with the <A href="http://www.slac.stanford.edu/BFROOT/www/Computing/Graphics/Wired/">
|
|---|
| 170 | WIRED3</A> HepRep Browser.
|
|---|
| 171 |
|
|---|
| 172 | <P>
|
|---|
| 173 | The HepRep graphics format is further described at
|
|---|
| 174 | <A href="http://www.slac.stanford.edu/~perl/heprep">http://www.slac.stanford.edu/~perl/heprep</A>.
|
|---|
| 175 |
|
|---|
| 176 | <P>
|
|---|
| 177 | To write just the detector geometry to this file, use the command:
|
|---|
| 178 | <PRE> /vis/viewer/flush</PRE>
|
|---|
| 179 |
|
|---|
| 180 | <P>
|
|---|
| 181 | Or, to also include trajectories and hits (after the appropriate /vis/viewer/add/trajectories or
|
|---|
| 182 | /vis/viewer/add/hits commands), just issue:
|
|---|
| 183 | <PRE> /run/beamOn 1</PRE>
|
|---|
| 184 |
|
|---|
| 185 | <P>
|
|---|
| 186 | HepRepFile will write a file called G4Data0.heprep to the current directory.
|
|---|
| 187 | Each subsequent file will have a file name like G4Data1.heprep, G4Data2.heprep, etc.
|
|---|
| 188 |
|
|---|
| 189 | <P>
|
|---|
| 190 | View the file using the WIRED3 HepRep Browser, available from:
|
|---|
| 191 | <A href="http://www.slac.stanford.edu/BFROOT/www/Computing/Graphics/Wired/">
|
|---|
| 192 | http://www.slac.stanford.edu/BFROOT/www/Computing/Graphics/Wired/</A>.
|
|---|
| 193 |
|
|---|
| 194 | <P>
|
|---|
| 195 | WIRED3 allows you to pick on volumes, trajectories and hits to find out their associated
|
|---|
| 196 | HepRep Attributes, such as volume name, particle ID, momentum, etc.
|
|---|
| 197 | These same attributes can be displayed as labels on the relevant objects, and you can make
|
|---|
| 198 | visibility cuts based on these attributes ("show me only the photons", or "omit any volumes
|
|---|
| 199 | made of iron").
|
|---|
| 200 | <P>
|
|---|
| 201 | WIRED3 can read heprep files in zipped format as well as unzipped,
|
|---|
| 202 | so you can save space by applying gzip to the heprep file.
|
|---|
| 203 | This will reduce the file to about five percent of its original size.
|
|---|
| 204 |
|
|---|
| 205 | <P>
|
|---|
| 206 | Several environment variables are available to override some of HepRepFile's defaults
|
|---|
| 207 | <UL>
|
|---|
| 208 | <LI>
|
|---|
| 209 | You can specify a different directory for the heprep output files by setting the environment variable
|
|---|
| 210 | G4HEPREPFILE_DIR, as in:
|
|---|
| 211 | <PRE> export G4HEPREPFILE_DIR=someOtherDir/someOtherSubDir</PRE>
|
|---|
| 212 | <LI>
|
|---|
| 213 | You can specify a different file name (the part before the number) by setting the environment variable
|
|---|
| 214 | G4HEPREPFILE_NAME, as in:
|
|---|
| 215 | <PRE> export G4HEPREPFILE_NAME=myFileName</PRE>
|
|---|
| 216 | which will produce files named myFileName0.heprep, myFileName1.heprep, etc.
|
|---|
| 217 | <LI>
|
|---|
| 218 | You can specify that each file should overwrite the previous file (always rewriting to the same file name)
|
|---|
| 219 | by setting the environment variable
|
|---|
| 220 | G4HEPREPFILE_OVERWRITE, as in:
|
|---|
| 221 | <PRE> export G4HEPREPFILE_OVERWRITE=1</PRE>
|
|---|
| 222 | This may be useful in some automated applications where you always want to see the latest output file
|
|---|
| 223 | in the same location.
|
|---|
| 224 | <LI>
|
|---|
| 225 | Geant4 visualization supports a concept called "culling", by which certain parts of the detector can be
|
|---|
| 226 | made invisible.
|
|---|
| 227 | Since you may want to control visibility from the HepRep browser, turning on visibility of detector parts
|
|---|
| 228 | that had defaulted to be invisible, the HepRepFile driver does not omit these invisible detector parts
|
|---|
| 229 | from the HepRep file.
|
|---|
| 230 | But for very large files, if you know that you will never want to make these parts visible, you can choose
|
|---|
| 231 | to have them left entirely out of the file. Set the environment variable
|
|---|
| 232 | G4HEPREPFILE_CULL, as in:
|
|---|
| 233 | <PRE> export G4HEPREPFILE_CULL=1</PRE>
|
|---|
| 234 | </UL>
|
|---|
| 235 |
|
|---|
| 236 | <P><B>Further information:</B><BR>
|
|---|
| 237 | <UL>
|
|---|
| 238 | <LI>WIRED3 Users Home Page:<BR>
|
|---|
| 239 | <A href="http://www.slac.stanford.edu/BFROOT/www/Computing/Graphics/Wired/">
|
|---|
| 240 | http://www.slac.stanford.edu/BFROOT/www/Computing/Graphics/Wired/</A>.</LI>
|
|---|
| 241 | <LI>HepRep graphics format:<BR>
|
|---|
| 242 | <A href="http://www.slac.stanford.edu/~perl/heprep">
|
|---|
| 243 | http://www.slac.stanford.edu/~perl/heprep</A>
|
|---|
| 244 | <LI>Geant4 Visualization Tutorial using the WIRED3 HepRep Browser
|
|---|
| 245 | <A href="http://geant4.slac.stanford.edu/Presentations/vis/G4WIREDTutorial/G4WIREDTutorial.html">
|
|---|
| 246 | http://geant4.slac.stanford.edu/Presentations/vis/G4WIREDTutorial/G4WIREDTutorial.html</A>
|
|---|
| 247 | </UL>
|
|---|
| 248 |
|
|---|
| 249 | <P>
|
|---|
| 250 | <H4>8.3.5 <A NAME="HepRepXML">HepRepXML</A></H4>
|
|---|
| 251 | The HepRepXML driver creates a HepRep file in the HepRep2 format suitable for viewing
|
|---|
| 252 | with the <A href="http://wired.freehep.org/index.html">
|
|---|
| 253 | WIRED4</A> Plugin to the JAS3 Analysis System or the
|
|---|
| 254 | <A HREF="http://www.fisica.uniud.it/~glast/FRED">FRED</a> event display.
|
|---|
| 255 |
|
|---|
| 256 | <P>
|
|---|
| 257 | This driver can write both Binary HepRep (.bheprep) and XML HepRep
|
|---|
| 258 | (.heprep) files. Binary HepRep files are a one-to-one translation
|
|---|
| 259 | of XML HepRep files, but they are considerably shorter and faster
|
|---|
| 260 | to parse by a HepRepViewer such as WIRED 4.
|
|---|
| 261 |
|
|---|
| 262 | <P>
|
|---|
| 263 | Both Binary HepRep and XML HepRep can be compressed using the standard
|
|---|
| 264 | zlib library if linked into Geant4 using G4LIB_USE_ZLIB. If a standard
|
|---|
| 265 | zlib is not available (WIN32-VC for instance) you should also set
|
|---|
| 266 | G4LIB_BUILD_ZLIB to build G4zlib included with Geant4.
|
|---|
| 267 |
|
|---|
| 268 | <P>
|
|---|
| 269 | HepRep files (Binary and XML) can contain multiple HepRep events/geometries.
|
|---|
| 270 | If the file contains more than one HepRep it is not strictly XML anymore.
|
|---|
| 271 | Files can be written in .heprep.zip, .heprep.gz or .heprep format and their
|
|---|
| 272 | binary versions .bheprep.zip, .bheprep.gz or .bheprep.
|
|---|
| 273 |
|
|---|
| 274 | <P>
|
|---|
| 275 | The .heprep.zip is the default for file output, the .heprep is the default
|
|---|
| 276 | for stdout and stderr.
|
|---|
| 277 |
|
|---|
| 278 | <P>
|
|---|
| 279 | (Optional) To set the filename with a particular extension such as:
|
|---|
| 280 | .heprep.zip, .heprep.gz, .heprep, .bheprep.zip, .bheprep.gz or .bheprep
|
|---|
| 281 | use for instance:
|
|---|
| 282 | <PRE> /vis/scene/create filename.bheprep.zip</PRE>
|
|---|
| 283 |
|
|---|
| 284 | <P>
|
|---|
| 285 | (Optional) To create separate files for each event, you can set a suffix such as
|
|---|
| 286 | "-0001" to start writing files from filename-0001.bheprep.zip to
|
|---|
| 287 | filename-9999.bheprep.zip (or up), while "-55-sub" will start write files
|
|---|
| 288 | filename-55-sub.bheprep.zip to filename-99-sub.bheprep.zip (or up).
|
|---|
| 289 | <PRE> /vis/heprep/setEventNumberSuffix -0001</PRE>
|
|---|
| 290 | (Note: suffix has to contain at least one digit)
|
|---|
| 291 |
|
|---|
| 292 | <P>
|
|---|
| 293 | (Optional) To route the HepRep XML output to stdout (or stderr),
|
|---|
| 294 | by default uncompressed, use:
|
|---|
| 295 | <PRE> /vis/scene/create stdout</PRE>
|
|---|
| 296 |
|
|---|
| 297 | <P>
|
|---|
| 298 | (Optional) To add attributes to each point on a trajectory, use:
|
|---|
| 299 | <PRE> /vis/heprep/addPointAttributes 1</PRE>
|
|---|
| 300 | <P>
|
|---|
| 301 | Be aware that this may increase the size of the output dramatically.
|
|---|
| 302 |
|
|---|
| 303 | <P>
|
|---|
| 304 | (Optional) You may use the commands:
|
|---|
| 305 | <PRE> /vis/viewer/zoom to set an initial zoom factor</PRE>
|
|---|
| 306 | <PRE> /vis/viewer/set/viewpointThetaPhi to set an initial view point</PRE>
|
|---|
| 307 | <PRE> /vis/heprep/setCoordinateSystem uvw to change the coordinate system, where uvw can be "xyz", "zxy", ...</PRE>
|
|---|
| 308 |
|
|---|
| 309 | <P>
|
|---|
| 310 | (Optional) You may decide to write .zip files with events and geometry separated (but linked).
|
|---|
| 311 | This results in a smaller zip file, as the geometry is only written once. Use the command:
|
|---|
| 312 | <PRE> /vis/heprep/appendGeometry false</PRE>
|
|---|
| 313 |
|
|---|
| 314 | <P>
|
|---|
| 315 | (Optional) To close the file, remove the SceneHandler, use:
|
|---|
| 316 | <PRE> /vis/sceneHandler/remove scene-handler-0</PRE>
|
|---|
| 317 |
|
|---|
| 318 | <P>
|
|---|
| 319 | Limitations:
|
|---|
| 320 | Only one SceneHandler can exist at any time, connected to a single Viewer.
|
|---|
| 321 | Since the HepRep format is a model rather than a view this is not a real
|
|---|
| 322 | limitation. In WIRED 4 you can create as many views (SceneHandlers) as you like.
|
|---|
| 323 | </UL>
|
|---|
| 324 |
|
|---|
| 325 | <P><B>Further information:</B><BR>
|
|---|
| 326 | <UL>
|
|---|
| 327 | <LI><A href="http://wired.freehep.org/index.html">
|
|---|
| 328 | WIRED4</A> Plugin to the JAS3 Analysis System
|
|---|
| 329 | <LI><A HREF="http://www.fisica.uniud.it/~glast/FRED">
|
|---|
| 330 | FRED</a> event display
|
|---|
| 331 | <LI>HepRep graphics format:<BR>
|
|---|
| 332 | <A href="http://www.slac.stanford.edu/~perl/heprep">
|
|---|
| 333 | http://www.slac.stanford.edu/~perl/heprep</A>
|
|---|
| 334 | </UL>
|
|---|
| 335 |
|
|---|
| 336 | <P>
|
|---|
| 337 | <H4>8.3.6 <A NAME="DAWN">DAWN</A></H4>The DAWN drivers are interfaces to <A
|
|---|
| 338 | href="http://geant4.kek.jp/GEANT4/vis/DAWN/About_DAWN.html">Fukui Renderer
|
|---|
| 339 | DAWN</A>, which has been developed by Satoshi Tanaka, Minato Kawaguti et al
|
|---|
| 340 | (Fukui University). It is a vectorized 3D PostScript processor, and so well
|
|---|
| 341 | suited to prepare technical high quality outputs for presentation and/or
|
|---|
| 342 | documentation. It is also useful for precise debugging of detector geometry.
|
|---|
| 343 | Remote visualization, off-line re-visualization, cut view, and many other useful
|
|---|
| 344 | functions of detector simulation are supported. A DAWN process is automatically
|
|---|
| 345 | invoked as a co-process of Geant4 when visualization is performed, and 3D data
|
|---|
| 346 | are passed with inter-process communication, via a file, or the TCP/IP socket.
|
|---|
| 347 | <P>When Geant4 Visualization is performed with the DAWN driver, the visualized
|
|---|
| 348 | view is automatically saved to a file named <TT>g4.eps</TT> in the current
|
|---|
| 349 | directory, which describes a vectorized (Encapsulated) PostScript data of the
|
|---|
| 350 | view.
|
|---|
| 351 | <P>There are two kinds of DAWN drivers, the DAWNFILE driver and the
|
|---|
| 352 | DAWN-Network driver. The DAWNFILE driver is usually recommended, since it
|
|---|
| 353 | is faster and safer in the sense that it is not affected by network conditions.
|
|---|
| 354 |
|
|---|
| 355 | <P>
|
|---|
| 356 | The DAWNFILE driver sends 3D data to DAWN via an intermediate file, named
|
|---|
| 357 | <TT>g4.prim</TT> in the current directory. The file <TT>g4.prim</TT> can be
|
|---|
| 358 | re-visualized later without the help of Geant4. This is done by invoking DAWN
|
|---|
| 359 | by hand: <PRE> % dawn g4.prim </PRE>
|
|---|
| 360 |
|
|---|
| 361 | <P>
|
|---|
| 362 | DAWN files can also serve as input to two additional programs:
|
|---|
| 363 | <UL>
|
|---|
| 364 | <LI>
|
|---|
| 365 | A standalone program, DAWNCUT, can perform a planar cut on a DAWN image.
|
|---|
| 366 | DAWNCUT takes as input a .prim file and some cut parameters.
|
|---|
| 367 | Its output is a new .prim file to which the cut has been applied.
|
|---|
| 368 | <LI>
|
|---|
| 369 | Another standalone program, DAVID, can show you any volume overlap errors in your geometry.
|
|---|
| 370 | DAVID takes as input a .prim file and outputs a new .prim file in which overlapping
|
|---|
| 371 | volumes have been highlighted.
|
|---|
| 372 | The use of DAVID is described in section <A HREF="../Detector/geomOverlap.html#4.1.11">4.1.11</a>
|
|---|
| 373 | of this manual.
|
|---|
| 374 | </UL>
|
|---|
| 375 |
|
|---|
| 376 | <P>
|
|---|
| 377 | The DAWN-Network driver is almost the same as the DAWNFILE driver except that
|
|---|
| 378 |
|
|---|
| 379 | <UL>
|
|---|
| 380 | <LI>3D data are passed to DAWN via the TCP/IP the socket (default) or the
|
|---|
| 381 | named pipe, and that,
|
|---|
| 382 | </UL>If you have not set
|
|---|
| 383 | up network configurations of your host machine, set the environment variable
|
|---|
| 384 | <TT>G4DAWN_NAMED_PIPE</TT> to "1", e.g., <TT>% setenv G4DAWN_NAMED_PIPE
|
|---|
| 385 | 1</TT>. This setting switches the default socket connection to the named-pipe
|
|---|
| 386 | connection within the same host machine. The DAWN-Network driver also saves the
|
|---|
| 387 | 3D data to the file <TT>g4.prim</TT> in the current directory.
|
|---|
| 388 |
|
|---|
| 389 | <h4>Remote Visualization with the DAWN-Network Driver</h4>
|
|---|
| 390 | Visualization in Geant4 is considered to be "remote" when it is performed on
|
|---|
| 391 | a machine other than the Geant4 host. Some of the visualization drivers
|
|---|
| 392 | support this feature.
|
|---|
| 393 | <P>
|
|---|
| 394 | Usually, the visualization host is your local host, while the Geant4 host is
|
|---|
| 395 | a remote host where you log in, for example, with the <tt>telnet</tt>
|
|---|
| 396 | command. This enables distributed processing of Geant4 visualization,
|
|---|
| 397 | avoiding the transfer of large amounts of visualization data to your terminal
|
|---|
| 398 | display via the network.
|
|---|
| 399 |
|
|---|
| 400 | This section describes how to perform remote Geant4 visualization with the
|
|---|
| 401 | DAWN-Network driver. In order to do it, you must install the Fukui
|
|---|
| 402 | Renderer DAWN on your local host beforehand.
|
|---|
| 403 | <P>
|
|---|
| 404 | The following steps realize remote Geant4 visualization viewed by DAWN.
|
|---|
| 405 | <OL>
|
|---|
| 406 | <LI>Invoke DAWN with "-G" option on your local host:
|
|---|
| 407 | <PRE> Local_Host> dawn -G</PRE>
|
|---|
| 408 | This invokes DAWN with the network connection mode.
|
|---|
| 409 | <p></LI>
|
|---|
| 410 | <LI>Login to the remote host where a Geant4 executable is placed.
|
|---|
| 411 | <p></LI>
|
|---|
| 412 | <LI>Set an environment variable on the remote host as follows:
|
|---|
| 413 | <PRE> Remote_Host> setenv G4DAWN_HOST_NAME local_host_name</PRE>
|
|---|
| 414 | For example, if you are working in the local host named "arkoop.kek.jp",
|
|---|
| 415 | set this environment variable as follows:
|
|---|
| 416 | <PRE> Remote_Host> setenv G4DAWN_HOST_NAME arkoop.kek.jp</PRE>
|
|---|
| 417 | This tells a Geant4 process running on the remote host where Geant4
|
|---|
| 418 | Visualization should be performed, i.e., where the visualized views
|
|---|
| 419 | should be displayed.
|
|---|
| 420 | <p></LI>
|
|---|
| 421 | <LI>Invoke a Geant4 process and perform visualization with the DAWN-Network
|
|---|
| 422 | driver. For example:
|
|---|
| 423 | <PRE>
|
|---|
| 424 | Idle> /vis/open DAWN
|
|---|
| 425 | Idle> /vis/drawVolume
|
|---|
| 426 | Idle> /vis/viewer/flush
|
|---|
| 427 | </PRE>
|
|---|
| 428 | </OL>
|
|---|
| 429 | <P>
|
|---|
| 430 | In step 4, 3D scene data are sent from the remote host to the local host as
|
|---|
| 431 | <A HREF="http://geant4.kek.jp/GEANT4/vis/DAWN/G4PRIM_FORMAT_24/">
|
|---|
| 432 | DAWN-formatted data</A>, and the local DAWN will visualize the data.
|
|---|
| 433 | The transferred data are saved as a file named <tt>g4.prim</tt> in the current
|
|---|
| 434 | directory of the local host.
|
|---|
| 435 | <P>
|
|---|
| 436 | <B>Further information:</B>
|
|---|
| 437 | <UL>
|
|---|
| 438 | <LI><A HREF="http://geant4.kek.jp/GEANT4/vis/DAWN/About_DAWN.html">
|
|---|
| 439 | http://geant4.kek.jp/GEANT4/vis/DAWN/About_DAWN.html</A></LI>
|
|---|
| 440 | <LI><A HREF="http://geant4.kek.jp/GEANT4/vis/DAWN/G4PRIM_FORMAT_24/">
|
|---|
| 441 | http://geant4.kek.jp/GEANT4/vis/DAWN/G4PRIM_FORMAT_24/</A></LI>
|
|---|
| 442 | </UL>
|
|---|
| 443 | <P>
|
|---|
| 444 |
|
|---|
| 445 |
|
|---|
| 446 | <P><B>Further information:</B><BR>
|
|---|
| 447 | <UL>
|
|---|
| 448 | <LI>Fukui Renderer DAWN:<BR><A
|
|---|
| 449 | href="http://geant4.kek.jp/GEANT4/vis/DAWN/About_DAWN.html">http://geant4.kek.jp/GEANT4/vis/DAWN/About_DAWN.html</A>
|
|---|
| 450 |
|
|---|
| 451 | <LI>The DAWNFILE driver :<BR><A
|
|---|
| 452 | href="http://geant4.kek.jp/GEANT4/vis/GEANT4/DAWNFILE_driver.html">http://geant4.kek.jp/GEANT4/vis/GEANT4/DAWNFILE_driver.html</A>
|
|---|
| 453 |
|
|---|
| 454 | <LI>The DAWN-Network driver :<BR><A
|
|---|
| 455 | href="http://geant4.kek.jp/GEANT4/vis/GEANT4/DAWNNET_driver.html">http://geant4.kek.jp/GEANT4/vis/GEANT4/DAWNNET_driver.html</A>
|
|---|
| 456 |
|
|---|
| 457 | <LI>Environmental variables to customize DAWN and DAWN drivers:<BR><A
|
|---|
| 458 | href="http://geant4.kek.jp/GEANT4/vis/DAWN/DAWN_ENV.html">http://geant4.kek.jp/GEANT4/vis/DAWN/DAWN_ENV.html</A><BR><A
|
|---|
| 459 | href="http://geant4.kek.jp/GEANT4/vis/GEANT4/g4vis_on_linux.html">http://geant4.kek.jp/GEANT4/vis/GEANT4/g4vis_on_linux.html</A><BR>
|
|---|
| 460 | <LI>DAWN format (g4.prim format) manual:<BR><A
|
|---|
| 461 | href="http://geant4.kek.jp/GEANT4/vis/DAWN/G4PRIM_FORMAT_24/">http://geant4.kek.jp/GEANT4/vis/DAWN/G4PRIM_FORMAT_24/</A>
|
|---|
| 462 |
|
|---|
| 463 | <LI>Geant4 Fukui University Group Home Page:<BR><A
|
|---|
| 464 | href="http://geant4.kek.jp/GEANT4/vis/">http://geant4.kek.jp/GEANT4/vis/</A>
|
|---|
| 465 |
|
|---|
| 466 | <LI>DAWNCUT:<BR><A
|
|---|
| 467 | href="http://geant4.kek.jp/GEANT4/vis/DAWN/About_DAWNCUT.html">
|
|---|
| 468 | http://geant4.kek.jp/GEANT4/vis/DAWN/About_DAWNCUT.html
|
|---|
| 469 | </A>
|
|---|
| 470 |
|
|---|
| 471 | <LI>DAVID:<BR><A
|
|---|
| 472 | http://geant4.kek.jp/GEANT4/vis/DAWN/About_DAVID.html">
|
|---|
| 473 | http://geant4.kek.jp/GEANT4/vis/DAWN/About_DAVID.html</A>
|
|---|
| 474 |
|
|---|
| 475 | <LI>Geant4 Visualization Tutorial using the DAWN Renderer
|
|---|
| 476 | <A href="http://geant4.slac.stanford.edu/Presentations/vis/GDAWNTutorial/GDAWNTutorial.html">
|
|---|
| 477 | http://geant4.slac.stanford.edu/Presentations/vis/GDAWNTutorial/G4DAWNTutorial.html</A>
|
|---|
| 478 | </UL>
|
|---|
| 479 |
|
|---|
| 480 | <P>
|
|---|
| 481 | <H4>8.3.7 <A NAME="VRML">VRML</A></H4>These drivers were developed by Satoshi Tanaka and
|
|---|
| 482 | Yasuhide Sawada (Fukui University). They generate VRML files, which describe
|
|---|
| 483 | 3D scenes to be visualized with a proper VRML viewer, at either a local or a
|
|---|
| 484 | remote host. It realizes virtual-reality visualization with your WWW
|
|---|
| 485 | browser. There are many excellent VRML viewers, which enable one to perform
|
|---|
| 486 | interactive spinning of detectors, walking and/or flying inside detectors or
|
|---|
| 487 | particle showers, interactive investigation of detailed detector geometry etc.
|
|---|
| 488 | <P>
|
|---|
| 489 | There are two kinds of VRML drivers: the VRMLFILE driver, and the
|
|---|
| 490 | VRML-Network driver. The VRMLFILE driver is usually recommended, since it
|
|---|
| 491 | is faster and safer in the sense that it is not affected by network conditions.
|
|---|
| 492 |
|
|---|
| 493 | <P>
|
|---|
| 494 | The VRMLFILE driver sends 3D data to your VRML viewer, which is running on
|
|---|
| 495 | the same host machine as Geant4, via an intermediate file named
|
|---|
| 496 | <TT>g4.wrl</TT> created in the current directory. This file can be
|
|---|
| 497 | re-visualization afterwards. In visualization, the name of the VRML viewer
|
|---|
| 498 | should be specified by setting the environment variable <TT>G4VRML_VIEWER</TT>
|
|---|
| 499 | beforehand. For example,
|
|---|
| 500 | <PRE> % setenv G4VRML_VIEWER "netscape"
|
|---|
| 501 | </PRE>
|
|---|
| 502 | <P>
|
|---|
| 503 | Its default value is <TT>NONE</TT>, which means that no viewer is invoked and
|
|---|
| 504 | only the file <TT>g4.wrl</TT> is generated.
|
|---|
| 505 |
|
|---|
| 506 | <h4>Remote Visualization with the VRML-Network Driver</h4>
|
|---|
| 507 | Visualization in Geant4 is considered to be "remote" when it is performed on
|
|---|
| 508 | a machine other than the Geant4 host. Some of the visualization drivers
|
|---|
| 509 | support this feature.
|
|---|
| 510 | <P>
|
|---|
| 511 | Usually, the visualization host is your local host, while the Geant4 host is
|
|---|
| 512 | a remote host where you log in, for example, with the <tt>telnet</tt>
|
|---|
| 513 | command. This enables distributed processing of Geant4 visualization,
|
|---|
| 514 | avoiding the transfer of large amounts of visualization data to your terminal
|
|---|
| 515 | display via the network.
|
|---|
| 516 | <P>
|
|---|
| 517 | In order to perform remote visualization with the VRML-Network driver,
|
|---|
| 518 | the following must be installed on your local host beforehand:
|
|---|
| 519 | <OL>
|
|---|
| 520 | <LI>a VRML viewer</LI>
|
|---|
| 521 | <LI>the Java application <tt>g4vrmlview</tt>.</LI>
|
|---|
| 522 | </OL>
|
|---|
| 523 | The Java application <tt>g4vrmlview</tt> is included as part of the Geant4
|
|---|
| 524 | package and is located at:
|
|---|
| 525 | <pre> source/visualization/VRML/g4vrmlview/</pre> .
|
|---|
| 526 | Installation instructions for <tt>g4vrmlview</tt> can be found in the
|
|---|
| 527 | <tt>README</tt> file there, or on the WWW page below.
|
|---|
| 528 |
|
|---|
| 529 | <P>
|
|---|
| 530 | The following steps realize remote Geant4 visualization displayed
|
|---|
| 531 | with your local VRML browser:
|
|---|
| 532 | <ol>
|
|---|
| 533 | <LI>Invoke the <tt>g4vrmlview</tt> on your local host,
|
|---|
| 534 | giving a VRML viewer name as its argument:
|
|---|
| 535 | <PRE> Local_Host> java g4vrmlview VRML_viewer_name</PRE>
|
|---|
| 536 | For example, if you want to use the Netscape browser as your VRML
|
|---|
| 537 | viewer, execute <tt>g4vrmlview</tt> as follows:
|
|---|
| 538 | <PRE> Local_Host> java g4vrmlview netscape</PRE>
|
|---|
| 539 | Of course, the command path to the VRML viewer should be properly set.
|
|---|
| 540 | <p></LI>
|
|---|
| 541 | <LI>Log in to the remote host where a Geant4 executable is placed.
|
|---|
| 542 | <p></LI>
|
|---|
| 543 | <LI>Set an environment variable on the remote host as follows:
|
|---|
| 544 | <PRE> Remote_Host> setenv G4VRML_HOST_NAME local_host_name</PRE>
|
|---|
| 545 | For example, if you are working on the local host named "arkoop.kek.jp",
|
|---|
| 546 | set this environment variable as follows:
|
|---|
| 547 | <PRE> Remote_Host> setenv G4VRML_HOST_NAME arkoop.kek.jp</PRE>
|
|---|
| 548 | This tells a Geant4 process running on the remote host where Geant4
|
|---|
| 549 | Visualization should be performed, i.e., where the visualized views
|
|---|
| 550 | should be displayed.
|
|---|
| 551 | <p></LI>
|
|---|
| 552 | <LI>Invoke a Geant4 process and perform visualization with the VRML-Network
|
|---|
| 553 | driver. For example:
|
|---|
| 554 | <PRE>
|
|---|
| 555 | Idle> /vis/open VRML2
|
|---|
| 556 | Idle> /vis/drawVolume
|
|---|
| 557 | Idle> /vis/viewer/update
|
|---|
| 558 | </PRE></LI>
|
|---|
| 559 | </OL>
|
|---|
| 560 | <P>
|
|---|
| 561 | In step 4, 3D scene data are sent from the remote host to the local host as
|
|---|
| 562 | VRML-formatted data, and the VRML viewer specified in step 3 is invoked by the
|
|---|
| 563 | <tt>g4vrmlview</tt> process to visualize the VRML data. The transferred VRML
|
|---|
| 564 | data are saved as a file named <tt>g4.wrl</tt> in the current directory of the
|
|---|
| 565 | local host.
|
|---|
| 566 | <P>
|
|---|
| 567 | <B>Further information:</B><BR>
|
|---|
| 568 | <UL>
|
|---|
| 569 | <LI><A HREF="http://geant4.kek.jp/GEANT4/vis/GEANT4/VRML_net_driver.html">
|
|---|
| 570 | http://geant4.kek.jp/GEANT4/vis/GEANT4/VRML_net_driver.html</A></LI>
|
|---|
| 571 | </UL>
|
|---|
| 572 | <P>
|
|---|
| 573 | <P><B>Further information (VRML drivers):</B><BR>
|
|---|
| 574 | <UL>
|
|---|
| 575 | <LI><A
|
|---|
| 576 | href="http://geant4.kek.jp/GEANT4/vis/GEANT4/VRML_file_driver.html">http://geant4.kek.jp/GEANT4/vis/GEANT4/VRML_file_driver.html</A>
|
|---|
| 577 |
|
|---|
| 578 | <LI><A
|
|---|
| 579 | href="http://geant4.kek.jp/GEANT4/vis/GEANT4/VRML_net_driver.html">http://geant4.kek.jp/GEANT4/vis/GEANT4/VRML_net_driver.html</A>
|
|---|
| 580 | </LI></UL>
|
|---|
| 581 | <P><B>Sample VRML files:</B><BR>
|
|---|
| 582 | <UL>
|
|---|
| 583 | <LI><A
|
|---|
| 584 | href="http://geant4.kek.jp/GEANT4/vis/GEANT4/VRML2_FIG/">http://geant4.kek.jp/GEANT4/vis/GEANT4/VRML2_FIG/</A>
|
|---|
| 585 | </LI></UL>
|
|---|
| 586 | <P><B>Further information (VRML language and browsers):</B><BR>
|
|---|
| 587 | <UL>
|
|---|
| 588 | <LI><A href="http://www.vrmlsite.com/">http://www.vrmlsite.com/</A> </LI></UL>
|
|---|
| 589 |
|
|---|
| 590 | <P>
|
|---|
| 591 | <H4>8.3.8 <A NAME="RayTracer">RayTracer</A></H4>This driver was developed by
|
|---|
| 592 | Makoto Asai and Minamimoto (Hirosihma Instutute of Technology). It performs
|
|---|
| 593 | ray-tracing visualization using the tracking routines of Geant4. It is,
|
|---|
| 594 | therefore, available for every kinds of shapes/solids which Geant4 can
|
|---|
| 595 | handle. It is also utilized for debugging the user's geometry for the tracking
|
|---|
| 596 | routines of Geant4. It is well suited for
|
|---|
| 597 | photo-realistic high quality output for presentation, and for intuitive
|
|---|
| 598 | debugging of detector geometry. It produces a JPEG file. This driver is by default listed in the
|
|---|
| 599 | available visualization drivers of user's application.
|
|---|
| 600 | <P>
|
|---|
| 601 | Some pieces of geometries may fail to show up in other visualization drivers
|
|---|
| 602 | (due to algorithms those drivers use to compute visualizable shapes and polygons),
|
|---|
| 603 | but RayTracer can handle any geometry that the Geant4 navigator can handle.
|
|---|
| 604 | <P>
|
|---|
| 605 | Because RayTracer in essence takes over Geant4's tracking routines for its own use,
|
|---|
| 606 | RayTracer cannot be used to visualize Trajectories or hits.
|
|---|
| 607 | <P>
|
|---|
| 608 | An X-Window version, called RayTracerX, can be selected by setting
|
|---|
| 609 | <tt>G4VIS_BUILD_RATRACERX_DRIVER</tt> at Geant4 library build time and
|
|---|
| 610 | <tt>G4VIS_USE_RAYTRACERX</tt> at application (user code) build time
|
|---|
| 611 | (assuming you use the standard visualization manager, <tt>G4VisExecutive</tt>,
|
|---|
| 612 | or an equally smart vis manager).
|
|---|
| 613 | RayTracerX builds the same jpeg file as RayTracer,
|
|---|
| 614 | but simultaneously renders to screen so you can watch as rendering grows progressively smoother.
|
|---|
| 615 | <P>
|
|---|
| 616 | RayTracer has its own built-in commands - <tt>/vis/rayTracer/</tt>....
|
|---|
| 617 | Alternatively, you can treat it as a normal vis system and use
|
|---|
| 618 | <tt>/vis/viewer/</tt>... commands, e.g:
|
|---|
| 619 | <PRE>
|
|---|
| 620 | /vis/open RayTracerX
|
|---|
| 621 | /vis/drawVolume
|
|---|
| 622 | /vis/viewer/set/viewpointThetaPhi 30 30
|
|---|
| 623 | /vis/viewer/refresh
|
|---|
| 624 | </PRE>
|
|---|
| 625 | The view parameters are translated into the necessary RayTracer parameters.
|
|---|
| 626 | <P>
|
|---|
| 627 | RayTracer is compute intensive. If you are unsure of a good viewing
|
|---|
| 628 | angle or zoom factor, you might be advised to choose them with a
|
|---|
| 629 | faster renderer, such as OpenGL, and transfer the view parameters with
|
|---|
| 630 | <tt>/vis/viewer/set/all</tt>:
|
|---|
| 631 | <PRE>
|
|---|
| 632 | /vis/open OGLSXm # or any of the OGL options. Opens, say, viewer-0.
|
|---|
| 633 | /vis/drawVolume
|
|---|
| 634 | /vis/viewer/zoom # plus any /vis/viewer/commands that get you the view you want.
|
|---|
| 635 | /vis/open RayTracerX
|
|---|
| 636 | /vis/viewer/set/all viewer-0
|
|---|
| 637 | /vis/viewer/refresh
|
|---|
| 638 | </PRE>
|
|---|
| 639 |
|
|---|
| 640 | <P>
|
|---|
| 641 | <h4>8.3.9 <A NAME="ASCIITree">Visualization of detector geometry tree</A> </h4>
|
|---|
| 642 | ASCIITREE is a visualization driver that is not actually graphical
|
|---|
| 643 | but that dumps the volume hierarchy as a simple text tree.
|
|---|
| 644 | <P>
|
|---|
| 645 | Each call to /vis/viewer/flush or /vis/drawTree will dump the tree.
|
|---|
| 646 | <P>
|
|---|
| 647 | ASCIITree has command to control its verbosity, <tt>/vis/ASCIITree/verbose</tt>.
|
|---|
| 648 | The verbosity value controls the amount of information available,
|
|---|
| 649 | e.g., physical volume name alone, or also logical volume and solid
|
|---|
| 650 | names. If the volume is "sensitive" and/or has a "readout geometry",
|
|---|
| 651 | this may also be indicated. Also, the mass of the physical volume
|
|---|
| 652 | tree(s) can be printed (but beware - higher verbosity levels can be computationally
|
|---|
| 653 | intensive).
|
|---|
| 654 | <P>
|
|---|
| 655 | At verbosity level 4,
|
|---|
| 656 | ASCIITree calculates the mass of the complete geometry tree taking into account daughters
|
|---|
| 657 | up to the depth specified for each physical volume.
|
|---|
| 658 | The calculation involves subtracting the mass of that part of the mother that is
|
|---|
| 659 | occupied by each daughter and then adding the mass of the daughter, and so on down the hierarchy.
|
|---|
| 660 | <PRE>
|
|---|
| 661 | /vis/ASCIITree/Verbose 4
|
|---|
| 662 | /vis/viewer/flush
|
|---|
| 663 | "HadCalorimeterPhysical":0 / "HadCalorimeterLogical" / "HadCalorimeterBox"(G4Box), 1.8 m3 , 11.35 g/cm3
|
|---|
| 664 | "HadCalColumnPhysical":-1 (10 replicas) / "HadCalColumnLogical" / "HadCalColumnBox"(G4Box), 180000 cm3, 11.35 g/cm3
|
|---|
| 665 | "HadCalCellPhysical":-1 (2 replicas) / "HadCalCellLogical" / "HadCalCellBox"(G4Box), 90000 cm3, 11.35 g/cm3
|
|---|
| 666 | "HadCalLayerPhysical":-1 (20 replicas) / "HadCalLayerLogical" / "HadCalLayerBox"(G4Box), 4500 cm3, 11.35 g/cm3
|
|---|
| 667 | "HadCalScintiPhysical":0 / "HadCalScintiLogical" / "HadCalScintiBox"(G4Box), 900 cm3, 1.032 g/cm3
|
|---|
| 668 |
|
|---|
| 669 | Calculating mass(es)...
|
|---|
| 670 | Overall volume of "worldPhysical":0, is 2400 m3
|
|---|
| 671 | Mass of tree to unlimited depth is 22260.5 kg
|
|---|
| 672 | </PRE>
|
|---|
| 673 | <P>
|
|---|
| 674 | Some more examples of ASCIITree in action:
|
|---|
| 675 | <PRE>
|
|---|
| 676 | Idle> /vis/ASCIITree/verbose 1
|
|---|
| 677 | Idle> /vis/drawTree
|
|---|
| 678 | # Set verbosity with "/vis/ASCIITree/verbose <verbosity>":
|
|---|
| 679 | # < 10: - does not print daughters of repeated placements, does not repeat replicas.
|
|---|
| 680 | # >= 10: prints all physical volumes.
|
|---|
| 681 | # The level of detail is given by verbosity%10:
|
|---|
| 682 | # for each volume:
|
|---|
| 683 | # >= 0: physical volume name.
|
|---|
| 684 | # >= 1: logical volume name (and names of sensitive detector and readout geometry, if any).
|
|---|
| 685 | # >= 2: solid name and type.
|
|---|
| 686 | # >= 3: volume and density.
|
|---|
| 687 | # >= 5: daughter-subtracted volume and mass.
|
|---|
| 688 | # and in the summary at the end of printing:
|
|---|
| 689 | # >= 4: daughter-included mass of top physical volume(s) in scene to depth specified.
|
|---|
| 690 | .....
|
|---|
| 691 | "Calorimeter", copy no. 0, belongs to logical volume "Calorimeter"
|
|---|
| 692 | "Layer", copy no. -1, belongs to logical volume "Layer" (10 replicas)
|
|---|
| 693 | "Absorber", copy no. 0, belongs to logical volume "Absorber"
|
|---|
| 694 | "Gap", copy no. 0, belongs to logical volume "Gap"
|
|---|
| 695 | .....
|
|---|
| 696 | Idle> /vis/ASCIITree/verbose 15
|
|---|
| 697 | Idle> /vis/drawTree
|
|---|
| 698 | ....
|
|---|
| 699 | "tube_phys":0 / "tube_L" / "tube"(G4Tubs), 395841 cm3, 1.782 mg/cm3, 9.6539e-08 mm3, 1.72032e-10 mg
|
|---|
| 700 | "divided_tube_phys":0 / "divided_tube_L" / "divided_tube"(G4Tubs), 65973.4 cm3, 1.782 mg/cm3, 7587.54 cm3, 13.521 g
|
|---|
| 701 | "divided_tube_inset_phys":0 / "divided_tube_inset_L" / "divided_tube_inset"(G4Tubs), 58385.9 cm3, 1.782 mg/cm3, 6.03369e-09 mm3, 1.0752e-11 mg
|
|---|
| 702 | "sub_divided_tube_phys":0 / "sub_divided_tube_L" / "sub_divided_tube"(G4Tubs), 14596.5 cm3, 1.782 mg/cm3, 12196.5 cm3, 21.7341 g
|
|---|
| 703 | .....
|
|---|
| 704 | Calculating mass(es)...
|
|---|
| 705 | Overall volume of "expHall_P":0, is 8000 m3 and the daughter-included mass to unlimited depth is 78414 kg
|
|---|
| 706 | .....
|
|---|
| 707 | </PRE>
|
|---|
| 708 | <P>For the complete list of commands and options,
|
|---|
| 709 | see the <A HREF="../Control/UIcommands/_vis_.html">Control...UICommands</A> section of this user guide.
|
|---|
| 710 |
|
|---|
| 711 | <h4>8.3.10 <A NAME="GAGTree">GAG Tree</A></h4>
|
|---|
| 712 | The GAGTree driver provides a listing of the detector geometry tree within GAG,
|
|---|
| 713 | the Geant Adaptive GUI,
|
|---|
| 714 | (<a href="http://erpc1.naruto-u.ac.jp/~geant4/">http://erpc1.naruto-u.ac.jp/~geant4</a>).
|
|---|
| 715 | GAG allows "folding/un-folding" a part of the geometry tree, using the
|
|---|
| 716 | <i>Tree Widget</i> in Java:
|
|---|
| 717 | <br>
|
|---|
| 718 | <img src="visualization.src/gagtree.jpg">
|
|---|
| 719 | <P>
|
|---|
| 720 |
|
|---|
| 721 | <h4>8.3.11 <A NAME="XMLTree">XML Tree</A></h4>
|
|---|
| 722 | The XML description of the geometry tree can be created in Geant4 by the XML
|
|---|
| 723 | Tree driver. The XML source can also be edited on the fly. The created XML
|
|---|
| 724 | files are visualizable with any XML browser (in Windows, a good XML viewer is
|
|---|
| 725 | <i>XML Notepad</i>).
|
|---|
| 726 | <ul>
|
|---|
| 727 | <li>Folding and un-folding:<br>
|
|---|
| 728 | <br>
|
|---|
| 729 | <img src="visualization.src/xmlnp.gif"><br>
|
|---|
| 730 | <br>
|
|---|
| 731 | </li>
|
|---|
| 732 | <li>Searching a string:<br>
|
|---|
| 733 | <br>
|
|---|
| 734 | <img src="visualization.src/xmlnpfind.gif"><br>
|
|---|
| 735 | <br>
|
|---|
| 736 | </li>
|
|---|
| 737 | </ul>
|
|---|
| 738 | <P>
|
|---|
| 739 | <HR>
|
|---|
| 740 | <A href="commandcontrol.html">Next section</A><BR>
|
|---|
| 741 | <A href="index.html">Back to contents</A>
|
|---|
| 742 | </BODY>
|
|---|
| 743 | </HTML>
|
|---|