Import Geant4 6.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 10:56:29 +02:00
parent 1d812b78b1
commit e083ffb441
1415 changed files with 111223 additions and 21207 deletions
+26 -26
View File
@@ -1,8 +1,8 @@
*************************************************************
Geant4 version $Name: geant4-06-01 $ (25-March-2004)
Geant4 version $Name: geant4-06-02 $ (25-June-2004)
Copyright : Geant4 Collaboration
Reference : NIM A 506 (2003), 250-303.
Reference : NIM A 506 (2003), 250-303
WWW : http://cern.ch/geant4
*************************************************************
@@ -149,8 +149,8 @@ msc: Model variant of multiple scattering for proton
hIoni: tables are built for proton
dE/dx and range tables from 100 eV to 100 TeV in 120 bins.
Lambda tables from threshold to 100 TeV in 120 bins.
Step function: finalRange(mm)= 1, dRoverRange= 0.2, integral: 0
Bether-Bloch model for Escaled > 2 MeV, parametrisation of Bragg peak below, Integral mode 0
Step function: finalRange(mm)= 1, dRoverRange= 0.2, integral: 1
Bether-Bloch model for Escaled > 2 MeV, parametrisation of Bragg peak below, Integral mode 1
msc: Model variant of multiple scattering for mu+
Lambda tables from 100 eV to 100 TeV in 120 bins.
@@ -159,7 +159,7 @@ msc: Model variant of multiple scattering for mu+
MuIoni: tables are built for mu+
dE/dx and range tables from 100 eV to 100 TeV in 120 bins.
Lambda tables from threshold to 100 TeV in 120 bins.
Step function: finalRange(mm)= 1, dRoverRange= 0.2, integral: 0
Step function: finalRange(mm)= 1, dRoverRange= 0.2, integral: 1
Bether-Bloch model for E > 0.2 MeV, parametrisation of Bragg peak below,
radiative corrections for E > 1 GeV
@@ -177,7 +177,7 @@ MuPairProd: tables are built for mu+
MuIoni: tables are built for mu-
dE/dx and range tables from 100 eV to 100 TeV in 120 bins.
Lambda tables from threshold to 100 TeV in 120 bins.
Step function: finalRange(mm)= 1, dRoverRange= 0.2, integral: 0
Step function: finalRange(mm)= 1, dRoverRange= 0.2, integral: 1
Bether-Bloch model for E > 0.2 MeV, parametrisation of Bragg peak below,
radiative corrections for E > 1 GeV
@@ -185,26 +185,26 @@ msc: Model variant of multiple scattering for pi-
Lambda tables from 100 eV to 100 TeV in 120 bins.
Boundary algorithm is active with facrange= 0.199
Volume name | Importance| Tr.Entering| Population| Collisions| Coll*WGT| NumWGTedE| FluxWGTedE| Av.Tr.WGT|
cell_01_rep:0............ | 1 | 106 | 131 | 120 | 120 | 0.032472038 | 9.2527983 | 1 |
cell_02_rep:0............ | 2 | 72 | 157 | 148 | 74 | 8.9205605 | 9.2174133 | 1 |
cell_03_rep:0............ | 4 | 93 | 212 | 211 | 52.75 | 7.4823819 | 8.5261163 | 1 |
cell_04_rep:0............ | 8 | 112 | 219 | 254 | 31.75 | 3.5008375 | 7.7749792 | 1 |
cell_05_rep:0............ | 16 | 128 | 262 | 321 | 20.0625 | 4.1377944 | 7.7074206 | 1 |
cell_06_rep:0............ | 32 | 134 | 297 | 329 | 10.28125 | 6.6014772 | 7.7333631 | 1 |
cell_07_rep:0............ | 64 | 156 | 316 | 391 | 6.109375 | 0.18088036 | 7.4546045 | 1 |
cell_08_rep:0............ | 128 | 184 | 376 | 497 | 3.8828125 | 5.134922 | 6.7888989 | 1 |
cell_09_rep:0............ | 256 | 211 | 445 | 591 | 2.3085938 | 0.061641191 | 6.5983902 | 1 |
cell_10_rep:0............ | 512 | 239 | 494 | 707 | 1.3808594 | 5.1539762 | 6.6420088 | 1 |
cell_11_rep:0............ | 1024 | 260 | 530 | 781 | 0.76269531 | 0.17684092 | 6.5343371 | 1 |
cell_12_rep:0............ | 2048 | 289 | 596 | 928 | 0.453125 | 2.0888873 | 6.0537706 | 1 |
cell_13_rep:0............ | 4096 | 301 | 643 | 1004 | 0.24511719 | 3.6000169 | 5.9038428 | 1 |
cell_14_rep:0............ | 8192 | 327 | 682 | 1112 | 0.13574219 | 3.6317715 | 5.5996676 | 1 |
cell_15_rep:0............ | 16384 | 332 | 673 | 974 | 0.059448242 | 3.4512276 | 5.5878681 | 1 |
cell_16_rep:0............ | 32768 | 360 | 743 | 1194 | 0.036437988 | 3.1622704 | 5.4812661 | 1 |
cell_17_rep:0............ | 65536 | 394 | 812 | 1230 | 0.018768311 | 3.5856689 | 5.5173971 | 1 |
cell_18_rep:0............ | 131072 | 355 | 828 | 1436 | 0.010955811 | 0.23625257 | 5.1653559 | 1 |
rest_rep:0............... | 131072 | 385 | 385 | 0 | 0 | 0 | 0 | 0 |
shieldWorld_rep:0........ | 1 | 10 | 110 | 0 | 0 | 10 | 10 | 1 |
cell_01_rep:0............ | 1 | 110 | 131 | 118 | 118 | 8.5562926 | 9.237997 | 1 |
cell_02_rep:0............ | 2 | 73 | 167 | 174 | 87 | 7.1601913 | 8.7864585 | 1 |
cell_03_rep:0............ | 4 | 88 | 191 | 196 | 49 | 7.5359216 | 8.6869605 | 1 |
cell_04_rep:0............ | 8 | 104 | 214 | 305 | 38.125 | 3.1115996 | 7.4269722 | 1 |
cell_05_rep:0............ | 16 | 105 | 228 | 302 | 18.875 | 3.5556678 | 7.357289 | 1 |
cell_06_rep:0............ | 32 | 110 | 230 | 286 | 8.9375 | 6.3052811 | 7.3525379 | 1 |
cell_07_rep:0............ | 64 | 119 | 256 | 350 | 5.46875 | 5.6560453 | 6.8402582 | 1 |
cell_08_rep:0............ | 128 | 137 | 281 | 407 | 3.1796875 | 4.9128142 | 6.36468 | 1 |
cell_09_rep:0............ | 256 | 158 | 320 | 491 | 1.9179688 | 4.5960987 | 6.3811044 | 1 |
cell_10_rep:0............ | 512 | 183 | 386 | 561 | 1.0957031 | 4.6296183 | 6.3449131 | 1 |
cell_11_rep:0............ | 1024 | 190 | 403 | 606 | 0.59179688 | 4.3429934 | 6.1812327 | 1 |
cell_12_rep:0............ | 2048 | 188 | 381 | 698 | 0.34082031 | 0.036896157 | 5.4227668 | 1 |
cell_13_rep:0............ | 4096 | 211 | 440 | 822 | 0.20068359 | 3.0971965 | 4.9838145 | 1 |
cell_14_rep:0............ | 8192 | 216 | 452 | 781 | 0.095336914 | 3.0991602 | 4.9325683 | 1 |
cell_15_rep:0............ | 16384 | 251 | 510 | 901 | 0.054992676 | 1.9544162 | 4.851316 | 1 |
cell_16_rep:0............ | 32768 | 256 | 516 | 958 | 0.02923584 | 2.5277374 | 4.4940816 | 1 |
cell_17_rep:0............ | 65536 | 290 | 564 | 1105 | 0.016860962 | 2.5106552 | 4.1521405 | 1 |
cell_18_rep:0............ | 131072 | 265 | 624 | 1379 | 0.010520935 | 0.22549469 | 4.019048 | 1 |
rest_rep:0............... | 131072 | 267 | 267 | 0 | 0 | 0 | 0 | 0 |
shieldWorld_rep:0........ | 1 | 10 | 109 | 0 | 0 | 10 | 10 | 1 |
=== G4ProcessPlacer::RemoveProcess: for: neutron
ProcessName: MassImportanceProcess, will be removed!
The initial Vectors:
-7
View File
@@ -1,7 +0,0 @@
# This script may be executed from a lizard session to display
# the histogram in b02.hbook. To create the histogram and the file
# b02.hbook run exampleB02 first.
tree = tf.create ("b02.hbook", "hbook",1,0)
h = tree.findH1D("10")
hplot(h)
+5 -8
View File
@@ -1,4 +1,4 @@
# $Id: GNUmakefile,v 1.8 2003/06/20 15:32:09 dressel Exp $
# $Id: GNUmakefile,v 1.9 2004/06/18 15:59:39 daquinog Exp $
# --------------------------------------------------------------
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
# --------------------------------------------------------------
@@ -21,12 +21,9 @@ endif
.PHONY: all
all: lib bin
CPPFLAGS +=
#LDFLAGS += -L/usr/local/lib
include $(G4INSTALL)/config/binmake.gmk
CPPFLAGS += `aida-config -i`
LDFLAGS += `aida-config -l`
ifdef G4ANALYSIS_USE
CPPFLAGS += `aida-config --include`
LDFLAGS += `aida-config --lib`
endif
+25
View File
@@ -0,0 +1,25 @@
$Id: History,v 1.1 2004/06/18 16:05:17 daquinog Exp $
-------------------------------------------------------------------
=========================================================
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
=========================================================
Category History file
---------------------
This file should be used by G4 developers and category coordinators
to briefly summarize all major modifications introduced in the code
and keep track of all category-tags.
It DOES NOT substitute the CVS log-message one should put at every
committal in the CVS repository !
----------------------------------------------------------
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
Jun 18th, 2004 G.Daquino - B02-V06-01-00
- porting B02 from Anaphe (Lizard) to PI. Actually, PI 1.2.1 still DOES NOT
allow the plotting in the same way, previously set in Anaphe. Therefore the
HBOOk file produced at the end of the example still needs other packages to
be displayed. However, future PI releases could contain python modules with
this property.
@@ -1,148 +0,0 @@
#!/bin/tcsh -x
#set verbose = 0
set release = "5.0.1"
set redHat72 = "redhat72"
set redHat61 = "redhat61"
set redhat73 = "redhat73"
set gcc295 = "gcc-2.95.2"
set gcc296 = "gcc-2.96"
set gcc32 = "gcc-3.2"
set platform = "$redHat72/$gcc295" # default
set COMP = `g++ --version | tail -1`
set os = `uname`
set osVersion = `uname -r`
set unavailable = "Sorry, Anaphe $release is not available for $os, compiler $COMP"
# deal with non-Linux (= Solaris CC 5.3) first
if ($os != "Linux" && ) then
if ($os == "SunOS" && $osVersion == "5.8") then
set platform = "sun4x_58/CC-5.3"
else
echo $unavailable
exit
endif
endif
# Linux next. Find Redhat/SuSE flavours
set is61 = "no"
if { grep "6.1" /etc/issue > /dev/null } then
set is61 = "yes"
endif
set is72 = "no"
if { grep "7.2" /etc/issue > /dev/null } then
set is72 = "yes"
endif
set is73 = "no"
if { grep "7.3" /etc/issue > /dev/null } then
set is73 = "yes"
endif
set isSuSE = "no"
if { grep "SuSE" /etc/issue > /dev/null } then
set isSuSE = "yes"
endif
# Constraint: all these vars are now "yes" or "no"
# deal with SuSE
if ($isSuSE == "yes") then
echo "Found SuSE distribution"
if ($is72 == "yes") then # SuSE 7.2 is compatible with RH61
# use Red Hat 6.1 / gcc-2.95.2 for SuSE 7.2 (gcc-2.95.3)
set platform = "$redHat61/$gcc295"
else
echo "Unknown version of SuSE - please report to HepLib.Support@cern.ch"
echo "/etc/issue contains:"
cat /etc/issue
exit
endif
endif
# deal with non-SuSE - assumed to be Red Hat (but might be wrong..!)
if ($isSuSE == "no") then
# first deal with Red Hat 6.1
if ($is61 == "yes") then
if ($COMP == "gcc-2.96") then
echo $unavailable
exit
else if ($COMP == "2.95.2") then
set platform = "redhat61/gcc-2.95.2"
else
set platform = "redhat61/egcs_1.1.2" # assumption!
endif
endif
# now deal with Red Hat 7.2
if ($is72 == "yes") then
if ($COMP == "gcc-2.96") then
echo $unavailable
exit
else if ($COMP == "2.95.2") then
set platform = "redhat72/gcc-2.95.2"
else
set platform = "redhat72/gcc-3.2" # assumption!
endif
endif
# finally deal with Red Hat 7.3
else if ($is73 == "yes") then
if ( $COMP == "gcc-2.96" ) then
echo $unavailable
exit
else if ( $COMP == "gcc-2.95.2" ) then
set platform = "redhat73/gcc-2.95.2"
else
set platform = "redhat73/gcc-3.2" # assumption!
endif
endif
else
echo $unavailable
endif
setenv PLATF $platform
if ($?AIDA_DIR == 0) then
setenv AIDA_DIR /afs/cern.ch/sw/contrib/AIDA/3.0/src/cpp
endif
if ($?ANAPHETOP == 0) then
setenv ANAPHETOP /afs/cern.ch/sw/lhcxx
endif
# add to PATH and LD_LIBRARY_PATH, but only if not already present ...
set pubDom = "${ANAPHETOP}/specific/${PLATF}/PublicDomainPackages/2.0.0"
if ( { echo $PATH | grep $pubDom } == 0 ) then
setenv PATH "${pubDom}/bin:${PATH}"
endif
if ( $?LD_LIBRARY_PATH == 0 ) then
setenv LD_LIBRARY_PATH "${pubDom}/lib"
else if ( { echo $LD_LIBRARY_PATH | grep $pubDom } == 0 ) then
setenv LD_LIBRARY_PATH "${pubDom}/lib:${LD_LIBRARY_PATH}"
endif
set releaseDirectory = "${ANAPHETOP}/specific/${PLATF}/${release}"
if ( { echo $PATH | grep $releaseDirectory } == 0 ) then
setenv PATH "${releaseDirectory}/bin:${PATH}"
endif
if ( { echo $LD_LIBRARY_PATH | grep $releaseDirectory } == 0 ) then
setenv LD_LIBRARY_PATH "${releaseDirectory}/lib:${LD_LIBRARY_PATH}"
endif
if ( $?GRACE_HOME == 0 ) then
setenv GRACE_HOME "${pubDom}/grace"
endif
if ( { echo $PATH | grep $GRACE_HOME } == 0 ) then
setenv PATH "${GRACE_HOME}/bin:${PATH}"
endif
+63
View File
@@ -0,0 +1,63 @@
#!/bin/tcsh -x
#set verbose = 0
if (${?PI_BASE_DIR} == 1) then
setenv PI_VERSION 1_2_1
setenv PI_VER 1.2.1
setenv PLATF rh73_gcc32
setenv PATH ${PATH}:${PI_BASE_DIR}/${PI_VER}/app/releases/PI/PI_${PI_VER}/${PLATF}/bin
setenv PATH ${PI_BASE_DIR}/Linux-g++/bin:$PATH
eval `aida-config -r csh`
#
# python from PI
#
setenv PYTHONVERSION 2.2
setenv PYTHON_INCLUDE_DIR ${PI_BASE_DIR}/${PI_VER}/external/Python/2.2.2/${PLATF}/include/python${PYTHONVERSION}
setenv PYTHON_LIB_DIR ${PI_BASE_DIR}/${PI_VER}/external/Python/2.2.2/${PLATF}/lib/python${PYTHONVERSION}/config
#
# python for PI
if (${?PYTHONPATH} == 0) then
setenv PYTHONPATH
endif
setenv PYTHONPATH ${PI_BASE_DIR}/Linux-g++/python:$PYTHONPATH
setenv PYTHONPATH ${PI_BASE_DIR}/${PI_VER}/app/releases/SEAL/SEAL_1_3_4/${PLATF}/lib:$PYTHONPATH
#
#
else # not using PI
echo "-- WARNING: histograms are not activated !"
echo " Either PI_BASE_DIR are not set."
#
if ( ${?PYTHONVERSION} == 1 && \
${?PYTHON_BASE_DIR} == 1 && \
${?CLHEP_BASE_DIR} == 1) then # settings without PI
setenv PYTHON_LIB_DIR ${PYTHON_BASE_DIR}/lib/python${PYTHONVERSION}/config
setenv PYTHON_INCLUDE_DIR ${PYTHON_BASE_DIR}/include/python${PYTHONVERSION}
#
if ( ! -d $PYTHON_LIB_DIR ) then
echo -- ERROR: no pyhton lib/config directory: $PYTHON_LIB_DIR
endif
if ( ! -d $PYTHON_INCLUDE_DIR ) then
echo -- ERROR: no pyhton include directory: $PYTHON_INCLUDE_DIR
endif
else # environment not completed in case no PI is used
echo "-- ERROR: PYTHONVERSION or PYTHON_BASE_DIR or CLHEP_BASE_DIR not set!" exit
endif
endif # end settings for not using PI
if ( ${?LD_LIBRARY_PATH} == 0 ) then
setenv LD_LIBRARY_PATH
endif
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${G4WORKDIR}/lib/${G4SYSTEM}
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${PYTHON_LIB_DIR}
setenv LD_LIBRARY_PATH ${PI_BASE_DIR}/${PI_VER}/app/releases/SEAL/SEAL_1_3_4/rh73_gcc32/lib:$LD_LIBRARY_PATH
setenv LD_LIBRARY_PATH /afs/cern.ch/sw/lcg/external/Python/2.2.2/rh73_gcc32/lib:$LD_LIBRARY_PATH
setenv LD_LIBRARY_PATH ${PI_BASE_DIR}/${PI_VER}/external/Boost/1.30.2/rh73_gcc32/lib:$LD_LIBRARY_PATH
if (${?PYTHONPATH} == 0) then
setenv PYTHONPATH
endif
setenv PYTHONPATH ${PYTHONPATH}:${LD_LIBRARY_PATH}
@@ -8,13 +8,13 @@
# This example needs python2.2 http://www.python.org or later.
#
# This script may be used without or with ANAPHE e.g. lizard.
# Without lizard: just execute this file.
# With lizard: start lizard and than do
# This script may be used without or with PI.
# Without python: just execute this file.
# With python: start python2.2 and then do
# execfile("B03RunApplication.py")
import string
from PyAida import *
execfile("B03Application.py")
#executing the application could be done "by hand"
@@ -27,19 +27,17 @@ Bapp.setupSampler()
Bapp.run(30)
# using lizard and ANAPHE to create a histogram
# check if lizrd is loaded by looking for the af instance of the AnalysisFactory
if 'af' in dir():
tr = tf.create()
hf = af.createHistogramFactory(tr)
n = Bapp.nevents
minm = int(min(Bapp.messurements))-0.5
maxm = int(max(Bapp.messurements)+1)+0.5
h = hf.createHistogram1D ("10","Tracks entering in " +
'%(n)d' % vars() +
" events",30, minm, maxm)
for v in Bapp.messurements:
h.fill(v)
hplot(h)
# using PI to create a histogram
if 'af' in dir():
tr = tf.create("TracksEntering.hbook","hbook")
hf = af.createHistogramFactory(tr)
n = Bapp.nevents
minm = int(min(Bapp.messurements))-0.5
maxm = int(max(Bapp.messurements)+1)+0.5
h = hf.createHistogram1D ("10","Tracks entering in " + '%(n)d' % vars() + " events",30, minm, maxm)
for v in Bapp.messurements:
h.fill(v)
# hplot(h)
tr.commit()
tr.close()
+18 -12
View File
@@ -1,23 +1,21 @@
# $Id: GNUmakefile,v 1.11 2003/06/30 16:40:27 dressel Exp $
# $Id: GNUmakefile,v 1.12 2004/06/20 17:26:13 daquinog Exp $
# --------------------------------------------------------------
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
# --------------------------------------------------------------
#
# The variable PYTHON_DIR has to be setup. See ../README.
# The variable PI_BASE_DIR has to be setup. See ../README.
#
name := exampleB03
G4TARGET := $(name)
G4EXLIB := true
ifndef G4INSTALL
G4INSTALL = ../../..
endif
include $(G4INSTALL)/config/architecture.gmk
SWIGINC = include/B03App.i
SWIGCC = src/B03App_wrap.cc
SWIGD = $(G4WORKDIR)/tmp/$(G4SYSTEM)/exampleB03/B03App_wrap.d
@@ -26,27 +24,29 @@ SWIGSO = $(G4WORKDIR)/tmp/$(G4SYSTEM)/exampleB03/_B03App.so
moduleName = B03App
MYLIBS = $(subst -l$(name),,$(LDLIBS))
SWIG = $(ANAPHETOP)/specific/$(PLATF)/PublicDomainPackages/2.0.0/bin/swig-1.3.15
SWIG = ${SWIG_BASE_DIR}/bin/swig-${SWIGVERSION}
.PHONY: all
.PHONY: clean_all all
all: $(SWIGD) $(SWIGCC) lib $(SWIGSO) bin
CPPFLAGS += -I$(ANAPHETOP)/specific/$(PLATF)/PublicDomainPackages/2.0.0/include/python$(PYTHON_VERSION)
CPPFLAGS += -I${PI_BASE_DIR}/${PI_VER}/external/Python/2.2.2/${PLATF}/include/python${PYTHONVERSION}
CXXFLAGS += -w
LDFLAGS += \
-L$(ANAPHETOP)/specific/$(PLATF)/PublicDomainPackages/2.0.0/lib/python$(PYTHON_VERSION)/config \
-L${PI_BASE_DIR}/${PI_VER}/external/Python/2.2.2/${PLATF}/lib/python${PYTHONVERSION}/config \
-L/lib \
-lnsl -ldl -lreadline /lib/libtermcap.so.2 -lieee -lpthread -lutil -lexampleB03 -lpython$(PYTHON_VERSION)
-lnsl -ldl -lreadline /lib/libtermcap.so.2 -lieee -lpthread -lutil -lexampleB03 -lpython$(PYTHONVERSION)
include $(G4INSTALL)/config/binmake.gmk
ifdef G4ANALYSIS_USE
CPPFLAGS += `aida-config --include`
LDFLAGS += `aida-config --lib`
endif
$(SWIGSO): $(objectfilesWrapper)
@echo Creating shared library: $@
$(CXX) -Wl,-soname,$(@F) -shared $(LDFLAGS) $(objectfilesWrapper) $(MYLIBS) -lc -o $(SWIGSO)
@@ -60,6 +60,12 @@ ${G4WORKDIR}/tmp/${G4SYSTEM}/$(name):
@mkdir ${G4WORKDIR}/tmp/${G4SYSTEM}/$(name)
clean_all: clean
@rm -f B03App.pyc
@rm B03App.py
@rm src/B03App_wrap.cc
#libdir = $(G4WORKDIR)/tmp/$(G4SYSTEM)/$(name)
#objectfiles = $(shell /bin/ls $(G4WORKDIR)/tmp/$(G4SYSTEM)/$(name)/*.o)
#_B03App.so:
+26
View File
@@ -0,0 +1,26 @@
$Id: History,v 1.1 2004/06/20 17:26:14 daquinog Exp $
-------------------------------------------------------------------
=========================================================
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
=========================================================
Category History file
---------------------
This file should be used by G4 developers and category coordinators
to briefly summarize all major modifications introduced in the code
and keep track of all category-tags.
It DOES NOT substitute the CVS log-message one should put at every
committal in the CVS repository !
----------------------------------------------------------
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
Jun 20th, 2004 G.Daquino - B03-V06-01-00
- porting B03 from Anaphe (Lizard) to PI. Actually, PI 1.2.1 still DOES NOT
allow the plotting in the same way, previously set in Anaphe. Therefore the
HBOOk file produced at the end of the example still needs other packages to
be displayed. However, future PI releases could contain python modules with
this property.
README file has been updated accordingly.
+73
View File
@@ -0,0 +1,73 @@
# #Id: setupPI.csh,v 1.6 2004/06/19 17:22:46 daquinog Exp $
# -------------------------------------------------------------------
# GEANT4 tag $Name: geant4-06-02 $
# -------------------------------------------------------------------
# before sourcing this script make sure you have set the
# environment variables according to the description in README
# setting in case PI and analysis is used
if (${?PI_BASE_DIR} == 1) then
setenv PI_VERSION 1_2_1
setenv PI_VER 1.2.1
setenv PLATF rh73_gcc32
setenv PATH ${PATH}:${PI_BASE_DIR}/${PI_VER}/app/releases/PI/PI_${PI_VER}/${PLATF}/bin
setenv PATH ${PI_BASE_DIR}/Linux-g++/bin:$PATH
eval `aida-config -r csh`
#
# python from PI
#
setenv PYTHONVERSION 2.2
setenv PYTHON_INCLUDE_DIR ${PI_BASE_DIR}/${PI_VER}/external/Python/2.2.2/${PLATF}/include/python${PYTHONVERSION}
setenv PYTHON_LIB_DIR ${PI_BASE_DIR}/${PI_VER}/external/Python/2.2.2/${PLATF}/lib/python${PYTHONVERSION}/config
#
# python for PI
if (${?PYTHONPATH} == 0) then
setenv PYTHONPATH
endif
setenv PYTHONPATH ${PI_BASE_DIR}/Linux-g++/python:$PYTHONPATH
setenv PYTHONPATH ${PI_BASE_DIR}/${PI_VER}/app/releases/SEAL/SEAL_1_3_4/${PLATF}/lib:$PYTHONPATH
#
# SWIG settings
setenv SWIGVERSION 1.3.15
#
else # not using PI
echo "-- WARNING: histograms are not activated !"
echo " Either PI_BASE_DIR are not set."
#
if ( ${?PYTHONVERSION} == 1 && \
${?PYTHON_BASE_DIR} == 1 && \
${?SWIG_BASE_DIR} == 1 && \
${?SWIG_VERSION} == 1 && \
${?CLHEP_BASE_DIR} == 1) then # settings without PI
setenv PYTHON_LIB_DIR ${PYTHON_BASE_DIR}/lib/python${PYTHONVERSION}/config
setenv PYTHON_INCLUDE_DIR ${PYTHON_BASE_DIR}/include/python${PYTHONVERSION}
#
if ( ! -d $PYTHON_LIB_DIR ) then
echo -- ERROR: no pyhton lib/config directory: $PYTHON_LIB_DIR
endif
if ( ! -d $PYTHON_INCLUDE_DIR ) then
echo -- ERROR: no pyhton include directory: $PYTHON_INCLUDE_DIR
endif
else # environment not completed in case no PI is used
echo "-- ERROR: PYTHONVERSION or PYTHON_BASE_DIR or CLHEP_BASE_DIR or SWIG_VERSION or SWIG_BASE_DIR not set!"
exit
endif
endif # end settings for not using PI
#
if ( ${?LD_LIBRARY_PATH} == 0 ) then
setenv LD_LIBRARY_PATH
endif
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${G4WORKDIR}/lib/${G4SYSTEM}:${G4WORKDIR}/tmp/${G4SYSTEM}/exampleB03
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${PYTHON_LIB_DIR}
setenv LD_LIBRARY_PATH ${PI_BASE_DIR}/${PI_VER}/app/releases/SEAL/SEAL_1_3_4/rh73_gcc32/lib:$LD_LIBRARY_PATH
setenv LD_LIBRARY_PATH /afs/cern.ch/sw/lcg/external/Python/2.2.2/rh73_gcc32/lib:$LD_LIBRARY_PATH
setenv LD_LIBRARY_PATH ${PI_BASE_DIR}/${PI_VER}/external/Boost/1.30.2/rh73_gcc32/lib:$LD_LIBRARY_PATH
setenv B03_BASE `pwd`
if (${?PYTHONPATH} == 0) then
setenv PYTHONPATH
endif
setenv PYTHONPATH ${PYTHONPATH}:${LD_LIBRARY_PATH}
setenv PYTHONPATH ${PYTHONPATH}:${B03_BASE}
+4 -1
View File
@@ -1,4 +1,4 @@
$Id: History,v 1.27 2003/08/25 12:33:52 dressel Exp $
$Id: History,v 1.28 2004/06/21 09:28:04 gcosmo Exp $
-------------------------------------------------------------------
=========================================================
@@ -17,6 +17,9 @@ committal in the CVS repository !
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
Jun 21st, 2004 G. Daquino - exbiasing-V06-01-00
- Ported B02 and B03 to AIDA 3.2.1 and PI 1.2.1.
Jul 31th, 2003 M. Dressel - exbiasing-V05-02-02
- added weight window example to B01
+31 -59
View File
@@ -58,7 +58,7 @@ importance of the current volumes.
Further information:
--------------------
Short description of importance sampling and scoring:
http://dressel.home.cern.ch/dressel/biasscore/Sampling.html
http://cern.ch/geant4/working_groups/geometry/biasing/Sampling.html
Example B01
===========
@@ -89,90 +89,62 @@ the scoring. In this example one scorer creates a histogram.
Compiling and running
---------------------
To compile this example you need AIDA 3.0 installed. To link
Can be compiled and executed on a RedHat-7.3 system with gcc-3.2.3
compiler and the tcsh shell.
To compile this example you need AIDA 3.2.1 installed. To link
and run it you need a AIDA compliant analysis package. The
GNUmakefile of this example shows how to use Anaphe as analysis
package.
The following list shows what to do if you are at CERN using rehat73
and gcc-3.2 and the tcsh:
1) set the following variables (for example):
setenv ANAPHETOP /afs/cern.ch/sw/lhcxx
(or if installed in opt: /opt/Anaphe/5.0.5)
setenv AIDA_DIR /afs/cern.ch/sw/contrib/AIDA/3.0/src/cpp
(or if installed in opt: /opt/AIDA/3.0.0/3.0.0/AIDA/3.0/src/cpp)
2) Source the script:
source $ANAPHETOP/share/LHCXX/5.0.5/scripts/setupAnaphe.csh
This should set the LD_LIBRARY_PATH and the PATH environment to find the
lizrd executable and Anaphe libraries and header files.
It also sets the environment variable PLATF.
3) and add to lirary path the following directories:
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${G4WORKDIR}/lib/${G4SYSTEM}:${G4WORKDIR}/tmp/${G4SYSTEM}/exampleB02
GNUmakefile of this example shows how to use AIDA through PI as
analysis interface.
Histograms are saved in HBOOK format. It can be displayed with PAW or
compatible packages.
You need to set the following variables in your environment:
"G4ANALYSIS_USE"
"PI_BASE_DIR" (where PI has been installed)
Finally, source the script setupPI.csh.
Now you should be able to run gmake and to run exampleB02.
The example stores the plot in the file b02.hbook.
To look at the histogram using lizard you also may use Anaphe 5.0.5
http://anaphe.web.cern.ch/anaphe/index2.html.
Files in B02:
B02plot.py: a simple script that may be executed from a lizzard session
to show the plot created by running the exampleB02.
To look at the histogram using lizard you also may use PI 1.2.1
http://cern.ch/PI.
Example B03
===========
This example uses Geant4 and in particular importance sampling and
scoring through python. It creates a simple histogram. It's ment
scoring through python. It creates a simple histogram. It's meant
to demonstrate how to use a customized scorer and importance sampling
in combination with a scripting language, python.
Geant4 code is executed from a python session. Therefore, swig is used
to create python shadow classes and to generate the code necessary to
use the Geant4 libraries from a python session.
For simplicity it is recommended to use Anaphe. Anaphe comes with
python and swig installations.
See http://anaphe.web.cern.ch/
It can be built and run using PI: http://cern.ch/PI.
At the end a histogram called "trackentering.hbook" is created and can be
displayed using standard packages (such as PAW).
Building, compiling and running
-------------------------------
Follow similar steps as for example B02. If you already have
the environment set up for example B02 jump to point 3 below:
You need to set the following variables in your environment:
"G4ANALYSIS_USE"
"PI_BASE_DIR" (where PI has been installed)
"SWIG_BASE_DIR" (where SWIG 1.3.15 has been installed)
Finally source the script setupPI.csh.
1) set the following variables (for example):
setenv ANAPHETOP /afs/cern.ch/sw/lhcxx
(or if installed in opt: /opt/Anaphe/5.0.5)
setenv AIDA_DIR /afs/cern.ch/sw/contrib/AIDA/3.0/src/cpp
(or if installed in opt: /opt/AIDA/3.0.0/3.0.0/AIDA/3.0/src/cpp)
2) Source the script:
source $ANAPHETOP/share/LHCXX/5.0.5/scripts/setupAnaphe.csh
3) and add to lirary path the following directories:
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${G4WORKDIR}/lib/${G4SYSTEM}:${G4WORKDIR}/tmp/${G4SYSTEM}/exampleB03
====
setenv PYTHONPATH $LD_LIBRARY_PATH
4) setenv PYTHON_VERSION 2.2
You may run gmake now.
You should be able to execute the file B03RunApplication.py from your
You may run gmake now.
You should be able to execute the file B03RunApplication.py from your
shell or from a lizard session now.
The histogram is displayed only if the script is beeing ran
from lizard.
At the moment the plotting is not available using a python script, but
it is planned in future releases. A histogram is created and later displayed
using standard analysis packages.
Files in B03;
B03Application.py: Is a example class utilizing importance sampling
and scoring using python.
B03RunApplication.py: Is a python script running the example.
It may be executed from the shell or in a python or lizard
session. In case it is executed from lizard it creates a plot
with a histogram.
It may be executed from the shell or in a python session.
B03App.py: Is created by swig using swig.
TracksEntering.hbook:
It is the histogram file created by running B03RunApplication.py