15
Visualization of Geant4 Data: Exploiting Visualization of Geant4 Data: Exploiting Component Architecture through AIDA, Component Architecture through AIDA, HepRep, JAS and WIRED HepRep, JAS and WIRED Geant4 Workshop, CERN - 2 October Geant4 Workshop, CERN - 2 October 2002 2002 Joseph Perl Joseph Perl User code (e.g. GEANT4 ) Analys is tool 1 Analys is tool 2 A I D A

Visualization of Geant4 Data: Exploiting Component Architecture through AIDA, HepRep, JAS and WIRED Geant4 Workshop, CERN - 2 October 2002 Joseph Perl

Embed Size (px)

Citation preview

Page 1: Visualization of Geant4 Data: Exploiting Component Architecture through AIDA, HepRep, JAS and WIRED Geant4 Workshop, CERN - 2 October 2002 Joseph Perl

Visualization of Geant4 Data: Exploiting Component Visualization of Geant4 Data: Exploiting Component Architecture through AIDA, HepRep, JAS and WIREDArchitecture through AIDA, HepRep, JAS and WIRED

Geant4 Workshop, CERN - 2 October 2002 Geant4 Workshop, CERN - 2 October 2002 Joseph PerlJoseph Perl

User code (e.g. GEANT4)

Analysis tool 1

Analysis tool 2

A

I

D

A

Page 2: Visualization of Geant4 Data: Exploiting Component Architecture through AIDA, HepRep, JAS and WIRED Geant4 Workshop, CERN - 2 October 2002 Joseph Perl

2 October 20022 October 2002 Visualization of G4 Data / AIDA, HepRep, JAS and WIRED JVisualization of G4 Data / AIDA, HepRep, JAS and WIRED Joseph Perl, SLAC Computing Servicesoseph Perl, SLAC Computing Services

22

Visualization of Geant4 Data: Exploiting Component Visualization of Geant4 Data: Exploiting Component Architecture through AIDA, HepRep, JAS and WIREDArchitecture through AIDA, HepRep, JAS and WIRED

Component Architecture/Generic InterfacesComponent Architecture/Generic Interfaces AIDA for data visualization and analysisAIDA for data visualization and analysis

• IntroductionIntroduction• Current use architectureCurrent use architecture• Proposed use architectureProposed use architecture

HepRep for single event visualizationHepRep for single event visualization• IntroductionIntroduction• Current use architectureCurrent use architecture• Proposed use architectureProposed use architecture

Demo WIRED reading HepRep filesDemo WIRED reading HepRep files Demo JAS reading AIDA filesDemo JAS reading AIDA files

Page 3: Visualization of Geant4 Data: Exploiting Component Architecture through AIDA, HepRep, JAS and WIRED Geant4 Workshop, CERN - 2 October 2002 Joseph Perl

2 October 20022 October 2002 Visualization of G4 Data / AIDA, HepRep, JAS and WIRED JVisualization of G4 Data / AIDA, HepRep, JAS and WIRED Joseph Perl, SLAC Computing Servicesoseph Perl, SLAC Computing Services

33

Component Architecture / Generic InterfacesComponent Architecture / Generic Interfaces

Component ArchitectureComponent Architecture• Use the same data visualization/analysis tool for Use the same data visualization/analysis tool for

G4 data as for other experimental data.G4 data as for other experimental data.• Experiment or collaboration need only agree on the Experiment or collaboration need only agree on the

interfaces with which they will fill or send data.interfaces with which they will fill or send data.• The end user (physicist, astronomer, doctor) is free The end user (physicist, astronomer, doctor) is free

to choose whatever desktop tool they prefer.to choose whatever desktop tool they prefer. Depends on Generic InterfacesDepends on Generic Interfaces

• Well defined (AIDA 3.0, HepRep2)Well defined (AIDA 3.0, HepRep2)• FlexibleFlexible• Language neutralLanguage neutral

Page 4: Visualization of Geant4 Data: Exploiting Component Architecture through AIDA, HepRep, JAS and WIRED Geant4 Workshop, CERN - 2 October 2002 Joseph Perl

2 October 20022 October 2002 Visualization of G4 Data / AIDA, HepRep, JAS and WIRED JVisualization of G4 Data / AIDA, HepRep, JAS and WIRED Joseph Perl, SLAC Computing Servicesoseph Perl, SLAC Computing Services

44

AIDA for Data Visualization and AnalysisAIDA for Data Visualization and Analysis

Abstract Interfaces for Abstract Interfaces for Data Analysis (AIDA) is an Data Analysis (AIDA) is an analysis interface that can analysis interface that can be used with several be used with several different analysis different analysis packagespackages

JAS Picture Here

• such assuch as JASJAS LizardLizard OpenScientistOpenScientist

User code (e.g. GEANT4)

Analysis tool 1

Analysis tool 2

A

I

D

A

Page 5: Visualization of Geant4 Data: Exploiting Component Architecture through AIDA, HepRep, JAS and WIRED Geant4 Workshop, CERN - 2 October 2002 Joseph Perl

