The Relationship between HepRep and DAWN - PowerPoint PPT Presentation

1 / 19
About This Presentation
Title:

The Relationship between HepRep and DAWN

Description:

In my plenary talk, I described HepRep as part of a component approach to event ... Parallelepiped. PolyCone. PolyGon. Polyhedron. Details ... – PowerPoint PPT presentation

Number of Views:79
Avg rating:3.0/5.0
Slides: 20
Provided by: richard59
Category:

less

Transcript and Presenter's Notes

Title: The Relationship between HepRep and DAWN


1
The Relationship betweenHepRep and DAWN
Joseph Perl SLAC Computing Services
DAWN
HepRep/WIRED
2
HepRep and DAWN
  • In my plenary talk, I described HepRep as part of
    a component approach to event displays and
    described a little about its relationship to
    other visualization drivers, OpenGL and DAWN.
  • WIRED is currently just wireframe or simple,
    unshaded fills, but runs anywhere and allows
    complex attribute viewing and handling.
  • To see rendered, photorealistic images, instead
    use
  • OpenGL can be very fast and beautiful with right
    libraries (and these libraries have become nearly
    ubiquitous).
  • DAWN slow but beautiful, and its beauty can be
    exported to vector postscript.
  • Two of these drivers, HepRep and DAWN, work by
    exporting the visualization to an ASCII file.
    The purpose of this talk is to discuss how those
    two different formats came about and to compare
    their features.

3
HepRep XML Example
  • ltheprep xmlns"http//www.freehep.org/HepRep"
  • xmlnsxsi"http//www.w3.org/2001/XMLSchema-inst
    ance" xsischemaLocation"HepRep.xsd"gt
  • ltlayerorder"Detector, Event, CalHit,
    Trajectory, TrajectoryPoint, Hit"/gt
  • lttypetree name"G4GeometryTypes" version"1.0"gt
  • lttype name"Detector"gt
  • ltattvalue name"Layer" showLabel"NONE"
    type"String" value"Detector"/gt
  • ltattdef category"Physics" desc"Logical
    Volume" extra"" name"LVol"/gt
  • ltattdef category"Physics" desc"Material
    Name" extra"" name"Material"/gt
  • lttype name"Detector/World"gt
  • lttype name"Detector/World/Calorimeter"gt
  • lttype name"Detector/World/Calorimeter/L
    ayer"gt
  • lttype name"Detector/World/Calorimeter
    /Layer/Lead"gt
  • lt/typegt
  • lt/typegt
  • lt/typegt
  • lt/typegt
  • lt/typegt
  • lt/typetreegt
  • lttypetree name"G4EventTypes" version"1.0"gt

HepRep files compress down to about 5 percent of
original size with gzip (and WIRED can read them
without unzipping).
4
Example HepRep Object Tree
HepRep
GLAST Event multiHad/xxx
GLAST Event Types version 1.4
InstanceTree
TypeTree
Event 1
Instance of Event
TypeEvent
Track 1
Track 2
AttDefs
AttVals
Instance of Track
linked by name to Type Track
Instance of Track
linked by name to Type Track
Type Track
Type Cluster
Points
Points
AttVals
AttVals
AttDefs
AttVals
AttVals
AttDefs
AttVals
AttVals
Type HitOnTrack
  • Flexible scheme for incremental download.Client
    can ask to
  • include or exclude Attributes
  • only get Instances of a given Type
  • only get Instances that have given Attributes
  • and other options

AttDefs
AttVals
5
Origins of HepRep
  • HepRep was designed to solve a general event
    display problem, not just for Geant4.
  • HepRep primitives guiding principle is to make it
    possible for someone to write their own HepRep
    browser without extraordinary effort
  • indeed, the FRED browser was written by two
    people working part time with little help other
    than the HepRep documentation
  • G4 HepRep drivers relies on G4's ability to
    decompose those primitives that HepRep can't
    handle by itself
  • thanks to John Allison and Satoshi Tanaka for
    this useful basic functionality of G4
    visualization

6
HepRep is Not Just for Geant4and Not Just for
WIRED
BaBar Server
WIRED Client (Java)
GLAST Server
FRED Client (C/Ruby)
HepRep
LCDInterface
Other HepRep Clients
Geant4Server
The HepRep interface breaks the dependency
between any particular experiment's event display
server and any particular event display
client. The HepRep format is independent of any
one particular language or protocol. It can be
used from C or Java and can be shipped as
Corba, RMI, XML, C, Java or JNI for consumption
by WIRED, FRED or any other HepRep-enabled event
display client.
7
Whos Using HepRep
BaBar Offline
8
HepRep-Compliant Visualization Tools
  • WIRED
  • a HepRep client written in Java based on FreeHEP
  • Full-featured
  • Runs in JAS or as separate app
  • Examples
  • HepRep from BaBar offline and online via Corba
  • HepRep from Geant4 and GLAST via XML
  • HepRep from Geant4 via JNI
  • FRED
  • a HepRep client written in C/Ruby based on the
    Fox toolkit
  • Less features than WIRED, but could be extended
  • Limited functionality, but does include scripting
  • Examples
  • HepRep from GLAST and Geant4 via XML

9
HepRep Primitives Set
  • Details
  • http//heprep.freehep.org

