Modellistica Medica. Maria Grazia Pia INFN Genova. Scuola di Specializzazione in Fisica Sanitaria Genova Anno Accademico

Similar documents
INTRODUCTION TO THE ANAPHE/LHC++ SOFTWARE SUITE

AIDA JAS Massimiliano Turri, SLAC Massimiliano Turri, SLAC INFN-LNF, 7 July 2003

Analysis Tools. A brief introduction to AIDA. Anton Lechner. ORNL, May 22nd 2008

AIDA analysis tools and Geant4 A user roadmap. G.Barrand / LAL / IN2P3 / CNRS

Modellistica Medica. Maria Grazia Pia, INFN Genova. Scuola di Specializzazione in Fisica Sanitaria Genova Anno Accademico

Fitting in AIDA. General Concepts Requirements JAIDA Examples Interfaces Overview Conclusions

Simulation Techniques Using Geant4

GAUDI - The Software Architecture and Framework for building LHCb data processing applications. Marco Cattaneo, CERN February 2000

JAIDA, JAS3, WIRED4 and the AIDA tag library experience and new developments

Trivial And Non-Trivial Data Analysis for Geant4

Trivial Data Analysis for Geant4 Geant4 v9.3p01

HippoDraw and Python

Software Installation, release 5.2

Potential use of JAS/JAIDA etc. SAS J2EE Review

Geant4 in a Distributed Computing Environment

Modellistica Medica. Maria Grazia Pia, INFN Genova. Scuola di Specializzazione in Fisica Sanitaria Genova Anno Accademico

A Prototype of the CMS Object Oriented Reconstruction and Analysis Framework for the Beam Test Data

Modellistica Medica. Maria Grazia Pia, INFN Genova. Scuola di Specializzazione in Fisica Sanitaria Genova Anno Accademico

Geant4 simulation in a distributed computing environment

Geant4 application in a Web browser

8 Novembre How to install

Test & Analysis Project aka statistical testing

ROOT Course. Vincenzo Vitale, Dip. Fisica and INFN Roma 2

CLAS 12 Reconstruction Software

How to install and build an application

How to install and build an application. Giuliana Milluzzo INFN-LNS

P445/515 Data Analysis using PAW

Frank Gaede, DESY, LCWS 2005, Stanford, CA March Overview of Simulation and Reconstruction Tools in Europe

PyROOT: Seamless Melting of C++ and Python. Pere MATO, Danilo PIPARO on behalf of the ROOT Team

Introduction to Geant4

Interactive 3D graphics in HEP

IGUANA Architecture, Framework and Toolkit for Interactive Graphics

How to install and build an application

INSPECTOR, A ZERO CODE IDE FOR CONTROL SYSTEMS USER INTERFACE DEVELOPMENT

Existing Tools in HEP and Particle Astrophysics

Simulation Techniques Using Geant4

Geant4 Installation Guide

Expressing Parallelism with ROOT

ATLAS NOTE. December 4, ATLAS offline reconstruction timing improvements for run-2. The ATLAS Collaboration. Abstract

Frank Gaede, DESY, SLAC Simulation Meeting March 16/ Persistency and Data Model for ILC Software

Histograms And N-tuples

LCIO - A persistency framework for linear collider simulation studies

Agenda. - Final Project Info. - All things Git. - Make sure to come to lab for Python next week

A Geometrical Modeller for HEP

Overview. Rationale Division of labour between script and C++ Choice of language(s) Interfacing to C++

Suez: Job Control and User Interface for CLEO III

FAMOS: A Dynamically Configurable System for Fast Simulation and Reconstruction for CMS

Supported platforms & compilers Required software Where to download the packages Geant4 toolkit installation (release 10.1.p02)

ROOT Trips & Tricks. Ole Hansen. Jefferson Lab. Hall A & C Analysis Workshop June 26 27, 2017

