Geant4 versus External Frameworks Approaches, Requirements and Constraints ATLAS, LHCb, CMS, Alice M. Stavrianakou CERN/CMC Geant4  -review 10.10.2002.

Slides:



Advertisements
Similar presentations
Understand and appreciate Object Oriented Programming (OOP) Objects are self-contained modules or subroutines that contain data as well as the functions.
Advertisements

MicroKernel Pattern Presented by Sahibzada Sami ud din Kashif Khurshid.
The Geant4 Kernel: Status and Recent Developments John Apostolakis, Gabriele Cosmo – CERN / PH Makoto Asai – SLAC On behalf the Geant4 collaboration April.
Ch:8 Design Concepts S.W Design should have following quality attribute: Functionality Usability Reliability Performance Supportability (extensibility,
6/4/20151 Introduction LHCb experiment. LHCb experiment. Common schema of the LHCb computing organisation. Common schema of the LHCb computing organisation.
23/04/2008VLVnT08, Toulon, FR, April 2008, M. Stavrianakou, NESTOR-NOA 1 First thoughts for KM3Net on-shore data storage and distribution Facilities VLV.
15 March, 2000LHCb Computing1 Software Review Panel LHCb Answers to Architecture, Data Model and Program Infrastructure Pere Mato for the LHCb Collaboration.
25/03/2003Simulation Application for the LHCb Experiment CHEP March 2003 Presented by: W. Pokorski / CERN Authors: I. Belyaev, Ph. Charpentier,
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 2: Operating-System Structures Modified from the text book.
Design Patterns academy.zariba.com 1. Lecture Content 1.What are Design Patterns? 2.Creational 3.Structural 4.Behavioral 5.Architectural 6.Design Patterns.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 18 Slide 1 Software Reuse 2.
Dependency Injection and Model-View-Controller. Overview Inversion of Control Model-View-Controller.
Design Patterns.
Gaudi Framework Tutorial, April Introduction.
Advanced Analysis Environments What is the role of Java in physics analysis? Will programming languages at all be relevant? Can commercial products help.
An Introduction to Software Architecture
Introduzione al Software di CMS N. Amapane. Nicola AmapaneTorino, Aprile Outline CMS Software projects The framework: overview Finding more.
Architecture-Based Runtime Software Evolution Peyman Oreizy, Nenad Medvidovic & Richard N. Taylor.
LC Software Workshop, May 2009, CERN P. Mato /CERN.
N ATIONAL E NERGY R ESEARCH S CIENTIFIC C OMPUTING C ENTER Charles Leggett The Athena Control Framework in Production, New Developments and Lessons Learned.
Root based event display Dmitry Romanov October 19, 2010.
1 Geospatial and Business Intelligence Jean-Sébastien Turcotte Executive VP San Francisco - April 2007 Streamlining web mapping applications.
ALICE Simulation Framework Ivana Hrivnacova 1 and Andreas Morsch 2 1 NPI ASCR, Rez, Czech Republic 2 CERN, Geneva, Switzerland For the ALICE Collaboration.
Introduction to Gaudi LHCb software tutorial - September
The ALICE Simulation Strategy Andreas Morsch For the ALICE Offline Group Joint STAR/ALICE Offline Meeting Brookhaven National Laboratory, Upton, NY April.
Framework for MDO Studies Amitay Isaacs Center for Aerospace System Design and Engineering IIT Bombay.
Virtual Monte Carlo and new geometry description in STAR Maxim Potekhin STAR Collaboration Meeting, BNL July 17, 2004 July 17, 2004.
The Virtual MonteCarlo D.Adamova 2, V.Berejnoi 1, R.Brun 1, F.Carminati 1, A.Fassó 1, E.Futo 1, I.Gonzalez 3, I.Hrivnacova 4, A.Morsch 1 1 CERN, Geneva;
SEAL Core Libraries and Services CLHEP Workshop 28 January 2003 P. Mato / CERN Shared Environment for Applications at LHC.
Games Development Game Architecture: Entities CO2301 Games Development 1 Week 22.
GDB Meeting - 10 June 2003 ATLAS Offline Software David R. Quarrie Lawrence Berkeley National Laboratory
VICOMTECH VISIT AT CERN CERN 2013, October 3 rd & 4 th O.COUET CERN/PH/SFT DATA VISUALIZATION IN HIGH ENERGY PHYSICS THE ROOT SYSTEM.
The CMS Simulation Software Julia Yarba, Fermilab on behalf of CMS Collaboration 22 m long, 15 m in diameter Over a million geometrical volumes Many complex.
A proposal for a Proposal for a Simulation Framework in BTeV G. Cerati, E. Di Maio, S. Magni, D. Menasce.
Introduction What is detector simulation? A detector simulation program must provide the possibility of describing accurately an experimental setup (both.
Claudio Grandi INFN-Bologna CHEP 2000Abstract B 029 Object Oriented simulation of the Level 1 Trigger system of a CMS muon chamber Claudio Grandi INFN-Bologna.
Rack Wizard LECC 2003 Frank Glege. LECC Frank Glege - CERN2/12 Content CMS databases - overview The equipment database The Rack Wizard.
Makoto Asai (SLAC) Getting Started MGP: added class diagram of basic user application.
CERN Tutorial, February Introduction to Gaudi.
D. Duellmann - IT/DB LCG - POOL Project1 The LCG Dictionary and POOL Dirk Duellmann.
Geant4 release 5.1 summary Gabriele Cosmo EP/SFT.
INFSO-RI Enabling Grids for E-sciencE Using of GANGA interface for Athena applications A. Zalite / PNPI.
S.Linev: Go4 - J.Adamczewski, H.G.Essel, S.Linev ROOT 2005 New development in Go4.
Geant4 User Workshop 15, 2002 Lassi A. Tuura, Northeastern University IGUANA Overview Lassi A. Tuura Northeastern University,
CPT Week, November , 2002 Lassi A. Tuura, Northeastern University Core Framework Infrastructure Lassi A. Tuura Northeastern.
Marco Cattaneo, 6-Apr Issues identified in sub-detector OO software reviews Calorimeters:18th February Tracking:24th March Rich:31st March.
N ATIONAL E NERGY R ESEARCH S CIENTIFIC C OMPUTING C ENTER Charles Leggett Prototype GEANT4 Service for ATHENA framework ATLAS Software Workshop Dec 3.
Follow-up to SFT Review (2009/2010) Priorities and Organization for 2011 and 2012.
VI/ CERN Dec 4 CMS Software Architecture vs Hybrid Store Vincenzo Innocente CMS Week CERN, Dec
HEPVis May, 2001 Lassi A. Tuura, Northeastern University Coherent and Non-Invasive Open Analysis Architecture Lassi A. Tuura.
Elements of LCG Architecture Application Architecture Blueprint RTAG 8 th June 2002 P. Mato / CERN.
Modularization of Geant4 Dynamic loading of modules Configurable build using CMake Pere Mato Witek Pokorski
The LHCb Software and Computing NSS/IEEE workshop Ph. Charpentier, CERN B00le.
A C++ generic model for the GLAST Geometric Description
Geant4 Geometry Objects Persistency using ROOT
POOL persistency framework for LHC
GAUSS - GEANT4 based simulation for LHCb
LHCb Software Tutorial
Vincenzo Innocente CERN/EP/CMC
Geant3 All collaborations are using G3 to a certain extent
An Introduction to Software Architecture
Use of Geant4 in experiment interactive frameworks AliRoot
Simulation Framework Subproject cern
GAUSS - GEANT4 based simulation for LHCb
Entering the production phase
Simulation and Physics
Mantis a framework and toolkit for Geant4 simulation in CMS
Use of GEANT4 in CMS The OSCAR Project
Games Development Game Architecture: Entities
Planning next release of GAUDI
Presentation transcript:

Geant4 versus External Frameworks Approaches, Requirements and Constraints ATLAS, LHCb, CMS, Alice M. Stavrianakou CERN/CMC Geant4  -review

M. Stavrianakou, CMS/CERN Experiment simulation frameworks: ATLAS Athena (Gaudi based software framework)  G4Scv  Goofy (G4 based simulation framework)  ATLAS simulation è Scalability: from the simplest test beam simulation to the complete detector simulation è Separation between core software and user implementation: light framework providing maximum user flexibility and freedom  p no geometry; built interactively by user at initialization time p no physics; user implementation and/or selection from catalogue p no kinematics  “dismantling”of standard G4 framework (too static) while maintaining full compatibility with G4 è Services for user plug-in code: p MaterialManager, DetectorFacility, PhysicsListCatalog, VisCenter etc è Geometry wrappers extending G4 functionality è Use of G4 (G)UI facilities for recreating connections è Memory saving: use of proxies and light-weight objects

M. Stavrianakou, CMS/CERN Experiment simulation frameworks: LHCb Gaudi (event processing framework)  GiGa (Gaudi simulation service)  Gauss (LHCb simulation application) è G4 control and configuration; actions è communication via transient stores p transient objects  G4 representation è common geometry source è use of common services p ParticlePropertySvc, MagneticFieldSvc etc è access to internal G4 event loop via GiGaRunManager è interaction with G4 via GiGa service abstract interfaces; minimize coupling to G4 è loading of external physics lists p dynamic loading of modular sublists via jobOptions è instantiation (abstract factory pattern) of different actions as plugable components è MCParticles, MCHits from LHCb event model saved in ROOT file

M. Stavrianakou, CMS/CERN Experiment simulation frameworks: CMS COBRA (OO framework and toolkit)  Mantis (COBRA interface to G4)  OSCAR (CMS G4 simulation) è toolkit for building or interfacing to detector geometries and sensitive volumes, generators, physics, magnetic fields, actions etc è framework for G4 simulation applications (interactive or batch) p COBRA infrastructure and services for core application steering and control, hits, persistency, histogramming etc p run and event management; p interfaces for loading user libraries using COBRA features and pattern: action on demand, lazy instantiation, abstract factories, dispatchers-observers,… IGUANA (Interactive Graphics for User ANAlysis)  IgGeant4 (IGUANA IgModule ¹)  OSCAR visualization ¹IgModules are plug-in modules dynamically loadable by the IGUANA kernel; they provide event display core, application management services and thin adaptors for external software è G4 configuration selection wizard for geometry, magnetic field, generators, physics lists, user actions è G4 volume tree browser; visualization by logical or physical hierarchy, category (sensitive, cooling, cables etc) or material filter; volume location service; volume properties panel; session history; visualization settings

M. Stavrianakou, CMS/CERN Experiment simulation frameworks: ALICE AliRoot (ROOT based framework)  Virtual Monte Carlo (interface to MC programs: G3, G4)  ALICE simulation è TVirtualMC: interface to MC program; generalization of G3 functions for definition of simulation task (geometry and physics setup, access to tracked particle properties during stepping, visualization) p run-time selection and dynamic loading of concrete MC; p G4 initialization with configuration file è TVirtualMCApplication: interface to user application; implementation by user: p ConstructGeometry(), InitGeometry(), GeneratePrimaries(), BeginEvent(), …, Stepping(),… p G4 VMC geometry based on G3toG4 p AliRoot UI = ROOT UI   access to all objects processed by CINT  G4 objects not accessible  ROOT UI from/to G4 UI interface

M. Stavrianakou, CMS/CERN Approaches and concerns in common (I) l The ATLAS, CMS and LHCb approaches are very similar despite differences between the underlying frameworks and the actual implementations è So are the concerns raised over G4 architectural aspects and the workarounds adopted by the experiment frameworks The ALICE approach is quite different; some commonalities may however be identified and some concerns may be shared l The commonalities in approach: è Application control and steering by experiment rather than G4 framework; è Existing experiment infrastructure¹ for major services such as persistency, generators, magnetic field, hit creation and formatting, visualization etc; ¹ chosen for good reasons: functionality, transparency, compatibility, ease of use… è Modular and flexible run management by experiment implementation of run manager; è Maximum component decoupling (geometry, physics, generators…) and separation from core è Event definition and management; è Registration or notification mechanisms

M. Stavrianakou, CMS/CERN Approaches and concerns in common (II) l Static nature of G4 framework and degree of internal coupling affect flexibility and scalability è Experiment frameworks need to provide for a dynamic changing world that cannot be driven by static construction p from simplest setup to test beam to partial or full system simulation (geometry, field…) p for any “beam” (generator, physics, cuts and tuning…) p for any measurements (sensitive detectors and hits, user actions…) p with any tools (visualization, persistency…) è From the user side anybody may be observing or modifying anything l Need a very light-weight framework è independent of any user applications è with minimal internal coupling è able to run with(out) any UI

M. Stavrianakou, CMS/CERN Perceived shortcomings of current G4 architecture… l several G4 components know too much about each other and appear to be too closely coupled to the G4 kernel l several G4 managers are too “monolithic”or “intrusive” in the context of experiment frameworks è G4RunManager with a UserInitialization of a G4VUserDetectorConstruction, a G4VUserPrimaryGeneratorAction (essentially for passing MC vertices/particles to G4Event) and a UserInitialization of a G4VUserPhysicsList, as well as the registration of all types of user actions l while their abstract counterparts, if available, provide too limited functionality è e.g the G4VisManager (too intrusive for visualization toolkits such as IGUANA) vs the G4VVisManager l the G4Event cannot be customized or efficiently bypassed è must be generated in the G4RunManager è but offers no hook for non-G4 hit collections l workarounds, usually possible, often at a price è need for dummy actions when bypassing G4 expected initializations è costly copy or conversion operations è increased maintenance cost, waste of manpower, divergence

M. Stavrianakou, CMS/CERN Requirements, suggestions for improvements… l UI, command structure included, should be decoupled from the G4 kernel (see arguments in previous sections) l G4RunManager should be dismantled and modularized esp. in what concerns currently mandatory initializations (geometry, generators, physics) l G4Event (too close to G4 kernel to be easily modularized) should be hidden by providing direct hook for generated event (e.g. HepMC event in the HEP case) and allowing user event to take over more efficiently l Services and operations should be factored out and generalized; duplications must be eliminated è e.g. factor out geometry traversal, volume processing etc duplicated in geometry and visualization l Notification for entity changes at any granularity must come from the sources that manage the entities rather than high level managers; such notification should not be limited to entities pertaining to global states è e.g. notification for world volume changes from the G4TransportationManager would greatly facilitate interactive geometry construction and visualization

M. Stavrianakou, CMS/CERN Other concerns and constraints l Most LHC experiments need and want G4 simulation l They already know what they want (or are learning very fast) l They already have a large software base in terms of frameworks, toolkits, services etc l Their needs in terms of flexibility and scalability as well as their fundamental architectural choices imply that they need to adapt G4 simulation to their environment rather than vice versa l Their timescales for release and deployment are ~10 shorter than G4 è To meet official milestones è To proceed with detector construction è To run productions indispensable for p testing other/all components of their software p carrying out detector/physics studies for various TDRs p testing and adapting their production and analysis environments and tools è Most LHC experiments don’t need (want to) reinvent every instance of the same wheel for themselves; they would much rather find common solutions provided in the G4 context è But they have to continue developing and deploying in their own timescales l Can we find ways to collaborate within these constraints? We must.