22
LCIO A persistency framework and data model for the linear collider CHEP 04, Interlaken Core Software, Wednesday 29.09.2004 Frank Gaede, DESY -IT-

LCIO A persistency framework and data model for the linear collider CHEP 04, Interlaken Core Software, Wednesday 29.09.2004 Frank Gaede, DESY -IT-

Embed Size (px)

Citation preview

Page 1: LCIO A persistency framework and data model for the linear collider CHEP 04, Interlaken Core Software, Wednesday 29.09.2004 Frank Gaede, DESY -IT-

LCIO A persistency framework and data model for the linear collider

CHEP 04, InterlakenCore Software, Wednesday

29.09.2004Frank Gaede, DESY -IT-

Page 2: LCIO A persistency framework and data model for the linear collider CHEP 04, Interlaken Core Software, Wednesday 29.09.2004 Frank Gaede, DESY -IT-

CHEP 04, Interlaken, 29.09.04 Frank Gaede, DESY -IT- 2

Outline

• Introduction

• Implementation/Design

• Data Model

• Status

• Summary

Page 3: LCIO A persistency framework and data model for the linear collider CHEP 04, Interlaken Core Software, Wednesday 29.09.2004 Frank Gaede, DESY -IT-

CHEP 04, Interlaken, 29.09.04 Frank Gaede, DESY -IT- 3

Motivation for LCIO

Generator

geometry

AnalysisRecon-

structionSimulation

Java, C++, FortranGeant3, Geant4

Java, C++, FortranJava, C++, Fortran

LCIO Persistency Framework

Page 4: LCIO A persistency framework and data model for the linear collider CHEP 04, Interlaken Core Software, Wednesday 29.09.2004 Frank Gaede, DESY -IT-

CHEP 04, Interlaken, 29.09.04 Frank Gaede, DESY -IT- 4

LCIO persistency framework

data model

LCIOcontents

data formatpersiste

ncy

data handlingAPI implementation

Page 5: LCIO A persistency framework and data model for the linear collider CHEP 04, Interlaken Core Software, Wednesday 29.09.2004 Frank Gaede, DESY -IT-

CHEP 04, Interlaken, 29.09.04 Frank Gaede, DESY -IT- 5

LCIO Project Overview

• DESY and SLAC joined project:• provide common basis for ILC software

• Requirements:• need Java, C++ and f77 (!) API• extendable data model for current and

future simulation and testbeam studies• user code separated from concrete data

format• easy to adapt LCIO in existing applications• no dependency on other frameworks

-> keep it simple & lightweight

Page 6: LCIO A persistency framework and data model for the linear collider CHEP 04, Interlaken Core Software, Wednesday 29.09.2004 Frank Gaede, DESY -IT-

CHEP 04, Interlaken, 29.09.04 Frank Gaede, DESY -IT- 6

LCIO SW-Architecture

*.slcio files (SIO)

common API

LCIOC++ implementation

LCIOJava implementation

Java API C++ API f77 API

JAS/AIDA root hbook

compressed records,pointer retrieval

generated fromone sourceusing AID

Page 7: LCIO A persistency framework and data model for the linear collider CHEP 04, Interlaken Core Software, Wednesday 29.09.2004 Frank Gaede, DESY -IT-

CHEP 04, Interlaken, 29.09.04 Frank Gaede, DESY -IT- 7

Data Format (persistency): SIO

• SIO: Simple Input Output• developed at SLAC for NLC simulation

• already used in hep.lcd framework

• features:• on the fly data compression • some OO capabilities, e.g. pointers • C++ and Java implementation available • no direct access -> use fast skip

Page 8: LCIO A persistency framework and data model for the linear collider CHEP 04, Interlaken Core Software, Wednesday 29.09.2004 Frank Gaede, DESY -IT-

CHEP 04, Interlaken, 29.09.04 Frank Gaede, DESY -IT- 8

Implementation details

• common Java, C++ interface:• AID-tool from

freehep.org

• define interfaces in Java-like language with C++ extensions

• -> generates files with Java interfaces

• -> generates C++ header files with pure abstract base classes

• Fortran interface:• use C++-wrapper

functions and cfortran.h

• one function for every class member function

• use integers to store pointers !

• -> OO-like code in fortran

Page 9: LCIO A persistency framework and data model for the linear collider CHEP 04, Interlaken Core Software, Wednesday 29.09.2004 Frank Gaede, DESY -IT-

CHEP 04, Interlaken, 29.09.04 Frank Gaede, DESY -IT- 9

LCIO Design

abstract

event

abstract io

concrete

classes

persistency

implementation

Page 10: LCIO A persistency framework and data model for the linear collider CHEP 04, Interlaken Core Software, Wednesday 29.09.2004 Frank Gaede, DESY -IT-

CHEP 04, Interlaken, 29.09.04 Frank Gaede, DESY -IT- 10

Data Model I

Page 11: LCIO A persistency framework and data model for the linear collider CHEP 04, Interlaken Core Software, Wednesday 29.09.2004 Frank Gaede, DESY -IT-

CHEP 04, Interlaken, 29.09.04 Frank Gaede, DESY -IT- 11

Data Model II

Page 12: LCIO A persistency framework and data model for the linear collider CHEP 04, Interlaken Core Software, Wednesday 29.09.2004 Frank Gaede, DESY -IT-

CHEP 04, Interlaken, 29.09.04 Frank Gaede, DESY -IT- 12

Data Model III

