Analysis with Geant4 Analysis with Geant4 and AIDA and AIDA Tony Johnson Tony Johnson Fermilab Geant4 Workshop Geant4 Workshop Fermilab October 2003 October 2003
What is AIDA? What is AIDA? � AIDA = Abstract Interfaces for Data AIDA = Abstract Interfaces for Data � Analysis Analysis Analysis Tool 1 User Code AIDA (e.g. Geant 4) Analysis Tool 2
Why AIDA? Why AIDA? Goal Goal � � • Provide the user with a powerful set of interfaces which can be used used • Provide the user with a powerful set of interfaces which can be regardless of which underlying analysis tool they are using. regardless of which underlying analysis tool they are using. Advantages Advantages � � • The user will only need to learn one set of interfaces even if t hey use hey use • The user will only need to learn one set of interfaces even if t more than one tool. more than one tool. • By pooling the experiences of several different development team s we s we • By pooling the experiences of several different development team will be able to develop a more complete solution to the data analysis lysis will be able to develop a more complete solution to the data ana problem. problem. • Different analysis tools built using AIDA will be able to interoperate, perate, • Different analysis tools built using AIDA will be able to intero for example by exchanging objects in a common storage format for example by exchanging objects in a common storage format (initially XML). (initially XML). Currently two (.5) versions of the AIDA interfaces exist, Currently two (.5) versions of the AIDA interfaces exist, � � • • one for Java one for Java • one for C+ + • one for C+ + The two interfaces are as identical as the underlying languages will permit. will permit. The two interfaces are as identical as the underlying languages � � • Also “unofficial” python interface • Also “unofficial” python interface
Who is AIDA? Who is AIDA? � Past and present contributors: Past and present contributors: � • Guy Guy Barrand Barrand, , Pavel Pavel Binko, , Grzegorz Grzegorz • Binko Chwajol , Mark Donszelmann Donszelmann, , Wolfgang Wolfgang Chwajol , Mark Hoschek, , Tony Johnson, , Emmanuel Hoschek Tony Johnson Emmanuel Medernach, , Dino Ferrero Merlino, , Medernach Dino Ferrero Merlino Lorenzo Moneta Moneta, , Jakub Jakub Moscicki Moscicki, , Ioannis Ioannis Lorenzo Papadopoulos, Andreas Pfeiffer, Max , Max Papadopoulos, Andreas Pfeiffer Sang, Victor Serbo Serbo, Max , Max Turri Turri Sang, Victor • CERN, SLAC, LAL, others… CERN, SLAC, LAL, others… •
Aida Interfaces: IHistogram IHistogram Aida Interfaces: Histograms 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
Aida Interfaces: ICloud ICloud Aida Interfaces: Histograms Histograms � � � unbinned histograms Clouds Clouds � � � scatter plots � auto-conversion to histograms
Aida Interfaces: IProfile IProfile Aida Interfaces: Histograms Histograms � � Clouds Clouds � � � fill 1D and 2D profile plots Profiles Profiles � � � access to bin statistics (height, mean , rms) � access to overall statistics (entries, mean rms) � scaling
Aida Interfaces: IDataPointSet IDataPointSet Aida Interfaces: Histograms Histograms � � Clouds Clouds � � Profiles Profiles � � Data Point Sets 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
Aida Interfaces: ITuple ITuple Aida Interfaces: Histograms Histograms � � Clouds Clouds � � Profiles Profiles � � Data Point Sets Data Point Sets � � N- - tuples tuples N � � fill and retrieve data � � support folder-like structure • Evaluators • Evaluators � projections to histograms, clouds and profiles • Filters • Filters of “evaluated” quantities with “filtering” � chaining, merging
Aida Interfaces: IPlotter IPlotter Aida Interfaces: Histograms Histograms � � Clouds Clouds � � Profiles Profiles � � Data Point Sets Data Point Sets � � N- - tuples tuples N � � • Evaluators • Evaluators • Filters • Filters � create plot area, regions Plotting Plotting � � � control styles (title, text, markers, lines etc.)
Aida Interfaces: IFitter IFitter Aida Interfaces: Histograms Histograms � � Clouds Clouds � � Profiles Profiles � � Data Point Sets Data Point Sets � � N- - tuples tuples N � � � fitting to all the data storage types • Evaluators • Evaluators IFitResult result = fitter.fit(data, function) • Filters • Filters � change fit method ( χ 2 ,max. Likelihood, etc) � change optimizer (Minuit, etc) Plotting Plotting � � � control parameters (bounds, fix, step, etc.) Fitter Fitter � � � set constraints � create scans and contours � use function’s analytical gradient
Aida Interfaces: IFunction IFunction Aida Interfaces: Histograms Histograms � � Clouds Clouds � � Profiles Profiles � � Data Point Sets Data Point Sets � � N- - tuples tuples N � � • Evaluators • Evaluators • Filters • Filters Plotting Plotting � create scripted or built-in functions � � � access/change parameter’s values Fitter Fitter � � � evaluate function and its gradient Functions Functions � � � support of PDFs ( normalized functions over a range )
Aida Interfaces: ITree ITree Aida Interfaces: Histograms Histograms � � Clouds Clouds � � Profiles Profiles � � Data Point Sets Data Point Sets � � N- - tuples tuples N � � • Evaluators • Evaluators • Filters • Filters Plotting Plotting � � Fitter Fitter � � Functions Functions � � � storage for analysis objects IO IO � � � XML interchange format standard (.aida files) � no APIs; storage is application specific � unix-like : ls, cp, mv, cd ….
Example AIDA program (Java) Example AIDA program (Java)
What AIDA Compliant Tools exist? What AIDA Compliant Tools exist? � Current Version of AIDA is 3.2.1 Current Version of AIDA is 3.2.1 � • Tools Tools • � C+ + C+ + � • Open Scientist 11.0 Open Scientist 11.0 • http: / / www.lal.in2p3.fr/ OpenScientist/ http: / / www.lal.in2p3.fr/ OpenScientist/ • • Anaphe Anaphe (5.0) (5.0) http: / / anaphe.web.cern.ch/ anaphe/ http: / / anaphe.web.cern.ch/ anaphe/ � Now moved to LCG Now moved to LCG- - PI project PI project � � Includes AIDA Includes AIDA- - > Root > Root � • • AIDA AIDA- - JNI (3.0.4) JNI (3.0.4) http: / / http: / / java.freehep.org/ aidajni java.freehep.org/ aidajni On � Java Java � The • JAIDA (3.2.0) JAIDA (3.2.0) http: / / java.freehep.org/ jaida http: / / java.freehep.org/ jaida • CD • JAS3 (0.7.3) JAS3 (0.7.3) http: / / jas.freehep.org/ jas3 http: / / jas.freehep.org/ jas3 • � Python Python � • PAIDA (3.2.1b1) PAIDA (3.2.1b1) http: / / http: / / paida.sourceforge.net paida.sourceforge.net •
AIDA with Geant4 AIDA with Geant4 � AIDA allows Geant4 examples to illustrate AIDA allows Geant4 examples to illustrate � analysis techniques without choosing a single analysis techniques without choosing a single analysis tool analysis tool � The T01 example (and several others) has been The T01 example (and several others) has been � set up to use AIDA for analysis set up to use AIDA for analysis � By default links without AIDA implementation By default links without AIDA implementation � � Switching to a real AIDA implementation is easy, Switching to a real AIDA implementation is easy, � just set environment variables and relink relink just set environment variables and • source setup- -analysis # (or source setup analysis # (or source setup- -analysis.csh analysis.csh) ) • source setup • make • make • • ../../bin/$G4SYSTEM/A01app novis.mac ../../bin/$G4SYSTEM/A01app novis.mac
Simple GUI build into JAIDA Simple GUI build into JAIDA Plots update in real time. A01 also creates a A01.aida file which can be analyzed offline.
Recommend
More recommend