dØ offline reconstruction and analysis control framework j.kowalkowski, h.greenlee, q.li,...

15
DØ Offline Reconstruction and Analysis Control Framework J.Kowalkowski, H.Greenlee, Q.Li, S.Protopopescu, G.Watts, V.White, J.Yu

Upload: katherine-tate

Post on 06-Jan-2018

215 views

Category:

Documents


3 download

DESCRIPTION

Infrastructure RCP - Run Control Parameters –Persistent part of algorithm –Stored in database –Event data identified by RCP set ID EDM - Event Data Model Framework: –Build/Configure/Run Algorithms IO_PACKAGES: –Event read/write packages DØOM - Object persistency package

TRANSCRIPT

Page 1: DØ Offline Reconstruction and Analysis Control Framework J.Kowalkowski, H.Greenlee, Q.Li, S.Protopopescu, G.Watts, V.White, J.Yu

DØ Offline Reconstruction and Analysis Control Framework

J.Kowalkowski, H.Greenlee, Q.Li, S.Protopopescu, G.Watts, V.White,

J.Yu

Page 2: DØ Offline Reconstruction and Analysis Control Framework J.Kowalkowski, H.Greenlee, Q.Li, S.Protopopescu, G.Watts, V.White, J.Yu

DØ C++ Framework• Set of well established interfaces from which

reconstruction and analysis algorithms are built. • Propagates events through a sets of algorithms in a

well defined and established manner.• The algorithm configuration and set is determined

at program execution time.• The framework hides many system related

complexities from the user and the algorithm developer and allow for sharing of code for common or related tasks.

Page 3: DØ Offline Reconstruction and Analysis Control Framework J.Kowalkowski, H.Greenlee, Q.Li, S.Protopopescu, G.Watts, V.White, J.Yu

Infrastructure• RCP - Run Control Parameters

– Persistent part of algorithm– Stored in database– Event data identified by RCP set ID

• EDM - Event Data Model• Framework:

– Build/Configure/Run Algorithms• IO_PACKAGES:

– Event read/write packages• DØOM - Object persistency package

Page 4: DØ Offline Reconstruction and Analysis Control Framework J.Kowalkowski, H.Greenlee, Q.Li, S.Protopopescu, G.Watts, V.White, J.Yu

DØ JBK CHEP2000

PhysicistAlgorithms

EventHandlers

Framework EDM

RCPORB D0OM

GUIClient

Geometry

Calibration

RunConfig

SAM

Dependencies

Page 5: DØ Offline Reconstruction and Analysis Control Framework J.Kowalkowski, H.Greenlee, Q.Li, S.Protopopescu, G.Watts, V.White, J.Yu

Qualities• No coupling with external libaries• Easy introduction of new algorithms• Strong typing in event objects• Independent GUI controls• Flexible, run time configuration of

reconstruction activities• No need for user to write code to produce

an executable with a custom configuration

Page 6: DØ Offline Reconstruction and Analysis Control Framework J.Kowalkowski, H.Greenlee, Q.Li, S.Protopopescu, G.Watts, V.White, J.Yu

Concepts• Algorithms (Package)

– Standard interface for configuration with RCP– Common manipulation such as status reporting– Defines a framework “pluggable” component

• Named event handlers (Interface)– Algorithms register event handlers– Handlers get invoked when the event occurs

• Factory– Simple algorithm auto-registration mechanism– Algorithm instances made by name at run time

Page 7: DØ Offline Reconstruction and Analysis Control Framework J.Kowalkowski, H.Greenlee, Q.Li, S.Protopopescu, G.Watts, V.White, J.Yu

Event Processing• Event Handlers and Work Queues

– Events generated by special Packages– Placed on an event queue for processing– Event contains type-code and an object

• Data Managers– Events in queue dispatched to data managers– Hold list of handlers (Interfaces instances)

• Controllers– Event dispatcher, sequencer, state controller– Queue and Package instances owner – Can be nested to arbitrary depth.

Page 8: DØ Offline Reconstruction and Analysis Control Framework J.Kowalkowski, H.Greenlee, Q.Li, S.Protopopescu, G.Watts, V.White, J.Yu

Class Algorithm : public Package, Process, Tag, RunInit

