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