10
DAWN File Example
  • G4.PRIM-FORMAT-2.4
  • List of primitives 1
  • /BoundingBox -1.0 -1.0 -5.0 8.0 4.0 6.0
  • !SetCamera
  • !OpenDevice
  • !BeginModeling
  • Box
  • /Origin 0.0 0.0 0.0
  • /ColorRGB 1.0 0.0 0.0
  • /Box 0.5 2.0 4.5
  • Column
  • /Origin 4.0 0.0 0.0
  • /ColorRGB 0.0 1.0 0.0
  • /Ndiv 50
  • /Column 1.5 2.0

Sphere /Ndiv 25 /Origin 4.0 4.0 0.0
/ColorRGB 0.0 1.0 1.0 /Sphere 1.5
Polyline /Origin 0.0 0.0 0.0 /ColorRGB 0.0
0.0 1.0 /Polyline /PLVertex 0.0 0.0 0.0
/PLVertex 10.0 0.0 0.0 /PLVertex 10.0 10.0 0.0
/PLVertex 0.0 10.0 0.0 /PLVertex 0.0 0.0 0.0
/EndPolyline Mark (square) /ColorRGB 1
0 0 /MarkSquare2D 0 0 0 0.1 /MarkText2D
0 0 0 0.5 0.25 -0.125 Origin /MarkSquare2D
1 1 1 0.1 /MarkText2D 1 1 1 0.5 0.25
-0.125 (1 1 1) /MarkSquare2D 2 2 2
0.1 /MarkText2D 2 2 2 0.5 0.25 -0.125 (2 2
2) /MarkSquare2D 3 3 3 0.1 /MarkText2D 3
3 3 0.5 0.25 -0.125 (3 3 3) /MarkSquare2D
4 4 4 0.1 /MarkText2D 4 4 4 0.5 0.25
-0.125 (4 4 4)
11
DAWN Object Diagram
  • No object diagram is necessary.
  • DAWN has a flat structure. No hierarchy.

12
Origins of DAWN
  • Fukui Renderer DAWN (Drawer for Academic
    WritiNgs).
  • A vectorized 3D PostScript processor with
    analytical hidden line/surface removal intended
    for precise technical drawing of complicated
    objects.
  • Specifically designed for Geant4.
  • Primitives set is same as Geant4 primitives set.
  • Calculates all visible parts of the 3D data
    before drawing.
  • Produces device-independent vectorized graphics
    for high quality technical applications.

13
DAWN Examples
  • From a repository of beautiful images at
  • http//geant4.kek.jp/tanaka/GEANT4/ATLAS_G4_GIFFI
    G/

14
DAWN Examples
15
DAWN Primitives Set
  • Primitives set is same as Geant4 primitives
  • Box
  • Column
  • Cons
  • Parallelepiped
  • PolyCone
  • PolyGon
  • Polyhedron
  • Polyline
  • Sphere
  • SphereSeg
  • Torus
  • Trap
  • Trd
  • Tubs
  • Details
  • http//geant4.kek.jp/tanaka/DAWN/G4PRIM_FORMAT_24
    /

16
Comparison of Formats
  • HepRep
  • Hierarchical
  • Simple Primitives
  • General Purpose
  • Representables have Attributes
  • No Camera or Lighting Information
  • DAWN
  • Flat
  • All Geant4 Primitives
  • Just for Geant4
  • No Attributes
  • Camera and Lighting Information

17
Converters
  • A converter could be written to transform one
    file format to the other, but some information
    would be lost.
  • HepRep does not contain the full set of DAWN
    primitives, in particular, it has no cut shapes.
    Such primitives would either have to be omitted,
    be simplified, or be decomposed into simpler
    primitives such as polygons by fairly elaborate
    software (essentially G4 vis itself).
  • DAWN does not contain hierarchical information or
    attributes. Such information would be missing
    from a HepRep file generated from a DAWN file.

18
Summary
  • HepRep and DAWN are complimentary file formats,
    each with its own strengths.
  • Converters could be written from one format to
    the other, but because the two formats do not
    contain exactly the same information, such
    conversions would not be ideal for Geant4.
  • Best way to work in Geant4 is to produce one or
    the other or both file formats, depending on your
    needs at the time.
  • Fortunately, Geant4s visualization framework
    allows one to run multiple visualization drivers
    side by side.
  • /vis/scene/create
  • /vis/open HepRepFile
  • /vis/open DAWNFILE
  • /vis/viewer/flush

19
References
  • HepRep a generic interface definition for HEP
    event display representableshttp//heprep.freehep
    .org
  • HepRep Complete Presentation (most complete
    description of HepRep)http//heprep.freehep.org/h
    eprep2.Complete.ppthttp//heprep.freehep.org/hepr
    ep2.Complete.pdf
  • Fred oh no, another event display (a HepRep
    client)http//www.fisica.uniud.it/riccardo/resea
    rch/fred
  • WIRED world wide web interactive remote event
    display (a HepRep Client)http//www.slac.stanford
    .edu/BFROOT/www/Computing/Graphics/Wired
  • SLAC HepRep WIRED Work Planhttp//www.slac.stanfo
    rd.edu/perl/wired
  • A Component Approach to HEP Event
    Displayshttp//www.slac.stanford.edu/perl/compon
    ent
  • Requirements for a New BaBar Event Display (most
    parts apply to any experiment)http//www-sldnt.sl
    ac.stanford.edu/hepvis/paper/paper.asp?id37
  • About DAWNhttp//geant4.kek.jp/tanaka/DAWN/About
    _DAWN.html
  • Satoshi Tanakas GEANT4 Ritsumeikan University
    Group Home Page (more information on DAWN, sample
    PRIMS files, images, etc.)http//geant4.kek.jp/t
    anaka/
Write a Comment
User Comments (0)
About PowerShow.com