2 October 20022 October 2002 Visualization of G4 Data / AIDA, HepRep, JAS and WIRED JVisualization of G4 Data / AIDA, HepRep, JAS and WIRED Joseph Perl, SLAC Computing Servicesoseph Perl, SLAC Computing Services

55

AIDA PurposeAIDA Purpose

““The goals of the AIDA project are to The goals of the AIDA project are to define abstract interfaces for common define abstract interfaces for common physics analysis objects, such as physics analysis objects, such as histograms, ntuples, fitters, IO histograms, ntuples, fitters, IO etc.The adoption of these interfaces etc.The adoption of these interfaces should make it easier for developers should make it easier for developers and users to select to use different and users to select to use different tools without having to learn new tools without having to learn new interfaces or change their code. In interfaces or change their code. In addition it should be possible to addition it should be possible to exchange data (objects) between exchange data (objects) between AIDA compliant applications.”AIDA compliant applications.”

Page 6: Visualization of Geant4 Data: Exploiting Component Architecture through AIDA, HepRep, JAS and WIRED Geant4 Workshop, CERN - 2 October 2002 Joseph Perl

2 October 20022 October 2002 Visualization of G4 Data / AIDA, HepRep, JAS and WIRED JVisualization of G4 Data / AIDA, HepRep, JAS and WIRED Joseph Perl, SLAC Computing Servicesoseph Perl, SLAC Computing Services

66

AIDA Current Use ArchitectureAIDA Current Use Architectureas used in February Geant4 User Workshopas used in February Geant4 User Workshop

Geant4AIDA (2.2)

JNI

OtherAIDATools

JAIDA

Simple“live”GUI

AIDAFile

JAS 2.2+ AIDA

DIM

JASTuple

Explorer

OtherAIDATools

Any C++Program

Any JavaProgram

not inbatch

Page 7: Visualization of Geant4 Data: Exploiting Component Architecture through AIDA, HepRep, JAS and WIRED Geant4 Workshop, CERN - 2 October 2002 Joseph Perl

2 October 20022 October 2002 Visualization of G4 Data / AIDA, HepRep, JAS and WIRED JVisualization of G4 Data / AIDA, HepRep, JAS and WIRED Joseph Perl, SLAC Computing Servicesoseph Perl, SLAC Computing Services

77

AIDA Near-Term Future ArchitectureAIDA Near-Term Future Architecture

Geant4AIDA (3.0)

JNI

OtherAIDATools

JAIDAAIDAFile

OtherAIDATools

Any C++Program

Any JavaProgram JAS 3.0

AIDATuple

ExplorerWIRED

Slightly longer term future:Slightly longer term future:

•GAG style Plug-in for controlling G4GAG style Plug-in for controlling G4

•True interactive analysis (i.e. actually defining histograms True interactive analysis (i.e. actually defining histograms on the fly rather than just viewing pre-defined histograms)on the fly rather than just viewing pre-defined histograms)

Page 8: Visualization of Geant4 Data: Exploiting Component Architecture through AIDA, HepRep, JAS and WIRED Geant4 Workshop, CERN - 2 October 2002 Joseph Perl

2 October 20022 October 2002 Visualization of G4 Data / AIDA, HepRep, JAS and WIRED JVisualization of G4 Data / AIDA, HepRep, JAS and WIRED Joseph Perl, SLAC Computing Servicesoseph Perl, SLAC Computing Services

88

HepRep for Single Event VisualizationHepRep for Single Event Visualization

• HepRep is a generic interface for component or client server event displays

JAS Picture Here

• such assuch as WIRED (Java)WIRED (Java) FRED (C++ OpenGL)FRED (C++ OpenGL)

Page 9: Visualization of Geant4 Data: Exploiting Component Architecture through AIDA, HepRep, JAS and WIRED Geant4 Workshop, CERN - 2 October 2002 Joseph Perl

2 October 20022 October 2002 Visualization of G4 Data / AIDA, HepRep, JAS and WIRED JVisualization of G4 Data / AIDA, HepRep, JAS and WIRED Joseph Perl, SLAC Computing Servicesoseph Perl, SLAC Computing Services

99

HepRep PurposeHepRep Purpose

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 HepRep-enabled event display client.

4/9/2002Joseph Perl HepRep218

*

*

*

**

*

*

1 1

1

1

1

1

1

HepRepInstance

HepRepTypeTree

HepRepInstanceTree

HepRepAttValue

HepRepType

HepRepAttDef

Linked by TypeName

ID: HepRepTreeID ID: HepRepTreeIDTypeTreeID:HRTreeIDInstanceTreeIDs:HRTreeID[]

Name: StringDesc: StringInfoURL: String

TypeName: String

X,Y,Z: Double

Name: StringDesc: StringCategory: StringExtra: String

AttDefName: StringValue: AnyShowLabel: Int

Linked by AttDefName

HepRepPoint

HepRepAction

Name:StringExpression:String

HepRep

Comments: String[]