AUTHORS: FERNANDO PEREZ BRIAN E GRANGER (IEEE 2007) PRESENTED BY: RASHMISNATA ACHARYYA

Offline Tutorial I. Małgorzata Janik Łukasz Graczykowski. Warsaw University of Technology

Game Programming with. presented by Nathan Baur

Servicing HEP experiments with a complete set of ready integreated and configured common software components

Geant4 on Azure using Docker containers

CLEO III Cathode Hit Calibration

MONTE CARLO SIMULATION FOR RADIOTHERAPY IN A DISTRIBUTED COMPUTING ENVIRONMENT

open source RCP Eclipse based Visualization analysis Python Workflow

GUI in C++ PV264 Advanced Programming in C++ Nikola Beneš Jan Mrázek Vladimír Štill. Faculty of Informatics, Masaryk University.

Benchmarking the ATLAS software through the Kit Validation engine

VISPA: Visual Physics Analysis Environment

CSCD18: Computer Graphics. Instructor: Leonid Sigal

Introduction p. 1 Basic Programming Introduction p. 7 Introduction to Python p. 7 Why Use Python? p. 10 Main Technical Features p.

Objective: To learn meaning and concepts of programming. Outcome: By the end of this students should be able to describe the meaning of programming

How to install and build an application

Software Design COSC 4353/6353 D R. R A J S I N G H

CSCS CERN videoconference CFD applications

Plotting package evaluation

Visualisation : Lecture 1. So what is visualisation? Visualisation

What are some common categories of system calls? What are common ways of structuring an OS? What are the principles behind OS design and

Python for Astronomers. Week 1- Basic Python

Introduction to Python and VTK

Spring 2010 Research Report Judson Benton Locke. High-Statistics Geant4 Simulations

Implementation Frameworks: OpenFresco & OpenFrescoExpress

Dynamic Cuda with F# HPC GPU & F# Meetup. March 19. San Jose, California

Monte Carlo programs

Reusable Component Management Through the Use of Subversion Externals. Who Am I?

Overview of Unix / Linux operating systems

Using Java for Scientific Computing. Mark Bul EPCC, University of Edinburgh

Contour Analysis And Visualization

LoKi & Bender Smart & transparent physics analysis

Virtual Environments: System Architectures

Topic 0. Introduction: What Is Computer Graphics? CSC 418/2504: Computer Graphics EF432. Today s Topics. What is Computer Graphics?

Migration to Service Oriented Architecture Using Web Services Whitepaper

Collider analysis recasting with Rivet & Contur. Andy Buckley, University of Glasgow Jon Butterworth, University College London MC4BSM, 20 April 2018

CMS Simulation Software

Data and Analysis preservation in LHCb

This course is designed for anyone who needs to learn how to write programs in Python.

Marlin et al Introduction to ILC LDC Simulation and Reconstruction Software

ATLAS Tracking Detector Upgrade studies using the Fast Simulation Engine

Python where we can, C ++ where we must

A Web-based control and monitoring system for DAQ applications

Frank Gaede, ILC Detector Workshop, Snowmass, Aug 14 27, Introduction to ILC LDC Simulation and Reconstruction Software

Topic I. Introduction and motivation References: Chapter 1 of Concepts in programming languages by J. C. Mitchell. CUP, 2003.

GraXML. Modular Geometric Modeler History Architecture. Data Sources Applications. Generic Model Geometric Model Core

Python Scripting for Computational Science

Clustering and Reclustering HEP Data in Object Databases

Chapter 1: Introduction

IDL DISCOVER WHAT S IN YOUR DATA

ELFms industrialisation plans

Massive-Scale Data Management using Standards-Based Solutions

Transcription:

Modellistica Medica Maria Grazia Pia INFN Genova Scuola di Specializzazione in Fisica Sanitaria Genova Anno Accademico 2002-2003 GranSasso, Jul-2002 Andreas Pfeiffer, CERN/IT-API, andreas.pfeiffer@cern.ch 1