Page 13: LCIO A persistency framework and data model for the linear collider CHEP 04, Interlaken Core Software, Wednesday 29.09.2004 Frank Gaede, DESY -IT-

CHEP 04, Interlaken, 29.09.04 Frank Gaede, DESY -IT- 13

Data Model IV

TrackerHit

● Position● Covariance● dEdx ● raw hit

TPCHit

● CellID● Time● Charge

RawData and Digitization

Serve as interface classes to

reconstruction

SimHits

CalorimeterHit

● CellID● Energy● Time (opt.) ● Position (opt.)

RawCalorimeterHit

● CellID● Amplitude● Time (optional)

Add more specialized classes as needed-> user request !

Page 14: LCIO A persistency framework and data model for the linear collider CHEP 04, Interlaken Core Software, Wednesday 29.09.2004 Frank Gaede, DESY -IT-

CHEP 04, Interlaken, 29.09.04 Frank Gaede, DESY -IT- 14

Data Model V

Page 15: LCIO A persistency framework and data model for the linear collider CHEP 04, Interlaken Core Software, Wednesday 29.09.2004 Frank Gaede, DESY -IT-

CHEP 04, Interlaken, 29.09.04 Frank Gaede, DESY -IT- 15

LCIO for transient data

• The LCEvent can be used as container for transient data in an application, e.g. reconstruction

• Application will call list of modules that read existing collections from the LCEvent and add resulting new Collections

• LCIO has (Event/Run)-Listener classes that can serve as base classes for modules

• easy to define an application framework based on LCIO for reconstruction and analysis:• org.lcsim (Java) , Marlin (C++)

Page 16: LCIO A persistency framework and data model for the linear collider CHEP 04, Interlaken Core Software, Wednesday 29.09.2004 Frank Gaede, DESY -IT-

CHEP 04, Interlaken, 29.09.04 Frank Gaede, DESY -IT- 16

LCEvent in a modular application

main

Module0

Module1

Module2

ModuleN

LCEvent

collection0collection0collection0collection0collection0collection0collection0

…read and

addcollections

Outputmodule

MyInput2.slcioMyInput1.slcio

MyInput0.slcio

MyOutput.slcio

Page 17: LCIO A persistency framework and data model for the linear collider CHEP 04, Interlaken Core Software, Wednesday 29.09.2004 Frank Gaede, DESY -IT-

CHEP 04, Interlaken, 29.09.04 Frank Gaede, DESY -IT- 17

LCIO status – new features

• first official release v01-00 (Nov 2003)• simulation data model

• new release v01-03 now:• reconstruction model

(Rec.Particle,Tracks,Cluster)• user extensions (LCGenericObject)• raw data classes • support for CLHEP four vectors• transient data collections• StdHep interface• run, event and collection parameters

-> store meta data describing what is in the collections

Page 18: LCIO A persistency framework and data model for the linear collider CHEP 04, Interlaken Core Software, Wednesday 29.09.2004 Frank Gaede, DESY -IT-

CHEP 04, Interlaken, 29.09.04 Frank Gaede, DESY -IT- 18

LCIO online documentation

Page 19: LCIO A persistency framework and data model for the linear collider CHEP 04, Interlaken Core Software, Wednesday 29.09.2004 Frank Gaede, DESY -IT-

CHEP 04, Interlaken, 29.09.04 Frank Gaede, DESY -IT- 19

LCIO on the web

• LCIO homepage: http://lcio.desy.de• downloads and documentation

• LCIO forum at: http://forum.linearcollider.org• user/developer questions and comments

• discussions on new developments

• LCIO bug reports at: http://bugs.freehep.org• bug report and new feature requests

Page 20: LCIO A persistency framework and data model for the linear collider CHEP 04, Interlaken Core Software, Wednesday 29.09.2004 Frank Gaede, DESY -IT-

CHEP 04, Interlaken, 29.09.04 Frank Gaede, DESY -IT- 20

LCIO Users

• Geant4 Full simulations:• LCDG4, LCS, Mokka, Jupiter (planned)

• Reconstruction:• org.lcsim, Brahms, Marlin

• Fast simulation• Lelaps, Simdet

• Testbeam • Calice: Ecal, Hcal PPTs• TPC prototypes

• Analysis Tools• JAS3: file browser, code wizard• WIRED: generic event display (picking of LCIO objects)

-> about to become de facto standard for ILC-

software

Page 21: LCIO A persistency framework and data model for the linear collider CHEP 04, Interlaken Core Software, Wednesday 29.09.2004 Frank Gaede, DESY -IT-

CHEP 04, Interlaken, 29.09.04 Frank Gaede, DESY -IT- 21

JAS3 – LCIO plugin

http://jas.freehep.org/jas3/index.html

JAS3 provides native interfaces to LCIO: browser, code wizard, event display WIRED

Page 22: LCIO A persistency framework and data model for the linear collider CHEP 04, Interlaken Core Software, Wednesday 29.09.2004 Frank Gaede, DESY -IT-

CHEP 04, Interlaken, 29.09.04 Frank Gaede, DESY -IT- 22

Summary & Outlook

• LCIO is a persistency framework and data model for the linear collider

• DESY and SLAC joined project

• Provides Java, C++ and f77 API

• New version v01-03 released now• simulation and

reconstruction data model

• user extensions

• Future plans:• react to user requests

• provide convenient methods

• handling of relationships

• handling of meta data

• bug fix patches

• Idea to develop a Java/C++ binding for LCIO

-> would allow to have a mixed language reconstruction framework

-> not so straight forward…