HepRep: a Generic Interface Definition for HEP Event Display Representables

+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;

Comments: String[]HepRep HepRepTreeID

Name:StringVersion:String

Linked by TypeTreeID

1

HepRep

WIRED Client

Other HepRep Clients

BaBar Server

LCDInterface

GLAST Server

Geant4Server

FRED Client

Page 10: Visualization of Geant4 Data: Exploiting Component Architecture through AIDA, HepRep, JAS and WIRED Geant4 Workshop, CERN - 2 October 2002 Joseph Perl

2 October 20022 October 2002 Visualization of G4 Data / AIDA, HepRep, JAS and WIRED JVisualization of G4 Data / AIDA, HepRep, JAS and WIRED Joseph Perl, SLAC Computing Servicesoseph Perl, SLAC Computing Services

1010

HepRep Current Use ArchitectureHepRep Current Use Architecture

HepRep1HepRep2+legacydata formats

LCD(java)

Javalegacy format

WIRED 1 version 3.9(java)

XML

HepRep2FRED(c++)

GLAST(c++)

HepRep2

BaBar(c++)

CorbaHepRep1

Geant4(c++)

XMLHepRep1

Corba

RMI

Java

XML

C++

XML

C++

LCD Application

GLAST XML Streamer / C++ Builder

BaBar Corba Server

Geant4 XML Streamer

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.

Page 11: Visualization of Geant4 Data: Exploiting Component Architecture through AIDA, HepRep, JAS and WIRED Geant4 Workshop, CERN - 2 October 2002 Joseph Perl

2 October 20022 October 2002 Visualization of G4 Data / AIDA, HepRep, JAS and WIRED JVisualization of G4 Data / AIDA, HepRep, JAS and WIRED Joseph Perl, SLAC Computing Servicesoseph Perl, SLAC Computing Services

1111

HepRep Near-Term Future ArchitectureHepRep Near-Term Future Architecture

HepRep2

LCD(java)

WIRED 4(java)

XML

HepRep2FRED(c++)GLAST

(c++)

HepRep2

BaBar(c++)

CorbaGeant4(c++)

Corba

RMI

Java

XML

C++

XML

C++

C++ Shared HepRep Factory

Java

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)

HepRep2 Corba

XML

Java

RMIIceCube(java)

Java Shared HepRep Factory

Page 12: Visualization of Geant4 Data: Exploiting Component Architecture through AIDA, HepRep, JAS and WIRED Geant4 Workshop, CERN - 2 October 2002 Joseph Perl

2 October 20022 October 2002 Visualization of G4 Data / AIDA, HepRep, JAS and WIRED JVisualization of G4 Data / AIDA, HepRep, JAS and WIRED Joseph Perl, SLAC Computing Servicesoseph Perl, SLAC Computing Services

1212

Demo WIRED Reading HepRep FilesDemo WIRED Reading HepRep Filesfrom the feb 2002 G4 Workshop CDfrom the feb 2002 G4 Workshop CD

Page 13: Visualization of Geant4 Data: Exploiting Component Architecture through AIDA, HepRep, JAS and WIRED Geant4 Workshop, CERN - 2 October 2002 Joseph Perl

2 October 20022 October 2002 Visualization of G4 Data / AIDA, HepRep, JAS and WIRED JVisualization of G4 Data / AIDA, HepRep, JAS and WIRED Joseph Perl, SLAC Computing Servicesoseph Perl, SLAC Computing Services

1313

Demo JAS Reading AIDA FilesDemo JAS Reading AIDA Filesfrom the feb 2002 G4 Workshop CDfrom the feb 2002 G4 Workshop CD

Page 14: Visualization of Geant4 Data: Exploiting Component Architecture through AIDA, HepRep, JAS and WIRED Geant4 Workshop, CERN - 2 October 2002 Joseph Perl

2 October 20022 October 2002 Visualization of G4 Data / AIDA, HepRep, JAS and WIRED JVisualization of G4 Data / AIDA, HepRep, JAS and WIRED Joseph Perl, SLAC Computing Servicesoseph Perl, SLAC Computing Services

1414

ConclusionsConclusions

•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

Page 15: Visualization of Geant4 Data: Exploiting Component Architecture through AIDA, HepRep, JAS and WIRED Geant4 Workshop, CERN - 2 October 2002 Joseph Perl

2 October 20022 October 2002 Visualization of G4 Data / AIDA, HepRep, JAS and WIRED JVisualization of G4 Data / AIDA, HepRep, JAS and WIRED Joseph Perl, SLAC Computing Servicesoseph Perl, SLAC Computing Services

1515

ReferencesReferences•AIDA: Abstract Interfaces for Data Analysishttp://aida.freehep.org

•JAS: Java Analysis Studiohttp://jas.freehep.org

•HepRep:a generic interface definition for HEP event display representableshttp://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 Planhttp://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, Tutorialshttp://geant4.slac.stanford.edu/UsersWorkshop/tutorial.html

•A Component Approach to HEP Event Displayshttp://www.slac.stanford.edu/~perl/component