Lezione 35 Analysis Tools AIDA Anaphe Original transparencies by Andreas Pfeiffer, CERN 2

Collaborating Frameworks In our applications: Simulation to model the experimental setup and generate effects from particle interactions User Interface to control configuration and flow of execution Visualisation detector geometry, particle tracks, hits etc. Analysis histograms, ntuples, fitting etc. Original transparencies by Andreas Pfeiffer, CERN 3

Components and Frameworks Frameworks are composed of components Abstract Interfaces de-couple components and frameworks Frameworks correlated groups of classes (components) together with their interactions re-usable (generic) designs of a software system on a very high abstraction level Component a correlated group of classes together with their interactions reusable design of (part of) a software system on a low or medium abstraction level Weakly coupled components and frameworks have large advantages ease of re-use of component or framework flexibility through independence of implementation maintainability through independent evolution of components Original transparencies by Andreas Pfeiffer, CERN 4

Interface to external tools in Geant4 Through abstract interfaces no dependence minimize coupling of components Similar approach Visualisation (G)UI Persistency Analysis The user is free to choose the concrete system he/she prefers for each component Original transparencies by Andreas Pfeiffer, CERN 5

Original transparencies by Andreas Pfeiffer, CERN 6

AIDA Abstract Interfaces for Data Analysis http://aida.freehep.org Andreas Pfeiffer CERN IT/API andreas.pfeiffer@cern.ch GranSasso, Jul-2002 Andreas Pfeiffer, CERN/IT-API, andreas.pfeiffer@cern.ch 7

Outline What is AIDA History/Collaboration/Documentation Some Details Examples Ongoing work Summary Original transparencies by Andreas Pfeiffer, CERN 8

What is AIDA Abstract Interfaces for Data Analysis (AIDA) 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. Original transparencies by Andreas Pfeiffer, CERN 9

Motivation Advantages The user needs to learn only one set of interfaces Same user code can be used with different AIDAcompliant analysis applications Pool experience of different developer teams LHC++, OpenScientist, JAS Different analysis tools can exchange analysis objects same storage format, use functionality from other tools Original transparencies by Andreas Pfeiffer, CERN 10

Abstract Interfaces Abstract Interfaces only pure virtual methods, inheritance only from other A.I. components use other components only through their A.I. defines a kind of a protocol for a component maximize flexibility and re-use of packages allow each component to develop independently De-couple implementation of a package from its use Original transparencies by Andreas Pfeiffer, CERN 11

AIDA Example Use same code with any AIDA-compliant analysis tool User code (e.g. GEANT4) A I D A Analysis tool 1 Analysis tool 2 GEANT4 adopted AIDA for analysis Original transparencies by Andreas Pfeiffer, CERN 12

Use of Components with Abstract Interfaces User Code uses only Interface classes IHistogram1D * hist = histofactory-> create1d( E deposit, 100, 0., 10.) Actual implementations are selected at run-time loading of shared libraries No change at all to user code but keep freedom to choose implementation Histo-IF User Code Fitter-IF Histo- Histo- Impl. 1 Impl. 2 Fitter- Impl. Fitter- X Impl. Y Original transparencies by Andreas Pfeiffer, CERN 13

Systems implementing AIDA Three implementations of AIDA exist Anaphe/Lizard (C++) http://anaphe.web.cern.ch/anaphe Open Scientist (C++) http://www.lal.in2p3.fr/openscientist JAIDA/JAS (Java) + AIDA JAIDA/JAS (Java) + AIDA-JNI 1.0 (C++) JNI 1.0 (C++) http://java.freehep.org/lib/freehep/doc/aida Original transparencies by Andreas Pfeiffer, CERN 14

AIDA Interfaces Summary AIDA Factories ITuple IHistogram ICloud ITree Original transparencies by Andreas Pfeiffer, CERN 15

