$Id: README,v 1.12 2003/06/20 14:55:44 gbarrand Exp $ ------------------------------------------------------------------- ========================================================= Geant4 - an Object-Oriented Toolkit for Simulation in HEP ========================================================= AnaEx01 ------- This example shows the usage of histogram and tuple manipulations using an AIDA compliant system. In this example, all analysis manipulations (hooking an AIDA implementation, histo booking, filling, etc...) are concentrated in one class : AnaEx01AnalysisManager. To use an AIDA compliant analysis system with this example, the environment variables : G4ANALYSIS_USE G4ANALYSIS_AIDA_CONFIG_CFLAGS G4ANALYSIS_AIDA_CONFIG_LIBS must be properly set. The first one permits to validate/devalidate the AIDA analysis code in the example code. The two others permit to give the compilation and link flags of the AIDA compliant system used. An AIDA compliant system should define the command 'aida-config' that permits to retrieve the correct values. For example under some UNIX csh flavour : csh> source .csh csh> source .csh (or some equivalent) csh> setenv G4ANALYSIS_USE 1 csh> setenv G4ANALYSIS_AIDA_CONFIG_CFLAGS `aida-config --cflags` csh> setenv G4ANALYSIS_AIDA_CONFIG_LIBS `aida-config --libs` csh> cd $G4INSTALL/examples/extended/analysis/AnaEx01 csh> gmake For info, the CPP macros G4ANALYSIS_*_AIDA_* are used in the config/analysis.gmk file of the Geant4 GNUmakefile system. Working with the Falsetto package : --------------------------------- Falsetto is a little package containing a dummy AIDA analysis factory. It permits to check compilation and link of some user AIDA code without embarquing a full analysis system. To reconstruct this example by using the Falsetto package (assuming that it is installed !), do : csh> source .csh csh> source /Falsetto//cmt/setup.csh csh> setenv G4ANALYSIS_USE 1 csh> setenv G4ANALYSIS_AIDA_CONFIG_CFLAGS `aida-config --cflags` csh> setenv G4ANALYSIS_AIDA_CONFIG_LIBS `aida-config --libs` csh> cd $G4INSTALL/examples/extended/analysis/AnaEx01 csh> gmake To run : csh> cd analyis/Falsetto csh> $G4WORKDIR/bin/$G4SYSTEM/AnaEx01 At the beginning of output ;should appear : AIDA analysis factory not found. The Falsetto URL is : http://www.lal.in2p3.fr/SI/Falsetto Falsetto is installed at CERN under /afs/cern.ch/sw/contrib. Working with the OpenScientist/Lab package : ------------------------------------------ To reconstruct this example by using the OpenScientist/Lab package (assuming that OpenScientist is installed ! ) you have first to "setup" the environment of the Lab package and Geant4. The Lab package (and all OpenScientist packages) being handled by the CMT tools, you may have to setup the environment variable "CMTSITE" to execute site specific things in the chain of setup files of the OpenScientist packages. Then for example at CERN : csh> setenv CMTSITE CERN (DOS> set CMTSITE=CERN_WIN32 (for Windows)) When done then do : csh> source /Lab//cmt/setup.csh csh> source .csh csh> setenv G4ANALYSIS_USE 1 csh> setenv G4ANALYSIS_AIDA_CONFIG_CFLAGS `aida-config --cflags` csh> setenv G4ANALYSIS_AIDA_CONFIG_LIBS `aida-config --libs` csh> cd $G4INSTALL/examples/extended/analysis/AnaEx01 csh> gmake To run : csh> cd analyis/Lab csh> $G4WORKDIR/bin/$G4SYSTEM/AnaEx01 It must produce an AnaEx01.root file that contains some HCL histograms and a Lab tuple (stored as a ROOT/TTree). To plot some histograms, spawn the Lab interactive tool with : csh> onx (DOS> onx (for Windows)) click in 'File/File/import' to map a file chooser, choose AnaEx01.py to execute the AnaEx01.py. You can also execute this script by issuing an : import AnaEx01 in the command prompt. This file contains a Python script that do some analysis over the AnaEx01.root file by using the AIDA interfaces. This script gets an histo (EAbs) and plots it in a first drawing region. Then it gets the 'AnaEx01' tuple, books and fills another histo from the tuple colum 'EAbs' and plots it a secon drawing region. The AnaEx01.C file could also be used, within the ROOT tool, to see a projection of the first column of the tuple contained in the AnaEx01.root file. For example : csh> root root[0] .X AnaEx01.C Note that the HCL 'EAbs' histogram could not be seen with ROOT. The OpenScientist URL is : http://www.lal.in2p3.fr/OpenScientist OpenScientist is installed at CERN under /afs/cern.ch/sw/contrib.