112 lines
4.5 KiB
Plaintext
112 lines
4.5 KiB
Plaintext
$Id: README,v 1.11 2001/12/03 07:49:17 barrand 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 <your Geant4 setup script>.csh
|
|
csh> source <AIDA_SYSTEM setup>.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 <your Geant4 setup script>.csh
|
|
csh> source <some directory>/Falsetto/<version>/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 <some directory>/Lab/<version>/cmt/setup.csh
|
|
csh> source <your Geant4 setup script>.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/Python to map a file chooser, choose AnaEx01.py
|
|
to execute the AnaEx01.py that contains a Python script that
|
|
do some analysis over the AnaEx01.root file (it gets an histo, plots it
|
|
in a first drawing region, gets the tuple, books and fills another histo
|
|
from the tuple colum and plots it in another 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
|
|
|
|
The OpenScientist URL is : http://www.lal.in2p3.fr/OpenScientist
|
|
OpenScientist is installed at CERN under /afs/cern.ch/sw/contrib.
|
|
|
|
|