IAnalysisFactory (from AIDA-2.2) IPlotterFactory (from AIDA-2.2) IPlotter (from AIDA-2.2) ITreeFactory (from AIDA-2.2) <<virtual>> ~ITreeFactory() <<abstract>> create() IManagedObject ITree (from AIDA-2.2) (from AIDA-2.2) IStore (from AIDA-2.2-dev) <<virtual>> ~IStore() <<abstract>> close() <<abstract>> commit() <<abstract>> select() <<abstract>> write() IDevTree (from AIDA-2.2-dev) <<virtual>> ~IDevTree() <<abstract>> add() <<abstract>> store() IAnnotation (from AIDA-2.2) IHistogram (from AIDA-2.2) IAxis (from AIDA-2.2) IHistogram1D (from AIDA-2.2) IHistogram3D (from AIDA-2.2) IFunction (from AIDA-2.2) ICloud (from AIDA-2.2) ICloud1D ICloud3D (from AIDA-2.2) (from AIDA-2.2) ITuple (from AIDA-2.2) IEvaluator (from AIDA-2.2) IFilter (from AIDA-2.2) IHistogram2D (from AIDA-2.2) IFitFunction (from AIDA-2.2) ICloud2D (from AIDA-2.2) IEvaluatorFactory (from AIDA-2.2) IHistogramFactory (from AIDA-2.2) IFunctionFactory (from AIDA-2.2) ICloudFactory (from AIDA-2.2) ITupleFactory (from AIDA-2.2) IFilterFactory (from AIDA-2.2) File: /data/pfeiffer/rose/aida-2.2.mdl Sun Jun 30 17:18:39 2002 Class Diagram: Logical View / Main Page 1 Original transparencies by Andreas Pfeiffer, CERN 16

IHistogram (1D-3D) Binned histogram: IHistogram1D, 2D, 3D fill methods (with/without weight) Histogram info: entries, mean, rms, axis Bin info: centre, entries, height, error Histogram arithmetic: add, multiply, divide Convenience methods, like coordinate-to-index conversion Original transparencies by Andreas Pfeiffer, CERN 17

ITuple ITuple - interface to the Data get/set methods for double, float, int, Information about columns: min, max, mean, rms Navigating: start(), next(), skip(int nrows) Project ITuple into 1D, 2D, 3D histogram New features for AIDA 2.3: Support for complex internal structures (subfolders) Merging and chaining of ITuples under discussion Original transparencies by Andreas Pfeiffer, CERN 18

ICloud Unbinned collection of points: ICloud1D, 2D, 3D Can represent scatter plot, dynamically rebinnable histogram Can be converted to a binned histogram Standard get/set methods for entries Collection info: lower, upper, mean, rms Original transparencies by Andreas Pfeiffer, CERN 19

IFunction and Fitting Fitting: IFunction, IFitFunction IFunction simple interface, allows to set parameters and get function value IFitFunction fit function to a histogram Extends IFunction Various fit control methods: step size, bounds, etc. Allows to perform fit and get results AIDA 2.2 fitting functionality fairly limited AIDA 2.3 (Under discussion) extended functionality Original transparencies by Andreas Pfeiffer, CERN 20

ITree ITree directory-like structure (Unix directory convention) Methods like: cd, ls, mkdir, etc. AIDA analysis objects (tuples, histograms, clouds, ets.) exist within ITree directories save/restore functionality, hides storage details from the user Compatible with database or file storage Can support multiple file formats Mount/Unmount functionality (like unix) allows multiple stores to be seamlessly merged AIDA XML format is defined for data interchange Original transparencies by Andreas Pfeiffer, CERN 21

Summary Abstract Interfaces de-couple components of frameworks Weakly coupled components and frameworks have large advantages User code needs no change if changing implementation Even across language boundaries (JAIDA) Ease of re-use of a component Flexibility through independence of implementation Maintainability through independent evolution of components Geant4 adopted AIDA Original transparencies by Andreas Pfeiffer, CERN 22

