AIDA Abstract Interfaces for Data Analysis Massimiliano Turri, SLACCHEP, La Jolla, March “The goal of the AIDA project is to define abstract interfaces for common physics analysis objects, such as histograms, ntuples, fitters. The adoption of these interfaces makes it easier for developers and users to select and use different tools without having to learn new interfaces or change their code. In addition it is possible to exchange data (objects) between AIDA compliant applications through a standard XML format.” Introduction
AIDA Abstract Interfaces for Data Analysis Massimiliano Turri, SLACCHEP, La Jolla, March Only pure virtual methods for analysis objects AIDA defines behavior, analysis tool provides implementation Object factories independence of user code from AIDA implementation easy to switch implementations IAnalysisFactory af = IAnalysisFactory.create(); Features
AIDA Abstract Interfaces for Data Analysis Massimiliano Turri, SLACCHEP, La Jolla, March Use same code with any AIDA-compliant analysis tool. Used for experiment’s code, e.g. reconstruction or individual user’s analysis User needs to learn only one set of interfaces. Interoperability of analysis tools. AIDAAIDA User code (e.g. GEANT4) Analysis tool 1 Analysis tool 2 Advantages
AIDA Abstract Interfaces for Data Analysis Massimiliano Turri, SLACCHEP, La Jolla, March Distributed data analysis: GRID enabled AIDA implementation. No need for user to change code. Many places within the GRID where abstract interfaces could be adopted. AIDA working group may be a good model to follow GRID Node Analysis Objects AIDA GRID Node Analysis Objects AIDA GRID-land Speaking of GRID…
AIDA Abstract Interfaces for Data Analysis Massimiliano Turri, SLACCHEP, La Jolla, March Initial idea formed at HepVis-99 workshop at Orsay. Informal AIDA discussions at CERN in 2000 AIDA workshops: January Paris/Orsay April Boston (preceding HepVis 2001) June 2002 – CERN Informal meetings e.g. during Geant4 meetings and V.C. History
AIDA Abstract Interfaces for Data Analysis Massimiliano Turri, SLACCHEP, La Jolla, March Open source project No formal collaboration/author list currently an informal CERN-LAL-SLAC effort Interfaces are designed by discussion and (eventual) consensus Takes some time, but result is well though out and robust Past and present contributors: Guy Barrand, Pavel Binko, Grzegorz Chwajol, Mark Donszelmann, Wolfgang Hoschek, Tony Johnson, Emmanuel Medernach, Dino Ferrero Merlino, Lorenzo Moneta, Jakub Moscicki, Ioannis Papadopoulos, Andreas Pfeiffer, Max Sang, Victor Serbo, Max Turri Organization and Developers
AIDA Abstract Interfaces for Data Analysis Massimiliano Turri, SLACCHEP, La Jolla, March AIDA Version 3.0 (Oct 2002) second end-user release. AIDA 2.2 first end-user release Interfaces available in C++ and Java automatically generated with AID ( see FreeHEP Java Libraries talk ) easy to add more languages Status
AIDA Abstract Interfaces for Data Analysis Massimiliano Turri, SLACCHEP, La Jolla, March Interfaces Overview
AIDA Abstract Interfaces for Data Analysis Massimiliano Turri, SLACCHEP, La Jolla, March Histograms fixed and variable width binning filling access to overall statistics (entries, mean, rms) bin information (center, entries, height, error) arithmetic (add, multiply, divide) projections slices IHistogram
AIDA Abstract Interfaces for Data Analysis Massimiliano Turri, SLACCHEP, La Jolla, March Histograms Clouds unbinned histograms scatter plots auto-conversion to histograms ICloud
AIDA Abstract Interfaces for Data Analysis Massimiliano Turri, SLACCHEP, La Jolla, March Histograms Clouds Profiles fill 1D and 2D profile plots access to bin statistics (height, mean, rms) access to overall statistics (entries, mean rms) scaling IProfile
AIDA Abstract Interfaces for Data Analysis Massimiliano Turri, SLACCHEP, La Jolla, March Histograms Clouds Profiles Data Point Sets sets of n-dimensional points with errors add, remove, get points scaling of values and errors full mathematical arithmetic (+-*/) simple error propagation IDataPointSet
AIDA Abstract Interfaces for Data Analysis Massimiliano Turri, SLACCHEP, La Jolla, March Histograms Clouds Profiles Data Point Sets Ntuples Evaluators Filters fill and retrieve data support folder-like structure projections to histograms, clouds and profiles of “evaluated” quantities with “filtering” chaining, merging ITuple
AIDA Abstract Interfaces for Data Analysis Massimiliano Turri, SLACCHEP, La Jolla, March Histograms Clouds Profiles Data Point Sets Ntuples Evaluators Filters Plotting create plot area, regions control styles (title, text, markers, lines etc.) IPlotter
AIDA Abstract Interfaces for Data Analysis Massimiliano Turri, SLACCHEP, La Jolla, March Histograms Clouds Profiles Data Point Sets Ntuples Evaluators Filters Plotting Fitter fitting to all the data storage types IFitResult result = fitter.fit(data, function) change fit method ( 2,max. Likelihood, etc) change optimizer (Minuit, etc) control parameters (bounds, fix, step, etc.) set constraints create scans and contours use function’s analytical gradient IFitter
AIDA Abstract Interfaces for Data Analysis Massimiliano Turri, SLACCHEP, La Jolla, March Histograms Clouds Profiles Data Point Sets Ntuples Evaluators Filters Plotting Fitter Functions create scripted or built-in functions access/change parameter’s values evaluate function and its gradient support of PDFs ( normalized functions over a range ) IFunction
AIDA Abstract Interfaces for Data Analysis Massimiliano Turri, SLACCHEP, La Jolla, March Histograms Clouds Profiles Data Point Sets Ntuples Evaluators Filters Plotting Fitter Functions IO storage for analysis objects XML interchange format standard (.aida files) no APIs; storage is application specific ITree
AIDA Abstract Interfaces for Data Analysis Massimiliano Turri, SLACCHEP, La Jolla, March IAnalysisFactory aF = IAnalysisFactory.create(); ITree tree = aF.createTreeFactory().create(); IHistogramFactory histF = aF.createHistogramFactory( tree ); IFitFactory fitF = aF.createFitFactory(); IFitter fitter = fitF.createFitter("Chi2"); IPlotter plotter = aF.createPlotterFactory().create("Plot"); IHistogram1D gaussHist = histF.createHistogram1D("gaussHist", "Gaussian Histogram",100,-5,5); Random r = Random(); for (i=0; i<10000; i++) gaussHist.fill(r.nextGaussian()); IFitResult chi2Fit = fitter.fit(gaussHist,"g"); plotter.createRegions(); plotter.region(0).plot( gaussHist ); plotter.region(0).plot( chi2Fit.fittedFunction() ); plotter.show(); Example code
AIDA Abstract Interfaces for Data Analysis Massimiliano Turri, SLACCHEP, La Jolla, March Three implementations are available within: Anaphe/Lizard (C++) Open Scientist (C++) JAIDA/JAS (Java) + AIDA-JNI 3.0 (C++) GEANT4 adopted AIDA for analysis Advanced examples use AIDA See Geant4 workshop held in Feb Tools and Users
AIDA Abstract Interfaces for Data Analysis Massimiliano Turri, SLACCHEP, La Jolla, March AIDA has: a comprehensive set of interfaces for data analysis three separate implementations AIDA needs: feedback AIDA news: LHC Computing Grid (LCG) Application Area adopted the AIDA interfaces in the context of their Architectural Blueprint collaborate with the AIDA team to further develop the interfaces LCG PI (Physicist Interface) project started on a "value-semantic" layer based on the AIDA interfaces AIDA 4.0 ? Outlook