{public:

UserPackage(Context*);~UserPackage();

virtual Result processEvent(edm::Event&);virtual Result tagEvent(edm::Event&);virtual Result runInit(const RunNumber&);

virtual void reinitialize(edm::RCP);virtual void statusReport();virtual void flush();

}

Example User Algorithm Class Definition

Page 9: DØ Offline Reconstruction and Analysis Control Framework J.Kowalkowski, H.Greenlee, Q.Li, S.Protopopescu, G.Watts, V.White, J.Yu

Event Data Loop

EventRead:erEventWrite:ewCalReco:calConeJetReco: jet3ConeJetReco: jet5KTJetReco: kt

PackageType:instance

“process”

“read”

“write”

“verify”

“decide”

er:generate(Queue)

er:makeDecision(Queue,Event)

ew:output(Event)

cal:processEvent(Event)jet3:processEvent(Event)jet5:processEvent(Event)kt:processEvent(Event)

cal:verifyEvent(Event)jet3:verifyEvent(Event)jet5:verifyEvent(Event)

“runInit” Cal:runInit(Run)kt:runInit(Run)

Page 10: DØ Offline Reconstruction and Analysis Control Framework J.Kowalkowski, H.Greenlee, Q.Li, S.Protopopescu, G.Watts, V.White, J.Yu

Event Handling Features• No experiment or subsystem specific types • New event types can be added by users

without framework modifications• Asynchronous and synchronous types • Synchronous order can be determined at run

time• Event handlers and algorithm instances can

be grouped by function and treated as a single unit

Page 11: DØ Offline Reconstruction and Analysis Control Framework J.Kowalkowski, H.Greenlee, Q.Li, S.Protopopescu, G.Watts, V.White, J.Yu

Interactive Components• Threaded model• No built in interpreter or GUI• Commander Abstraction

– configure algorithms and control event loop– get reports from algorithms

• Messenger Abstraction– catch and propagate errors and output to registered

clients

• ORB– manage client/server communications and remote

framework interactions

Page 12: DØ Offline Reconstruction and Analysis Control Framework J.Kowalkowski, H.Greenlee, Q.Li, S.Protopopescu, G.Watts, V.White, J.Yu

Simple Configuration Examplereco.rcp: string PackageName = “Controller” string Flow = "generator decide filter process tag output" string Packages = ”event_read hits clustering id verify save" RCP event_read = <reco read> RCP hits = <reco hit_finder> RCP clustering = <reco cluster_finder> RCP id = <reco ID> RCP verify = <reco verify> RCP save = <reco save_events>

cluster_finder.rcp: string PackageName = “ClusterFinder” double seed_threshold = 2.3

Page 13: DØ Offline Reconstruction and Analysis Control Framework J.Kowalkowski, H.Greenlee, Q.Li, S.Protopopescu, G.Watts, V.White, J.Yu

DØ JBK CHEP2000

+getR C P() : R CP+report()

Package Interface

Event

RCP +processEvent(in event)Process

+runIn it(in run)RunInit

+processEvent(in event)+runIn it(in run)+report()

MyAlgorithm«uses» «uses»

Algorithm View

Page 14: DØ Offline Reconstruction and Analysis Control Framework J.Kowalkowski, H.Greenlee, Q.Li, S.Protopopescu, G.Watts, V.White, J.Yu

DØ JBK CHEP2000

Interactive View

ORBMyMessenger MyCommander

+getR CP() : RCP+report()

Package Interface

+start()+stop()+ findPackage(in nam e)

Framework

Controller +execute(in data)+type(in nam e)

DataManager

+errorM sg(in string)+outputM sg(in string)

Messenger+start()+stop()

Commander

RCP

«uses» «uses»

Page 15: DØ Offline Reconstruction and Analysis Control Framework J.Kowalkowski, H.Greenlee, Q.Li, S.Protopopescu, G.Watts, V.White, J.Yu

Conclusion• Algorithm abstraction (Package)• Algorithm configuration system (RCP)• Extensible event handling and dispatching

system with C++ templates (Interface)• Factory to create algorithms at run time• Provisions for state machine behavior• Separation of GUI and interactive

components from reconstruction engine• Independent threads for engine and GUI