Anaphe OO Libraries for Data Analysis using C++ and Python http://anaphe.web.cern.ch/anaphe Andreas Pfeiffer CERN IT/API andreas.pfeiffer@cern.ch GranSasso, Jul-2002 Andreas Pfeiffer, CERN/IT-API, andreas.pfeiffer@cern.ch 23

Outline Motivation Anaphe Components C++ Lizard: Interactive Data Analysis Python Summary Original transparencies by Andreas Pfeiffer, CERN 24

Lifetime of LHC software = 25 yrs SPS 1969 W and Z 1983 LEP 1989 LEP ends 2000 K&R C 1978 Unix V6 first public version 1975 IBM PC 1981 Ethernet standar d 1983 C++ 1985 WWW Linux V 0.01 1991 Intel Pentium 1992 Java 1995 XML 1.0 1997 Original transparencies by Andreas Pfeiffer, CERN 25

Anaphe: what it is Analysis for physics experiments Modular (OO/C++) replacement of CERNLIB functionality for use in HEP experiments memory management I/O foundation classes histogramming minimizing/fitting visualization interactive data analysis Trying to use standards wherever possible Trying to re-use existing class libraries Original transparencies by Andreas Pfeiffer, CERN 26

Layered Approach Basic functionalities (histograms, fitting, etc.) are available as individual C++ class libraries. Easy replacing one part without throwing away everything Insulate components through Abstract Interfaces Apply s/w quality control tools code checking, testing Original transparencies by Andreas Pfeiffer, CERN 27

Anaphe Components Data Analysis Custom graphics (2-D) Basic graphics (3-D) Basic math HEP foundation Minimization/Fitting Histograms Database Persistency C++ Lizard - AIDA Qt - Qplotter OpenInventor OpenGL NAG C CLHEP FML - Gemini HTL HepODBMS ODMG/Objectivity DB Standard Libraries Original transparencies by Andreas Pfeiffer, CERN 28

