Changeset 1337 for trunk/examples/extended/analysis/AnaEx01
- Timestamp:
- Sep 30, 2010, 2:47:17 PM (15 years ago)
- Location:
- trunk/examples/extended/analysis/AnaEx01
- Files:
-
- 27 edited
-
AnaEx01.cc (modified) (1 diff)
-
History (modified) (2 diffs)
-
README (modified) (2 diffs)
-
include/AnaEx01AnalysisManager.hh (modified) (1 diff)
-
include/AnaEx01CalorHit.hh (modified) (1 diff)
-
include/AnaEx01CalorimeterSD.hh (modified) (1 diff)
-
include/AnaEx01DetectorConstruction.hh (modified) (1 diff)
-
include/AnaEx01DetectorMessenger.hh (modified) (1 diff)
-
include/AnaEx01EventAction.hh (modified) (1 diff)
-
include/AnaEx01PhysicsList.hh (modified) (1 diff)
-
include/AnaEx01PrimaryGeneratorAction.hh (modified) (1 diff)
-
include/AnaEx01PrimaryGeneratorMessenger.hh (modified) (1 diff)
-
include/AnaEx01RunAction.hh (modified) (1 diff)
-
include/AnaEx01SteppingAction.hh (modified) (1 diff)
-
include/AnaEx01SteppingVerbose.hh (modified) (1 diff)
-
src/AnaEx01AnalysisManager.cc (modified) (1 diff)
-
src/AnaEx01CalorHit.cc (modified) (1 diff)
-
src/AnaEx01CalorimeterSD.cc (modified) (1 diff)
-
src/AnaEx01DetectorConstruction.cc (modified) (1 diff)
-
src/AnaEx01DetectorMessenger.cc (modified) (1 diff)
-
src/AnaEx01EventAction.cc (modified) (1 diff)
-
src/AnaEx01PhysicsList.cc (modified) (1 diff)
-
src/AnaEx01PrimaryGeneratorAction.cc (modified) (1 diff)
-
src/AnaEx01PrimaryGeneratorMessenger.cc (modified) (1 diff)
-
src/AnaEx01RunAction.cc (modified) (1 diff)
-
src/AnaEx01SteppingAction.cc (modified) (1 diff)
-
src/AnaEx01SteppingVerbose.cc (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/examples/extended/analysis/AnaEx01/AnaEx01.cc
r1230 r1337 26 26 // 27 27 // $Id: AnaEx01.cc,v 1.14 2006/06/29 16:33:13 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/AnaEx01/History
r807 r1337 1 $Id: History,v 1.1 5 2006/08/16 15:43:44 gcosmoExp $1 $Id: History,v 1.18 2009/05/13 08:46:37 gbarrand Exp $ 2 2 -------------------------------------------------- 3 3 … … 15 15 * Reverse chronological order (last date on top), please * 16 16 ---------------------------------------------------------- 17 18 13 May 2009 Guy Barrand (AnaEx01-V09-02-00) 19 - Tagged all changes. 20 21 13 May 2009 Guy Barrand 22 - update the README. 23 - remove the content of the analysis/[Falsetto,jas,Lab] directories. 24 In fact the analysis directory should not be distributed anymore. 25 - have a run.mac in the main example directory. 26 - AnaEx01AnalysisManager : arrange to have histo and tuple name 27 as interger in case of hbook file format. 28 29 5 March 2009 Guy Barrand 30 - GNUmakefile : remove the G4ANALYSIS_USE logic found in this file, since 31 it is handled already in the config/analysis.gmk. 32 This avoids a duplication in the compilation and link commands 33 of the aida-config options. 17 34 18 35 16th August 2006 Gabriele Cosmo (AnaEx01-V08-01-00) -
trunk/examples/extended/analysis/AnaEx01/README
r807 r1337 1 $Id: README,v 1.1 5 2006/08/16 15:42:16 gcosmoExp $1 $Id: README,v 1.16 2009/05/13 08:32:36 gbarrand Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 11 11 This example shows the usage of histogram and tuple manipulations using 12 12 an AIDA compliant system. In this example, all analysis manipulations 13 (hooking an AIDA implementation, histo booking, filling, etc...) are 14 concentrated in one class : AnaEx01AnalysisManager. 13 (attaching an AIDA implementation, histo booking, filling, saving 14 histos in a file, etc...) are concentrated in one class : 15 AnaEx01AnalysisManager. 15 16 16 To use an AIDA compliant analysis system with this example, the environment 17 variables : 17 To include the analysis code, the environment variable 18 18 G4ANALYSIS_USE 19 G4ANALYSIS_AIDA_CONFIG_CFLAGS 20 G4ANALYSIS_AIDA_CONFIG_LIBS 21 must be properly set. 19 must be defined before doing "make". If not, at run time, no 20 histograms and file will be created. 22 21 23 The first one permits to validate/devalidate the AIDA analysis code 24 in the example code. The two others permit to give the compilation 25 and link flags of the AIDA compliant system used. 22 For example, a typical session from a UNIX csh flavoured shell is : 23 csh> source <aida tool>/aida-setup.csh 24 csh> setenv G4ANALYSIS_USE 1 25 csh> make 26 csh> ${G4BIN}/${G4SYSTEM}/AnaEx01 27 After execution, a file AnaEx01.aida should have been created. 28 Someone can change the default file format by changing the 29 value of the std::string variable format in the AnaEx01AnalysisManager 30 constructor : 31 // File format : 32 std::string format("xml"); 33 //std::string format("hbook"); 34 //std::string format("root"); 35 36 Working with the OpenScientist packages : 37 --------------------------------------- 38 To create the analysis file, you can install the light "osc_batch" 39 binary kit (See http://OpenScientist.lal.in2p3.fr ). For example 40 from a UNIX sh flavoured shell : 41 sh> cd /usr/local 42 sh> <arrange to be su> 43 sh> <get an osc_batch binary kit> 44 sh> unzip -q osc_batch<platform>.zip 45 sh> cd osc_batch/<version> 46 sh> ./install 47 48 Then you build the example with : 49 <create another terminal> 50 csh> source /usr/local/osc_batch/<version>/aida-setup.csh 51 csh> <source setup Geant4> 52 csh> setenv G4ANALYSIS_USE 1 53 csh> cd <G4_install_path>/examples/extended/analysis/AnaEx01 54 csh> make 55 csh> ${G4BIN}/${G4SYSTEM}/AnaEx01 56 57 Depending of the file format, you can visualize the produced 58 file with various interactive tools (CERN/PAW, CERN/ROOT, jas). 59 But if installing also an OpenScientist osc_vis binary kit, 60 you shall be able to visualize all formats by using 61 the osc-plot program. To install an osc_vis kit : 62 sh> cd /usr/local 63 sh> <arrange to be su> 64 sh> <get an osc_vis binary kit> 65 sh> unzip -q osc_vis<platform>.zip 66 sh> cd osc_vis/<version> 67 sh> ./install 68 Then to browse the AnaEx01.<format> file (for exa from an UNIX sh shell) : 69 <create another terminal> 70 sh> . /usr/local/osc_vis/<version>/setup.sh 71 sh> <setenv DISPLAY if needed> 72 sh> osc-plot AnaEx01.[aida,root,hbook] 26 73 27 The variable G4ANALYSIS_USE must be defined in the environment, and the 28 the system properly configured to use one of the AIDA compliant analysis 29 tools (i.e. path set to retrieve the 'aida-config' command). 74 The OpenScientist URL is : 75 http://OpenScientist.lal.in2p3.fr. 30 76 31 Working with the OpenScientist/Lab package : 32 ------------------------------------------ 33 To reconstruct this example by using the OpenScientist/Lab 34 package (assuming that OpenScientist is installed ! ) you have 35 first to "setup" the environment of the Lab package and Geant4. 36 The Lab package (and all OpenScientist packages) being handled 37 by the CMT tools, you may have to setup the environment 38 variable "CMTSITE" to execute site specific things in the chain 39 of setup files of the OpenScientist packages. Then for example at CERN : 40 csh> setenv CMTSITE CERN 41 (DOS> set CMTSITE=CERN_WIN32 (for Windows)) 42 When done then do : 43 csh> source <some directory>/Lab/<version>/cmt/setup.csh 44 csh> source <your Geant4 setup script>.csh 45 csh> setenv G4ANALYSIS_USE 1 46 csh> cd $G4INSTALL/examples/extended/analysis/AnaEx01 47 csh> gmake 77 Note that OpenScientist is installed on CERN/lxplus under : 78 /afs/cern.ch/sw/contrib/[osc_batch,osc_vis]. 48 79 49 To run :50 csh> cd analyis/Lab51 csh> $G4WORKDIR/bin/$G4SYSTEM/AnaEx0152 80 53 It must produce an AnaEx01.aida file that contains some histograms54 and a tuple.55 56 To plot some histograms, spawn the Lab interactive tool with :57 csh> onx58 (DOS> onx (for Windows))59 click in 'File/Open AIDA file...' to map a file chooser,60 then choose AnaEx01.aida. The file name should appear in the left61 tree widget beside the plotting area. Use the tree widget to browse62 the file. You can visualize histos by selecting them with the mouse.63 64 If the OpenScientist/OnX and Lab Python drivers had been65 reconstructed at installation of OpenScientist, then66 you can also work with the OpenScientist/Lab/AIDA Python API.67 You can execute AnaEx01.py by doing :68 OS> python AnaEx01.py69 or :70 OS> python71 (>>> import AIDA)72 >>> import AnaEx0173 The AnaEx01 file contains a Python script that74 does some analysis over the AnaEx01.aida file by using the AIDA interfaces.75 This script gets an histo (EAbs) and plots it in a first drawing region.76 Then it gets the 'AnaEx01' tuple, books and fills another histo77 from the tuple colum 'EAbs' and plots it a secon drawing region.78 79 If exporting a AnaEx01.root file (see src/AnaEx01AnalysisManager.cc),80 the AnaEx01.C file could also be used, within the ROOT tool.81 To see a projection of the first column of the tuple contained82 in the AnaEx01.root file. For example :83 csh> root84 root[0] .X AnaEx01.C85 86 The OpenScientist URL is : http://OpenScientist.lal.in2p3.fr.87 OpenScientist is installed at CERN under /afs/cern.ch/sw/contrib.88 89 Working with the Falsetto package :90 ---------------------------------91 Falsetto is a little package containing a dummy92 AIDA analysis factory. It permits to check compilation93 and link of some user AIDA code without embarquing a94 full analysis system.95 96 To reconstruct this example by using the Falsetto97 package (assuming that it is installed !), do :98 csh> source <your Geant4 setup script>.csh99 csh> source <some directory>/Falsetto/<version>/cmt/setup.csh100 csh> setenv G4ANALYSIS_USE 1101 csh> cd $G4INSTALL/examples/extended/analysis/AnaEx01102 csh> gmake103 104 To run :105 csh> cd analyis/Falsetto106 csh> $G4WORKDIR/bin/$G4SYSTEM/AnaEx01107 At the beginning of output ;should appear :108 AIDA analysis factory not found.109 110 The Falsetto URL is : http://www.lal.in2p3.fr/SI/Falsetto111 Falsetto is installed at CERN under /afs/cern.ch/sw/contrib.112 -
trunk/examples/extended/analysis/AnaEx01/include/AnaEx01AnalysisManager.hh
r1230 r1337 26 26 // 27 27 // $Id: AnaEx01AnalysisManager.hh,v 1.9 2006/06/29 16:33:15 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/AnaEx01/include/AnaEx01CalorHit.hh
r1230 r1337 26 26 // 27 27 // $Id: AnaEx01CalorHit.hh,v 1.4 2006/06/29 16:33:17 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/AnaEx01/include/AnaEx01CalorimeterSD.hh
r1230 r1337 26 26 // 27 27 // $Id: AnaEx01CalorimeterSD.hh,v 1.4 2006/06/29 16:33:19 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/AnaEx01/include/AnaEx01DetectorConstruction.hh
r1230 r1337 26 26 // 27 27 // $Id: AnaEx01DetectorConstruction.hh,v 1.4 2006/06/29 16:33:22 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/AnaEx01/include/AnaEx01DetectorMessenger.hh
r1230 r1337 26 26 // 27 27 // $Id: AnaEx01DetectorMessenger.hh,v 1.4 2006/06/29 16:33:25 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/AnaEx01/include/AnaEx01EventAction.hh
r1230 r1337 26 26 // 27 27 // $Id: AnaEx01EventAction.hh,v 1.6 2006/06/29 16:33:27 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/AnaEx01/include/AnaEx01PhysicsList.hh
r1230 r1337 26 26 // 27 27 // $Id: AnaEx01PhysicsList.hh,v 1.4 2006/06/29 16:33:29 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/AnaEx01/include/AnaEx01PrimaryGeneratorAction.hh
r1230 r1337 26 26 // 27 27 // $Id: AnaEx01PrimaryGeneratorAction.hh,v 1.4 2006/06/29 16:33:31 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/AnaEx01/include/AnaEx01PrimaryGeneratorMessenger.hh
r1230 r1337 26 26 // 27 27 // $Id: AnaEx01PrimaryGeneratorMessenger.hh,v 1.4 2006/06/29 16:33:33 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/AnaEx01/include/AnaEx01RunAction.hh
r1230 r1337 26 26 // 27 27 // $Id: AnaEx01RunAction.hh,v 1.6 2006/06/29 16:33:36 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/AnaEx01/include/AnaEx01SteppingAction.hh
r1230 r1337 26 26 // 27 27 // $Id: AnaEx01SteppingAction.hh,v 1.6 2006/06/29 16:33:38 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/AnaEx01/include/AnaEx01SteppingVerbose.hh
r1230 r1337 26 26 // 27 27 // $Id: AnaEx01SteppingVerbose.hh,v 1.4 2006/06/29 16:33:40 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/AnaEx01/src/AnaEx01AnalysisManager.cc
r1230 r1337 26 26 // 27 27 // $Id: AnaEx01AnalysisManager.cc,v 1.18 2009/05/13 08:33:17 gbarrand Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/AnaEx01/src/AnaEx01CalorHit.cc
r1230 r1337 26 26 // 27 27 // $Id: AnaEx01CalorHit.cc,v 1.6 2006/06/29 16:33:44 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/AnaEx01/src/AnaEx01CalorimeterSD.cc
r1230 r1337 26 26 // 27 27 // $Id: AnaEx01CalorimeterSD.cc,v 1.5 2006/06/29 16:33:46 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/AnaEx01/src/AnaEx01DetectorConstruction.cc
r1230 r1337 26 26 // 27 27 // $Id: AnaEx01DetectorConstruction.cc,v 1.5 2006/06/29 16:33:49 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/AnaEx01/src/AnaEx01DetectorMessenger.cc
r1230 r1337 26 26 // 27 27 // $Id: AnaEx01DetectorMessenger.cc,v 1.5 2006/06/29 16:33:51 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/AnaEx01/src/AnaEx01EventAction.cc
r1230 r1337 26 26 // 27 27 // $Id: AnaEx01EventAction.cc,v 1.6 2006/06/29 16:33:53 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/AnaEx01/src/AnaEx01PhysicsList.cc
r1230 r1337 26 26 // 27 27 // $Id: AnaEx01PhysicsList.cc,v 1.5 2006/06/29 16:33:55 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/AnaEx01/src/AnaEx01PrimaryGeneratorAction.cc
r1230 r1337 26 26 // 27 27 // $Id: AnaEx01PrimaryGeneratorAction.cc,v 1.5 2006/06/29 16:33:57 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/AnaEx01/src/AnaEx01PrimaryGeneratorMessenger.cc
r1230 r1337 26 26 // 27 27 // $Id: AnaEx01PrimaryGeneratorMessenger.cc,v 1.5 2006/06/29 16:33:59 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/AnaEx01/src/AnaEx01RunAction.cc
r1230 r1337 26 26 // 27 27 // $Id: AnaEx01RunAction.cc,v 1.7 2006/06/29 16:34:01 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/AnaEx01/src/AnaEx01SteppingAction.cc
r1230 r1337 26 26 // 27 27 // $Id: AnaEx01SteppingAction.cc,v 1.7 2006/06/29 16:34:03 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/AnaEx01/src/AnaEx01SteppingVerbose.cc
r1230 r1337 26 26 // 27 27 // $Id: AnaEx01SteppingVerbose.cc,v 1.7 2006/06/29 16:34:05 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 //
Note:
See TracChangeset
for help on using the changeset viewer.
