ppt - Geant4
Download
Report
Transcript ppt - Geant4
Visualization of Geant4 Data: Exploiting Component
Architecture through AIDA, HepRep, JAS and WIRED
HepRep: a Generic Interface Definition for HEP Event Display Representables
HepRep
Comments: String[]
HepRep
Comments: String[]
+getInstanceTreeTop(
InstanceTreeName: String)
:HepRepInstanceTree;
+getTypeTree(
TypeTreeName: String)
:TypeTree;
+getInstances(
InstanceTreeName: String,
TypeNames: String[])
:HepRepInstanceTree;
+getInstancesCut(
InstanceTreeName: String,
TypeNames: String[],
CutList:HepRepCut[],
GetPoints: Boolean,
GetDrawAtts: Boolean,
GetNonDrawAtts: Boolean,
InvertAtts: String[])
:HepRepInstanceTree;
+getLayerOrder( )
:String[];
14
1
*
*
HepRep
InstanceTree
Name: String
ReqTypeTree: String
ReqInstanceTrees: String[]
HepRep
TypeTree
Name: String
1
1
*
*
HepRep
Type
Name: String
Desc: String
InfoURL: String
1
1
Linked by Name
1
*
HepRep
Point
X,Y,Z: Double
1
*
Linked by
Name
HepRep
AttDef
Name: String
Desc: String
Category: String
Extra: String
*
HepRep
AttValue
Name: String
Value: Any
ShowLabel: Int
Joseph Perl
A
HepRep
Cut
Name:String
Comparison:String
Value:Any
HepRep2
I
User
code
(e.g.
GEANT
4)
HepRep
Instance
Name: String
4/25/2001
Analysis
tool 1
D
A
Analysis
tool 2
Geant4 Workshop, CERN - 2 October 2002
Joseph Perl
Visualization of Geant4 Data: Exploiting Component
Architecture through AIDA, HepRep, JAS and WIRED
Component Architecture/Generic Interfaces
AIDA for data visualization and analysis
• Introduction
• Current use architecture
• Proposed use architecture
HepRep for single event visualization
• Introduction
• Current use architecture
• Proposed use architecture
Demo WIRED reading HepRep files
Demo JAS reading AIDA files
2 October 2002
Visualization of G4 Data / AIDA, HepRep, JAS and WIRED
Joseph Perl, SLAC Computing Services
2
Component Architecture / Generic Interfaces
Component Architecture
• Use the same data visualization/analysis tool for
G4 data as for other experimental data.
• Experiment or collaboration need only agree on the
interfaces with which they will fill or send data.
• The end user (physicist, astronomer, doctor) is free
to choose whatever desktop tool they prefer.
Depends on Generic Interfaces
• Well defined (AIDA 3.0, HepRep2)
• Flexible
• Language neutral
2 October 2002
Visualization of G4 Data / AIDA, HepRep, JAS and WIRED
Joseph Perl, SLAC Computing Services
3
AIDA for Data Visualization and Analysis
Abstract Interfaces for
Data Analysis (AIDA) is
an analysis interface that
can be used with several
different analysis
packages
• such as
JAS
Lizard
OpenScientist
A
I
Analysis
tool 1
JAS Picture
Here
D
User code
(e.g.
GEANT4)
A
Analysis
tool 2
2 October 2002
Visualization of G4 Data / AIDA, HepRep, JAS and WIRED
Joseph Perl, SLAC Computing Services
4
AIDA Purpose
“The goals of the AIDA project are to
define abstract interfaces for common
physics analysis objects, such as
histograms, ntuples, fitters, IO
etc.The adoption of these interfaces
should make it easier for developers
and users to select to use different
tools without having to learn new
interfaces or change their code. In
addition it should be possible to
exchange data (objects) between
AIDA compliant applications.”
2 October 2002
Visualization of G4 Data / AIDA, HepRep, JAS and WIRED
Joseph Perl, SLAC Computing Services
5
AIDA Current Use Architecture
as used in February Geant4 User Workshop
Simple
“live”
GUI
Geant4
Any C++
Program
2 October 2002
not in
batch
AIDA (2.2)
JNI
JAIDA
Any Java
Program
JAS 2.2
+ AIDA
DIM
AIDA
File
JAS
Tuple
Explorer
Other
AIDA
Tools
Visualization of G4 Data / AIDA, HepRep, JAS and WIRED
Joseph Perl, SLAC Computing Services
Other
AIDA
Tools
6
AIDA Near-Term Future Architecture
Any Java
Program
JAS 3.0
AIDA
Geant4
Any C++
Program
AIDA (3.0)
JNI
JAIDA
Tuple
WIRED
Explorer
AIDA
File
Other
AIDA
Tools
Other
AIDA
Tools
Slightly longer term future:
•GAG style Plug-in for controlling G4
•True interactive analysis (i.e. actually defining histograms
on the fly rather
than
just
viewing
pre-defined
histograms)
2 October 2002
Visualization
of G4 Data
/ AIDA,
HepRep, JAS
and WIRED
Joseph Perl, SLAC Computing Services
7
HepRep for Single Event Visualization
• HepRep is a generic
interface for
component or client
server event displays
• such as
WIRED (Java)
FRED (C++ OpenGL)
HepRep: a Generic Interface Definition for HEP Event Display Representables
HepRep
Comments: String[]
HepRep
Comments: String[]
+getInstanceTreeTop(
InstanceTreeName: String)
:HepRepInstanceTree;
+getTypeTree(
TypeTreeName: String)
:TypeTree;
+getInstances(
InstanceTreeName: String,
TypeNames: String[])
:HepRepInstanceTree;
+getInstancesCut(
InstanceTreeName: String,
TypeNames: String[],
CutList:HepRepCut[],
GetPoints: Boolean,
GetDrawAtts: Boolean,
GetNonDrawAtts: Boolean,
InvertAtts: String[])
:HepRepInstanceTree;
+getLayerOrder( )
:String[];
14
2 October 2002
1
*
*
HepRep
InstanceTree
Name: String
ReqTypeTree: String
ReqInstanceTrees: String[]
HepRep
TypeTree
Name: String
1
1
*
*
HepRep
Type
Name: String
Desc: String
InfoURL: String
1
1
Linked by Name
JAS Picture
Here
HepRep
Instance
Name: String
1
*
HepRep
Point
X,Y,Z: Double
1
*
Linked by
Name
HepRep
AttDef
Name: String
Desc: String
Category: String
Extra: String
*
HepRep
AttValue
Name: String
Value: Any
ShowLabel: Int
Joseph Perl
HepRep
Cut
Name:String
Comparison:String
Value:Any
HepRep2
4/25/2001
Visualization of G4 Data / AIDA, HepRep, JAS and WIRED
Joseph Perl, SLAC Computing Services
8
BaBar
Server
GLAST
Server
LCD
Interface
Geant4
Server
HepRep Purpose
HepRep: a Generic Interface Definition for HEP Event Display Representables
HepRep
Comments: String[]
+getInstanceTreeTop(
InstanceTreeName: String,
InstanceTreeVersion: String)
:HepRepInstanceTree;
+getTypeTree(
TypeTreeName: String,
TypeTreeVersion: String)
:TypeTree;
+getInstances(
InstanceTreeName: String,
InstanceTreeVersion: String,
TypeNames: String[])
:HepRepInstanceTree;
+getInstancesAfterAction(
InstanceTreeName: String,
InstanceTreeVersion: String,
TypeNames: String[],
Actions:HepRepAction[],
GetPoints: Boolean,
GetDrawAtts: Boolean,
GetNonDrawAtts: Boolean,
InvertAtts: String[])
:HepRepInstanceTree;
+getLayerOrder( )
:String[];
+checkForException( )
:String;
18
HepRep
Comments: String[]
HepRepTreeID
Name:String
Version:String
1
*
*
HepRep
InstanceTree
ID: HepRepTreeID
Linked by TypeTreeID:HRTreeID
TypeTreeID InstanceTreeIDs:HRTreeID[]
HepRep
TypeTree
ID: HepRepTreeID
1
WIRED
Client
1
*
HepRep
HepRep
Type
Name: String
Desc: String
InfoURL: String
*
1
1
Linked by TypeName
HepRep
Instance
TypeName: String
1
HepRep
Point
X,Y,Z: Double
1
1
*
FRED Client
*
Linked by
AttDef
Name
HepRep
AttDef
Name: String
Desc: String
Category: String
Extra: String
*
HepRep
AttValue
AttDefName: String
Value: Any
ShowLabel: Int
Joseph Perl
HepRep
Action
Name:String
Expression:String
HepRep2
Other HepRep
Clients
4/9/2002
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, Java or JNI for consumption by WIRED or any other HepRepenabled event display client.
2 October 2002
Visualization of G4 Data / AIDA, HepRep, JAS and WIRED
Joseph Perl, SLAC Computing Services
9
HepRep Current Use Architecture
BaBar
(c++)
BaBar Corba
Server
HepRep1
Corba
Corba
LCD
(java)
LCD
Application
legacy
format
Java
Geant4
(c++)
Geant4 XML
Streamer
HepRep1
XML
GLAST
(c++)
GLAST XML
Streamer /
C++ Builder
HepRep2
RMI
Java
XML
XML
XML
C++
C++
HepRep1
HepRep2
+legacy
data
formats
WIRED 1
version
3.9
(java)
HepRep2
FRED
(c++)
While all four SLAC data sources are now using WIRED,
they communicate with WIRED in different ways:
•BaBar has its own HepRep1 Corba server, dependent on BaBar code.
•LCD passes WIRED java objects using a legacy data format (pre-HepRep).
•Geant4 has its own HepRep1 XML streamer, dependent on Geant4 code.
•GLAST, being the newest, is leading us towards the right approach.
2 October 2002
Visualization of G4 Data / AIDA, HepRep, JAS and WIRED
Joseph Perl, SLAC Computing Services
10
HepRep Near-Term Future Architecture
LCD
(java)
Java Shared
HepRep
IceCube Factory
(java)
BaBar
(c++)
Geant4
(c++)
GLAST
(c++)
Java
HepRep2
Corba
RMI
XML
Java
Corba
RMI
HepRep2
WIRED 4
(java)
HepRep2
FRED
(c++)
XML
C++ Shared
HepRep
Factory
HepRep2
Java
Corba
XML
XML
C++
C++
All data sources speak HepRep2 to an abstract HepRep factory.
By instantiation of one or another concrete implementation of HepRep:
•a C++ program can change from creating HepRep in C++ memory
•to creating HepRep as an XML streamer (a pure C++ solution with no
external library dependencies and no creation of the HepRep in memory)
•to creating HepRep as Corba (depends on Corba libraries)
•or creating HepRep as Java (via Java Native Interface)
2 October 2002
Visualization of G4 Data / AIDA, HepRep, JAS and WIRED
Joseph Perl, SLAC Computing Services
11
Demo WIRED Reading HepRep Files
from the feb 2002 G4 Workshop CD
2 October 2002
Visualization of G4 Data / AIDA, HepRep, JAS and WIRED
Joseph Perl, SLAC Computing Services
12
Demo JAS Reading AIDA Files
from the feb 2002 G4 Workshop CD
2 October 2002
Visualization of G4 Data / AIDA, HepRep, JAS and WIRED
Joseph Perl, SLAC Computing Services
13
Conclusions
•Component architecture based on generic interfaces has worked
well in Geant4.
•All attendees at the Feb 2002 G4 Users Workshop tutorials were
successful in using JAS and WIRED to visualize G4 data.
•But these tutorials relied on the user having the pre-built binaries
that we produced for that workshop, and the documentation was
maintained only on that workshop’s web pages.
•These tutorials should be:
•adapted to the latest G4 version
•included in the G4 distribution as G4 extended or advanced
examples
•documented in the G4 standard documentation set
•and perhaps also used as standard G4 test cases
2 October 2002
Visualization of G4 Data / AIDA, HepRep, JAS and WIRED
Joseph Perl, SLAC Computing Services
14
References
•AIDA: Abstract Interfaces for Data Analysis
http://aida.freehep.org
•JAS: Java Analysis Studio
http://jas.freehep.org
•HepRep:a generic interface definition for HEP event display representables
http://heprep.freehep.org
•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 Plan
http://www.slac.stanford.edu/~perl/wired
•Fred: oh no, another event display (a HepRep client)
http://www.fisica.uniud.it/~riccardo/research/fred
•Geant4 Users Workshop at SLAC Feb 2002, Tutorials
http://geant4.slac.stanford.edu/UsersWorkshop/tutorial.html
•A Component Approach to HEP Event Displays
http://www.slac.stanford.edu/~perl/component
2 October 2002
Visualization of G4 Data / AIDA, HepRep, JAS and WIRED
Joseph Perl, SLAC Computing Services
15