ANAPHE Components Lizard Interactive Commands Python / SWIG Histograms NTuples Fitting Plotting VectorOfPoints Functions Analyzer HTL Tags (HepODBMS Gemini/HepFitting Qplotter VectorOfPoints Objectivity/DB HBook NAG-C Minuit Qt (free edition) Abstract types Implementations (HEP-specific) AIDA (Abstract Interfaces for Data Analysis) CLHEP Class Libraries for HEP non-hep components User Interface - using Abstract Types Original transparencies by Andreas Pfeiffer, CERN 29

Basic 3D Graphic Libraries OpenGL (basic graphics) De-facto industry standard for basic 3D graphics Used in CAD/CAE, games, VR, medical imaging OpenInventor (scene mgmt.) OO 3D toolkit for graphics Cubes, polygons, text, materials Cameras, lights, picking 3D viewers/editors,animation Based on OpenGL/MesaGL Original transparencies by Andreas Pfeiffer, CERN 30

2D Graphics libraries Qt multi-platform C++ GUI toolkit C++ class library, not wrapper around C libs superset of Motif and MFC available on Unix and MS Windows no change for developer commercial but with public domain version www.troll.no Qplotter add-on functionality for HEP HIGZ/HPLOT Original transparencies by Andreas Pfeiffer, CERN 31

Mathematical Libraries NAG (Numerical Algorithms Group) C Library Covers a broad range of functionality Linear algebra differential equations quadrature, etc. Special functions of CERNLIB added to Mark-6 release mostly for theory and accelerator Quality assurance extensive testing done by NAG www.nag.com Original transparencies by Andreas Pfeiffer, CERN 32

CLHEP - foundation classes HEP foundation class library Random number generators Physics vectors 3- and 4- vectors Geometry Linear algebra System of units more packages recently added will continue to evolve wwwinfo.cern.ch/asd/lhc++/clhep/ Original transparencies by Andreas Pfeiffer, CERN 33

Histograms: the HTL package Histograms are the basic tool for physics analysis Statistical information of density distributions Histogram Template Library (HTL) design based on C++ templates Modular : separation between sampling and display Extensible : open for user defined binning systems Flexible: support transient/persistent at the same time Open: large use of abstract interfaces Original transparencies by Andreas Pfeiffer, CERN 34

Fitting and Minimization Fitting and Minimization Library (FML) common OO interface NAG-C, MINUIT based on Abstract Interfaces IVector, IModelFunction, fitting as a special case of minimization minimize distance between data and model replacement for HepFitting (and Gemini) Gemini common interface to minimizer engine very thin layer Original transparencies by Andreas Pfeiffer, CERN 35

Tags, Ntuples and Events Tags - a special kind of Ntuple Always associated with an underlying persistent store Tags may be used to store ntuple-like data extracted from all over the event minpt, maxemiss, njets, nmuon, trigger, Main use: speedup data selection for analysis Tag simplifies selection without loosing complexity Association from the Tag to the Event may be used to navigate to any other part of the Event even from an interactive visualization program Original transparencies by Andreas Pfeiffer, CERN 36

Lizard: a tool for Interactive Data Analysis GranSasso, Jul-2002 Andreas Pfeiffer, CERN/IT-API, andreas.pfeiffer@cern.ch 37

Interactive Data Analysis Aim: OO replacement for PAW (at least) analysis of ntuple-like data ( Tags, Ntuples, ) visualisation of data (Histograms, scatter-plot, Vectors ) fitting of histograms (and other data) access to experiment specific data/code Maximize flexibility and re-use Foresee customization/integration allow use from within experiment s s/w Plan for extensions code for now, design for the future Ensure maintainability use of s/w quality control tools Original transparencies by Andreas Pfeiffer, CERN 38

Scripting - why Typical use of scripting is quite different from programming (reconstruction, analysis,...) history go back to where I was before repetition/looping - with modifiable parameters avoid one size fits all or using power-tool as hammer rapid prototyping in scripting language quick turn-around times performance critical code in core language exploit richer set of features/functionality (e.g. templates in C++) scripting languages usually less susceptible to changes than mainstream languages potentially longer lives Original transparencies by Andreas Pfeiffer, CERN 39

Python - why Python - OO (scripting) language no strange $!%-variables sensitive to indentation More easy for users as Java Lots of user supplied modules available and ready for use scientific, numerics, graphics, GUI, network, OS, games, DBs, example: http://www.vex.net/parnassus/ Parnassus Totals: 1173 items in 49 categories. Also usable in Java (Jython) used in JAS for scripting minimize changes needed within AIDA compliant environments Original transparencies by Andreas Pfeiffer, CERN 40

Python - how SWIG to (semi-) automatically create connection to chosen scripting language allows flexibility to choose amongst several scripting languages Python, Perl, Tcl, Guile, Ruby, (Java) Very easy to use swig -c++ -python -shadow -c myclass.h create shared lib from myclass.cpp and myclass_wrap.c start python and import myclass.h to use it Very easy to extend simply inherit from swiggified class in python modifications can later be fed back into C++ performance, type safety, special language features (templates), Original transparencies by Andreas Pfeiffer, CERN 41

Design choices in Geant4 applications Analysis is based on AIDA Independence of implementation: Anaphe, JAS, OpenScientist can be used interchangeably without changing code All analysis is concentrated in a Singleton Eases access from several different classes Analysis is done in the User* classes, the Singleton only provides access to the analysis objects Histograms, tuple Original transparencies by Andreas Pfeiffer, CERN 42

Original transparencies by Andreas Pfeiffer, CERN 43

Original transparencies by Andreas Pfeiffer, CERN 44

Original transparencies by Andreas Pfeiffer, CERN 45