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
+359 -220
View File
@@ -18,9 +18,9 @@
# you may fetch it yourself from your nearest archive site.)
#
# $Id: Configure,v 1.49 2004/02/09 14:58:45 stesting Exp $
# $Id: Configure,v 1.60 2004/06/29 09:33:29 stesting Exp $
#
# Generated on Mon Feb 9 15:57:09 CET 2004 [metaconfig 3.0 PL70]
# Generated on Tue Jun 29 11:27:51 CEST 2004 [metaconfig 3.0 PL70]
cat >/tmp/c1$$ <<EOF
WARNING!!!!!
@@ -166,10 +166,12 @@ g4bin=''
g4lib=''
g4tmp=''
g4data=''
g4elasticdata=''
g4ledata=''
g4levelgammadata=''
g4neutronhpcrosssections=''
g4radioactivedata=''
clhep_dirs=''
g4clhep_base_dir=''
g4clhep_include_dir=''
g4clhep_lib=''
@@ -178,10 +180,6 @@ g4global=''
g4granular=''
g4lib_use_granular=''
g4debug=''
g4lib_build_shared=''
g4lib_build_static=''
g4lib_use_shared=''
g4lib_use_static=''
g4ui_build_gag_session=''
g4ui_build_terminal_session=''
g4ui_build_win32_session=''
@@ -1644,7 +1642,16 @@ case "$g4compiler" in
g4compiler=CC
;;
'WIN32')
g4compiler=VC
g4compiler=VC7
clcompiler=`( cl 1>/dev/null || echo "ERROR: There is no 'cl' compiler.") 2>&1`
case $clcompiler in
*"Version 12"*) g4compiler=VC
;;
*"Version 13"*) g4compiler=VC7
;;
*) g4compiler=VC7
;;
esac
;;
'Darwin')
g4compiler=g++
@@ -2392,10 +2399,15 @@ esac
case "$g4install" in
'')
if [ X$HOME = X/ ] ; then
if test $g4system = "WIN32-VC" -o $g4system = "WIN32-VC7"; then
g4install="c:/geant4"
else
if [ X"$HOME" = X/ ] ; then
HOME=""
fi
g4install=$HOME/geant4
g4install="$HOME"/geant4
fi
# Check for Windows!
if test $g4system = "WIN32-VC" -o $g4system = "WIN32-VC7"; then
@@ -2496,6 +2508,12 @@ case "$g4lib" in
;;
esac
#case "$g4bin" in
#'')
# g4bin=$g4workdir/bin
# ;;
#esac
while test 1 = 1 ; do
g4message=`cat << EOM
@@ -2585,6 +2603,12 @@ case "$g4neutronhpcrosssections" in
;;
esac
case "$g4elasticdata" in
'')
g4elasticdata=$g4data/Elastic
;;
esac
while test 1 = 1 ; do
g4message=`cat << EOM
@@ -2599,6 +2623,8 @@ Please, specify directories where the Geant4 data is installed:
4) NeutronHPCrossSections: $g4neutronhpcrosssections
5) G4ELASTICDATA: $g4elasticdata
To modify default settings, select number above (e.g. 2)
EOM`
@@ -2640,6 +2666,15 @@ gans=$ans
. ./getfile
g4neutronhpcrosssections=$ans
;;
5)
dflt=$g4elasticdata
fn='f~'
rp="Where is G4ELASTICDATA installed?"
. ./getfile
g4elasticdata=$ans
;;
# [eE])
# break
# ;;
@@ -2839,211 +2874,6 @@ gans=$ans
esac
done
if test "X$g4clhep_base_dir" = "X/usr" -o "X$g4clhep_base_dir" = "X/usr/local"; then
g4clhep_base_dir=""
fi
if test "X$g4clhep_include_dir" = "X/usr/include" -o "X$g4clhep_include_dir" = "X/usr/local/include"; then
g4clhep_include_dir=""
fi
if test "X$g4clhep_lib_dir" = "X/usr/lib" -o "X$g4clhep_lib_dir" = "X/usr/local/lib"; then
g4clhep_lib_dir=""
fi
echo " "
case "$g4global" in
'')
g4global=n
;;
esac
echo " "
# By default it's 'grabular'!
case "$g4granular" in
'')
g4granular=y
;;
esac
echo " "
# Will be set (if needed) in GNUmakefile!
case "$g4lib_use_granular" in
'')
g4lib_use_granular=y
;;
esac
#
# Ask about g4global - default "(empty)".
#
echo ""
while test 1 = 1 ; do
g4message=`cat << EOM
Do you want to build 'global' compound libraries?
EOM`
dflt=$g4global
rp=$g4message
. ./myread
gans=$ans
case $gans in
n*|N*)
g4global=n
g4granular=y
g4lib_use_granular=y
break
;;
y*|Y*)
g4global=y
# Shoud be comment out to keep settings from config.sh - not now to keep as in release
g4granular=n
# Shoud be comment out to keep settings from config.sh - not now to keep as in release
g4lib_use_granular=n
break
;;
# [eE])
# break
# ;;
# *)
# echo " "
# break
# ;;
esac
done
if [ X$g4global = Xy ] ; then
#
# Ask about g4granular - default "n".
#
echo ""
while test 1 = 1 ; do
g4message=`cat << EOM
Granular libraries are used by defaults, you asked to build global
compound libraries. Do you want to build 'granular' libraries too?
EOM`
dflt=$g4granular
rp=$g4message
. ./myread
gans=$ans
case $gans in
n*|N*)
g4granular=n
break
;;
y*|Y*)
g4granular=y
break
;;
# [eE])
# break
# ;;
# *)
# echo " "
# break
# ;;
esac
done
if [ X$g4granular = Xy ] ; then
#
# Ask about g4lib_use_granular - default "n".
#
echo ""
while test 1 = 1 ; do
g4message=`cat << EOM
Global libraries are used by defaults, you asked to build global
compound libraries and granular libraries.
Do you want to use 'granular' libraries instead?
EOM`
dflt=$g4lib_use_granular
rp=$g4message
. ./myread
gans=$ans
case $gans in
n*|N*)
g4lib_use_granular=n
break
;;
y*|Y*)
g4lib_use_granular=y
break
;;
# [eE])
# break
# ;;
# *)
# echo " "
# break
# ;;
esac
done
fi
fi
### End file - without will be problem! Check in others...
echo " "
case "$g4debug" in
'')
g4debug=""
;;
esac
#
# Ask about g4debug - default "(empty)".
#
echo ""
while test 1 = 1 ; do
g4message=`cat << EOM
Do you want to compile libraries in DEBUG mode (-g)?
EOM`
dflt="n"
rp=$g4message
. ./myread
gans=$ans
case $gans in
n*|N*)
break
;;
y*|Y*)
g4debug=1
break
;;
# [eE])
# break
# ;;
# *)
# echo " "
# break
# ;;
esac
done
echo " "
@@ -3077,12 +2907,117 @@ case "$g4lib_use_static" in
;;
esac
case "$g4lib_build_dll" in
'')
g4lib_build_dll=n
;;
esac
case "$g4lib_build_dyn" in
'')
g4lib_build_dyn=n
;;
esac
#
# Ask about building of SHARED|STATIC libraries - default STATIC.
#
echo ""
if test "X$g4system" != "XWIN32-VC" -a "X$g4system" != "XWIN32-VC7"; then
if test "X$g4system" = "XWIN32-VC" -o "X$g4system" = "XWIN32-VC7"; then
while test 1 = 1 ; do
g4message=`cat << EOM
By default 'static' libraries are built.
Do you want to build DLL (.dll) libraries?
EOM`
dflt=$g4lib_build_dll
rp=$g4message
. ./myread
gans=$ans
case $gans in
n*|N*)
g4lib_build_dll=n
g4lib_build_shared=n
g4lib_build_static=y
break
;;
y*|Y*)
g4lib_build_dll=y
g4lib_build_shared=n
g4lib_build_static=n
# g4lib_build_static=""
# g4lib_use_shared=1
# g4lib_use_static=""
break
;;
# [eE])
# break
# ;;
# *)
# echo " "
# break
# ;;
esac
done
fi
###############################################
if test "X$g4system" = "XDarwin-g++" ; then
while test 1 = 1 ; do
g4message=`cat << EOM
By default 'static' libraries are built.
Do you want to build dynamic libraries?
EOM`
dflt=$g4lib_build_dyn
rp=$g4message
. ./myread
gans=$ans
case $gans in
n*|N*)
g4lib_build_dyn=n
g4lib_build_shared=n
g4lib_build_static=y
break
;;
y*|Y*)
g4lib_build_dyn=y
g4lib_build_shared=n
g4lib_build_static=n
# g4lib_build_static=""
# g4lib_use_shared=1
# g4lib_use_static=""
break
;;
# [eE])
# break
# ;;
# *)
# echo " "
# break
# ;;
esac
done
fi
if test "X$g4system" != "XWIN32-VC" -a "X$g4system" != "XWIN32-VC7" -a "X$g4system" != "XDarwin-g++" ; then
while test 1 = 1 ; do
@@ -3212,6 +3147,212 @@ done
fi
fi # if !Win
echo " "
case "$g4global" in
'')
g4global=n
;;
esac
echo " "
# By default it's 'grabular'!
case "$g4granular" in
'')
g4granular=y
;;
esac
echo " "
# Will be set (if needed) in GNUmakefile!
case "$g4lib_use_granular" in
'')
g4lib_use_granular=y
;;
esac
if test \( \( "X$g4system" = "XWIN32-VC" -o "X$g4system" = "XWIN32-VC7" \) -a "X$g4lib_build_dll" = "Xy" \) -o \( "X$g4system" = "XDarwin-g++" -a "X$g4lib_build_dyn" = "Xy" \) ; then
g4global=n
g4granular=n
g4lib_use_granular=n
fi
if test \( "X$g4system" != "XWIN32-VC" -a "X$g4system" != "XWIN32-VC7" -a "X$g4system" != "XDarwin-g++" \) -o \( \( "X$g4system" = "XWIN32-VC" -o "X$g4system" = "XWIN32-VC7" \) -a "X$g4lib_build_dll" = "Xn" \) -o \( "X$g4system" = "XDarwin-g++" -a "X$g4lib_build_dyn" = "Xn" \) ; then
#
# Ask about g4global - default "(empty)".
#
echo ""
while test 1 = 1 ; do
g4message=`cat << EOM
Do you want to build 'global' compound libraries?
EOM`
dflt=$g4global
rp=$g4message
. ./myread
gans=$ans
case $gans in
n*|N*)
g4global=n
g4granular=y
g4lib_use_granular=y
break
;;
y*|Y*)
g4global=y
# Shoud be comment out to keep settings from config.sh - not now to keep as in release
g4granular=n
# Shoud be comment out to keep settings from config.sh - not now to keep as in release
g4lib_use_granular=n
break
;;
# [eE])
# break
# ;;
# *)
# echo " "
# break
# ;;
esac
done
if [ X$g4global = Xy ] ; then
#
# Ask about g4granular - default "n".
#
echo ""
while test 1 = 1 ; do
g4message=`cat << EOM
Granular libraries are used by defaults, you asked to build global
compound libraries. Do you want to build 'granular' libraries too?
EOM`
dflt=$g4granular
rp=$g4message
. ./myread
gans=$ans
case $gans in
n*|N*)
g4granular=n
break
;;
y*|Y*)
g4granular=y
break
;;
# [eE])
# break
# ;;
# *)
# echo " "
# break
# ;;
esac
done
if [ X$g4granular = Xy ] ; then
#
# Ask about g4lib_use_granular - default "n".
#
echo ""
while test 1 = 1 ; do
g4message=`cat << EOM
Global libraries are used by defaults, you asked to build global
compound libraries and granular libraries.
Do you want to use 'granular' libraries instead?
EOM`
dflt=$g4lib_use_granular
rp=$g4message
. ./myread
gans=$ans
case $gans in
n*|N*)
g4lib_use_granular=n
break
;;
y*|Y*)
g4lib_use_granular=y
break
;;
# [eE])
# break
# ;;
# *)
# echo " "
# break
# ;;
esac
done
fi
fi
fi # !Win
### End file - without will be problem! Check in others...
echo " "
case "$g4debug" in
'')
g4debug=""
;;
esac
#
# Ask about g4debug - default "(empty)".
#
echo ""
while test 1 = 1 ; do
g4message=`cat << EOM
Do you want to compile libraries in DEBUG mode (-g)?
EOM`
dflt="n"
rp=$g4message
. ./myread
gans=$ans
case $gans in
n*|N*)
break
;;
y*|Y*)
g4debug=1
break
;;
# [eE])
# break
# ;;
# *)
# echo " "
# break
# ;;
esac
done
echo " "
case "$g4make" in
@@ -4355,6 +4496,7 @@ State='$State'
c='$c'
cf_by='$cf_by'
cf_time='$cf_time'
clhep_dirs='$clhep_dirs'
contains='$contains'
d_portable='$d_portable'
eunicefix='$eunicefix'
@@ -4372,6 +4514,7 @@ g4compiler='$g4compiler'
g4conf='$g4conf'
g4data='$g4data'
g4debug='$g4debug'
g4elasticdata='$g4elasticdata'
g4global='$g4global'
g4granular='$g4granular'
g4include='$g4include'
@@ -4380,11 +4523,7 @@ g4install='$g4install'
g4ledata='$g4ledata'
g4levelgammadata='$g4levelgammadata'
g4lib='$g4lib'
g4lib_build_shared='$g4lib_build_shared'
g4lib_build_static='$g4lib_build_static'
g4lib_use_granular='$g4lib_use_granular'
g4lib_use_shared='$g4lib_use_shared'
g4lib_use_static='$g4lib_use_static'
g4make='$g4make'
g4neutronhpcrosssections='$g4neutronhpcrosssections'
g4osname='$g4osname'
@@ -4461,7 +4600,7 @@ echo "CONFIG=true" >> $g4conf/config.sh
: propagate old symbols
if $test -f .config/UU/config.sh; then
<.config/UU/config.sh sort | uniq >.config/UU/oldconfig.sh
sed -n 's/^\([a-zA-Z_0-9]*\)=.*/\1/p' config.sh config.sh .config/UU/oldconfig.sh |\
sed -n 's/^\([a-zA-Z_0-9]*\)=.*/\1/p' $g4conf/config.sh $g4conf/config.sh .config/UU/oldconfig.sh |\
sort | uniq -u >.config/UU/oldsyms
set X `cat .config/UU/oldsyms`
shift
+903
View File
@@ -0,0 +1,903 @@
<HTML>
<HEAD>
<TITLE>Geant4 6.2 Release Notes</TITLE>
</HEAD>
<BODY BGCOLOR='F0F0F0'>
<P> </P>
<BR>
<P> </P>
<P ALIGN="Center">
<FONT SIZE="+4" COLOR="#238E23">
<B>Geant4 6.2 Release Notes</B>
</FONT>
<TABLE WIDTH="100%">
<TR><TD ALIGN="Right">
<FONT SIZE="-1" COLOR="#5C3317">
<B><I>June 25<SUP>th</SUP>, 2004</I></B>
</FONT>
</TD></TR>
</TABLE>
<BR><BR>
<HR ALIGN="Center" SIZE="7%">
<P>
The code and binary libraries for the supported systems are available
through our <A TARGET="ext" HREF="http://cern.ch/geant4">Source Code Web page</A>.
</P>
<P>
Please refer to the
<A TARGET="ext" HREF="http://cern.ch/geant4/G4UsersDocuments/Overview/html">Geant4
User Documentation</A> for further information about using Geant4.
</P>
<H2><I>Contents</I></H2>
<OL>
<LI><A HREF="#1.">Supported and Tested Platforms</A></LI>
<LI><A HREF="#2.">AIDA and CLHEP</A></LI>
<LI><A HREF="#3.">Compiler Specific Problems</A></LI>
<LI><A HREF="#4.">Known Run-Time Problems</A></LI>
<LI><A HREF="#5.">Compilation Warnings</A></LI>
<LI><A HREF="#6.">Known Run-Time Warnings</A></LI>
<LI><A HREF="#7.">Major items for migration of user code</A></LI>
<LI><A HREF="#8.">Detailed list of changes and fixes</A></LI>
</OL>
<P> </P>
<A NAME="1."></a>
<HR>
<!-- ============================================== -->
<H2>1. Supported and Tested Platforms</H2>
Official platforms:
<UL>
<LI>SUN Solaris 5.8, C++ CC-5.4 Patch 111715-02.</LI>
<LI>Linux, gcc 3.2.3.<BR>
This configuration was tested with the RedHat 7.3 distribution,
versions of Geant4 have also been compiled successfully on other
Linux distributions, like Debian, Suse or more recent RedHat systems.
The default RedHat compiler gcc-2.96 distributed in RedHat 7.X is NOT
supported. It has been verified that it produces incorrect binaries,
therefore is not reliable. See also <A HREF="#note-1">note below</A>.</LI>
<LI>Windows/XP and CygWin Tools with: Visual C++ 7.1 .NET</LI>
</UL>
More verified configurations:
<UL>
<LI>SUN Solaris 5.8, C++ CC-5.5.</LI>
<LI>Linux, gcc 3.3.3.</LI>
<LI>Linux, Intel-icc 8.0.</LI>
<LI>MacOS 10.3, gcc-3.3</LI>
</UL>
More verified configurations, which we plan to stop supporting
in releases or patches after November 2004:
<UL>
<LI>Linux, gcc 2.95.2.</LI>
<LI>Windows/2000 and CygWin Tools, Visual C++ 6.0 Service Pack 5</LI>
</UL>
Platforms configured but not tested and not supported:
<UL>
<LI>AIX 4.3.2, xlC 6.0</LI>
<LI>DEC V4.0, cxx C++ V6.1-027</LI>
<LI>HP 10.20, aCC C++ B3910B A.01.23</LI>
<LI>SGI V6.5.5, CC 7.2.1</LI>
</UL>
<P> </P>
<A NAME="2."></A>
<HR>
<!-- ============================================== -->
<H2>2. AIDA and CLHEP</H2>
Geant4 6.2 requires the <A TARGET="ext"
HREF="http://cern.ch/clhep/INSTALLATION/clhep.html">installation
of CLHEP</A>.<BR>
Tests have been performed with <B>CLHEP-1.8.1.0</B><BR>
<P> </P>
Geant4 6.2 examples with histogramming cowork with AIDA 3.2.1
implementations. These include:
<UL>
<LI><A TARGET="ext" HREF="http://cern.ch/PI">PI</A> and included components</LI>
<LI><A TARGET="ext" HREF="http://jas.freehep.org">JAS (Java Analysis Studio)</A></LI>
<LI><A TARGET="ext" HREF="http://www.lal.in2p3.fr/OpenScientist">Open Scientist</A></LI>
</UL>
AIDA headers can be downloaded from:
<A TARGET="ext" HREF="http://aida.freehep.org">http://aida.freehep.org</A>
<P> </P>
<A NAME="3."></A>
<HR>
<!-- ============================================== -->
<H2>3. Compiler Specific Problems</H2>
<UL>
<LI><A NAME="note-1"><B>Linux Red Hat 7.X, gcc-2.96</B></A>.
<UL>
<LI>The default compiler distributed by Red Hat since release 7.0 is
NOT supported and not considered reliable for running a Geant4-based
application. In more than one test case, binaries produced by gcc-2.96
have shown incorrect behavior, either due to wrong order of
initialisation of static data in memory or to bugs in the system
<TT>iostream</TT> classes, problems which apparently have all been
solved in more recent versions of the compiler (3.X series).<BR>
For information, gcc-2.96 is a compiler that has never been
officially released, nor supported by the GNU team itself and is not
considered reliable by the authors (for more information, see also
<A TARGET="ext" HREF="http://gcc.gnu.org/gcc-2.96.html">http://gcc.gnu.org/gcc-2.96.html</A>).</LI>
</UL></LI>
</UL>
<P> </P>
<A NAME="4."></A>
<HR>
<!-- ============================================== -->
<H2>4. Known Run-Time Problems and Limitations</H2>
For a complete list of outstanding run-time problems and to submit any
problem you may find running this version of Geant4, please refer to the
<A TARGET="ext" HREF="http://cern.ch/geant4/problemreport">Geant4 Problem Reporting
System</A>.
<P> </P>
<A NAME="5."></A>
<HR>
<!-- ============================================== -->
<H2>5. Compilation Warnings</H2>
There may be compilation warnings on some platforms. We do not believe
that any will lead to incorrect run-time behaviour.
<P> </P>
<A NAME="6."></A>
<HR>
<!-- ============================================== -->
<H2>6. Known Run-Time Warnings</H2>
The following message can be written to error output while tracking.
We believe it does not give rise to incorrect behaviour.
<PRE>
G4PropagateInField: Warning: Particle is looping
- tracking in field will be stopped.
It has performed 1000 steps in Field while a maximum of 1000
are allowed.
</PRE>
<P> </P>
<A NAME="7."></A>
<HR>
<!-- ============================================== -->
<H2>7. Major items for migration of user code</H2>
There're not known migrations necessary if upgrading from release 6.1,
other than recompilation and/or reinstallation of libraries and user
applications.
<P> </P>
<B>Future migration for <TT>G4VParticleChange</TT> class</B>
<P> </P>
For the future releases, an interface change to the class
<TT>G4VParticleChange</TT> is foreseen. The required changes are already
implemented in this release while still keeping valid the old interface.<BR>
The following methods will be removed in the future:
<PRE>
void SetTrueStepLength(G4double truePathLength);
void SetLocalEnergyDeposit(G4double anEnergyPart);
G4TrackStatus GetStatusChange() const;
void SetStatusChange(G4TrackStatus status);
void SetSteppingControl(G4SteppingControl StepControlFlag);
void SetParentWeight(G4double);
</PRE>
They will have to be replaced by the following methods, respectively:
<PRE>
void ProposeTrueStepLength(G4double truePathLength);
void ProposeLocalEnergyDeposit(G4double anEnergyPart);
G4TrackStatus GetTrackStatus() const;
void ProposeTrackStatus(G4TrackStatus status);
void ProposeSteppingControl(G4SteppingControl StepControlFlag);
void ProposeParentWeight(G4double);
</PRE>
<P> </P>
<B>Future migration for <TT>G4GeneralParticleSource</TT> class</B>
<P> </P>
A 'tree-structured' command format is implemented in this release for
<TT>G4GeneralParticleSource</TT>. The old UI commands have been kept
for backward compatibility but will be removed in the future.<BR>
For more information, please consult:
<A HREF="http://reat.space.qinetiq.com/gps">http://reat.space.qinetiq.com/gps</A>.
<P> </P>
<A NAME="8."></A>
<HR>
<!-- ============================================== -->
<H2>8. Detailed list of changes and fixes</H2>
These are the main new features/fixes included in this release since the
last patched public release (for the detailed list of fixes/additions,
please refer to the related History files provided in most packages):
<P> </P>
<A NAME="conf-notes">
<H3><I>Configuration</I></H3></A>
<UL>
<LI><TT>Configure</TT> script:
<UL>
<LI>Added support for global DLL libraries on Windows systems.</LI>
<LI>Added new data-set for elastic-scattering data.</LI>
</UL></LI>
<LI><TT>source/GNUmakefile</TT>:
<UL>
<LI>Revised order of module installation according to dependencies.</LI>
<LI>New <TT>dll</TT> target for building of DLLs global libraries
on Windows systems.</LI>
</UL></LI>
<LI><TT>Linux-g++.gmk</TT>:
<UL>
<LI>Made -O2 optimisation the default.</LI>
<LI>Included (deactivated by default) Pentium4 chip specific options
for using chips-specific floating-point arithmetics based on the
SSE unit.</LI>
</UL></LI>
<LI><TT>WIN32-VC7.gmk</TT>:
<UL>
<LI>Added setup for WIN32-VC7 for building of DLLs.</LI>
</UL></LI>
<LI><TT>Darwin-g++.gmk</TT>:
<UL>
<LI>Corrected options to build shared libraries (.dyn); use
twolevel_namespace and GLOBLIBS for shared-libs build on MacOS.
Shared-libs build are possible only global libraries.</LI>
<LI>Corrected options to retrieve Motif.</LI>
</UL></LI>
<LI><TT>architecture.gmk</TT>:
<UL>
<LI>Added check for definition of LDFLAGS. Fixes bug report #603.</LI>
<LI>Revisited Inventor default. Removed HEPVis dependencies
(Inventor visualization driver no longer needs these).</LI>
</UL></LI>
<LI><TT>binmake.gmk</TT>:
<UL>
<LI>Activated shared-libs mechanism for Windows platforms; forced creation
of static library for examples/applications for the usage with DLLs.</LI>
<LI>Fixed problem for WIN32 such that also LDLIBS (including EXTRALIBS)
will be mangled to replace -L by its WIN32 corresponding libpath.</LI>
<LI>Added include paths to new hadronic models.</LI>
<LI>Restored global library for 'interfaces' module which was missing from
the linking list.</LI>
</UL></LI>
<LI><TT>common.gmk</TT>, <TT>globlib.gmk</TT>:
<UL>
<LI>Fixed clean/clean_libs target.</LI>
</UL></LI>
</UL>
<A NAME="dgt-notes">
<H3><I>Digitization & Hits</I></H3></A>
<UL>
<LI><TT>G4SDManager</TT>, <TT>G4SDStructure</TT>: added optional argument
<I>warning</I> to <TT>FindSensitiveDetector(pathName, warning)</TT>,
defaulted to <TT>true</TT>, to eventually exclude warning issued by
<TT>G4SDManager</TT> when sensitive detector is not found.</LI>
</UL>
<A NAME="evt-notes">
<H3><I>Event</I></H3></A>
<UL>
<LI>Design iteration of the <TT>G4GeneralParticleSource</TT> class:
<UL>
<LI>New classes have been added.<BR>
See <A HREF="http://reat.space.qinetiq.com/gps">http://reat.space.qinetiq.com/gps</A>
for more details of the changes.</LI>
<LI>New formula for converting integral spectrum to differential one.</LI>
</UL></LI>
<LI><TT>G4EventManager</TT>:
<UL>
<LI>Added access methods to <TT>G4TrackingManager</TT> and
<TT>G4StackManager</TT>.</LI>
<LI>Fixed incorrect behaviour of event abortion requested by
<TT>BeginOfEventAction()</TT>.</LI>
</UL></LI>
</UL>
<A NAME="emlow-notes">
<H3><I>Electromagnetic Processes (Low-energy)</I></H3></A>
<UL>
<LI>First iteration towards new models for photoelectric angular distribution:
design iteration and re-implementation of non-polarized Sauter-Gavrila
distribution (K-shell approximation).</LI>
<LI>New model for PIXE.</LI>
<LI>Bug fix for Barkas effect.</LI>
<LI>Bug fix in energy loss concerning positrons handled by Penelope.</LI>
</UL>
<A NAME="emstd-notes">
<H3><I>Electromagnetic Processes (Standard)</I></H3></A>
<UL>
<LI><TT>G4VEnergyLoss</TT> and related classes:
<UL>
<LI>Corrected error in retrieving <TT>dE/dx</TT> from tables
(it affected proton around <TT>1 MeV</TT>).</LI>
<LI>Fixed a problem in retrieving physics tables from files. </LI>
<LI>Fixed a problem of energy below <TT>lowestKinEnergy</TT> (simulation of
energy loss of low energy particles in low density gases).</LI>
<LI>Improved sampling in integral method for cross sections with peaks.</LI>
<LI>Added new methods to define simulation options to
<TT>G4EmProcessOptions</TT>.</LI>
<LI>Revised printout format in <TT>G4VEnergyLossProcess</TT>.</LI>
</UL></LI>
<LI>Energy-loss fluctuations:
<UL>
<LI>Reduced area of applicability of the model for simulation of
fluctuations at very small steps to provide less step dependent
results in solid absorbers.</LI>
<LI>Smoothed out sampling of Gaussian fluctuations, when sigma is much
bigger than energy loss.</LI>
</UL>
The purpose of both changes is to provide results that are less dependent
on step size. For example, for steps down to 0.1 microns (in solid materials)
the energy deposition distribution in a thin absorber is not dependent on the
step limit.</LI>
<LI>Ionization for muons, hadrons, ions:
<UL>
<LI>Set the integral method to be the default (it already was for electrons).
The step remains limited to 20% of the current range, as in Geant4 5.2.</LI>
</UL></LI>
<LI>Multiple Scattering:
<UL>
<LI>Changes in <TT>G4MscModel</TT>: <TT>t->z</TT> and <TT>z->t</TT>
transformations (true length to geometrical length and back) have
been rewritten. The purpose is to reduce the step-size dependence of
results, which was mainly connected with simulation of multiple
scattering of low energy particles. It will affect the resolution
of sampling calorimeters.</LI>
<LI>Change in the angular distribution for <TT>e+/e-</TT>: correction
to the Highland formula for the central part of the distribution.</LI>
</UL></LI>
<LI>Multiple Scattering for ions:
<UL>
<LI>Use dynamic charge for simulation of multiple scattering angle.</LI>
<LI>Fix to avoid crash in case of use of <TT>G4hLowEnergyIonisation</TT>
for ions together with multiple-scattering.</LI>
</UL></LI>
<LI>Muon Pair Production:
<UL>
<LI>Minor fix in differential cross section: use total energy instead
of kinetic energy.</LI>
<LI>Fixed minor energy non-conservation (electron mass).</LI>
<LI>Fixed problem of calculation of maximum energy transfer to an
atom of compound materials.</LI>
</UL></LI>
<LI>PAI ionisation:
<UL>
<LI>Introduced new model <TT>G4PAIPhotonModel</TT>, PAI model that splits
the cross-section into electron and photon parts.</LI>
<LI>Removed limitations on cut values in both PAI models.</LI>
<LI>Use precise integrator for initialisation of PAI models.</LI>
</UL></LI>
</UL>
<A NAME="gen-notes">
<H3><I>General Processes, Parameterisation, Cuts, Decay, Optical</I></H3></A>
<UL>
<LI><B>Cuts</B>:
<UL>
<LI>Enabled the user to retrieve from a file tables with materials and
couples which are in a different order to that in memory.<BR>
Modified <TT>G4ProductionCutsTable::RetrieveCutsTable()</TT> to enable this.</LI>
<LI><TT>G4ProductionCuts</TT>: moved usage of statics in inline functions
to non-inline for porting to DLLs on Windows.</LI>
</UL></LI>
<LI><B>Decay</B>:
<UL>
<LI>Use new interface methods of <TT>G4VParticleChange</TT>.</LI>
</UL></LI>
<LI><B>Management</B>:
<UL>
<LI>Fixed bug in <TT>G4ProcessManager::RemoveProcess()</TT> for the case
when the process to be removed is inactive.</LI>
</UL></LI>
<LI><B>Optical</B>:
<UL>
<LI>Fixes in <TT>G4OpBoundaryProcess</TT> for default class member
assignments in <TT>DoIt()</TT> method.</LI>
<LI>Added protection against NULL pointers in <TT>G4OpRayleigh</TT> process.
Do not overwrite Rayleigh scattering length for 'Water' material if it
has been specified by the user through a call to
<TT>AddProperty("RAYLEIGH"...)</TT>.</LI>
</UL></LI>
</UL>
<A NAME="geo-notes">
<H3><I>Geometry</I></H3></A>
<UL>
<LI><B>Divisions</B>
<UL>
<LI>Added support for reflection of divided volumes:
added concrete istance of division-factory <TT>G4PVDivisionFactory</TT>
for the creation of volume divisions on demand.</LI>
</UL></LI>
<LI><B>Management</B>
<UL>
<LI>Imported <TT>G4ReflectedSolid</TT> class from <TT>solids/Boolean</TT>.</LI>
<LI>Added abstract factory <TT>G4VPVDivisionFactory</TT> defining interfaces
for the creation of volumes divisions.</LI>
</UL></LI>
<LI><B>Navigation</B>
<UL>
<LI>Added more verbosity on solids response for navigators (optimised/not
optimised) if "check_mode" state is combined with verbose level-1.</LI>
<LI>Added check to <TT>G4Navigator</TT> to count the number of steps with
zero length and issue an exception aborting the event for tracks that
get stuck in a loop. A corrective action is attempted after 10
consecutive zero steps; the exception is thrown after 25 consecutive
zero steps.</LI>
</UL></LI>
<LI><B>Solids</B>
<UL>
<LI><I>Boolean solids</I>:
<UL>
<LI>Moved <TT>G4ReflectedSolid</TT> class to <TT>management</TT> module.</LI>
<LI>Moved <TT>G4ReflectionFactory</TT> class to <TT>volumes</TT> module.</LI>
<LI>Moved unit test for reflection to <TT>volumes</TT> module.</LI>
</UL></LI>
<LI><I>Specific solids</I>:
<UL>
<LI>First implementation of a framework for twisted surfaces:<BR>
includes a new specific twisted shape: <TT>G4TwistedTubs</TT>.<BR>
New classes: <TT>G4VSurface</TT>, <TT>G4TwistedSurface</TT>,
<TT>G4HyperbolicSurface</TT>, <TT>G4FlatSurface</TT>,
<TT>G4TwistedTubs</TT>.</LI>
</UL></LI>
</UL></LI>
<LI><B>Volumes</B>
<UL>
<LI><TT>G4LogicalBorderSurface</TT>, <TT>G4LogicalSkinSurface</TT>: added
<TT>CleanSurfaceTable()</TT> static methods for the clearing of the
surface tables in case of dynamic geometries.</LI>
<LI>Imported <TT>G4ReflectionFactory</TT> from module <TT>solids/Boolean</TT>.</LI>
<LI>Enhanced <TT>G4ReflectionFactory</TT> to support reflection of divided
volumes: added <TT>Divide(...)</TT> set of methods.</LI>
<LI>Adopt DLLIMPORT/EXPORT technique to handle extern simbols for
allowing support of DLLs on Windows.</LI>
</UL></LI>
</UL>
<A NAME="glob-notes">
<H3><I>Global</I></H3></A>
<UL>
<LI><TT>G4Allocator</TT>: added utility methods for explicitely deallocate
storage and print total allocated pages size:
<TT>ResetStorage()</TT>, <TT>GetAllocatedSize()</TT>.</LI>
<LI>HEPNumerics: fixed bug in <TT>G4DataInterpolation::PolynomInterpolation()</TT>
for indexing in a for-loop.</LI>
<LI>Added support for building DLLs on Windows: added macros for importing
symbols and migrated <TT>G4ios</TT> and <TT>G4strstreambuf</TT>.</LI>
</UL>
<A NAME="greps-notes">
<H3><I>Graphical Representations</I></H3></A>
<UL>
<LI>Implemented constructor and destructor for <TT>G4AttDefStore</TT>, to
properly delete objects in the static map, allocated through explicit
calls to <TT>GetInstance()</TT>. Made <TT>G4AttDefStore</TT> a singleton.</LI>
</UL>
<A NAME="mat-notes">
<H3><I>Materials</I></H3></A>
<UL>
<LI><TT>G4SandiaTable</TT>: added new methods for sorting algorithm
in PAI model.</LI>
<LI>Added new utility method <TT>ConstPropertyExists(const char * key)</TT>
returning <TT>true</TT>/<TT>false</TT> according to the existance of the
'key' in the table <TT>G4MaterialPropertiesTable</TT>.</LI>
</UL>
<A NAME="had-notes">
<H3><I>Hadronic Processes</I></H3></A>
<UL>
<LI>New packages and models:
<UL>
<LI><I>Ablation</I>: model for evaporation (used in conjunction with
the abrasion code).</LI>
<LI><I>Abrasion</I>: package for ion reactions.</LI>
<LI><I>EM dissociation</I>.</LI>
<LI><I>Coherent_elastic</I>: new model for high energy elastic scattering,
requiring a new provided data set for elasting scattering data.</LI>
</UL></LI>
<LI>cross_sections:
<UL>
<LI>Removed discontinuities in pion scattering data.</LI>
<LI>Fix in high energy p-H cross-sections (G3 legacy bug).</LI>
</UL></LI>
<LI>management:
<UL>
<LI>Optionally killing of primaries, steerable from use code.</LI>
<LI>Bug fix for cross-section biasing.</LI>
<LI>Added protection to hadronic processes against illegal track
status.</LI>
</UL></LI>
<LI>util:
<UL>
<LI>Added a fuzzy initializer class.</LI>
<LI>Added a Besselfunction class.</LI>
<LI>Fixed two rare bugs seen by LHCb in <TT>G4HadFinalState</TT> that
lead to an exception.</LI>
</UL></LI>
<LI>models/binary_cascade:
<UL>
<LI>Some performance optimizations.</LI>
<LI>Corrected rotation in inverse kinematics for light ion
reaction code.</LI>
<LI>Added some protections fixing problems reported in bug-reports
#574 and #593.
<LI>Bug fix related to bug report #607.</LI>
</UL></LI>
<LI>models/cascade:
<UL>
<LI>Fixed memory leak.
</UL></LI>
<LI>models/chiral_invariant_phase_space:
<UL>
<LI>Fixed <TT>ppK+</TT> "antistrange below mass shell" problem in
<TT>G4QEnvironment</TT>.</LI>
<LI>Minor bug fixes in <TT>G4QEnvironment</TT> in (Sigma-)2n final state.</LI>
<LI>Fixed rare problem of decay in <TT>Del+Del+</TT> with <TT>pi0</TT> when
<TT>pi-</TT> was found.</LI>
<LI>Minor bug fix in final multibaryon spit (<TT>3n->n+n+n</TT>).</LI>
</UL>
<LI>models/de_excitation/fermi-break-up:
<UL>
<LI>Bug fix in the splitting probabilities.</LI>
<LI>Adding destruction of configurations.</LI>
</UL></LI>
<LI>models/de_excitation/photon-evaporation:
<UL>
<LI>Slight optimisation of E1 probabilities.</LI>
</UL></LI>
<LI>models/high_energy:
<UL>
<LI>Re-added class-descriptions.</LI>
</UL></LI>
<LI>models/im_r_matrix:
<UL>
<LI>Some optimizations in <TT>G4Scatterer</TT>.</LI>
</UL></LI>
<LI>models/management:
<UL>
<LI>Protections for rounding issues.</LI>
<LI>Enabling user overload of some methods.</LI>
</UL></LI>
<LI>models/neutron_hp:
<UL>
<LI>Some code clean-up.</LI>
<LI>Now suitable for DLL usage.</LI>
</UL></LI>
<LI>models/pre_equilibrium:
<UL>
<LI>Dixed updating of charged/neutral excited particles.</LI>
</UL></LI>
<LI>models/util:
<UL>
<LI>Optimized initialization for <TT>G4Fancy3DNucleus</TT>.</LI>
<LI>Fix in decay routines for decays involving broad resonances
in the final state.</LI>
</UL></LI>
</UL>
<A NAME="part-notes">
<H3><I>Particles</I></H3></A>
<UL>
<LI>Adopt DLLIMPORT/EXPORT technique to handle extern simbols for DLLs.
Modified granular <TT>GNUmakefile</TT>s and rearranged usage of extern
symbols in classes in <TT>management</TT> module.</LI>
</UL>
<A NAME="run-notes">
<H3><I>Run, Intercoms and Interfaces</I></H3></A>
<UL>
<LI><B>Intercoms</B>:
<UL>
<LI>Introduced static methods in <TT>G4UIcommand</TT> class for conversion
between a string and a value. Some implementation of derived classes
are modified accordingly. Introduced utility methods
<TT>ConvertToStringWithBestUnit()</TT> and
<TT>ConvertToStringWithDefaultUnit()</TT> for command classes taking a
unit parameter.</LI>
</UL></LI>
<LI><B>Interfaces</B>:
<UL>
<LI><TT>G4[UI]Win32</TT>: implemented changes to allow usage of
standard C main (and avoid WinMain). Moved usage of inline methods
to non-inline for DLLs support on Windows.</LI>
</UL></LI>
<LI><B>Run</B>:
<UL>
<LI><TT>G4RunManagerKernel</TT>: added access methods to
<TT>G4TrackingManager</TT> and <TT>G4StackManager</TT>.</LI>
<LI>Adopt DLLIMPORT/EXPORT technique to handle extern simbols for DLLs.
Modified <TT>GNUmakefile</TT> and rearranged usage of extern symbols in
<TT>G4Run</TT>.</LI>
</UL></LI>
</UL>
<A NAME="track-notes">
<H3><I>Track and Tracking</I></H3></A>
<UL>
<LI><B>Track</B>
<UL>
<LI>G4VParticleChange: added new methods <TT>ProposeXXX()</TT> (and
corresponding <TT>GetXXX()</TT> methods) as replacement for old
<TT>SetXXXChange()</TT> and <TT>GetXXXChange()</TT>, now obsolete.</LI>
<LI><TT>G4ParticleChangeForLoss</TT>: fixed minor energy non-conservation
problem in case of more than 1 processes changing the energy.
Fixed initialization of <TT>ParentWeight</TT>.</LI>
<LI>Adopt DLLIMPORT/EXPORT technique to handle extern simbols for DLLs.
Modified <TT>GNUmakefile</TT> and rearranged usage of extern symbols in
<TT>G4Track</TT>.</LI>
</UL></LI>
<LI><B>Tracking</B>
<UL>
<LI>Adopt DLLIMPORT/EXPORT technique to handle extern simbols for
DLLs. Modified <TT>GNUmakefile</TT> and rearranged usage of extern
symbols in classes.</LI>
</UL></LI>
</UL>
<A NAME="vis-notes">
<H3><I>Visualization</I></H3></A>
<UL>
<LI><B>HepRep</B>
<UL>
<LI>Renamed zlib prefix from <TT>z_</TT> to <TT>heprep_z_</TT>.
Added symbol <TT>z_errmsg</TT> to list for renaming to avoid conflicts
with other programs who contain a copy of zlib.</LI>
<LI>Added attributes for Region and root-Region to both HepRep drivers.</LI>
<LI>Added ability to separately write geometry files.</LI>
<LI>Bug fix: copied new interfaces for HepRep, which uses fewer pointers.</LI>
<LI>Added initial viewpoint settings and a command to set the coordinate
system.</LI>
</UL></LI>
<LI><B>OpenGL</B>
<UL>
<LI>Added <TT>G4OpenGL.hh</TT> wrapper file and adapted code to encapsulate
inclusion of <TT>GL/gl.h</TT> and <TT>GL/glu.h</TT> that may be platform
dependent. Cleared WIN32 ifdefs no longer necessary.</LI>
</UL></LI>
<LI><B>OpenInventor</B>
<UL>
<LI>Added copy of the few necessary HEPVis code. HEPVis module dependency
is now no more needed.</LI>
<LI>Ported code to run on Windows systems.</LI>
<LI>Split Viewer to have <TT>G4OpenInventorXtViewer</TT> and
<TT>G4OpenInventorWinViewer</TT>.</LI>
<LI>Split <TT>G4OpenInventor</TT> to have <TT>G4OpenInventorXt</TT> and
<TT>G4OpenInventorWin</TT>: Xt and Win to follow the conventions found
in the OpenInventor environment.</LI>
</UL></LI>
<LI><B>RayTracer</B>
<UL>
<LI>Adopt DLLIMPORT/EXPORT technique to handle extern simbols for
allowing support of DLLs on Windows.</LI>
</UL></LI>
<LI><B>VRML</B>
<UL>
<LI>Fixed typo in printout in <TT>G4VRML[1/2]FileSceneHandler</TT>.</LI>
</UL></LI>
</UL>
<A NAME="data-notes">
<H3><I>Data sets</I></H3></A>
<UL>
<LI>New data set for elastic-scattering data at high-energies
(above 1-GeV) for the <I>coherent_elastic</I> hadronic model.</LI>
</UL>
<A NAME="emlst-notes">
<H3><I>Electromagnetic physics-lists</I></H3></A>
<UL>
<LI>New module with samples of physics list for standard electromagnetic
physics.</LI>
</UL>
<A NAME="env-notes">
<H3><I>Environments</I></H3></A>
<UL>
<LI>MOMO: new version of MOMO.jar archive including a bug-fix to GPE.</LI>
</UL>
<A NAME="g3tog4-notes">
<H3><I>G3toG4 Tool</I></H3></A>
<UL>
<LI>Removed hardwired <TT>gSeparator</TT> constant (a character which is
used during generation of volume names) to '_'. Now <TT>gSeparator</TT>
is made non constant and so can be changed in case a user wants to use
'_' in his code.</LI>
<LI><TT>G4gsrotm</TT>: commented warning about left-handled coordinates for
rotation axes.</LI>
</UL>
<A NAME="ex-notes">
<H3><I>Examples</I></H3></A>
<UL>
<LI>Updated reference outputs.</LI>
<LI><B>advanced</B>
<UL>
<LI>Implemented migration to AIDA 3.2.1</LI>
<LI><I>composite_calorimeter</I>
<UL>
<LI>Changed use of the ntuple. Mechanism simplified and the ntuple
is always correctly filled.</LI>
</UL></LI>
<LI><I>cosmicray_charging</I>
<UL>
<LI>New example illustrating an application aimed at simulating the
electrostatic charging of isolated test masses in the LISA mission
by galactic cosmic ray protons and helium nuclei.</LI>
</UL></LI>
<LI><I>hadrontherapy</I>
<UL>
<LI>New example illustrating an application simulating an hadron
therapy beam line for medical physics.</LI>
</UL></LI>
<LI><I>medical_linac</I>
<UL>
<LI>New example simulating energy deposit in a Phantom filled with
water for a typical linac used for intensity modulated radiation
therapy. The experimental set-up is very similar to one used in
clinical practice.</LI>
</UL></LI>
<LI><I>purging_magnet</I>
<UL>
<LI>New example illustrating an application that simulates electrons
traveling through a 3D magnetic field; used in a medical
environment for simulating a strong purging magnet in a treatment
head.</LI>
</UL></LI>
<LI><I>radioprotection</I>
<UL>
<LI>New example illustrating an application to evaluate the dose in
astronauts, in vehicle concepts and Moon surface habitat
configurations, in a defined interplanetary space radiation
environment.</LI>
</UL></LI>
</UL></LI>
<LI><B>extended</B>
<UL>
<LI>Implemented migration to AIDA 3.2.1</LI>
<LI><I>analysis</I>
<UL>
<LI><I>A01</I>
<UL>
<LI>Updated mac files for HepRep2 driver to set zoom factor
and coordinate system and write separate geometry.</LI>
</UL></LI>
</UL></LI>
<LI><I>electromagnetic</I>
<UL>
<LI><I>TestEm1</I>:
<UL>
<LI>PhysicsLists: removed Particles and General.</LI>
<LI>EmPhysicsList: set G4eBremsstrahlungCMS as default.</LI>
</UL></LI>
<LI><I>TestEm2</I>
<UL>
<LI>Updated PhysicsList: use concept of builders per package.</LI>
<LI>Added acceptance control.</LI>
<LI>Added histogram name and type UI commands (AIDA, ROOT, JAS,
and other output types are available).</LI>
</UL></LI>
<LI><I>TestEm3</I>
<UL>
<LI>Introduction of the class HistoManager.</LI>
<LI>Possibility to have multi-runs histogram files.</LI>
<LI>PhysicsLists: removed Particles and General.</LI>
<LI>New macro <TT>dedx.max</TT> to quickly check <TT>dE/dx</TT>
calculation.</LI>
<LI>Added acceptance check activated by UI command.</LI>
</UL></LI>
<LI><I>TestEm5</I>
<UL>
<LI>Modified HistoManager and its messenger in order to allow
for multi-run jobs.</LI>
<LI>PhysicsLists: added HadronElastic, BinaryCascade,
IonBinaryCascade. Removed Particles, General.</LI>
<LI>New macro <TT>dedx.mac</TT>.</LI>
<LI>Modified histo 7: projected position at exit.</LI>
</UL></LI>
<LI><I>TestEm7</I>
<UL>
<LI>PhysicsLists: removed Particles and General.</LI>
</UL></LI>
<LI><I>TestEm8</I>
<UL>
<LI>Updated test of PAI model.</LI>
</UL></LI>
<LI><I>TestEm9</I>
<UL>
<LI>Removed Clean of <TT>G4RegionStore</TT>, instead delete
regions one by one.</LI>
<LI>Added acceptance printout.</LI>
<LI>Added <TT>histclean</TT> target to <TT>GNUmakefile</TT>.</LI>
</UL></LI>
<LI><I>MuonProcesses</I>
<UL>
<LI>New example intended to check implementation of the processes
of muon interactions: ionization, direct (e+,e-) production,
bremsstrahlung, mu-nuclear interaction.
It allows to compute differential cross sections (as function
of the energy transfered to secondaries), total cross sections
and to compare with analytic calculations.</LI>
</UL></LI>
<LI><I>PhotonProcesses</I>
<UL>
<LI>New test devoted to the photon processes: gamma conversion,
coherent and incoherent scattering, photoelectric effect.
It allows to compute absorption coefficients and to plot
</UL></LI>
</UL></LI>
<LI><I>optical</I>
<UL>
<LI>New example <I>LXe</I> demonstrating the use of optical processes
in a multi-purpose detector setup.</LI>
</UL></LI>
<LI><I>parallel</I>
<UL>
<LI>New example <I>ExDiane</I> showing parallelisation of the
'brachytherapy' example using the DIANE framework
(see <A HREF="http://cern.ch/diane">http://cern.ch/diane</A>).</LI>
<LI>Bug fix in ParRunManager for ParN02 and ParN04 TOP-C examples.</LI>
</UL></LI>
</UL></LI>
<LI><B>novice</B>
<UL>
<LI><I>N02</I>
<UL>
<LI>Removed UI vis commands from run-action.</LI>
<LI>Code cleanup in physics-list.</LI>
<LI>Corrected definition of XenonGas in detector-contruction.</LI>
</UL></LI>
<LI><I>N03</I>
<UL>
<LI>Use G4UI_USE_WIN32 to have a default Windows GUI coworking
with the OpenGL Windows driver on Windows.</LI>
<LI>New macro <TT>exN03Vis9.mac</TT>, demo of the OpenGL Windows
driver. Update to the <TT>gui.mac</TT> menu items.</LI>
<LI>Code cleanup in physics-list.</LI>
</UL></LI>
<LI><I>N06</I>
<UL>
<LI>Change e+ energy in primary-generator to 500 keV.</LI>
<LI>Removed UI vis commands from run-action.</LI>
</UL></LI>
</UL></LI>
</UL>
<HR>
</BODY>
</HTML>
+69 -2
View File
@@ -1,5 +1,5 @@
$Id: History,v 1.238 2004/02/24 09:49:45 gcosmo Exp $
$Name: geant4-06-01 $
$Id: History,v 1.254 2004/06/23 10:56:23 gcosmo Exp $
$Name: geant4-06-02 $
-------------------------------------------------------------------
=========================================================
@@ -17,6 +17,73 @@ committal in the CVS repository !
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
23rd June 2004 Gabriele Cosmo (config-V06-01-10)
- Updated win32def.c program to fix retrivial of public static data for
building DLLs on Windows (G.Barrand).
- Updated Configure scripts.
17th June 2004 Gabriele Cosmo (config-V06-01-09)
- Darwin-g++.gmk: use twolevel_namespace and GLOBLIBS for shared-libs
build on MacOS. Shared-libs build are possible only global libraries
and requires shared-lib version of CLHEP build with compatible options
(G.Barrand).
14th June 2004 Gabriele Cosmo (config-V06-01-08)
- architecture.gmk: added specification for G4LIB_USE_DLL.
11th June 2004 Gabriele Cosmo (config-V06-01-07)
- binmake.gmk: activated shared-libs mechanism for Windows platforms;
forced creation of static library for examples/applications for the
usage with DLLs.
8th June 2004 Gabriele Cosmo (config-V06-01-06)
- binmake.gmk: restored global lib for interfaces which was missing
from linking list.
- common.gmk, globlib.gmk: fixed clean/clean_libs target.
- architecture.gmk: added definition of G4LIB_BUILD_DLL flag.
- WIN32-VC.gmk: added targets for DLLs build.
- Linux-g++.gmk: made -O2 the default optimisation mode.
Archived temporary setup Linux-gO2 introduced in "config-V06-01-01".
7th June 2004 Gabriele Cosmo (config-V06-01-05)
- Corrected setup for WIN32-VC7 for building of DLLs.
- Cosmetics in build printout...
1st June 2004 Gabriele Cosmo (config-V06-01-04)
- binmake.gmk, added include paths to new hadronic models for
abrasion, em_dissociation, de_excitation/ablation and
de_excitation/fission.
- architecture.gmk: updated comments to header.
26th May 2004 Mark Donszelmann (config-V06-01-03)
- Fixed small problem in previous fix.
26th May 2004 Gunter Folger (config-V06-01-02)
- binmake.gmk: fixed problem for WIN32 such that also LDLIBS (including
EXTRALIBS) will be mangled to replace -L by its WIN32 correspondance
libpath.
11th May 2004 Gabriele Cosmo (config-V06-01-01)
- Added new experimental setup for Linux-g++ using -O2 optimisation
as default. To trigger this setup G4SYSTEM must be set to "Linux-gO2".
It also includes (deactivated by default) Pentium4 chip specific options
for using chips-specific floating-point arithmetics based on the SSE unit.
8th April 2004 Guy Barrand
- architecture.gmk: revisited Inventor default. Removed HEPVis dependencies
(Inventor visualization driver does not need these libraries any longer).
7th April 2004 Guy Barrand
- Darwin-g++.gmk:
o Corrected options to build shared libraries (.dyn); use
"-dynamic -single_module" to have faster startup when Geant4 is
embedded in an external framework.
o Corrected options to retrieve Motif.
5th April 2004 Gabriele Cosmo (config-V06-01-00)
- architecture.gmk: added check for definition of LDFLAGS.
Fixes bug report #603.
24th February 2004 Gabriele Cosmo (config-V06-00-03)
- Fixed link rpath definition in Linux-icc.gmk.
+29 -16
View File
@@ -1,4 +1,4 @@
# $Id: architecture.gmk,v 1.91 2004/02/09 15:22:49 gunter Exp $
# $Id: architecture.gmk,v 1.99 2004/06/14 10:42:12 gcosmo Exp $
# ------------------------------------------------------------------------
# GEANT 4 - Architecture configuration script for GNU Make
#
@@ -13,11 +13,11 @@
# List of the supported architectures/compilers and related flavors for
# the environment variable G4SYSTEM:
#
# Linux-g++ Linux (Red Hat 7.3), gcc-2.95.2 or gcc-3.2 (default)
# Linux-g++ Linux (Red Hat 7.3), gcc-3.2.3 (default)
#
# SUN-CC SunOS 5.8, CC 5.4
#
# WIN32-VC Windows/2000/XP and Microsoft Visual C++ 6.0 - SP5
# WIN32-VC7 Windows/2000/XP and Microsoft Visual C++ 7.1 .NET
# Adding CYGWIN32 tools
# -------------------------------------------------------------------------
@@ -84,6 +84,18 @@ ifeq ($(G4LIB_BUILD_SHARED),)
endif
endif
# Specify if to build the DLL libraries on Windows. Default is NO.
#
ifneq ($(G4LIB_USE_DLL),)
G4LIB_BUILD_DLL = 1
CPPFLAGS += -DG4LIB_BUILD_DLL
endif
ifneq ($(G4LIB_BUILD_DLL),)
G4LIB_BUILD_DLL = 1
CPPFLAGS += -DG4LIB_BUILD_DLL
G4LIB_USE_DLL = 1
endif
# Specify if to build the G3TOG4 module or not. Default is NO.
#
ifneq ($(G4LIB_BUILD_G3TOG4),)
@@ -115,7 +127,7 @@ endif
# CLHEP path, etc.
#
ifndef CLHEP_BASE_DIR
CLHEP_BASE_DIR := /afs/cern.ch/sw/geant4/dev/CLHEP/$(G4SYSTEM)/pro
CLHEP_BASE_DIR := $(shell ls CLHEP_BASE_DIR--UNDEFINED)
endif
ifndef CLHEP_INCLUDE_DIR
CLHEP_INCLUDE_DIR := $(CLHEP_BASE_DIR)/include
@@ -151,7 +163,7 @@ ifneq (,$(findstring WIN32-VC,$(G4SYSTEM)))
OUT_LIB := '-out:'
OUT_EXE := '-Fe'
LIB_PATH := '-libpath:'
CERNLIB_PATH := "z:\p32\cern\new\df\lib"
CERNLIB_PATH := "c:\cern\pro\lib"
PATH_DEL := \\
#
# pattern for next substitution
@@ -180,11 +192,14 @@ CPPFLAGS += -I$(CLHEP_INCLUDE_DIR)
# Positional qualifiers in action...
#
ifndef LDFLAGS
LDFLAGS :=
endif
ifneq (,$(findstring WIN32-VC,$(G4SYSTEM)))
LDFLAGS := -link $(LIB_PATH)$(CLHEP_LIB_DIR)
LDFLAGS += -link $(LIB_PATH)$(CLHEP_LIB_DIR)
LOADLIBS := $(CLHEP_LIB)
else
LDFLAGS := -L$(CLHEP_LIB_DIR)
LDFLAGS += -L$(CLHEP_LIB_DIR)
LOADLIBS := -l$(CLHEP_LIB)
LOADLIBS += -lm
endif
@@ -220,21 +235,19 @@ XAWLIBS := -lXaw
# are set below. Most system-dependent code assumes OGLHOME is set.
#
# ------------- OpenInventor -----------------
# The path to the installation of HEPVis and OpenInventor must be specified
# in HEPVISDIR -only- if the packages are installed in a location different
# The path to the installation of OpenInventor must be specified
# if the package is installed in a location different
# than default system directories (like... /usr or /usr/local).
#
ifndef HEPVISINC
HEPVISINC := $(HEPVISDIR)/include
endif
ifndef HEPVISLIB
HEPVISLIB := $(HEPVISDIR)/lib
ifndef OIVHOME
OIVHOME := /usr/local/Inventor
endif
ifndef OIVFLAGS
OIVFLAGS := -I${HEPVISINC}
OIVFLAGS := -I$(OIVHOME)/include
endif
ifndef OIVLIBS
OIVLIBS := -L${HEPVISLIB} -lHEPVis -lHEPVisXt -lInventor -lInventorXt
OIVLIBS := -L$(OIVHOME)/lib -lInventorXt -lInventor
endif
# For cfront compilers the repository location is set to
+53 -28
View File
@@ -1,4 +1,4 @@
# $Id: binmake.gmk,v 1.94 2003/11/18 11:28:10 hpw Exp $
# $Id: binmake.gmk,v 1.102 2004/06/11 14:07:47 gcosmo Exp $
# ----------------------------------------------------------
# Script defining rules and paths for making binaries.
# First implementation: Gabriele Cosmo, 25/06/1998.
@@ -20,6 +20,9 @@ include $(G4INSTALL)/config/G4VIS_USE.gmk
include $(G4INSTALL)/config/interactivity.gmk
include $(G4INSTALL)/config/analysis.gmk
# Verify the existance of the global static libraries first.
# if not verify the existance of global shared libraries (Unix only).
#
ifndef G4LIB_USE_GRANULAR
GLOBALLIBS := $(shell test -f $(G4LIB)/$(G4SYSTEM)/libG4global.a && echo yes)
ifndef GLOBALLIBS
@@ -28,9 +31,14 @@ ifndef G4LIB_USE_GRANULAR
endif
endif
# Verify the existance of granular shared libraries (Unix) or global DLLs (Windows)
#
ifndef SHAREDLIBS
SHAREDLIBS := $(shell test -f $(G4LIB)/$(G4SYSTEM)/libG4globman.$(SHEXT) && echo yes)
endif
ifneq (,$(findstring WIN32-VC,$(G4SYSTEM)))
SHAREDLIBS := $(shell test -f $(G4LIB)/$(G4SYSTEM)/G4global.$(SHEXT) && echo yes)
endif
ifndef INCFLAGS
ifeq ($(G4INCLUDE_EXEC),1)
@@ -64,18 +72,15 @@ ifndef INCFLAGS
-I$(G4BASE)/processes/electromagnetic/lowenergy/include \
-I$(G4BASE)/processes/hadronic/cross_sections/include \
-I$(G4BASE)/processes/hadronic/management/include \
-I$(G4BASE)/processes/hadronic/models/abrasion/include \
-I$(G4BASE)/processes/hadronic/models/binary_cascade/include \
-I$(G4BASE)/processes/hadronic/models/cascade/cascade/include \
-I$(G4BASE)/processes/hadronic/models/cascade/evaporation/include \
-I$(G4BASE)/processes/hadronic/models/cascade/utils/include \
-I$(G4BASE)/processes/hadronic/models/chiral_inv_phase_space/body/include \
-I$(G4BASE)/processes/hadronic/models/chiral_inv_phase_space/interface/include \
-I$(G4BASE)/processes/hadronic/models/coherent_elastic/include \
-I$(G4BASE)/processes/hadronic/models/high_energy/include \
-I$(G4BASE)/processes/hadronic/models/isotope_production/include \
-I$(G4BASE)/processes/hadronic/models/leading_particle/include \
-I$(G4BASE)/processes/hadronic/models/low_energy/include \
-I$(G4BASE)/processes/hadronic/models/neutron_hp/include \
-I$(G4BASE)/processes/hadronic/models/binary_cascade/include \
-I$(G4BASE)/processes/hadronic/models/de_excitation/ablation/include \
-I$(G4BASE)/processes/hadronic/models/de_excitation/evaporation/include \
-I$(G4BASE)/processes/hadronic/models/de_excitation/fermi_breakup/include \
-I$(G4BASE)/processes/hadronic/models/de_excitation/fission/include \
@@ -85,23 +90,29 @@ ifndef INCFLAGS
-I$(G4BASE)/processes/hadronic/models/de_excitation/multifragmentation/include \
-I$(G4BASE)/processes/hadronic/models/de_excitation/photon_evaporation/include \
-I$(G4BASE)/processes/hadronic/models/de_excitation/util/include \
-I$(G4BASE)/processes/hadronic/models/inucl/include \
-I$(G4BASE)/processes/hadronic/models/photolepton_hadron/muon_nuclear/include \
-I$(G4BASE)/processes/hadronic/models/pre_equilibrium/exciton_model/include \
-I$(G4BASE)/processes/hadronic/models/quark_molecular_dynamics/body/include \
-I$(G4BASE)/processes/hadronic/models/quark_molecular_dynamics/util/include \
-I$(G4BASE)/processes/hadronic/models/relativistic_qmd/include \
-I$(G4BASE)/processes/hadronic/models/relativistic_qmd/uplusplus/include \
-I$(G4BASE)/processes/hadronic/models/em_dissociation/include \
-I$(G4BASE)/processes/hadronic/models/general_finalstate/include \
-I$(G4BASE)/processes/hadronic/models/high_energy/include \
-I$(G4BASE)/processes/hadronic/models/im_r_matrix/include \
-I$(G4BASE)/processes/hadronic/models/inucl/include \
-I$(G4BASE)/processes/hadronic/models/isotope_production/include \
-I$(G4BASE)/processes/hadronic/models/leading_particle/include \
-I$(G4BASE)/processes/hadronic/models/low_energy/include \
-I$(G4BASE)/processes/hadronic/models/management/include \
-I$(G4BASE)/processes/hadronic/models/neutron_hp/include \
-I$(G4BASE)/processes/hadronic/models/parton_string/diffraction/include \
-I$(G4BASE)/processes/hadronic/models/parton_string/hadronization/include \
-I$(G4BASE)/processes/hadronic/models/parton_string/management/include \
-I$(G4BASE)/processes/hadronic/models/parton_string/qgsm/include \
-I$(G4BASE)/processes/hadronic/models/photolepton_hadron/muon_nuclear/include \
-I$(G4BASE)/processes/hadronic/models/pre_equilibrium/exciton_model/include \
-I$(G4BASE)/processes/hadronic/models/quark_molecular_dynamics/body/include \
-I$(G4BASE)/processes/hadronic/models/quark_molecular_dynamics/util/include \
-I$(G4BASE)/processes/hadronic/models/radioactive_decay/include \
-I$(G4BASE)/processes/hadronic/models/relativistic_qmd/include \
-I$(G4BASE)/processes/hadronic/models/relativistic_qmd/uplusplus/include \
-I$(G4BASE)/processes/hadronic/models/theo_high_energy/include \
-I$(G4BASE)/processes/hadronic/models/util/include \
-I$(G4BASE)/processes/hadronic/models/general_finalstate/include \
-I$(G4BASE)/processes/hadronic/models/radioactive_decay/include \
-I$(G4BASE)/processes/hadronic/processes/include \
-I$(G4BASE)/processes/hadronic/stopping/include \
-I$(G4BASE)/processes/hadronic/util/include \
@@ -160,23 +171,32 @@ endif
#
ifndef USER_DEFINED_LDLIBS
# LDLIBS1 contains the very high level libraries...
# TARGETLIB is the library generated for the final user application...
#
ifdef G4EXLIB
LDLIBS1 := -l$(G4TARGET)
ifeq (,$(findstring WIN32-VC,$(G4SYSTEM)))
# Unix
TARGETLIB := -l$(G4TARGET)
else
# Windows
TARGETLIB := lib$(G4TARGET).a
endif
endif
LDLIBS1 += $(EXTRALIBS)
# VISLIBS and UILIBS are now handled by the granular library script...
# LDLIBS1 contains the very high level libraries...
#
LDLIBS1 := $(EXTRALIBS)
# VISLIBS (and UILIBS?) is handled by the granular library script...
#
ifdef GLOBALLIBS
LDLIBS1 += $(VISLIBS) $(UILIBS) -lG4persistency
LDLIBS2 := $(VISLIBS) -lG4interfaces -lG4persistency
ifdef G4USE_G3TOG4
LDLIBS1 += -lG3toG4
LDLIBS2 += -lG3toG4
endif
LDLIBS2 := -lG4readout \
LDLIBS2 += -lG4readout \
-lG4run \
-lG4event \
-lG4tracking \
@@ -241,13 +261,18 @@ LDLIBS_PREFINAL += $(LDLIBS4)
ifneq (,$(findstring WIN32-VC,$(G4SYSTEM)))
WIN32TMP := $(patsubst -L%,$(LIB_PATH)%,$(LDFLAGS))
LDFLAGS = $(patsubst /,$(PATH_DEL),$(WIN32TMP))
LDLIBS = $(patsubst -l%,lib%.a,$(LDLIBS_PREFINAL))
WIN32TMP2 := $(patsubst -L%,$(LIB_PATH)%,$(LDLIBS_PREFINAL))
ifdef SHAREDLIBS
LDLIBS = $(TARGETLIB) $(patsubst -l%,lib%.lib,$(WIN32TMP2))
else
LDLIBS = $(TARGETLIB) $(patsubst -l%,lib%.a,$(WIN32TMP2))
endif
else
LDLIBS = $(LDLIBS_PREFINAL)
LDLIBS = $(TARGETLIB) $(LDLIBS_PREFINAL)
endif
ifdef transform-RPath
#invoke system specific transformation of
# Invoke system specific transformation of
include $(G4INSTALL)/config/sys/$(G4SYSTEM)-runpath.gmk
endif
@@ -279,7 +304,7 @@ ifndef USER_DEFINED_LDLIBS
echo " gmake libmap"; \
exit 1; fi
else
@echo "Using global libraries."
@echo "Using global libraries ..."
endif
endif
@if [ ! -d $(G4BINDIR) ] ; then mkdir $(G4BINDIR) ;fi
@@ -339,7 +364,7 @@ $(G4TMPDIR)/exe/$(G4TARGET).d: $(G4TARGET).cc
@if [ ! -d $(G4TMP)/$(G4SYSTEM) ] ; then mkdir $(G4TMP)/$(G4SYSTEM) ;fi
@if [ ! -d $(G4TMPDIR) ] ; then mkdir $(G4TMPDIR) ;fi
@if [ ! -d $(G4TMPDIR)/exe ] ; then mkdir $(G4TMPDIR)/exe ;fi
@echo Making dependency for file $<...
@echo Making dependency for file $< ...
@set -e;\
g++ $(GPPFLAGS) $(CPPFLAGS) -w $< |\
sed 's!$(G4TARGET)\.o!$(G4TMPDIR)/exe/& $@!' >$@;\
+11 -9
View File
@@ -1,4 +1,4 @@
# $Id: common.gmk,v 1.35 2003/01/22 18:02:03 gcosmo Exp $
# $Id: common.gmk,v 1.38 2004/06/08 10:04:47 gcosmo Exp $
# ----------------------------------------------------------------
# Common part of GNUmakefile for libraries. John Allison, 5/7/95.
# ----------------------------------------------------------------
@@ -37,7 +37,7 @@ ifneq ($(G4LIB_BUILD_SHARED),)
# Make shared library.
$(G4LIBDIR)/lib$(name).$(SHEXT): $(G4TMPDIR)/obj.last
@if [ ! -d $(G4LIBDIR) ] ; then mkdir $(G4LIBDIR) ;fi
@echo Creating shared library $@
@echo Creating shared library $@ ...
@$(RM) $@
# use architecture specific macro defined in sys/$(G4SYSTEM).gmk
$(build-granular-shared-lib)
@@ -47,7 +47,7 @@ ifneq ($(G4LIB_BUILD_STATIC),)
# Make static (archive) library.
$(G4LIBDIR)/lib$(name).a: $(G4TMPDIR)/obj.last
@if [ ! -d $(G4LIBDIR) ] ; then mkdir $(G4LIBDIR) ;fi
@echo Creating/replacing object files in $(G4LIBDIR)/lib$(name).a
@echo Creating/replacing object files in $(G4LIBDIR)/lib$(name).a ...
@rm -f $(G4LIBDIR)/lib$(name).a
@$(AR) $(OUT_LIB)$(G4LIBDIR)/lib$(name).a $(G4TMPDIR)/*.o
@if [ -f /usr/bin/ranlib -o -f /bin/ranlib ] ; then ranlib $(G4LIBDIR)/lib$(name).a ;fi
@@ -130,14 +130,16 @@ ifndef G4EXLIB
clean:
@echo Cleaning up ...
@rm -f $(G4LIBDIR)/lib$(name).a
@rm -f $(G4LIBDIR)/*$(name).lib
@rm -f $(G4LIBDIR)/*$(name).exp
@rm -f $(G4LIBDIR)/lib$(name).$(SHEXT)
@rm -rf $(G4TMPDIR)
endif
clean_libs:
@if [ -f $(G4LIBDIR)/lib$(name).a ] ; then \
$(ECHO) Removing library lib$(name).a ... ; \
$(RM) -f $(G4LIBDIR)/lib$(name).a ; fi
@if [ -f $(G4LIBDIR)/lib$(name).$(SHEXT) ] ; then \
$(ECHO) Removing library lib$(name).$(SHEXT) ... ; \
$(RM) -f $(G4LIBDIR)/lib$(name).$(SHEXT) ; fi
@echo Removing library lib$(name).a ...
@rm -f $(G4LIBDIR)/*$(name).a
@echo Removing library lib$(name).$(SHEXT) ...
@rm -f $(G4LIBDIR)/*$(name).lib
@rm -f $(G4LIBDIR)/*$(name).exp
@rm -f $(G4LIBDIR)/*$(name).$(SHEXT)
+19 -10
View File
@@ -1,4 +1,4 @@
# $Id: globlib.gmk,v 1.20 2003/01/22 18:02:04 gcosmo Exp $
# $Id: globlib.gmk,v 1.24 2004/06/08 10:04:46 gcosmo Exp $
# --------------------------------------------------------------
# Script for compound libraries. Gabriele Cosmo, 25/6/98.
# --------------------------------------------------------------
@@ -40,7 +40,7 @@ ifneq ($(G4LIB_BUILD_STATIC),)
$(G4LIBDIR)/lib$(name).a: \
$(foreach dir,$(SUBLIBS),$(G4TMP)/$(G4SYSTEM)/$(dir)/obj.last)
@if [ ! -d $(G4LIBDIR) ] ; then mkdir $(G4LIBDIR) ; fi
@echo Merging object files in $(G4LIBDIR)/lib$(name).a
@echo Merging object files in $(G4LIBDIR)/lib$(name).a ...
@$(RM) $(G4LIBDIR)/lib$(name).a
#
#
@@ -79,7 +79,7 @@ endif
ifneq ($(G4LIB_BUILD_SHARED),)
$(SHARED_LIB): $(foreach dir,$(SUBLIBS),$(G4TMP)/$(G4SYSTEM)/$(dir)/obj.last)
@if [ ! -d $(G4LIBDIR) ] ; then mkdir $(G4LIBDIR) ; fi
@echo Creating global shared library $@
@echo Creating global shared library $@ ...
@$(RM) $@
# use system specific commands to build the library
$(build-global-shared-lib)
@@ -105,16 +105,25 @@ clean:
@echo Cleaning up ...
@for lib in $(SUBLIBS); do ( \
rm -rf $(G4TMP)/$(G4SYSTEM)/$$lib;\
rm -f $(G4LIBDIR)/lib$$lib.a;\
rm -f $(G4LIBDIR)/lib$$lib.$(SHEXT) );\
rm -f $(G4LIBDIR)/*$$lib.a;\
rm -f $(G4LIBDIR)/*$$lib.lib;\
rm -f $(G4LIBDIR)/*$$lib.exp;\
rm -f $(G4LIBDIR)/*$$lib.$(SHEXT) );\
done
@rm -f $(G4LIBDIR)/lib$(name).a
@rm -f $(G4LIBDIR)/*$(name).a
@rm -f $(G4LIBDIR)/*$(name).lib
@rm -f $(G4LIBDIR)/*$(name).exp
@rm -f $(G4LIBDIR)/*$(name).$(SHEXT)
clean_libs:
@echo Removing lib$(name).a/.$(SHEXT) and sub-libraries ...
@for lib in $(SUBLIBS); do ( \
rm -f $(G4LIBDIR)/lib$$lib.a;\
rm -f $(G4LIBDIR)/lib$$lib.$(SHEXT) );\
rm -f $(G4LIBDIR)/*$$lib.a;\
rm -f $(G4LIBDIR)/*$$lib.lib;\
rm -f $(G4LIBDIR)/*$$lib.exp;\
rm -f $(G4LIBDIR)/*$$lib.$(SHEXT) );\
done
@rm -f $(G4LIBDIR)/lib$(name).a
@rm -f $(G4LIBDIR)/lib$(name).$(SHEXT)
@rm -f $(G4LIBDIR)/*$(name).a
@rm -f $(G4LIBDIR)/*$(name).lib
@rm -f $(G4LIBDIR)/*$(name).exp
@rm -f $(G4LIBDIR)/*$(name).$(SHEXT)
+8 -20
View File
@@ -73,6 +73,12 @@ setenv NeutronHPCrossSections "$g4neutronhpcrosssections"
echo "On this machine the NeutronHPCrossSections=\$NeutronHPCrossSections"
endif
#+
if ( X$g4elasticdata != X ) then
setenv G4ELASTICDATA "$g4elasticdata"
echo "On this machine the G4ELASTICDATA=\$G4ELASTICDATA"
endif
#
# g4clhep.U
#
@@ -303,26 +309,8 @@ else
# Check for Windows!
if ( "X$G4SYSTEM" == "XWIN32-VC" || "X$G4SYSTEM" == "XWIN32-VC7" ) then
setenv checkdrive `echo $HOME|cut -d"/" -f2`
if ( "X$checkdrive" == "Xcygdrive" ) then
setenv windrive `echo $HOME|cut -d"/" -f3`
setenv winpath `echo $HOME|cut -d"/" -f4-`
setenv fullwinpath "$windrive:/$winpath"
setenv G4WORKDIR $fullwinpath
endif # if cygwin syntax is used
if ( "X$winpath" == "X" ) then
echo "G4WORKDIR will be set to ${G4WORKDIR}geant4 (in "native" Windows syntax)."
setenv G4WORKDIR ${G4WORKDIR}geant4
else
echo "G4WORKDIR will be set to $G4WORKDIR/geant4 (in "native" Windows syntax)."
setenv G4WORKDIR $G4WORKDIR/geant4
endif
echo "G4WORKDIR will be set to c:/geant4 (in "native" Windows syntax)."
setenv G4WORKDIR "c:/geant4"
else # if Unix
+12 -20
View File
@@ -97,6 +97,15 @@ echo "On this machine the NeutronHPCrossSections=\$NeutronHPCrossSections"
fi
fi
#+
if [ X$g4elasticdata != X ] ; then
G4ELASTICDATA="$g4elasticdata"
export G4ELASTICDATA
if [ X\$g4non_display = X ] ; then
echo "On this machine the G4ELASTICDATA=\$G4ELASTICDATA"
fi
fi
#
# g4clhep.U
#
@@ -430,26 +439,9 @@ if [ X$g4non_display = X ] ; then
# Check for Windows!
if test "X$G4SYSTEM" = "XWIN32-VC" -o "X$G4SYSTEM" = "XWIN32-VC7"; then
checkdrive=`echo $HOME|cut -d"/" -f2`
if test "X$checkdrive" = "Xcygdrive"; then
windrive=`echo $HOME|cut -d"/" -f3`
winpath=`echo $HOME|cut -d"/" -f4-`
fullwinpath="$windrive:/$winpath"
G4WORKDIR=$fullwinpath
fi # if cygwin syntax is used
if test "X$winpath" = "X"; then
echo "G4WORKDIR will be set to ${G4WORKDIR}geant4 (in "native" Windows syntax)"
export G4WORKDIR=${G4WORKDIR}geant4
else
echo "G4WORKDIR will be set to $G4WORKDIR/geant4 (in "native" Windows syntax)"
export G4WORKDIR=${G4WORKDIR}/geant4
fi
echo "G4WORKDIR will be set to c:/geant4 (in "native" Windows syntax)"
G4WORKDIR="c:/geant4"
export G4WORKDIR
else # if Unix
+55 -14
View File
@@ -60,6 +60,12 @@ export G4LIB
echo "On this machine the G4LIB=\$G4LIB"
fi
#+
if [ X$g4lib != X ] ; then
G4BIN="$g4lib/../bin"
export G4BIN
fi
#+
if [ X$g4levelgammadata != X ] ; then
G4LEVELGAMMADATA="$g4levelgammadata"
@@ -88,6 +94,13 @@ export NeutronHPCrossSections
echo "On this machine the NeutronHPCrossSections=\$NeutronHPCrossSections"
fi
#+
if [ X$g4elasticdata != X ] ; then
G4ELASTICDATA="$g4elasticdata"
export G4ELASTICDATA
echo "On this machine the G4ELASTICDATA=\$g4elasticdata"
fi
#
# g4clhep.U
#
@@ -335,8 +348,6 @@ fi
#####################################################################
echo g4conf=$g4conf
#####################################################################
# Create GNUmakefile.db to keep ALL GNUmakefile DB :)
@@ -371,26 +382,56 @@ rm -rf $g4conf/g4make.log
$g4make 2>&1 | tee $g4conf/g4make.log
fi
# Check for errors in log file
export err=\$[ \`grep Error $g4conf/g4make.log | wc -w\` ]
export int=\$[ \`grep Stop\. $g4conf/g4make.log | wc -w\` ]
# echo err=\$err
if [ X$g4lib_build_dll = Xy ] ; then
echo ""
rm -rf $g4conf/g4make.log
$g4make dll 2>&1 | tee $g4conf/g4make.log
fi
if [ X\$err = X0 -a X\$int = X0 ] ; then
if [ X$g4lib_build_dyn = Xy ] ; then
echo ""
rm -rf $g4conf/g4make.log
$g4make global G4LIB_BUILD_SHARED=1 2>&1 | tee $g4conf/g4make.log
fi
# Check for errors in log file
if test -f \$g4conf/g4make.log ; then
# There are two (at least) shells 'sh' and 'bash' with
# different arithmetic expansion...So we are doing it by 'text'
# in two steps...
err=\`grep Error $g4conf/g4make.log | wc -w\`
int=\`grep Stop\. $g4conf/g4make.log | wc -w\`
err2=\`echo \$err\`
int2=\`echo \$int\`
if [ X\$err2 = X0 -a X\$int2 = X0 ] ; then
echo ""
echo "####################################################"
echo "# Your Geant4 installation seems to be successful! #"
echo "# To be sure please have a look into the log file: #"
echo "# $g4conf/g4make.log #"
echo "# Your Geant4 installation seems to be successful! "
echo "# To be sure please have a look into the log file: "
echo "# $g4conf/g4make.log "
echo "####################################################"
echo ""
else
echo ""
echo "############################################################"
echo "# It looks like you had errors during Geant4 installation #"
echo "# (or interrupted installation)! #"
echo "# Please check log file: #"
echo "# $g4conf/g4make.log #"
echo "# It looks like you had errors during Geant4 installation "
echo "# (or interrupted installation)! "
echo "# Please check log file: "
echo "# $g4conf/g4make.log "
echo "############################################################"
echo ""
fi
else
echo ""
echo "############################################################"
echo "# It looks like you had errors during Geant4 installation "
echo "# (or interrupted installation)! "
echo "# You have no log file: "
echo "# $g4conf/g4make.log "
echo "############################################################"
echo ""
fi
+12 -12
View File
@@ -35,12 +35,6 @@ ifeq ($(G4SYSTEM),Darwin-g++)
FCFLAGS += -pg
CCFLAGS += -pg
endif
ifdef G4LIB_BUILD_SHARED
CXXFLAGS += -fPIC
FCFLAGS += -fPIC
CCFLAGS += -fPIC
endif
# G4RUNPATHOPTION := -Wl,-rpath
FC := g77
FCFLAGS += -fno-automatic -fno-backslash -fno-second-underscore
FCLIBS := -lg2c -lnsl
@@ -48,8 +42,8 @@ ifeq ($(G4SYSTEM),Darwin-g++)
SHEXT := dylib
X11FLAGS := -I/usr/include/X11/extensions -I/usr/include/X11
X11LIBS := -L/usr/X11R6/lib -lXmu -lXt -lXext -lX11 -lSM -lICE
XMFLAGS := -I/usr/X11R6/include
XMLIBS := -lXm -lXpm
XMFLAGS := -I/sw/include
XMLIBS := -L/sw/lib -lXm -lXpm
DLDLIBS := -ldl
ifndef OGLHOME
OGLHOME := /usr/X11R6
@@ -60,16 +54,22 @@ ifeq ($(G4SYSTEM),Darwin-g++)
ifndef OGLLIBS
OGLLIBS := -L$(OGLHOME)/lib -lGLU -lGL
endif
OIVFLAGS += -I$(OIHOME)/include
define build-granular-shared-lib
@libdir=`(cd $(@D);/bin/pwd)`; \
cd $(G4TMPDIR); \
g++ -dynamiclib -flat_namespace -undefined suppress -o $$libdir/$(@F) $(INTYLIBS) *.o
g++ -dynamiclib -twolevel_namespace -undefined error -dynamic \
-single_module -o $$libdir/$(@F) *.o -L$(G4LIB)/$(G4SYSTEM) \
$(patsubst lib%,-l%,$(patsubst %.lib,%,$(GLOBLIBS))) \
-L$(CLHEP_LIB_DIR) -l$(CLHEP_LIB) $(INTYLIBS)
endef
define build-global-shared-lib
libdir=`(cd $(@D);/bin/pwd)`; \
@libdir=`(cd $(@D);/bin/pwd)`; \
cd $(G4TMP)/$(G4SYSTEM); \
g++ -dynamiclib -flat_namespace -undefined suppress -o $$libdir/$(@F) $(INTYLIBS) $(foreach dir,$(SUBLIBS),$(dir)/*.o);
g++ -dynamiclib -twolevel_namespace -undefined error -dynamic \
-single_module -o $$libdir/$(@F) \
$(foreach dir,$(SUBLIBS),$(dir)/*.o) -L$(G4LIB)/$(G4SYSTEM) \
$(patsubst lib%,-l%,$(patsubst %.lib,%,$(GLOBLIBS))) \
-L$(CLHEP_LIB_DIR) -l$(CLHEP_LIB) $(INTYLIBS);
endef
endif
+13 -4
View File
@@ -1,14 +1,23 @@
#
# ------ GNU/LINUX ------ gcc 2.95.2 / gcc 3.2
# ------ GNU/LINUX ------ gcc 3.2 and higher
#
ifeq ($(G4SYSTEM),Linux-g++)
CXX := g++
CXXFLAGS := -W -Wall -ansi -pedantic -Wno-non-virtual-dtor -Wno-long-long
CXXFLAGS += -Wwrite-strings -Wpointer-arith -Woverloaded-virtual -pipe
#
# Uncomment the following options to activate Pentium4 chip specific
# floating-point operations on the SSE unit. It will allow for more stable
# results (no output differences between debug/optimised runs) and little
# performance improvement (in the order of 2%).
# NOTE: binaries built using these options will NOT be portable cross
# platforms. Will only run on Pentium4-based architectures !
#
# CXXFLAGS += -march=pentium4 -mfpmath=sse
ifdef G4OPTIMISE
CXXFLAGS += -O
FCFLAGS := -O
CCFLAGS := -O
CXXFLAGS += -O2
FCFLAGS := -O2
CCFLAGS := -O2
else
ifdef G4DEBUG
CXXFLAGS += -g
+43 -3
View File
@@ -15,6 +15,7 @@ ifeq ($(G4SYSTEM),WIN32-VC)
CPPFLAGS += -DWIN32
LDFLAGS += -FORCE /NODEFAULTLIB:MSVCRT.dll
SHEXT := dll
AR := LIB
ECHO := echo -e
FC := g77
@@ -30,10 +31,49 @@ ifeq ($(G4SYSTEM),WIN32-VC)
endif
define build-granular-shared-lib
@echo "Shared Libraries not supported on $(G4SYSTEM)
@libdir=`(cd $(@D);/bin/pwd)`;\
cd $(G4TMP)/$(G4SYSTEM);\
echo "Building $(name).dumpbin file ...";\
$(RM) $(name).dumpbin;\
dumpbin /symbols $(G4LIBDIR)/lib$(name).a > $(name).dumpbin;\
echo "Building $(name).def file ...";\
$(RM) $(name).def;\
$(G4LIB)/$(G4SYSTEM)/win32def.exe $(name) < $(name).dumpbin > $(name).def;\
$(RM) $(name).dumpbin;\
echo "Building lib$(name).exp and lib$(name).lib file ...";\
$(RM) $(G4LIBDIR)/lib$(name).exp;\
$(RM) $(G4LIBDIR)/lib$(name).lib;\
lib.exe /nologo /machine:ix86 /def:$(name).def \
/out:$(G4LIBDIR)/lib$(name).lib;\
$(RM) $(G4LIBDIR)/$(name).dll;\
echo "Building $(name).dll file ...";\
link.exe /nologo /dll /out:$(G4LIBDIR)/$(name).dll \
$(G4LIBDIR)/lib$(name).exp $(G4LIBDIR)/lib$(name).a \
/libpath:$(G4LIBDIR) $(GLOBLIBS) \
$(LIB_PATH)$(CLHEP_LIB_DIR) $(CLHEP_LIB) \
$(INTYLIBS) $(ANALYSISLIBS) $(UI32LIBS)
endef
define build-global-shared-lib
@echo "Shared Libraries not supported on $(G4SYSTEM)
@libdir=`(cd $(@D);/bin/pwd)`;\
cd $(G4TMP)/$(G4SYSTEM);\
echo "Building $(name).dumpbin file ...";\
$(RM) $(name).dumpbin;\
dumpbin /symbols $(G4LIBDIR)/lib$(name).a > $(name).dumpbin;\
echo "Building $(name).def file ...";\
$(RM) $(name).def;\
$(G4LIB)/$(G4SYSTEM)/win32def.exe $(name) < $(name).dumpbin > $(name).def;\
$(RM) $(name).dumpbin;\
echo "Building lib$(name).exp and lib$(name).lib ...";\
$(RM) $(G4LIBDIR)/lib$(name).exp;\
$(RM) $(G4LIBDIR)/lib$(name).lib;\
lib.exe /nologo /machine:ix86 /def:$(name).def \
/out:$(G4LIBDIR)/lib$(name).lib;\
$(RM) $(G4LIBDIR)/$(name).dll;\
echo "Building $(name).dll ...";\
link.exe /nologo /dll /out:$(G4LIBDIR)/$(name).dll \
$(G4LIBDIR)/lib$(name).exp $(G4LIBDIR)/lib$(name).a \
/libpath:$(G4LIBDIR) $(GLOBLIBS) \
$(LIB_PATH)$(CLHEP_LIB_DIR) $(CLHEP_LIB) \
$(INTYLIBS) $(ANALYSISLIBS) $(UI32LIBS)
endef
endif
+30 -19
View File
@@ -1,6 +1,6 @@
#
# ------ WIN32/VC ------ Visual-C++ 7 .NET
# experimental setup
#
ifeq ($(G4SYSTEM),WIN32-VC7)
CXX := CL
ifdef G4OPTIMISE
@@ -31,16 +31,17 @@ ifeq ($(G4SYSTEM),WIN32-VC7)
endif
#
# Building DLLs (from G.Barrand)
# Building DLLs (G.Barrand)
# -------------
# The below commands permit to build DLLs from the archive libraries.
# The commands below allow to build DLLs from the archive libraries.
# From a libG4xxx.a, it will extract the symbols with :
# DOS> dumpbin /symbols libG4xxx.a > G4xxx.dumpbin
# After that it will produce a G4xxx.def using the 'win32def' program.
# The G4xxx.def file will contain the list of symbols that are "exported"
# or made public for using the DLLs.
# The source win32def.c is in config/sys. The binary is built during the
# library installation process, and will be placed in $G4LIB/G4SYSTEM.
# The source win32def.c is in the geant4/config directory. The binary is
# built during the library installation process, and will be placed in
# $G4LIB/G4SYSTEM.
# If can also be built as follows :
# DOS> cl.exe /Fowin32def.exe win32def.c
# Then, to use it :
@@ -56,37 +57,47 @@ ifeq ($(G4SYSTEM),WIN32-VC7)
define build-granular-shared-lib
@libdir=`(cd $(@D);/bin/pwd)`;\
cd $(G4TMP)/$(G4SYSTEM);\
echo "Building $(name).dumpbin file";\
echo "Building $(name).dumpbin file ...";\
$(RM) $(name).dumpbin;\
dumpbin /symbols $(G4LIBDIR)/lib$(name).a > $(name).dumpbin;\
echo "Building $(name).def file";\
echo "Building $(name).def file ...";\
$(RM) $(name).def;\
$(G4LIBDIR)/win32def.exe $(name) < $(name).dumpbin > $(name).def;\
$(G4LIB)/$(G4SYSTEM)/win32def.exe $(name) < $(name).dumpbin > $(name).def;\
$(RM) $(name).dumpbin;\
echo "Building lib$(name).exp and lib$(name).lib file";\
echo "Building lib$(name).exp and lib$(name).lib file ...";\
$(RM) $(G4LIBDIR)/lib$(name).exp;\
$(RM) $(G4LIBDIR)/lib$(name).lib;\
lib.exe /nologo /machine:ix86 /def:$(name).def /out:$(G4LIBDIR)/lib$(name).lib;\
lib.exe /nologo /machine:ix86 /def:$(name).def \
/out:$(G4LIBDIR)/lib$(name).lib;\
$(RM) $(G4LIBDIR)/$(name).dll;\
echo "Building $(name).dll file";\
link.exe /nologo /dll /out:$(G4LIBDIR)/$(name).dll $(G4LIBDIR)/lib$(name).exp $(G4LIBDIR)/lib$(name).a /libpath:$(G4LIBDIR) $(GLOBLIBS) $(LIB_PATH)$(CLHEP_LIB_DIR) $(CLHEP_LIB)
echo "Building $(name).dll file ...";\
link.exe /nologo /dll /out:$(G4LIBDIR)/$(name).dll \
$(G4LIBDIR)/lib$(name).exp $(G4LIBDIR)/lib$(name).a \
/libpath:$(G4LIBDIR) $(GLOBLIBS) \
$(LIB_PATH)$(CLHEP_LIB_DIR) $(CLHEP_LIB) \
$(INTYLIBS) $(ANALYSISLIBS) $(UI32LIBS)
endef
define build-global-shared-lib
@libdir=`(cd $(@D);/bin/pwd)`;\
cd $(G4TMP)/$(G4SYSTEM);\
echo "Building $(name).dumpbin file";\
echo "Building $(name).dumpbin file ...";\
$(RM) $(name).dumpbin;\
dumpbin /symbols $(G4LIBDIR)/lib$(name).a > $(name).dumpbin;\
echo "Building $(name).def file";\
echo "Building $(name).def file ...";\
$(RM) $(name).def;\
$(G4LIBDIR)/win32def.exe $(name) < $(name).dumpbin > $(name).def;\
$(G4LIB)/$(G4SYSTEM)/win32def.exe $(name) < $(name).dumpbin > $(name).def;\
$(RM) $(name).dumpbin;\
echo "Building lib$(name).exp and lib$(name).lib file";\
echo "Building lib$(name).exp and lib$(name).lib ...";\
$(RM) $(G4LIBDIR)/lib$(name).exp;\
$(RM) $(G4LIBDIR)/lib$(name).lib;\
lib.exe /nologo /machine:ix86 /def:$(name).def /out:$(G4LIBDIR)/lib$(name).lib;\
lib.exe /nologo /machine:ix86 /def:$(name).def \
/out:$(G4LIBDIR)/lib$(name).lib;\
$(RM) $(G4LIBDIR)/$(name).dll;\
echo "Building $(name).dll file";\
link.exe /nologo /dll /out:$(G4LIBDIR)/$(name).dll $(G4LIBDIR)/lib$(name).exp $(G4LIBDIR)/lib$(name).a /libpath:$(G4LIBDIR) $(GLOBLIBS) $(LIB_PATH)$(CLHEP_LIB_DIR) $(CLHEP_LIB)
echo "Building $(name).dll ...";\
link.exe /nologo /dll /out:$(G4LIBDIR)/$(name).dll \
$(G4LIBDIR)/lib$(name).exp $(G4LIBDIR)/lib$(name).a \
/libpath:$(G4LIBDIR) $(GLOBLIBS) \
$(LIB_PATH)$(CLHEP_LIB_DIR) $(CLHEP_LIB) \
$(INTYLIBS) $(ANALYSISLIBS) $(UI32LIBS)
endef
endif
+10 -4
View File
@@ -1,6 +1,6 @@
#
# ------ GNU/WIN32 CYGNUS ------ !!! not supported !!!
# Cygnus CygWin - gcc-2.95.3, gcc-3.2
# Cygnus CygWin - gcc-3.2 and higher
# Windows 2000/XP
#
# Stefano Agostinelli (agos001@pn.itnet.it) - IST Group, Genova
@@ -24,10 +24,12 @@ ifeq ($(G4SYSTEM),WIN32-g++)
FCFLAGS += -fPIC
CCFLAGS += -fPIC
endif
G4RUNPATHOPTION := -Wl,-rpath
FC := g77
FCFLAGS += -fno-automatic -fno-backslash -fno-second-underscore
FCLIBS := -lg2c -lnsl
ECHO := echo -e
SHEXT := so
X11FLAGS := -I/usr/include/X11/extensions -I/usr/include/X11
X11LIBS := -L/usr/X11R6/lib -lXmu -lXt -lXext -lX11 -lSM -lICE
XMFLAGS := -I/usr/X11R6/include
@@ -39,12 +41,16 @@ ifeq ($(G4SYSTEM),WIN32-g++)
OGLLIBS := -L$(OGLHOME)/lib -lGLU -lGL
endif
OIVFLAGS += -I$(OIHOME)/include
define build-granular-shared-lib
@echo "Shared Libraries not supported on $(G4SYSTEM)
@libdir=`(cd $(@D);/bin/pwd)`; \
cd $(G4TMPDIR); \
$(CXX) -Wl,-soname,$(@F) -shared -o $$libdir/$(@F) $(INTYLIBS) *.o
endef
define build-global-shared-lib
@echo "Shared Libraries not supported on $(G4SYSTEM)
@libdir=`(cd $(@D);/bin/pwd)`; \
cd $(G4TMP)/$(G4SYSTEM); \
$(CXX) -Wl,-soname,$(@F) -shared -o $$libdir/$(@F) $(INTYLIBS) \
$(foreach dir,$(SUBLIBS),$(dir)/*.o);
endef
endif
+17 -13
View File
@@ -1,4 +1,4 @@
/* $Id: win32def.c,v 1.2 2004/02/09 16:44:45 gcosmo Exp $ */
/* $Id: win32def.c,v 1.3 2004/06/18 16:10:06 gcosmo Exp $ */
/* +---------------------- Copyright notice -------------------------------+ */
/* | Copyright (C) 1995, Guy Barrand, LAL Orsay, (barrand@lal.in2p3.fr) | */
/* | Permission to use, copy, modify, and distribute this software | */
@@ -60,8 +60,11 @@ EXPORTS\n",aArgs[1]);
length--;
}
if(strstr(buffer,"SECT")==NULL) continue;
if(strstr(buffer,"??_")!=NULL) continue;
if(strstr(buffer,"External")==NULL) continue;
if(strstr(buffer,"??_")!=NULL) {
if(strstr(buffer,"operator/=")==NULL) continue;
/* Keep operator /= */
}
{
char** words;
@@ -69,24 +72,25 @@ EXPORTS\n",aArgs[1]);
words = GetWords (buffer," ",&wordn);
if(wordn>=8) {
int iword = 7;
int offset = 0;
if(strcmp(words[4],"()")==0) {
iword = 7;
} else if(strcmp(words[4],"External")==0) {
iword = 6;
}
if(words[iword][0]=='_') {
if(iword==6) {
printf(" %s\tDATA\n",words[iword]+1);
if(words[iword][0]=='_') offset = 1;
if( (iword==6) && (strstr(buffer,"static class")!=NULL) ){
/* static class objects are not DATA */
printf(" %s\n",words[iword]+offset);
} else if(iword==6) {
/* DATA */
printf(" %s\tDATA\n",words[iword]+offset);
} else {
printf(" %s\n",words[iword]+1);
}
} else {
if(iword==6) {
printf(" %s\tDATA\n",words[iword]);
} else {
printf(" %s\n",words[iword]);
}
/* code */
printf(" %s\n",words[iword]+offset);
}
}
{int count;
for(count=0;count<wordn;count++) if(words[count]) free(words[count]);
+21
View File
@@ -0,0 +1,21 @@
$Id: History,v 1.1 2004/05/28 15:19:42 vnivanch Exp $
-------------------------------------------------------------------
=========================================================
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
=========================================================
electromagnetic_lists History file
----------------------------------
This file should be used by the G4 example coordinator to briefly
summarize all major modifications introduced in the code and keep
track of all tags.
----------------------------------------------------------
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
28-05-04 V.Ivanchenko (emphys-V06-01-00)
- first tag
+44
View File
@@ -0,0 +1,44 @@
$Id: README,v 1.4 2004/05/28 15:19:42 vnivanch Exp $
-------------------------------------------------------------------
=========================================================
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
=========================================================
Electromagnetic PhysicsList
---------------------------
The example of physics list for standard electromagnetic physics
package is presented in the subdirectory
electromagnetic_lists/standard
The corresponding files are PhysicsList.cc, .hh
Physics list is equipped by the messenger, which allows to set
cuts and to define modules of physics to be used.
The following modules can be activated:
1. "standard" - (alternative) standard EM physics (current version)
2. "g4v52" - (alternative) standard EM physics (version G4 5.2p02)
3. "high_energy" - add high energy processes
To activate a specific module the UI command can be used:
"/testem/phys/addPhysics title"
By default "standard" module is loaded.
The PhysicsList options can be defined via G4EmProcessOptions
class, the example of the usage is in the PhysicsList class
It is NOT assumed that files from this subdirectory will be
compiled directly. User can copy or link these files to
his/her application, to modify this example according to the
particular application. It is assumed that user will add modules
to this PhysicsList.
This PhysicsList approach is used in tests of the standard
electromagnetic package. Similar PhysicsLists can be found out
in advance examples.
The direct test of this PhysicsList is performed in the example
examples/extended/electromagnetic/TestEm2
@@ -21,31 +21,47 @@
// ********************************************************************
//
//
// $Id: PhysListGeneral.cc,v 1.1 2003/10/08 17:28:47 maire Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: DecaysBuilder.cc,v 1.1 2004/05/04 10:03:03 vnivanch Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//---------------------------------------------------------------------------
//
// ClassName: DecayBuilder
//
// Author: V.Ivanchenko 03.05.2004
//
// Modified:
//
//----------------------------------------------------------------------------
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "PhysListGeneral.hh"
#include "DecaysBuilder.hh"
#include "G4ParticleDefinition.hh"
#include "G4ProcessManager.hh"
#include "G4Decay.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
PhysListGeneral::PhysListGeneral(const G4String& name)
DecaysBuilder::DecaysBuilder(const G4String& name)
: G4VPhysicsConstructor(name)
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
PhysListGeneral::~PhysListGeneral()
DecaysBuilder::~DecaysBuilder()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void PhysListGeneral::ConstructProcess()
void DecaysBuilder::ConstructParticle()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void DecaysBuilder::ConstructProcess()
{
// Add Decay Process
+71
View File
@@ -0,0 +1,71 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: DecaysBuilder.hh,v 1.1 2004/05/04 10:03:03 vnivanch Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef DecaysBuilder_h
#define DecaysBuilder_h 1
#include "G4VPhysicsConstructor.hh"
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class DecaysBuilder : public G4VPhysicsConstructor
{
public:
DecaysBuilder(const G4String& name = "decays");
virtual ~DecaysBuilder();
public:
// This method is dummy for physics
virtual void ConstructParticle();
// This method will be invoked in the Construct() method.
// each physics process will be instantiated and
// registered to the process manager of each particle type
virtual void ConstructProcess();
private:
// hide assignment operator
DecaysBuilder & operator=(const DecaysBuilder &right);
DecaysBuilder(const DecaysBuilder&);
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
+106
View File
@@ -0,0 +1,106 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4EmHadronBuilder.cc,v 1.1 2004/05/04 10:03:03 vnivanch Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//---------------------------------------------------------------------------
//
// ClassName: G4EmHadronBuilder
//
// Author: V.Ivanchenko 03.05.2004
//
// Modified:
//
//----------------------------------------------------------------------------
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4EmHadronBuilder.hh"
#include "G4ParticleDefinition.hh"
#include "G4ProcessManager.hh"
#include "G4MultipleScattering.hh"
#include "G4hIonisation.hh"
#include "G4ionIonisation.hh"
#include "G4Electron.hh"
#include "G4Proton.hh"
#include "G4GenericIon.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmHadronBuilder::G4EmHadronBuilder(const G4String& name)
: G4VPhysicsConstructor(name)
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmHadronBuilder::~G4EmHadronBuilder()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4EmHadronBuilder::ConstructParticle()
{
G4Electron::Electron();
G4Proton::Proton();
G4GenericIon::GenericIon();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4EmHadronBuilder::ConstructProcess()
{
// Add standard EM Processes
theParticleIterator->reset();
while( (*theParticleIterator)() ){
G4ParticleDefinition* particle = theParticleIterator->value();
if(particle->GetPDGMass() > 110.*MeV) {
G4ProcessManager* pmanager = particle->GetProcessManager();
G4String particleName = particle->GetParticleName();
if (particleName == "GenericIon") {
pmanager->AddProcess(new G4MultipleScattering, -1, 1,1);
pmanager->AddProcess(new G4ionIonisation, -1, 2,2);
} else if ((!particle->IsShortLived()) &&
(particle->GetPDGCharge() != 0.0) &&
(particle->GetParticleName() != "chargedgeantino")) {
pmanager->AddProcess(new G4MultipleScattering,-1,1,1);
pmanager->AddProcess(new G4hIonisation, -1,2,2);
}
}
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+64
View File
@@ -0,0 +1,64 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4EmHadronBuilder.hh,v 1.1 2004/05/04 10:03:03 vnivanch Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef G4EmHadronBuilder_h
#define G4EmHadronBuilder_h 1
#include "G4VPhysicsConstructor.hh"
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4EmHadronBuilder : public G4VPhysicsConstructor
{
public:
G4EmHadronBuilder(const G4String& name = "EM_stand_had");
virtual ~G4EmHadronBuilder();
public:
// This method is dummy for physics
virtual void ConstructParticle();
// This method will be invoked in the Construct() method.
// each physics process will be instantiated and
// registered to the process manager of each particle type
virtual void ConstructProcess();
private:
// hide assignment operator
G4EmHadronBuilder & operator=(const G4EmHadronBuilder &right);
G4EmHadronBuilder(const G4EmHadronBuilder&);
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
+104
View File
@@ -0,0 +1,104 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4EmHadronBuilder52.cc,v 1.1 2004/05/04 10:03:03 vnivanch Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//---------------------------------------------------------------------------
//
// ClassName: G4EmHadronBuilder52
//
// Author: V.Ivanchenko 03.05.2004
//
// Modified:
//
//----------------------------------------------------------------------------
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4EmHadronBuilder52.hh"
#include "G4ParticleDefinition.hh"
#include "G4ProcessManager.hh"
#include "G4MultipleScattering52.hh"
#include "G4hIonisation52.hh"
#include "G4Electron.hh"
#include "G4Proton.hh"
#include "G4GenericIon.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmHadronBuilder52::G4EmHadronBuilder52(const G4String& name)
: G4VPhysicsConstructor(name)
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmHadronBuilder52::~G4EmHadronBuilder52()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4EmHadronBuilder52::ConstructParticle()
{
G4Electron::Electron();
G4Proton::Proton();
G4GenericIon::GenericIon();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4EmHadronBuilder52::ConstructProcess()
{
// Add standard EM Processes
theParticleIterator->reset();
while( (*theParticleIterator)() ){
G4ParticleDefinition* particle = theParticleIterator->value();
if(particle->GetPDGMass() > 110.*MeV) {
G4ProcessManager* pmanager = particle->GetProcessManager();
G4String particleName = particle->GetParticleName();
if (particleName == "GenericIon") {
pmanager->AddProcess(new G4hIonisation52, -1, 1, 1);
} else if ((!particle->IsShortLived()) &&
(particle->GetPDGCharge() != 0.0) &&
(particle->GetParticleName() != "chargedgeantino")) {
pmanager->AddProcess(new G4MultipleScattering52,-1,1,1);
pmanager->AddProcess(new G4hIonisation52, -1,2,2);
}
}
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+64
View File
@@ -0,0 +1,64 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4EmHadronBuilder52.hh,v 1.1 2004/05/04 10:03:03 vnivanch Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef G4EmHadronBuilder52_h
#define G4EmHadronBuilder52_h 1
#include "G4VPhysicsConstructor.hh"
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4EmHadronBuilder52 : public G4VPhysicsConstructor
{
public:
G4EmHadronBuilder52(const G4String& name = "EM_stand_had");
virtual ~G4EmHadronBuilder52();
public:
// This method is dummy for physics
virtual void ConstructParticle();
// This method will be invoked in the Construct() method.
// each physics process will be instantiated and
// registered to the process manager of each particle type
virtual void ConstructProcess();
private:
// hide assignment operator
G4EmHadronBuilder52 & operator=(const G4EmHadronBuilder52 &right);
G4EmHadronBuilder52(const G4EmHadronBuilder52&);
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
+93
View File
@@ -0,0 +1,93 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4EmHighEnergyBuilder.cc,v 1.1 2004/05/04 10:03:03 vnivanch Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//---------------------------------------------------------------------------
//
// ClassName: G4EmHighEnergyBuilder
//
// Author: V.Ivanchenko 03.05.2004
//
// Modified:
//
//----------------------------------------------------------------------------
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4EmHighEnergyBuilder.hh"
#include "G4ParticleDefinition.hh"
#include "G4ProcessManager.hh"
#include "G4AnnihiToMuPair.hh"
#include "G4GammaConversionToMuons.hh"
#include "G4Gamma.hh"
#include "G4Electron.hh"
#include "G4Positron.hh"
#include "G4MuonPlus.hh"
#include "G4MuonMinus.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmHighEnergyBuilder::G4EmHighEnergyBuilder(const G4String& name)
: G4VPhysicsConstructor(name)
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmHighEnergyBuilder::~G4EmHighEnergyBuilder()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4EmHighEnergyBuilder::ConstructParticle()
{
// Minimal set of particles
G4Gamma::Gamma();
G4Electron::Electron();
G4Positron::Positron();
G4MuonPlus::MuonPlus();
G4MuonMinus::MuonMinus();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4EmHighEnergyBuilder::ConstructProcess()
{
// Add standard EM Processes for gamma
G4ParticleDefinition* particle = G4Gamma::Gamma();
G4ProcessManager* pmanager = particle->GetProcessManager();
pmanager->AddDiscreteProcess( new G4GammaConversionToMuons() );
// Add standard EM Processes for e+
particle = G4Positron::Positron();
pmanager = particle->GetProcessManager();
pmanager->AddDiscreteProcess( new G4AnnihiToMuPair() );
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+64
View File
@@ -0,0 +1,64 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4EmHighEnergyBuilder.hh,v 1.1 2004/05/04 10:03:03 vnivanch Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef G4EmHighEnergyBuilder_h
#define G4EmHighEnergyBuilder_h 1
#include "G4VPhysicsConstructor.hh"
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4EmHighEnergyBuilder : public G4VPhysicsConstructor
{
public:
G4EmHighEnergyBuilder(const G4String& name = "EM_stan_HE");
virtual ~G4EmHighEnergyBuilder();
public:
// This method is dummy for physics
virtual void ConstructParticle();
// This method will be invoked in the Construct() method.
// each physics process will be instantiated and
// registered to the process manager of each particle type
virtual void ConstructProcess();
private:
// hide assignment operator
G4EmHighEnergyBuilder & operator=(const G4EmHighEnergyBuilder &right);
G4EmHighEnergyBuilder(const G4EmHighEnergyBuilder&);
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
+105
View File
@@ -0,0 +1,105 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4EmMuonBuilder.cc,v 1.1 2004/05/04 10:03:03 vnivanch Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//---------------------------------------------------------------------------
//
// ClassName: G4EmMuonBuilder
//
// Author: V.Ivanchenko 03.05.2004
//
// Modified:
//
//----------------------------------------------------------------------------
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4EmMuonBuilder.hh"
#include "G4ParticleDefinition.hh"
#include "G4ProcessManager.hh"
#include "G4MultipleScattering.hh"
#include "G4MuIonisation.hh"
#include "G4MuBremsstrahlung.hh"
#include "G4MuPairProduction.hh"
#include "G4Gamma.hh"
#include "G4Electron.hh"
#include "G4Positron.hh"
#include "G4MuonPlus.hh"
#include "G4MuonMinus.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmMuonBuilder::G4EmMuonBuilder(const G4String& name)
: G4VPhysicsConstructor(name)
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmMuonBuilder::~G4EmMuonBuilder()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4EmMuonBuilder::ConstructParticle()
{
// Minimal set of particles
G4Gamma::Gamma();
G4Electron::Electron();
G4Positron::Positron();
G4MuonPlus::MuonPlus();
G4MuonMinus::MuonMinus();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4EmMuonBuilder::ConstructProcess()
{
// Add standard EM Processes for mu+
const G4ParticleDefinition* particle = G4MuonPlus::MuonPlus();
G4ProcessManager* pmanager = particle->GetProcessManager();
pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
pmanager->AddProcess(new G4MuIonisation, -1, 2,2);
pmanager->AddProcess(new G4MuBremsstrahlung, -1,-1,3);
pmanager->AddProcess(new G4MuPairProduction, -1,-1,4);
// Add standard EM Processes for mu-
particle = G4MuonMinus::MuonMinus();
pmanager = particle->GetProcessManager();
pmanager->AddProcess(new G4MultipleScattering,-1, 1,1);
pmanager->AddProcess(new G4MuIonisation, -1, 2,2);
pmanager->AddProcess(new G4MuBremsstrahlung, -1,-1,3);
pmanager->AddProcess(new G4MuPairProduction, -1,-1,4);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+63
View File
@@ -0,0 +1,63 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4EmMuonBuilder.hh,v 1.1 2004/05/04 10:03:03 vnivanch Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef G4EmMuonBuilder_h
#define G4EmMuonBuilder_h 1
#include "G4VPhysicsConstructor.hh"
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4EmMuonBuilder : public G4VPhysicsConstructor
{
public:
G4EmMuonBuilder(const G4String& name = "EM_stan_muons");
virtual ~G4EmMuonBuilder();
public:
// This method is dummy for physics
virtual void ConstructParticle();
// This method will be invoked in the Construct() method.
// each physics process will be instantiated and
// registered to the process manager of each particle type
virtual void ConstructProcess();
private:
// hide assignment operator
G4EmMuonBuilder & operator=(const G4EmMuonBuilder &right);
G4EmMuonBuilder(const G4EmMuonBuilder&);
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
+105
View File
@@ -0,0 +1,105 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4EmMuonBuilder52.cc,v 1.1 2004/05/04 10:03:03 vnivanch Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//---------------------------------------------------------------------------
//
// ClassName: G4EmMuonBuilder52
//
// Author: V.Ivanchenko 03.05.2004
//
// Modified:
//
//----------------------------------------------------------------------------
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4EmMuonBuilder52.hh"
#include "G4ParticleDefinition.hh"
#include "G4ProcessManager.hh"
#include "G4MultipleScattering52.hh"
#include "G4MuIonisation52.hh"
#include "G4MuBremsstrahlung52.hh"
#include "G4MuPairProduction52.hh"
#include "G4Gamma.hh"
#include "G4Electron.hh"
#include "G4Positron.hh"
#include "G4MuonPlus.hh"
#include "G4MuonMinus.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmMuonBuilder52::G4EmMuonBuilder52(const G4String& name)
: G4VPhysicsConstructor(name)
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmMuonBuilder52::~G4EmMuonBuilder52()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4EmMuonBuilder52::ConstructParticle()
{
// Minimal set of particles
G4Gamma::Gamma();
G4Electron::Electron();
G4Positron::Positron();
G4MuonPlus::MuonPlus();
G4MuonMinus::MuonMinus();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4EmMuonBuilder52::ConstructProcess()
{
// Add standard EM Processes for mu+
const G4ParticleDefinition* particle = G4MuonPlus::MuonPlus();
G4ProcessManager* pmanager = particle->GetProcessManager();
pmanager->AddProcess(new G4MultipleScattering52,-1, 1,1);
pmanager->AddProcess(new G4MuIonisation52, -1, 2,2);
pmanager->AddProcess(new G4MuBremsstrahlung52, -1,-1,3);
pmanager->AddProcess(new G4MuPairProduction52, -1,-1,4);
// Add standard EM Processes for mu-
particle = G4MuonMinus::MuonMinus();
pmanager = particle->GetProcessManager();
pmanager->AddProcess(new G4MultipleScattering52,-1, 1,1);
pmanager->AddProcess(new G4MuIonisation52, -1, 2,2);
pmanager->AddProcess(new G4MuBremsstrahlung52, -1,-1,3);
pmanager->AddProcess(new G4MuPairProduction52, -1,-1,4);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+63
View File
@@ -0,0 +1,63 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4EmMuonBuilder52.hh,v 1.1 2004/05/04 10:03:03 vnivanch Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef G4EmMuonBuilder52_h
#define G4EmMuonBuilder52_h 1
#include "G4VPhysicsConstructor.hh"
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4EmMuonBuilder52 : public G4VPhysicsConstructor
{
public:
G4EmMuonBuilder52(const G4String& name = "EM_stan_muons");
virtual ~G4EmMuonBuilder52();
public:
// This method is dummy for physics
virtual void ConstructParticle();
// This method will be invoked in the Construct() method.
// each physics process will be instantiated and
// registered to the process manager of each particle type
virtual void ConstructProcess();
private:
// hide assignment operator
G4EmMuonBuilder52 & operator=(const G4EmMuonBuilder52 &right);
G4EmMuonBuilder52(const G4EmMuonBuilder52&);
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
+111
View File
@@ -0,0 +1,111 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4EmQEDBuilder.cc,v 1.1 2004/05/04 10:03:03 vnivanch Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//---------------------------------------------------------------------------
//
// ClassName: G4EmQEDBuilder
//
// Author: V.Ivanchenko 03.05.2004
//
// Modified:
//
//----------------------------------------------------------------------------
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4EmQEDBuilder.hh"
#include "G4ParticleDefinition.hh"
#include "G4ProcessManager.hh"
#include "G4ComptonScattering.hh"
#include "G4GammaConversion.hh"
#include "G4PhotoElectricEffect.hh"
#include "G4MultipleScattering.hh"
#include "G4eIonisation.hh"
#include "G4eBremsstrahlung.hh"
#include "G4eplusAnnihilation.hh"
#include "G4Gamma.hh"
#include "G4Electron.hh"
#include "G4Positron.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmQEDBuilder::G4EmQEDBuilder(const G4String& name)
: G4VPhysicsConstructor(name)
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmQEDBuilder::~G4EmQEDBuilder()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4EmQEDBuilder::ConstructParticle()
{
G4Gamma::Gamma();
G4Electron::Electron();
G4Positron::Positron();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4EmQEDBuilder::ConstructProcess()
{
// Add standard EM Processes for gamma
G4ParticleDefinition* particle = G4Gamma::Gamma();
G4ProcessManager* pmanager = particle->GetProcessManager();
pmanager->AddDiscreteProcess( new G4PhotoElectricEffect() );
pmanager->AddDiscreteProcess( new G4ComptonScattering() );
pmanager->AddDiscreteProcess( new G4GammaConversion() );
// Add standard EM Processes for e-
particle = G4Electron::Electron();
pmanager = particle->GetProcessManager();
pmanager->AddProcess(new G4MultipleScattering, -1, 1,1);
pmanager->AddProcess(new G4eIonisation, -1, 2,2);
pmanager->AddProcess(new G4eBremsstrahlung, -1,-1,3);
// Add standard EM Processes for e+
particle = G4Positron::Positron();
pmanager = particle->GetProcessManager();
pmanager->AddProcess(new G4MultipleScattering, -1, 1,1);
pmanager->AddProcess(new G4eIonisation, -1, 2,2);
pmanager->AddProcess(new G4eBremsstrahlung, -1,-1,3);
pmanager->AddProcess(new G4eplusAnnihilation, 0,-1,4);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+64
View File
@@ -0,0 +1,64 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4EmQEDBuilder.hh,v 1.1 2004/05/04 10:03:03 vnivanch Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef G4EmQEDBuilder_h
#define G4EmQEDBuilder_h 1
#include "G4VPhysicsConstructor.hh"
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4EmQEDBuilder : public G4VPhysicsConstructor
{
public:
G4EmQEDBuilder(const G4String& name = "EM_stan_QED");
virtual ~G4EmQEDBuilder();
public:
// This method is dummy for physics
virtual void ConstructParticle();
// This method will be invoked in the Construct() method.
// each physics process will be instantiated and
// registered to the process manager of each particle type
virtual void ConstructProcess();
private:
// hide assignment operator
G4EmQEDBuilder & operator=(const G4EmQEDBuilder &right);
G4EmQEDBuilder(const G4EmQEDBuilder&);
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
+111
View File
@@ -0,0 +1,111 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4EmQEDBuilder52.cc,v 1.1 2004/05/04 10:03:04 vnivanch Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//---------------------------------------------------------------------------
//
// ClassName: G4EmQEDBuilder52
//
// Author: V.Ivanchenko 03.05.2004
//
// Modified:
//
//----------------------------------------------------------------------------
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4EmQEDBuilder52.hh"
#include "G4ParticleDefinition.hh"
#include "G4ProcessManager.hh"
#include "G4ComptonScattering.hh"
#include "G4GammaConversion.hh"
#include "G4PhotoElectricEffect.hh"
#include "G4MultipleScattering52.hh"
#include "G4eIonisation52.hh"
#include "G4eBremsstrahlung52.hh"
#include "G4eplusAnnihilation.hh"
#include "G4Gamma.hh"
#include "G4Electron.hh"
#include "G4Positron.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmQEDBuilder52::G4EmQEDBuilder52(const G4String& name)
: G4VPhysicsConstructor(name)
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4EmQEDBuilder52::~G4EmQEDBuilder52()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4EmQEDBuilder52::ConstructParticle()
{
G4Gamma::Gamma();
G4Electron::Electron();
G4Positron::Positron();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void G4EmQEDBuilder52::ConstructProcess()
{
// Add standard EM Processes for gamma
G4ParticleDefinition* particle = G4Gamma::Gamma();
G4ProcessManager* pmanager = particle->GetProcessManager();
pmanager->AddDiscreteProcess( new G4PhotoElectricEffect() );
pmanager->AddDiscreteProcess( new G4ComptonScattering() );
pmanager->AddDiscreteProcess( new G4GammaConversion() );
// Add standard EM Processes for e-
particle = G4Electron::Electron();
pmanager = particle->GetProcessManager();
pmanager->AddProcess(new G4MultipleScattering52, -1, 1,1);
pmanager->AddProcess(new G4eIonisation52, -1, 2,2);
pmanager->AddProcess(new G4eBremsstrahlung52, -1,-1,3);
// Add standard EM Processes for e+
particle = G4Positron::Positron();
pmanager = particle->GetProcessManager();
pmanager->AddProcess(new G4MultipleScattering52, -1, 1,1);
pmanager->AddProcess(new G4eIonisation52, -1, 2,2);
pmanager->AddProcess(new G4eBremsstrahlung52, -1,-1,3);
pmanager->AddProcess(new G4eplusAnnihilation, 0,-1,4);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+64
View File
@@ -0,0 +1,64 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4EmQEDBuilder52.hh,v 1.1 2004/05/04 10:03:04 vnivanch Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef G4EmQEDBuilder52_h
#define G4EmQEDBuilder52_h 1
#include "G4VPhysicsConstructor.hh"
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class G4EmQEDBuilder52 : public G4VPhysicsConstructor
{
public:
G4EmQEDBuilder52(const G4String& name = "EM_stan_QED");
virtual ~G4EmQEDBuilder52();
public:
// This method is dummy for physics
virtual void ConstructParticle();
// This method will be invoked in the Construct() method.
// each physics process will be instantiated and
// registered to the process manager of each particle type
virtual void ConstructProcess();
private:
// hide assignment operator
G4EmQEDBuilder52 & operator=(const G4EmQEDBuilder52 &right);
G4EmQEDBuilder52(const G4EmQEDBuilder52&);
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -21,13 +21,24 @@
// ********************************************************************
//
//
// $Id: PhysListParticles.cc,v 1.1 2003/04/22 16:25:07 maire Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// $Id: ParticlesBuilder.cc,v 1.1 2004/05/04 10:03:04 vnivanch Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//---------------------------------------------------------------------------
//
// ClassName: ParticleBuilder
//
// Author: V.Ivanchenko 03.05.2004
//
// Modified:
//
//----------------------------------------------------------------------------
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "PhysListParticles.hh"
#include "ParticlesBuilder.hh"
// Bosons
#include "G4ChargedGeantino.hh"
@@ -73,22 +84,22 @@
#include "G4He3.hh"
#include "G4GenericIon.hh"
#include "IonC12.hh"
//#include "IonC12.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
PhysListParticles::PhysListParticles(const G4String& name)
ParticlesBuilder::ParticlesBuilder(const G4String& name)
: G4VPhysicsConstructor(name)
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
PhysListParticles::~PhysListParticles()
ParticlesBuilder::~ParticlesBuilder()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void PhysListParticles::ConstructParticle()
void ParticlesBuilder::ConstructParticle()
{
// pseudo-particles
@@ -137,7 +148,7 @@ void PhysListParticles::ConstructParticle()
G4He3::He3Definition();
G4Alpha::AlphaDefinition();
G4GenericIon::GenericIonDefinition();
IonC12::IonDefinition();
// IonC12::IonDefinition();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -21,34 +21,34 @@
// ********************************************************************
//
//
// $Id: PhysListParticles.hh,v 1.2 2003/10/06 10:09:23 maire Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: ParticlesBuilder.hh,v 1.1 2004/05/04 10:03:04 vnivanch Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef PhysListParticles_h
#define PhysListParticles_h 1
#ifndef ParticlesBuilder_h
#define ParticlesBuilder_h 1
#include "G4VPhysicsConstructor.hh"
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class PhysListParticles : public G4VPhysicsConstructor
class ParticlesBuilder : public G4VPhysicsConstructor
{
public:
PhysListParticles(const G4String& name = "particles");
~PhysListParticles();
public:
ParticlesBuilder(const G4String& name = "particles");
virtual ~ParticlesBuilder();
public:
public:
// This method will be invoked in the Construct() method.
// each particle type will be instantiated
void ConstructParticle();
virtual void ConstructParticle();
// This method is dummy.
void ConstructProcess() {};
virtual void ConstructProcess() {};
};
@@ -0,0 +1,177 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: PhysicsList.cc,v 1.1 2004/05/04 10:03:04 vnivanch Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//---------------------------------------------------------------------------
//
// ClassName: PhysicsList
//
// Author: V.Ivanchenko 03.05.2004
//
// Modified:
//
//----------------------------------------------------------------------------
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "PhysicsList.hh"
#include "PhysicsListMessenger.hh"
#include "ParticlesBuilder.hh"
#include "G4EmQEDBuilder.hh"
#include "G4EmMuonBuilder.hh"
#include "G4EmHadronBuilder.hh"
#include "G4EmHighEnergyBuilder.hh"
#include "G4EmQEDBuilder52.hh"
#include "G4EmMuonBuilder52.hh"
#include "G4EmHadronBuilder52.hh"
#include "DecaysBuilder.hh"
#include "G4UnitsTable.hh"
#include "G4LossTableManager.hh"
#include "G4EmProcessOptions.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
PhysicsList::PhysicsList() : G4VModularPhysicsList(),
verbose(0),
emBuilderIsRegisted(false)
{
G4LossTableManager::Instance();
defaultCutValue = 1.*mm;
cutForGamma = defaultCutValue;
cutForElectron = defaultCutValue;
cutForPositron = defaultCutValue;
pMessenger = new PhysicsListMessenger(this);
// Add Physics builders
RegisterPhysics(new ParticlesBuilder());
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
PhysicsList::~PhysicsList()
{}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void PhysicsList::ConstructParticle()
{
if(!emBuilderIsRegisted) AddPhysicsList("standard");
G4VModularPhysicsList::ConstructParticle();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void PhysicsList::ConstructProcess()
{
G4VModularPhysicsList::ConstructProcess();
// Define energy interval for loss processes
G4EmProcessOptions emOptions;
emOptions.SetMinEnergy(0.1*keV);
emOptions.SetMaxEnergy(100.*GeV);
emOptions.SetDEDXBinning(90);
emOptions.SetLambdaBinning(90);
emOptions.SetBuildPreciseRange(false);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void PhysicsList::AddPhysicsList(const G4String& name)
{
G4bool yes = false;
if ("standard" == name && !emBuilderIsRegisted) {
RegisterPhysics(new G4EmQEDBuilder());
RegisterPhysics(new G4EmMuonBuilder());
RegisterPhysics(new G4EmHadronBuilder());
RegisterPhysics(new DecaysBuilder());
emBuilderIsRegisted = true;
yes = true;
} else if ("g4v52" == name && !emBuilderIsRegisted) {
RegisterPhysics(new G4EmQEDBuilder52());
RegisterPhysics(new G4EmMuonBuilder52());
RegisterPhysics(new G4EmHadronBuilder52());
RegisterPhysics(new DecaysBuilder());
emBuilderIsRegisted = true;
yes = true;
} else if ("high_energy" == name ) {
RegisterPhysics(new G4EmHighEnergyBuilder());
} else {
G4cout << "PhysicsList::AddPhysicsList <" << name << ">"
<< " fail - name is unknown " << G4endl;
}
if (verbose>0 && yes) {
G4cout << "PhysicsList::AddPhysicsList <" << name << ">" << G4endl;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void PhysicsList::SetCuts()
{
SetCutValue(cutForGamma, "gamma");
SetCutValue(cutForElectron, "e-");
SetCutValue(cutForPositron, "e+");
if (verbose>0) DumpCutValuesTable();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void PhysicsList::SetVerbose(G4int val)
{
verbose = val;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void PhysicsList::SetCutForGamma(G4double cut)
{
cutForGamma = cut;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void PhysicsList::SetCutForElectron(G4double cut)
{
cutForElectron = cut;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void PhysicsList::SetCutForPositron(G4double cut)
{
cutForPositron = cut;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -0,0 +1,88 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: PhysicsList.hh,v 1.1 2004/05/04 10:03:04 vnivanch Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//
//---------------------------------------------------------------------------
//
// ClassName: PhysicsList
//
// Author: V.Ivanchenko 03.05.2004
//
// Modified:
//
//----------------------------------------------------------------------------
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef PhysicsList_h
#define PhysicsList_h 1
#include "G4VModularPhysicsList.hh"
#include "globals.hh"
class PhysicsListMessenger;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class PhysicsList: public G4VModularPhysicsList
{
public:
PhysicsList();
~PhysicsList();
virtual void ConstructParticle();
virtual void ConstructProcess();
virtual void SetCuts();
void SetCutForGamma(G4double);
void SetCutForElectron(G4double);
void SetCutForPositron(G4double);
void AddPhysicsList(const G4String&);
void SetVerbose(G4int val);
private:
// hide assignment operator
PhysicsList & operator=(const PhysicsList &right);
PhysicsList(const PhysicsList&);
G4double cutForGamma;
G4double cutForElectron;
G4double cutForPositron;
G4int verbose;
G4bool emBuilderIsRegisted;
PhysicsListMessenger* pMessenger;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
@@ -0,0 +1,114 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: PhysicsListMessenger.cc,v 1.1 2004/05/04 10:03:04 vnivanch Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "PhysicsListMessenger.hh"
#include "PhysicsList.hh"
#include "G4UIcmdWithADoubleAndUnit.hh"
#include "G4UIcmdWithAString.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
PhysicsListMessenger::PhysicsListMessenger(PhysicsList* pPhys)
:pPhysicsList(pPhys)
{
gammaCutCmd = new G4UIcmdWithADoubleAndUnit("/testem/phys/setGCut",this);
gammaCutCmd->SetGuidance("Set gamma cut.");
gammaCutCmd->SetParameterName("Gcut",false);
gammaCutCmd->SetUnitCategory("Length");
gammaCutCmd->SetRange("Gcut>0.0");
gammaCutCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
electCutCmd = new G4UIcmdWithADoubleAndUnit("/testem/phys/setECut",this);
electCutCmd->SetGuidance("Set electron cut.");
electCutCmd->SetParameterName("Ecut",false);
electCutCmd->SetUnitCategory("Length");
electCutCmd->SetRange("Ecut>0.0");
electCutCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
protoCutCmd = new G4UIcmdWithADoubleAndUnit("/testem/phys/setPCut",this);
protoCutCmd->SetGuidance("Set positron cut.");
protoCutCmd->SetParameterName("Pcut",false);
protoCutCmd->SetUnitCategory("Length");
protoCutCmd->SetRange("Pcut>0.0");
protoCutCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
allCutCmd = new G4UIcmdWithADoubleAndUnit("/testem/phys/setCuts",this);
allCutCmd->SetGuidance("Set cut for all.");
allCutCmd->SetParameterName("cut",false);
allCutCmd->SetUnitCategory("Length");
allCutCmd->SetRange("cut>0.0");
allCutCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
pListCmd = new G4UIcmdWithAString("/testem/phys/addPhysics",this);
pListCmd->SetGuidance("Add modula physics list.");
pListCmd->SetParameterName("PList",false);
pListCmd->AvailableForStates(G4State_PreInit);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
PhysicsListMessenger::~PhysicsListMessenger()
{
delete gammaCutCmd;
delete electCutCmd;
delete protoCutCmd;
delete allCutCmd;
delete pListCmd;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void PhysicsListMessenger::SetNewValue(G4UIcommand* command,
G4String newValue)
{
if( command == gammaCutCmd )
{ pPhysicsList->SetCutForGamma(gammaCutCmd->GetNewDoubleValue(newValue));}
if( command == electCutCmd )
{ pPhysicsList->SetCutForElectron(electCutCmd->GetNewDoubleValue(newValue));}
if( command == protoCutCmd )
{ pPhysicsList->SetCutForPositron(protoCutCmd->GetNewDoubleValue(newValue));}
if( command == allCutCmd )
{
G4double cut = allCutCmd->GetNewDoubleValue(newValue);
pPhysicsList->SetCutForGamma(cut);
pPhysicsList->SetCutForElectron(cut);
pPhysicsList->SetCutForPositron(cut);
}
if( command == pListCmd )
{ pPhysicsList->AddPhysicsList(newValue);}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -0,0 +1,68 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: PhysicsListMessenger.hh,v 1.1 2004/05/04 10:03:04 vnivanch Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef PhysicsListMessenger_h
#define PhysicsListMessenger_h 1
#include "globals.hh"
#include "G4UImessenger.hh"
class PhysicsList;
class G4UIcmdWithADoubleAndUnit;
class G4UIcmdWithAString;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class PhysicsListMessenger: public G4UImessenger
{
public:
PhysicsListMessenger(PhysicsList* );
~PhysicsListMessenger();
void SetNewValue(G4UIcommand*, G4String);
private:
PhysicsList* pPhysicsList;
G4UIcmdWithADoubleAndUnit* gammaCutCmd;
G4UIcmdWithADoubleAndUnit* electCutCmd;
G4UIcmdWithADoubleAndUnit* protoCutCmd;
G4UIcmdWithADoubleAndUnit* allCutCmd;
G4UIcmdWithAString* pListCmd;
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
+5 -1
View File
@@ -1,4 +1,4 @@
$Id: History,v 1.3 2003/12/09 08:00:40 yhajime Exp $
$Id: History,v 1.4 2004/01/05 07:41:56 yhajime Exp $
-------------------------------------------------------------------
=========================================================
@@ -18,6 +18,10 @@ committal in the CVS repository !
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
2004 January 05 Hajime Yoshida
- replaced MOMO.jar with the debugged one
(MOMO.jar of 2003 December 8 had a bug in GPE)
2003 December 8 Hajime Yoshida
- replaced MOMO.jar with a new version which has XML capability.
- removed GGE.jar and GPE.jar which are included in MOMO.jar
Binary file not shown.
+29 -1
View File
@@ -1,4 +1,4 @@
$Id: History,v 1.80 2004/03/25 18:10:57 gcosmo Exp $
$Id: History,v 1.84 2004/06/23 16:15:45 gcosmo Exp $
-------------------------------------------------------------------
=========================================================
@@ -17,6 +17,34 @@ committal in the CVS repository !
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
24th June 2004 Gabriele Cosmo (examples-V06-01-02)
- Updated reference outputs according to reference tag geant4-06-02-ref-00.
- Includes tags: cosmicray_charging-V06-01-02, GammaRayTel-V06-01-01,
hadrontherapy-V06-01-01, lAr_calorimeter-V06-01-01,
purtag-V06-01-02, radioprotection-V06-01-06, Rich-V06-01-00,
Tiara-V06-01-03, DMX-V06-01-00, XrayFluo-V06-01-06,
xraytel-V06-01-01, exampleA01-V06-01-01, exbiasing-V06-01-00,
muonprocesses-V06-01-01, photonprocesses-V06-01-01,
testem1-V06-01-03, testem2-V06-01-03, testem3-V06-01-04,
testem3-V06-01-01, testem5-V06-01-04, testem7-V06-01-01
testem8-V06-01-00, testem9-V06-01-00, BlineTracer-V06-01-00,
opticalex-V06-01-00, exparallel-V06-01-00,
exampleN03-V06-01-00, exampleN06-V06-01-01.
28th May 2004 Gabriele Cosmo (examples-V06-01-01)
- Updated reference outputs according to reference tag geant4-06-01-ref-02.
- Includes tags: brachy-V06-01-01, ccal-V06-01-01, lAr_calorimeter-V06-01-00,
medical_linac-V06-01-03, photonprocesses-V06-01-00,
testem2-V06-01-02, testem3-V06-01-01, testem5-V06-01-00,
DICOM-V06-01-00.
30th April 2004 Gabriele Cosmo (examples-V06-01-00)
- Updated reference outputs according to reference tag geant4-06-01-ref-01.
- Includes tags: testem1-V06-01-02, testem2-V06-01-00, testem3-V06-01-00,
testem4-V06-01-00, testem5-V06-01-00, testem6-V06-01-00,
testem7-V06-01-00, exampleN02-V06-01-00, exampleN03-V06-00-00,
exampleN06-V06-01-00.
25th March 2004 Gabriele Cosmo (examples-V06-00-02)
- Updated reference outputs according to reference tag geant4-06-01-ref-00.
+4 -3
View File
@@ -1,4 +1,4 @@
# $Id: GNUmakefile,v 1.4 2003/06/25 14:55:54 gcosmo Exp $
# $Id: GNUmakefile,v 1.5 2004/06/23 16:09:48 gcosmo Exp $
# --------------------------------------------------------------
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
# --------------------------------------------------------------
@@ -9,8 +9,9 @@ endif
include $(G4INSTALL)/config/architecture.gmk
SUBDIRS = brachytherapy gammaray_telescope underground_physics
SUBDIRS += xray_fluorescence xray_telescope
SUBDIRS = gammaray_telescope underground_physics xray_fluorescence xray_telescope
SUBDIRS += brachytherapy cosmicray_charging hadrontherapy
SUBDURS += medical_linac purging_magnet radioprotection
SUBDIRS += Tiara Rich composite_calorimeter lAr_calorimeter
.PHONY : all clean clean_libs
+4 -1
View File
@@ -1,5 +1,5 @@
-------------------------------------------------------------------
$Id: History,v 1.2 2004/03/12 16:17:29 ribon Exp $
$Id: History,v 1.3 2004/05/28 11:19:18 ribon Exp $
-------------------------------------------------------------------
=========================================================
@@ -9,6 +9,9 @@ $Id: History,v 1.2 2004/03/12 16:17:29 ribon Exp $
Category History file
---------------------
18.05.2004 - A.Ribon (Rich-V06-01-00)
Ported to PI light. No changes of the code.
12.03.2004 - A.Ribon (Rich-V06-00-00)
Fixed compilation errors and warnings for g++ 3.2 .
+8 -14
View File
@@ -118,21 +118,15 @@ See their definition on AnalysisManager.
Note that histograms are disabled via the flag G4ANALYSIS_USE in GNUmakefile.
7. USING THE LAST ANAPHE IMPLEMENTATION OF AIDA HISTOGRAMS
------------------------------------------------------------
7. Using the PI implementation of the AIDA histograms:
------------------------------------------------------
In order to use the new Anaphe implementation of the AIDA interfaces
prepare some environment variables by source-ing one of the following
startup scripts:
In order to setup the proper environmental variables, needed for
running AIDA / PI , run the script:
(THIS EXAMPLE HAS BEEN DEVELOPED AND TESTED WITH THE gcc-2.95.5 COMPILER)
(A.R. 12-Mar-2004 : TESTED ALSO WITH gcc-3.2 or Linux RH 7.3)
--- For c-shell : source setupAidaPi.csh
o Setup the environment variable: G4ANALYSIS_USE 1
o setenv PATH ${PATH}:/afs/cern.ch/sw/lhcxx/specific/redhat73/gcc-2.95.2/5.0.5/bin
o source /afs/cern.ch/sw/lhcxx/share/LHCXX/5.0.5/install/sharedstart.csh
o ln -s /afs/cern.ch/sw/lhcxx/share/LHCXX/5.0.5/scripts/* ~/bin/ (this has
to be done only once)
--- For bash-shell : . setupAidaPi.sh
Notice that you need g++ 3.2 or 3.23.
After this, you will have access to the last 'aida-config' command
which is used in the GNUmakefile.
+11
View File
@@ -0,0 +1,11 @@
#------------------------------------------------------------------
# C-shell script to be run before building/executing this example.
#------------------------------------------------------------------
#
# --- Geant4 specific ---
setenv G4ANALYSIS_USE 1
#
# --- Aida / PI ---
eval `aida-config --runtime csh`
#
+12
View File
@@ -0,0 +1,12 @@
#------------------------------------------------------------------
# Bash-shell script to be run before building/executing this example.
#------------------------------------------------------------------
#
# --- Geant4 specific ---
export G4ANALYSIS_USE=1
#
# --- Aida / PI ---
eval `aida-config --runtime sh`
#
+13 -4
View File
@@ -1,6 +1,6 @@
# $Id: GNUmakefile,v 1.5 2003/12/08 17:53:25 gcosmo Exp $
# $Id: GNUmakefile,v 1.6 2004/06/09 15:04:34 daquinog Exp $
# -------------------------------------------------------------------
# GEANT4 tag $Name: geant4-06-00-patch-01 $
# GEANT4 tag $Name: geant4-06-02 $
# --------------------------------------------------------------
@@ -10,17 +10,26 @@ TIARA_SRC_SWIG_DIRS = CLHEPWrapper G4KernelWrapper TiaraWrapper
include $(G4INSTALL)/config/architecture.gmk
.PHONY: Tiara tiaraClean swigClean all
.PHONY: Tiara tiaraClean swigClean clean_all all
all: Tiara
#ifdef G4ANALYSIS_USE
# CPPFLAGS += `aida-config --include`
# LDFLAGS += `aida-config --lib`
# LDLIBS += `aida-config --lib`
#endif
Tiara:
@for dir in $(TIARA_SRC_DIRS); do ( cd source/$$dir && $(MAKE)); done;:
@for dir in $(TIARA_SRC_SWIG_DIRS); do ( cd source/$$dir && $(MAKE)); done;:
clean_all: swigClean tiaraClean
@rm -f source/py_modules/*.pyc
@rm -rf run/simData
tiaraClean:
@for dir in $(TIARA_SRC_DIRS); do ( cd source/$$dir && $(MAKE) tiaraClean); done;:
@for dir in $(TIARA_SRC_SWIG_DIRS); do ( cd source/$$dir && $(MAKE) tiaraClean); done;:
swigClean:
@for dir in $(TIARA_SRC_SWIG_DIRS); do ( cd source/$$dir && $(MAKE) swigClean); done;:
+7 -2
View File
@@ -1,6 +1,6 @@
# $Id: History,v 1.18 2003/12/09 08:48:33 daquinog Exp $
# $Id: History,v 1.19 2004/06/09 15:04:34 daquinog Exp $
# -------------------------------------------------------------------
# GEANT4 tag $Name: geant4-06-00-patch-01 $
# GEANT4 tag $Name: geant4-06-02 $
# -------------------------------------------------------------------
=========================================================
@@ -18,6 +18,11 @@ committal in the CVS repository !
----------------------------------------------------------
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
Jun 9th, 2004 G.Daquino - Tiara-V06-01-00
- Passing from Anaphe to PI, Tiara has been partly fixed. Still problems
are present on the compatibility between the PI and Anaphe pointers for hf.
However, runSimNoAnalysis.py works correctly, being independent of the
analysis tool.
Dec 9th, 2003 G.Daquino - Tiara-V05-02-06
- Fixed implementation of TiaraPrimaryGeneratorAction, where copy
+35 -41
View File
@@ -1,6 +1,6 @@
# $Id: README,v 1.15 2003/12/08 17:53:25 gcosmo Exp $
# $Id: README,v 1.18 2004/06/13 13:35:12 daquinog Exp $
# -------------------------------------------------------------------
# GEANT4 tag $Name: geant4-06-00-patch-01 $
# GEANT4 tag $Name: geant4-06-02 $
# -------------------------------------------------------------------
Simulation of the TIARA experiment using importance sampling
@@ -16,7 +16,7 @@ created by 43 MeV and 68 MeV protons bombarding a 7Li target are measured
behind several shields. The simulation starts from the neutron spectra.
In this example the interactions of the neutrons with the (concrete)
shields are simulated and energy dependent neutron fluxes are measured
behind the shields. Users may chose to run the simulation for different
behind the shields. Users may choose to run the simulation for different
shielding configuration with or without importance sampling.
The simulated neutron fluxes are compared to the published
experimental data. The efficiency of applying importance sampling
@@ -28,9 +28,9 @@ For Application Developers", Chapter "Toolkit Fundamentals"
Section "Event Biasing Techniques" and references there.
The example has been tested on CERN RH 7.3 with the
gcc-3.2 and gcc-2.95.2 compilers.
gcc-3.2.3 and gcc-2.95.2 compilers.
Note for system testing without analysis: see points 1, 1.3 and 3.2.
Note for system testing without analysis: see points 1.1, 1.3 and 3.2.
@@ -41,51 +41,43 @@ Note for system testing without analysis: see points 1, 1.3 and 3.2.
You must compile Geant4 with:
"G4LIB_BUILD_SHARED" set to 1.
You need to set:
"NeutronHPCrossSections" (e.g. to ${G4INSTALL}/data/G4NDL3.7)
"NeutronHPCrossSections" (e.g. pointing to a directory containing G4NDL3.7)
Three examples are given of how to set environment variables
in the three cases:
1.1) Anaphe via AFS (most simple):
1.1) PI via AFS (most simple):
--------------------
You have access to afs and you want to use Anaphe for the
You have access to afs and you want to use PI for the
analysis:
Set the following environment variables:
"G4ANALYSIS_USE"
"PI_BASE_DIR" (where PI has been installed)
"SWIG_BASE_DIR" (where SWIG has been installed)
"ANAPHETOP" (e.g. /afs/cern.ch/sw/lhcxx)
"AIDA_DIR" (e.g. /afs/cern.ch/sw/contrib/AIDA/3.0/src/cpp)
"ANAPHE_SCRIPTS" (e.g. /afs/cern.ch/sw/lhcxx/share/LHCXX/5.0.6/scripts)
Finally source the script envCommon.csh from the directory
you have Tiara installed, e.g. ${G4INSTALL}/examples/advanced/Tiara
Finally source the script envCommon.csh from the directory where you have Tiara
installed, e.g. ${G4INSTALL}/examples/advanced/Tiara
1.2) No afs but a local Anaphe and AIDA installation:
1.2) No afs but a local PI and SWIG installation:
-----------------------------------------------------
You don't use afs but you have a local installation of Anaphe and AIDA
(e.g. from http://anaphe.web.cern.ch/anaphe/.
You don't use afs but you have a local installation of SWIG and PI
Set the following environment variables:
"G4ANALYSIS_USE"
"PI_BASE_DIR"
"SWIG_BASE_DIR"
"ANAPHETOP" (e.g. <directory>/Anaphe/release)
"AIDA_DIR" (e.g. <directory>/AIDA/3.0.0/3.0.0/AIDA/3.0/src/cpp)
"ANAPHE_SCRIPTS" (e.g. ${ANAPHETOP}/share/LHCXX/5.0.6/scripts)
here <directory> is a place holder for your directory with the
respective installations of Anaphe and AIDA
Finally source the script envCommon.csh from the directory
Finally source the script envCommon.csh from the directory where
you have Tiara installed, e.g. ${G4INSTALL}/examples/advanced/Tiara
1.3) No afs, no Anaphe and no AIDA (e.g. for system testing):
1.3) No afs, no PI and no SWIG (e.g. for system testing):
-------------------------------------------------------------
You don't want to use Anaphe and AIDA and you don't have afs access.
Make sure "G4ANALYSIS_USE" is unset (e.g. unsetenv G4ANALYSIS_USE).
You don't want to use PI and SWIG and you don't have afs access.
Make sure "G4ANALYSIS_USE" is unset (e.g. unsetenv G4ANALYSIS_USE)
Note: python must be built against a "libc".
Note 1: python must be built against a "libc".
You may do this by creating a shared library by a command
similar to this
"ld -shared -o libpython2.2.so --whole-archive libpython2.2.a /usr/lib/libc.so"
@@ -97,16 +89,21 @@ in the three cases:
"SWIG_BASE_DIR" (e.g. /usr)
"CLHEP_BASE_DIR" (e.g. to /opt/local)
Finally source the script envCommon.csh from the directory
Finally source the script envCommon.csh from the directory where
you have Tiara installed, e.g. ${G4INSTALL}/examples/advanced/Tiara
Note 2: Passing from a simulation WITH to another WITHOUT analysis implies
that the G4ANALYSIS_use should be unset and that the SWIG-wrapper scripts
in the directory TiaraWrapper should be deleted. Normally, the whole code
should be compiled again using gmake tiaraClean and, afterwards, gmake.
The same procedure should be followed also passing from a simulation WITHOUT
to another WITH analysis.
2) Building the example
=======================
Geant4 has to be compiled using G4LIB_BUILD_SHARED 1 and the one of the
above environment settings have to be set.
Type "gmake".
@@ -116,10 +113,7 @@ Type "gmake".
Geant4 must be compiled into granular shared libraries.
Therefore before compiling Geant4 set "G4LIB_BUILD_SHARED" to "1".
External packages used in this example are Anaphe, SWIG and Python.
The Anaphe package comes with SWIG and Python versions used to build
Anaphe itself. These SWIG and Python versions should also be used with
this example if Anaphe is used.
External packages used in this example are PI, SWIG and Python.
2.2) Cleaning up
@@ -134,10 +128,10 @@ $G4WORKDIR/tmp/$G4SYSTEM/ use "gmake tiaraClean".
=======================
3.1) Using Anaphe
3.1) Using PI
-----------------
Change to the sub directory "run" and execute "runSim.py".
"runSim.py" runs an example configuration which nay be
"runSim.py" runs an example configuration which may be
changed by the user. The results of the simulation are stored in
the directory "simData".
The script "runSim.py" periodically prints scoring information to the
@@ -146,8 +140,8 @@ It also prints out the relative path of a ".shelve" file.
This file can be used to access results of the simulation.
In case the example was build using analysis
results may be viewed e.g. using lizard and scripts:
1) Start python2.2 or lizard
results may be viewed e.g. using python or ROOT:
1) Start python2.2
2) type: import dataAcess
3) type: p = dataAcess.ExpMcPlot (shelveFileName,detectorposition)
where "shelveFileName" is the name (enclosed in quotes) of the
@@ -184,7 +178,7 @@ set the print out period to 30 minutes by setting:
3.2) Not using Anaphe (mainly for system testing)
3.2) Not using PI (mainly for system testing)
-------------------------------------------------
Change to the sub directory "run" and execute
runSimNoAnalysis.py.
@@ -197,7 +191,7 @@ runSimNoAnalysis.py.
============================
simCommon.csh - a script to setup environment variables
envCommon.csh - a script to setup environment variables
in case the above one of the above environment settings have been
done beforehand.
+25 -27
View File
@@ -1,6 +1,6 @@
# $Id: envCommon.csh,v 1.8 2003/12/08 17:53:26 gcosmo Exp $
# $Id: envCommon.csh,v 1.9 2004/06/09 15:04:34 daquinog Exp $
# -------------------------------------------------------------------
# GEANT4 tag $Name: geant4-06-00-patch-01 $
# GEANT4 tag $Name: geant4-06-02 $
# -------------------------------------------------------------------
# Before sourcing this script make sure you have set the
# environment variables according to the description in README.
@@ -8,44 +8,38 @@
# setup in case Anaphe is used --------------------------------------
if (${?ANAPHE_SCRIPTS} == 1 && ${?ANAPHETOP} == 1 && ${?AIDA_DIR} == 1 ) then
if (${?PI_BASE_DIR} == 1 && ${?SWIG_BASE_DIR} == 1) then
if ( -f $ANAPHE_SCRIPTS/setupAnaphe.csh ) then
source $ANAPHE_SCRIPTS/setupAnaphe.csh
else if ( -f $ANAPHE_SCRIPTS/setup-Anaphe.csh) then
source $ANAPHE_SCRIPTS/setup-Anaphe.csh
else
echo "envCommon.csh: ERROR: could not find a setup file for anaphe"
exit
endif
setenv PATH ${ANAPHE_SCRIPTS}:$PATH
setenv ANAPHESPECDIR `(cd $ANAPHE_REL_DIR/../; pwd)`
setenv PI_VERSION 1_2_1
setenv PI_VER 1.2.1
setenv PI_ARCH rh73_gcc32
setenv PATH ${PATH}:${PI_BASE_DIR}/${PI_VER}/app/releases/PI/PI_${PI_VER}/${PI_ARCH}/bin
setenv PATH ${PI_BASE_DIR}/Linux-g++/bin:$PATH
eval `aida-config -r csh`
#
# python from Anaphe
# python from PI
#
setenv PYTHONVERSION 2.2
setenv PYTHON_INCLUDE_DIR ${ANAPHESPECDIR}/PublicDomainPackages/2.0.0/include/python${PYTHONVERSION}
setenv PYTHON_LIB_DIR ${ANAPHESPECDIR}/PublicDomainPackages/2.0.0/lib/python${PYTHONVERSION}/config
setenv PYTHON_INCLUDE_DIR ${PI_BASE_DIR}/${PI_VER}/external/Python/2.2.2/${PI_ARCH}/include/python${PYTHONVERSION}
setenv PYTHON_LIB_DIR ${PI_BASE_DIR}/${PI_VER}/external/Python/2.2.2/${PI_ARCH}/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/rh73_gcc32/lib:$PYTHONPATH
#
# setup the swig command
#
setenv SWIG_VERSION 1.3.15
setenv SWIG_BASE_DIR ${ANAPHESPECDIR}/PublicDomainPackages/2.0.0
setenv SWIG_INCDIRS "-I${SWIG_BASE_DIR}/lib/swig-${SWIG_VERSION} -I${SWIG_BASE_DIR}/lib/swig-${SWIG_VERSION}/python"
setenv SWIG ${SWIG_BASE_DIR}/bin/swig-${SWIG_VERSION}
#
# CLHEP from Anaphe (shared libraries are required)
#
setenv CLHEP_BASE_DIR ${ANAPHETOP}/specific/${PLATF}/CLHEP/1.8.0.0
#
# add scripts path to PATH
#
setenv PATH ${ANAPHETOP}/share/LHCXX/${ANAPHE_VERSION}/scripts:${PATH}
else # not using Anaphe
echo "-- WARNING: histograms are not activated !"
echo " Either ANAPHE_SCRIPTS, ANAPHETOP or AIDA_DIR are not set."
echo " Either PI_BASE_DIR or SWIG_BASE_DIR are not set."
#
if ( ${?PYTHONVERSION} == 1 && \
${?PYTHON_BASE_DIR} == 1 && \
@@ -75,7 +69,7 @@ else # not using Anaphe
exit
endif
endif # end settings for not using Anaphe
endif # end settings for not using PI
#
# common settings
@@ -92,6 +86,9 @@ setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${G4WORKDIR}/tmp/${G4SYSTEM}/tiaraPhys
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${G4WORKDIR}/tmp/${G4SYSTEM}/tiaraPhysicsLists
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
setenv TIARA_BASE `pwd`
setenv TIARASCRIPTS ${TIARA_BASE}/source/py_modules
if (${?PYTHONPATH} == 0) then
@@ -102,3 +99,4 @@ setenv PYTHONPATH ${PYTHONPATH}:${TIARA_BASE}/run:${TIARASCRIPTS}
setenv PYTHONPATH ${PYTHONPATH}:${TIARA_BASE}/source/TiaraWrapper
setenv PYTHONPATH ${PYTHONPATH}:${TIARA_BASE}/source/G4KernelWrapper
setenv PYTHONPATH ${PYTHONPATH}:${TIARA_BASE}/source/CLHEPWrapper
#
+2 -9
View File
@@ -1,8 +1,8 @@
#!/usr/bin/env python2.2
#
# $Id: runSim.py,v 1.7 2003/06/20 12:41:06 dressel Exp $
# $Id: runSim.py,v 1.8 2004/06/09 15:04:35 daquinog Exp $
# -------------------------------------------------------------------
# GEANT4 tag $Name: geant4-05-02-patch-01 $
# GEANT4 tag $Name: geant4-06-02 $
# -------------------------------------------------------------------
# importing python libraries
@@ -96,7 +96,6 @@ comment = ""
##########################################################################
# this should be fine for most settings
experiment = tiaraSpecifications.Experiment(beamEnergy,
particleCut["neutron"],
particleCut,
@@ -159,10 +158,8 @@ impScorer = G4Kernel.G4Scorer()
##########################################################################
# this and the remaining part should be fine for most settings
tApp = tiaraApplication.TiaraApplet(tiaraSpecs,
Tiara.TiaraSim_GetTiaraSim())
if totalTime == 0:
tApp.visMode()
else:
@@ -173,18 +170,14 @@ tApp.specifyPhysicsList(physList, particleCut)
# detectors
tApp.setScoreDetectorCreator(scoreDetectorCreator)
tApp.buildGeometry()
tiara_dir = os.environ["TIARA_BASE"]
primGenBuilder = tiaraGenerators.\
TiaraDPSEnergyGenerator(tiaraSpecs,
tiara_dir +
"/data/expDataConverted/dpsSource.xml")
#primGenBuilder = tiaraGenerators.TiaraPrimaryGenerator(tiaraSpecs)
#primGenBuilder = tiaraGenerators.FixedEnergyPrimaryGenerator(tiaraSpecs)
tApp.setPrimaryGenerator(primGenBuilder.primGen)
@@ -1,8 +1,8 @@
#!/usr/bin/env python2.2
#
# $Id: runSimNoAnalysis.py,v 1.3 2003/06/20 12:41:06 dressel Exp $
# $Id: runSimNoAnalysis.py,v 1.4 2004/06/09 15:04:35 daquinog Exp $
# -------------------------------------------------------------------
# GEANT4 tag $Name: geant4-05-02-patch-01 $
# GEANT4 tag $Name: geant4-06-02 $
# -------------------------------------------------------------------
@@ -124,7 +124,7 @@ impScorer = G4Kernel.G4Scorer()
##########################################################################
tApp = tiaraApplication.TiaraApplet(tiaraSpecs = tiaraSpecs,
tSim = Tiara.TiaraSim_GetTiaraSim(),
useLizard = False)
usePI = False)
#tApp.visMode()
@@ -190,7 +190,7 @@ rc.impScorer = impScorer
rc.totalTime = totalTime
rc.comment = comment
rs = runSequence.RunSequence(runConfig=rc, useLizard = False)
rs = runSequence.RunSequence(runConfig=rc, usePI = False)
rs.runNevents(100)
rs.runLoop()
+3 -2
View File
@@ -1,8 +1,8 @@
#!/usr/bin/env python2.2
#
# $Id: runVisMode.py,v 1.3 2003/06/20 12:41:06 dressel Exp $
# $Id: runVisMode.py,v 1.4 2004/06/09 15:04:35 daquinog Exp $
# -------------------------------------------------------------------
# GEANT4 tag $Name: geant4-05-02-patch-01 $
# GEANT4 tag $Name: geant4-06-02 $
# -------------------------------------------------------------------
@@ -11,6 +11,7 @@ import os
# importing wrapper modules (see the source/*Wrapper directories)
# created by swig (from the source/*Wrapper/*.i files).
import CLHEP
import Tiara
import G4Kernel
@@ -1,4 +1,4 @@
# $Id: GNUmakefile,v 1.1.1.1 2003/06/12 13:08:24 dressel Exp $
# $Id: GNUmakefile,v 1.2 2004/06/09 15:04:35 daquinog Exp $
# --------------------------------------------------------------
# GNUmakefile Michael Dressel
# --------------------------------------------------------------
@@ -46,3 +46,4 @@ LDLIBS += -lpython$(PYTHONVERSION) \
tiaraClean:
@echo Cleaning up $(G4WORKDIR)/tmp/$(G4SYSTEM)/$(name)
@rm -rf $(G4WORKDIR)/tmp/$(G4SYSTEM)/$(name)
@rm -f *.pyc
@@ -1,4 +1,4 @@
# $Id: GNUmakefile,v 1.5 2003/12/08 17:53:26 gcosmo Exp $
# $Id: GNUmakefile,v 1.6 2004/06/09 15:04:35 daquinog Exp $
# --------------------------------------------------------------
# GNUmakefile Michael Dressel
# --------------------------------------------------------------
@@ -43,4 +43,4 @@ LDLIBS += -lpython$(PYTHONVERSION) \
tiaraClean:
@echo Cleaning up $(G4WORKDIR)/tmp/$(G4SYSTEM)/$(name)
@rm -rf $(G4WORKDIR)/tmp/$(G4SYSTEM)/$(name)
@rm -f *.pyc
@@ -1,4 +1,4 @@
# $Id: GNUmakefile,v 1.6 2003/12/08 17:53:26 gcosmo Exp $
# $Id: GNUmakefile,v 1.7 2004/06/09 15:04:35 daquinog Exp $
# --------------------------------------------------------------
# GNUmakefile Michael Dressel
# --------------------------------------------------------------
@@ -46,10 +46,10 @@ all: $(copyDeps) $(SWIGSO)
include $(G4INSTALL)/config/binmake.gmk
ifdef G4ANALYSIS_USE
CPPFLAGS += `$(ANAPHE_SCRIPTS)/aida-config -i`
CPPFLAGS += `aida-config --include`
# LDFLAGS += `aida-config --lib`
endif
CPPFLAGS += -I$(TIARA_BASE)/source/tiara/include\
-I$(PYTHON_INCLUDE_DIR) \
-I$(TIARA_BASE)/source/tiaraPhysicsPackaging/include \
@@ -65,7 +65,7 @@ LDLIBS1 += -ltiaraPhysicsLists \
-ltiaraPhysicsPackaging-handMade
ifdef G4ANALYSIS_USE
LDLIBS += `$(ANAPHE_SCRIPTS)/aida-config -l`
LDLIBS += `aida-config --lib`
endif
LDLIBS += -lpython$(PYTHONVERSION) \
@@ -89,4 +89,4 @@ tiaraClean:
@echo Cleaning up $(G4WORKDIR)/tmp/$(G4SYSTEM)/$(name)
@echo $(tiaraDeps)
@rm -rf $(G4WORKDIR)/tmp/$(G4SYSTEM)/$(name)
@rm -f *.pyc
@@ -1,445 +0,0 @@
# $Id: liz.py,v 1.2 2003/06/16 17:06:44 dressel Exp $
# -------------------------------------------------------------------
# GEANT4 tag $Name: geant4-05-02-patch-01 $
# -------------------------------------------------------------------
#
import os, sys, string
if ( not os.environ.has_key("ANAPHETOP") ) :
os.environ["ANAPHETOP"] = "/afs/cern.ch/sw/lhcxx"
if ( not os.environ.has_key("PLATF") ) :
os.environ["PLATF"] = "redhat73/gcc-3.2"
if ( not os.environ.has_key("ANAPHE_VERSION") ) :
if ( not os.environ.has_key("ANAPHEVERS") ) :
os.environ["ANAPHEVERS"] = "5.0.4"
else :
os.environ["ANAPHEVERS"] = os.environ["ANAPHE_VERSION"]
if ( not os.environ.has_key("PUBDOMVERS") ) :
os.environ["PUBDOMVERS"] = "2.0.0"
if ( not os.environ.has_key("ANAPHE_REL_DIR") ) :
os.environ["ANAPHE_REL_DIR"] = os.environ["ANAPHETOP"]+"/specific/"+os.environ["PLATF"]+"/"+os.environ["ANAPHEVERS"]
if ( not os.environ.has_key("OS") ) :
os.environ["OS"] = "Linux" # for now !!!
# for debugging purposes this might be set differently ...
if ( not os.environ.has_key("LIZARD_ROOT") ) :
os.environ["LIZARD_ROOT"] = os.environ["ANAPHE_REL_DIR"] + "/python"
os.environ["LIZARD_LIB"] = os.environ["LIZARD_ROOT"] + "/lib"
#-toDo: clean up the LD_LIBRARY_PATH, PATH and PYTHONPATH variables from wrong versions
# of Anaphe s/w
#export LD_LIBRARY_PATH=`${LIZARD_ROOT}/bin/cleanupPath.py LD_LIBRARY_PATH`
#export PATH=`${LIZARD_ROOT}/bin/cleanupPath.py PATH`
#export PYTHONPATH=`${LIZARD_ROOT}/bin/cleanupPath.py PYTHONPATH`
# add to path in order to find xmgrace ...
if (not os.environ.has_key("GRACE_DIR") ) :
os.environ["GRACE_DIR"] = os.environ["ANAPHETOP"]+"/specific/"+os.environ["PLATF"]+"/PublicDomainPackages/" + os.environ["PUBDOMVERS"] + "/grace"
os.environ["PATH"] = os.environ["GRACE_DIR"] + "/bin:" + os.environ["PATH"]
os.environ["LD_LIBRARY_PATH"] = os.environ["LD_LIBRARY_PATH"] + ":" + os.environ["LIZARD_LIB"] + ":" + os.environ["ANAPHE_REL_DIR"] + "/lib"
# toDo:
# if [ `uname` = "SunOS" ] ; then
# SUN_CC_DIR=/afs/cern.ch/project/sun/solaris/opt/SUNWspro62Apr02
# export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${SUN_CC_DIR}/lib:/usr/local/lib # /opt/SUNWspro/lib:/usr/local/lib:/opt/SUNWspro/WS6U1/lib
# fi
#
# to find the proper versions of libs for python-2.0 and swig-1.3a5
# (it should be SWIG_DIR)
if (not os.environ.has_key("SWIG_DIR")) :
os.environ["SWIG_DIR"] = os.environ["ANAPHETOP"]+"/specific/"+os.environ["PLATF"]+"/PublicDomainPackages/" + os.environ["PUBDOMVERS"]
os.environ["LD_LIBRARY_PATH"] = os.environ["SWIG_DIR"] + "/lib:" + os.environ["LD_LIBRARY_PATH"]
# need to add "." for automatic code compilation (ntuples et al)
os.environ["LD_LIBRARY_PATH"] = os.environ["LD_LIBRARY_PATH"] + ":" + os.environ["LIZARD_ROOT"] + "/" + os.environ["PLATF"] + ":."
# add to PYTHONPATH
sys.path.append(os.environ["LIZARD_LIB"])
sys.path.append(os.environ["LIZARD_ROOT"] + "/" + os.environ["PLATF"])
sys.path.append(os.environ["LIZARD_ROOT"] + "/src")
sys.path.append(os.environ["HOME"])
sys.path.append(os.environ["LIZARD_ROOT"] + "/contrib")
# toDo
#if [ -z $LIZARD_NO_PUBLIC_CONTRIB ] ; then
# export PYTHONPATH=${PYTHONPATH}:${ANAPHETOP}/share/PythonContrib
#fi
# # define location of python
# if [ -z $PYDIR ] ; then
# export PYDIR=${ANAPHETOP}/specific/${PLATF}/PublicDomainPackages/${PUBDOMVERS}
# fi
#
# if [ -z $PYTHON ] ; then
# export PYTHON=${PYDIR}/bin/python2.2
# fi
#
# create a local temporary file (with the PID as part of the name) to
# speed up access from Nag fitter if starting directory is in AFS:
if (not os.environ.has_key("LIZARD_KEEP_FITRESULT")) :
os.system("rm -f e04ucc.r")
os.system("ln -s /tmp/pid-$$-e04ucc.r e04ucc.r")
# $PYTHON -i ${LIZARD_ROOT}/bin/.Lizardrc $*
print "executing startup from'"+os.environ["LIZARD_ROOT"] + "/bin/.Lizardrc"+"'"
# execfile(os.environ["LIZARD_ROOT"] + "/bin/.Lizardrc")
# Settings for Lizard
lizardVersion = "3.0.0.5"
lizardVersionDate = "20 Dec 2002"
lizardBatch = None
lizardObjy = None
lizardNag = None
lizardNoGraphics = None
from math import *
from time import *
import string
import os
import sys
import random
import atexit
import gc
# the following works only for python-2.0 (or later)
# for command-line completion :
import rlcompleter
rlcompleter.readline.parse_and_bind("tab: complete")
try :
if (sys.version_info[0] == 2) :
# for history (across-sessions)
import readline
# limit history file to 1000 lines
readline.set_history_length(1000)
# read previous file (if existing)
histfile = os.path.join(os.environ["HOME"], ".LizHist")
try:
readline.read_history_file(histfile)
except IOError:
print "cannot read command history file ", histfile
pass
# register function to write history file at exit
atexit.register(readline.write_history_file, histfile)
del histfile
# end history
except :
print "\nerror while accessing command history file"
raise
# end python-2.0 specific part ...
# --------------------------------------------------------------------------------
def usage ():
print """
usage: startLizard.sh [<options>] [<file1> <file2> ...]
where the optional <options> can be one of the following:
-?, -h, --help : print this text
-v, --version : print version info
-b, --batch : run in batch mode and execute the scripts passed after all options
--noGraphics : don't instantiate a Plotter (use this if your DISPLAY variable is not set)
--useNag : use minimizer engine from Nag-C library
--useObjy : use Objectivity/DB for persistent Histograms and (row-wise) Ntuples
default : use FML with Minuit minimizer engine
the (optional) list of files will be executed after startup
NOTE: the options need to be _before_ any script file
"""
# --------------------------------------------------------------------------------
# set some defaults: use FML, Objy, Nag-C
# --------------------------------------------------------------------------------
lizardFML = 1
lizardHBook = 0
lizardNag = 0
# --------------------------------------------------------------------------------
# --------------------------------------------------------------------------------
def lizardVersionInfo() :
print "\nThis is Lizard version " + lizardVersion + "\n"
# --------------------------------------------------------------------------------
# check if we got any flags:
# --------------------------------------------------------------------------------
import getopt
#optlist = []
#args = []
try:
optlist, args = getopt.getopt(sys.argv[1:], ['?', 'h', 'v', 'b'],
['help', 'version', 'batch', 'noGraphics',
'useNag', 'useNag', 'useObjy', 'objy' ])
except :
print "\nunknown option:",o,"\n"
usage()
sys.exit()
# --------------------------------------------------------------------------------
# have a first look at options now, see if the user wants some info without
# the need to start the system ...
# --------------------------------------------------------------------------------
for o, a in optlist:
if o in ("-?", "-h", "--help"):
usage()
sys.exit()
elif o in ("-v", "--version",):
lizardVersionInfo()
sys.exit()
elif o in ("", "--useObjy", "--objy",):
lizardObjy = 1
import dl
# --------------------------------------------------------------------------------
# check if Objectivity can be used, if requested
# --------------------------------------------------------------------------------
if (lizardObjy == 1) :
try:
dl.open( "liboo.so" )
except:
print "Objectivity requested, but liboo not found in LD_LIBRARY_PATH !! Aborting !"
sys.exit()
# --------------------------------------------------------------------------------
# check if Nag_C can be used,
# --------------------------------------------------------------------------------
if (lizardNag == 1 ) :
try:
dl.open( "libnagc.so" )
except:
print "Minimizer from NAG requested, but libnagc not found in LD_LIBRARY_PATH !! Aborting !"
sys.exit()
# --------------------------------------------------------------------------------
# check the other possible flags:
# --------------------------------------------------------------------------------
for o, a in optlist:
if o in ("-b", "--batch",):
lizardBatch = 1
elif o in ("--noGraphics",):
lizardNoGraphics = 1
elif o in ("--nag", "--useNag"):
lizardNag = 1
# --------------------------------------------------------------------------------
print "\n"
# --------------------------------------------------------------------------------
# check now whether DISPLAY is set.
# --------------------------------------------------------------------------------
if (lizardNoGraphics != 1) :
try:
disp = os.environ["DISPLAY"]
except:
print "\n==========> no DISPLAY set, switching to no-graphics mode."
lizardNoGraphics = 1
# prompt
sys.ps1=":-) "
# --------------------------------------------------------------------------------
# welcome message parameters
lizMsgWelcome = "Welcome to Lizard"
lizMsgID = "Version "+ lizardVersion + " (" + lizardVersionDate + ")"
lizMsgURL = "http://cern.ch/Anaphe"
lizMsgSide = "|"
lizMsgCorner = "+"
lizMsgTop = "-"
lizMsgWidth = 50
lizMsgSideIndent = 8
lizMsgTopIndent = 1
# generate welcome message
lizMsgBar = ""
for i in range (0,lizMsgWidth) :
lizMsgBar = lizMsgBar + lizMsgTop
lizMsgPad = ""
for i in range (0,lizMsgSideIndent) :
lizMsgPad = lizMsgPad + " "
lizMsgBlank = lizMsgSide + string.center("",lizMsgWidth) + lizMsgSide
for i in range (0, lizMsgTopIndent) :
print ""
print lizMsgPad + lizMsgCorner + lizMsgBar + lizMsgCorner
print lizMsgPad + lizMsgBlank
print lizMsgPad + lizMsgSide + string.center(lizMsgWelcome,lizMsgWidth) + lizMsgSide
print lizMsgPad + lizMsgBlank
print lizMsgPad + lizMsgSide + string.center(lizMsgID,lizMsgWidth) + lizMsgSide
print lizMsgPad + lizMsgBlank
print lizMsgPad + lizMsgSide + string.center(lizMsgURL,lizMsgWidth) + lizMsgSide
print lizMsgPad + lizMsgBlank
print lizMsgPad + lizMsgCorner + lizMsgBar + lizMsgCorner
for i in range (0, lizMsgTopIndent) :
print ""
# --------------------------------------------------------------------------------
print "Chosen configuration: ",
if ( lizardObjy == 1 ) :
print "Objectivity",
else:
print "HBook and XML",
print " persistency and ",
if ( lizardNag == 1 ) :
print "Nag-C",
else:
print "Minuit",
print "minimizer engine"
print "\nType help() for help\n"
sys.stdout.flush()
# --------------------------------------------------------------------------------
# global startup files ...
# --------------------------------------------------------------------------------
# remember where we started from ...
curDir = os.getcwd()
# check for global StartupFiles (so far, the order doesn't matter):
startDir = os.environ['LIZARD_ROOT']+"/startUpFiles/"
fileList = os.listdir(startDir)
# change to directory containing the startup files and exec them one by one:
os.chdir(startDir)
try:
for file in fileList :
if (string.find(file,".py") == -1) :
continue;
if (file == "constants.py") :
continue;
if (os.path.isfile(file)) :
# print "loading startUp file ", file
execfile(file)
else :
print "Strange: cannot \"execfile\" startUp file ", file, " in ", startDir, " !?!?"
except:
raise
#-ap execfile("constants.py")
# return to where we left from ...
os.chdir(curDir)
LizardIsInitialized = 1
print "\n\nLizard initialised\n"
# --------------------------------------------------------------------------------
# local/user-specific startup files ...
# --------------------------------------------------------------------------------
# check for local initfiles:
homeStart = os.environ['HOME']+"/.Lizardrc"
if os.path.isfile(homeStart):
execfile(homeStart)
# avoid reading it twice ...
if (os.getcwd() != os.environ['HOME'] and
os.getcwd() != os.environ['LIZARD_ROOT']+"/bin" ) :
localStart = "./.Lizardrc"
if os.path.isfile(localStart):
execfile(localStart)
# --------------------------------------------------------------------------------
def lizardCleanUp() :
global af, tf, pf, pl
# in reverse order of construction
if (lizardNoGraphics != 1) :
pl.thisown = 1 ; del pl
pf.thisown = 1 ; del pf
tf.thisown = 1 ; del tf
af.thisown = 1 ; del af
# print "global objects deleted ... " ; sys.stdout.flush()
for lib in theListOfLoadedLibraries.keys() :
sys.stdout.flush()
theListOfLoadedLibraries[lib].close()
# print "\nall libs unloaded ... " ; sys.stdout.flush()
print "\nobjects deleted and libs unloaded, exiting python ... " ; sys.stdout.flush()
return
# --------------------------------------------------------------------------------
def exit() :
lizardCleanUp()
sys.exit()
# --------------------------------------------------------------------------------
# execute file given at input (ignoring startup file .Lizardrc) ...
# --------------------------------------------------------------------------------
if (len(args) > 0 ) :
args[0] = os.path.abspath(args[0])
file = args[0]
# reset the environment ... the scripts will now look as if invoked from the shell ...
sys.argv = args
print "executing ", file
if (os.path.isfile(file)) :
try :
execfile(file)
except:
# if something goes wrong in batch mode, clean up and exit ...
if (lizardBatch == 1) :
lizardCleanUp()
sys.exit(2)
else :
raise
else :
print "file ", file, " not found."
if (lizardBatch == 1) :
# clean up (explicitly destroy some objects)
lizardCleanUp()
sys.exit()
@@ -1,10 +1,11 @@
# $Id: myLiz.py,v 1.2 2003/06/16 17:06:44 dressel Exp $
# $Id: myPI.py,v 1.1 2004/06/09 15:04:36 daquinog Exp $
# -------------------------------------------------------------------
# GEANT4 tag $Name: geant4-05-02-patch-01 $
# GEANT4 tag $Name: geant4-06-02 $
# -------------------------------------------------------------------
#
import sys
origArgv = sys.argv
sys.argv = ["","--noGraphics"]
from liz import *
from PyAida import *
sys.argv = origArgv
@@ -1,6 +1,6 @@
# $Id: myUtils.py,v 1.4 2003/06/20 12:41:06 dressel Exp $
# $Id: myUtils.py,v 1.5 2004/06/09 15:04:36 daquinog Exp $
# -------------------------------------------------------------------
# GEANT4 tag $Name: geant4-05-02-patch-01 $
# GEANT4 tag $Name: geant4-06-02 $
# -------------------------------------------------------------------
#
import CLHEP
@@ -13,7 +13,7 @@ import shelve
G4analysisUse = os.environ.has_key("G4ANALYSIS_USE")
if G4analysisUse:
import myLiz
import myPI
def createParallelSampler(impGeo, impScorer):
@@ -48,7 +48,7 @@ def saveResults(tApp, path, shelveName, impScorer, impGeo):
table.Print(tApp.cellScorerStore.GetMapGeometryCellCellScorer())
if G4analysisUse:
storePath = path + "/" + myShelve["xmlStoreName"]
persistantStore = myLiz.tf.create(storePath,"xml",0,1)
persistantStore = myPI.tf.create(storePath,"xml",0,1)
coppyTrees(tApp.tree, persistantStore)
persistantStore.commit()
persistantStore.close()
@@ -187,7 +187,7 @@ if G4analysisUse:
def addToXML(mergedXMLStore, xmlStore):
objNames = xmlStore.listObjectNames()
objTypes = xmlStore.listObjectTypes()
hf = myLiz.af.createHistogramFactory(mergedXMLStore)
hf = myPI.af.createHistogramFactory(mergedXMLStore)
for i in range(len(objNames)):
oName = objNames[i]
oType = objTypes[i]
@@ -230,11 +230,11 @@ def addToShelve(mergedShelve, she, shelveNameToBeAdded):
if G4analysisUse:
def mergeData(mergedName, shelveList):
mergedShelveName = mergedName + ".shelve"
print "createing merged shelve: ", mergedShelveName
print "creating merged shelve: ", mergedShelveName
mergedShelve = shelve.open(mergedShelveName)
mergedXMLname = mergedName + ".xml"
print "createing merged XML store: ", mergedXMLname
mergedXMLStore = myLiz.tf.create(mergedXMLname, "xml", 0, 1)
print "creating merged XML store: ", mergedXMLname
mergedXMLStore = myPI.tf.create(mergedXMLname, "xml", 0, 1)
for i in range(len(shelveList)):
@@ -243,7 +243,7 @@ if G4analysisUse:
she = shelve.open(shelveName,"r")
xmlStoreName = she["xmlStoreName"]
print "opening: ", xmlStoreName
xmlStore = myLiz.tf.create(xmlStoreName,"xml",1,0)
xmlStore = myPI.tf.create(xmlStoreName,"xml",1,0)
if i == 0:
if mergedXMLStore.listObjectNames() == ():
setUpMergedShelve(she, mergedShelve, mergedXMLname, shelveName)
@@ -1,6 +1,6 @@
# $Id: runSequence.py,v 1.3 2003/06/16 17:06:44 dressel Exp $
# $Id: runSequence.py,v 1.4 2004/06/09 15:04:36 daquinog Exp $
# -------------------------------------------------------------------
# GEANT4 tag $Name: geant4-05-02-patch-01 $
# GEANT4 tag $Name: geant4-06-02 $
# -------------------------------------------------------------------
#
import Tiara
@@ -31,9 +31,9 @@ class RunConfig(object):
class RunSequence(object):
# methods to be used public
def __init__(self, runConfig, useLizard = True):
def __init__(self, runConfig, usePI = True):
self.rc = runConfig
self.useLizard = useLizard
self.usePI = usePI
self.runNum = -1
self.confInfo = self.rc.getConfInfo()
self.storeName = myUtils.getStoreName()
@@ -74,7 +74,7 @@ class RunSequence(object):
def report(self):
print "\n\nRunSequence.report:"
print self.confInfo
if self.useLizard:
if self.usePI:
print "the xml store will be named: "
print " ", self.pathXMLName
print "the shelve name: "
@@ -97,7 +97,7 @@ class RunSequence(object):
rns = string.rjust(rns, 5)
rns = string.replace(rns,' ','0')
rId = "_run" + rns
if self.useLizard:
if self.usePI:
self.xmlStore = self.storeName + rId + ".xml"
self.pathXMLName = self.path + "/" + self.xmlStore
@@ -108,7 +108,7 @@ class RunSequence(object):
def mkShelve(self):
myShelve = shelve.open(self.pathShelveName)
if self.useLizard:
if self.usePI:
myShelve["xmlStoreName"] = self.xmlStore
for info in self.confInfo:
myShelve[info] = self.confInfo[info]
@@ -1,10 +1,9 @@
# $Id: tiaraApplication.py,v 1.3 2003/06/16 17:06:44 dressel Exp $
# $Id: tiaraApplication.py,v 1.4 2004/06/09 15:04:36 daquinog Exp $
# -------------------------------------------------------------------
# GEANT4 tag $Name: geant4-05-02-patch-01 $
# GEANT4 tag $Name: geant4-06-02 $
# -------------------------------------------------------------------
#
import string
import CLHEP
import G4Kernel
import Tiara
@@ -16,11 +15,27 @@ import tallyData
class TiaraApplet(object):
tiaraSim = None
def __init__(self, tiaraSpecs, tSim = None, useLizard = True):
if useLizard:
import myLiz
self.tree = myLiz.tf.create()
self.hf = myLiz.af.createHistogramFactory (self.tree)
def __init__(self, tiaraSpecs, tSim = None, usePI = True):
if usePI:
import myPI
self.tree = myPI.tf.create()
self.hf = myPI.af.createHistogramFactory (self.tree)
print self.hf
print "hf"
hf_ptr = str(self.hf._theObject)
print hf_ptr
print "hf_ptr before split"
hf_ptr = string.split(str(self.hf._theObject))[-1]
print hf_ptr
print "hf_ptr after split"
hf_ptr2 = hf_ptr.split('x')[1]
for i in range(len(hf_ptr2),8) :
hf_ptr2 = '0'+hf_ptr2
self.hf.this='_' + hf_ptr2 + '_p_AIDA__IHistogramFactory'
self.hf.thisown = 1
print self.hf.this
print "hf.this after split"
else:
self.tree = None
self.hf = None
@@ -160,6 +175,7 @@ class TiaraApplet(object):
self.tiaraSpecs.
experiment.binEdgesBonner,
tally)
else:
self.scSrc = Tiara.\
TiaraCellScorer("source_detector",
@@ -220,4 +236,3 @@ class TiaraApplet(object):
self.sampler.Configure()
@@ -1,6 +1,6 @@
# $Id: tiaraDetectors.py,v 1.3 2003/06/20 12:41:07 dressel Exp $
# $Id: tiaraDetectors.py,v 1.4 2004/06/09 15:04:36 daquinog Exp $
# -------------------------------------------------------------------
# GEANT4 tag $Name: geant4-05-02-patch-01 $
# GEANT4 tag $Name: geant4-06-02 $
# -------------------------------------------------------------------
#
import CLHEP
@@ -1,6 +1,6 @@
# $Id: tiaraGenerators.py,v 1.2 2003/06/16 17:06:44 dressel Exp $
# $Id: tiaraGenerators.py,v 1.3 2004/06/09 15:04:36 daquinog Exp $
# -------------------------------------------------------------------
# GEANT4 tag $Name: geant4-05-02-patch-01 $
# GEANT4 tag $Name: geant4-06-02 $
# -------------------------------------------------------------------
#
import string
@@ -36,7 +36,6 @@ class TiaraPrimaryGenerator(object):
class TiaraDPSEnergyGenerator(object):
def __init__(self, tiaraSpecs, xmlName):
self.Name = "dpsSource"
self.eSamp = Tiara.\
TiaraDPSSampledEnergy(tiaraSpecs.
experiment.energy,
@@ -45,7 +44,6 @@ class TiaraDPSEnergyGenerator(object):
xmlName,
"")
self.tally = Tiara.TiaraTally()
if string.find(xmlName,"other") > -1:
@@ -1,4 +1,4 @@
# $Id: GNUmakefile,v 1.5 2003/12/08 17:53:26 gcosmo Exp $
# $Id: GNUmakefile,v 1.6 2004/06/09 15:04:37 daquinog Exp $
# --------------------------------------------------------------
# GNUmakefile Michael Dressel
# --------------------------------------------------------------
@@ -27,9 +27,11 @@ all: lib bin
include $(G4INSTALL)/config/binmake.gmk
ifdef G4ANALYSIS_USE
CPPFLAGS += `$(ANAPHE_SCRIPTS)/aida-config -i`
CPPFLAGS += `aida-config --include`
# LDFLAGS += `aida-config --lib`
endif
CPPFLAGS += -I$(PYTHON_INCLUDE_DIR) \
-I$(TIARA_BASE)/source/tiaraPhysicsPackaging/include \
-I$(TIARA_BASE)/source/tiaraPhysicsLists/include
@@ -37,7 +39,7 @@ CPPFLAGS += -I$(PYTHON_INCLUDE_DIR) \
LDFLAGS += -L$(PYTHON_LIB_DIR)
ifdef G4ANALYSIS_USE
LDLIBS += `$(ANAPHE_SCRIPTS)/aida-config -l`
LDLIBS += `aida-config --lib`
endif
LDLIBS += -lpython$(PYTHONVERSION) \
@@ -20,8 +20,8 @@
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: TiaraDPSSampledEnergy.hh,v 1.5 2003/06/25 09:12:37 gunter Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// $Id: TiaraDPSSampledEnergy.hh,v 1.6 2004/06/09 15:04:37 daquinog Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
// ----------------------------------------------------------------------
//
@@ -61,8 +61,13 @@ private:
void getBounds(G4int &cL, G4int &cH, G4double v);
std::auto_ptr<AIDA::ITree> fTree;
std::auto_ptr<AIDA::IDataPointSet> fSampleDPS;
//std::auto_ptr<AIDA::ITree> fTree;
// std::auto_ptr<AIDA::IDataPointSet> fSampleDPS;
// /////
AIDA::ITree* fTree;
AIDA::IDataPointSet* fSampleDPS;
//////
G4double fMinEnergyCut;
std::map<int, double> fEnergy_Flux;
G4double fMaxProb;
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: TiaraCellScorer.cc,v 1.3 2003/06/18 16:40:28 gunter Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// $Id: TiaraCellScorer.cc,v 1.4 2004/06/09 15:04:37 daquinog Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
@@ -48,22 +48,37 @@ TiaraCellScorer::TiaraCellScorer(AIDA::IHistogramFactory *hf,
&binEdgesBonner,
const TiaraTally &tally) :
fBaseName(histBaseName),
fEnergyHisto(hf->createHistogram1D(histBaseName,
histBaseName + ": flux vs. energy",
binEdgesScinti)),
fEnergyFluxHisto(hf->createHistogram1D(histBaseName + "Eflux",
histBaseName + ": energy flux vs. energy",
binEdgesScinti)),
// fEnergyHisto(hf->createHistogram1D(histBaseName,
// histBaseName + ": flux vs. energy",
// binEdgesScinti)),
//fEnergyFluxHisto(hf->createHistogram1D(histBaseName + "Eflux",
// histBaseName + ": energy flux vs. energy",
// binEdgesScinti)),
fEnergyHistoBonner(hf->createHistogram1D(histBaseName + "Bonner",
histBaseName + ": flux vs. energy",
binEdgesBonner)),
fEnergyFluxHistoBonner(hf->createHistogram1D(histBaseName + "BonnerEflux",
histBaseName + ": energy flux vs. energy",
binEdgesBonner)),
//fEnergyHistoBonner(hf->createHistogram1D(histBaseName + "Bonner",
// histBaseName + ": flux vs. energy",
// binEdgesBonner)),
//fEnergyFluxHistoBonner(hf->createHistogram1D(histBaseName + "BonnerEflux",
// histBaseName + ": energy flux vs. energy",
// binEdgesBonner)),
fTally(tally)
{}
{
//G4cout << "porca troia" << G4endl;
G4cout << hf << " hf in G4" << G4endl;
fEnergyHisto = hf->createHistogram1D(histBaseName,
histBaseName + ": flux vs. energy",
binEdgesScinti);
fEnergyFluxHisto = hf->createHistogram1D(histBaseName + "Eflux",
histBaseName + ": energy flux vs. energy",
binEdgesScinti);
fEnergyHistoBonner = hf->createHistogram1D(histBaseName + "Bonner",
histBaseName + ": flux vs. energy",
binEdgesBonner);
fEnergyFluxHistoBonner = hf->createHistogram1D(histBaseName + "BonnerEflux",
histBaseName + ": energy flux vs. energy",
binEdgesBonner);
}
#else
TiaraCellScorer::TiaraCellScorer(const G4String &histBaseName,
const TiaraTally &tally) :
@@ -20,8 +20,8 @@
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: TiaraDPSSampledEnergy.cc,v 1.7 2003/12/08 17:53:27 gcosmo Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: TiaraDPSSampledEnergy.cc,v 1.8 2004/06/09 15:04:37 daquinog Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
#include "TiaraDPSSampledEnergy.hh"
@@ -40,16 +40,34 @@ TiaraDPSSampledEnergy::TiaraDPSSampledEnergy(const G4String &eng,
const G4String &sourceTree,
const G4String &nameExt)
:
fTree( (checkFileIsReadable(sourceTree, "TiaraDPSSampledEnergy::TiaraDPSSampledEnergy"),
AIDA_createAnalysisFactory()
->createTreeFactory()
->create(sourceTree, "xml",true,false)) ),
fSampleDPS(dynamic_cast<AIDA::IDataPointSet *>(fTree->find(G4String("dps" + eng + nameExt)))),
// fTree( (checkFileIsReadable(sourceTree, "TiaraDPSSampledEnergy::TiaraDPSSampledEnergy"),
// AIDA_createAnalysisFactory()
// ->createTreeFactory()
// ->create(sourceTree, "xml",true,false)) ),
//fSampleDPS(dynamic_cast<AIDA::IDataPointSet *>(fTree->find(G4String("dps" + eng + nameExt)))),
fMinEnergyCut(minEnergyCut),
fMaxProb(0),
fMinE(fSampleDPS->point(0)->coordinate(0)->value()),
fMaxE(fSampleDPS->point(fSampleDPS->size()-1)->coordinate(0)->value())
fMaxProb(0)
// fMinE(fSampleDPS->point(0)->coordinate(0)->value()),
//fMaxE(fSampleDPS->point(fSampleDPS->size()-1)->coordinate(0)->value())
{
/////////////////////////////////////////
AIDA::IAnalysisFactory* aFact = AIDA_createAnalysisFactory();
AIDA::ITreeFactory *treeFact = aFact->createTreeFactory();
fTree = treeFact -> create(sourceTree, "xml",true,false);
AIDA::IManagedObject* object = fTree->find("dps" + eng + nameExt);
if(object) {
AIDA::IDataPointSet* sample = object->cast("AIDA::IDataPointSet");
fSampleDPS = sample;
}
fMinE = fSampleDPS->point(0)->coordinate(0)->value();
fMaxE = fSampleDPS->point(fSampleDPS->size()-1)->coordinate(0)->value();
/////////////////////////////////////////
for (G4int i=0; i < fSampleDPS->size(); i++) {
AIDA::IDataPoint *p = fSampleDPS->point(i);
G4double prob(p->coordinate(1)->value());
+2 -2
View File
@@ -22,7 +22,7 @@
//
//
// $Id: Brachy.cc
// GEANT4 tag $Name: geant4-06-01 $
// GEANT4 tag $Name: geant4-06-02 $
//
// --------------------------------------------------------------
// GEANT 4 - Brachytherapy example
@@ -100,7 +100,7 @@ int main(int argc ,char ** argv)
#ifdef G4ANALYSIS_USE
G4cout << G4endl << G4endl << G4endl
<< " User Environment " << G4endl
<< " Using AIDA 3.0 analysis " << G4endl;
<< " Using AIDA 3.2.1 analysis " << G4endl;
# else
G4cout << G4endl << G4endl << G4endl
<< " User Environment " << G4endl
+6 -2
View File
@@ -1,5 +1,5 @@
-------------------------------------------------------------------
$Id: History,v 1.7 2004/03/11 15:38:41 guatelli Exp $
$Id: History,v 1.8 2004/05/13 14:47:46 guatelli Exp $
-------------------------------------------------------------------
=========================================================
@@ -8,7 +8,11 @@ $Id: History,v 1.7 2004/03/11 15:38:41 guatelli Exp $
Category History file
---------------------
11.3.2003 - Susanna Guatelli
13.5.2004 - Susanna Guatelli
Migration to AIDA 3.2.1 and PI 1.2.1
11.3.2004 - Susanna Guatelli
Add a histogram, maintenance of the code
12.11.2003 - John Allison
@@ -4,4 +4,4 @@
/source/switch Iodium
/run/energy Iodium
/run/initialize
/run/beamOn 1000
/run/beamOn 5000
@@ -2,4 +2,4 @@
/run/verbose 0
/event/verbose 0
/run/initialize
/run/beamOn 1000
/run/beamOn 5000
@@ -3,4 +3,4 @@
/event/verbose 0
/source/switch Leipzig
/run/initialize
/run/beamOn 1000
/run/beamOn 5000
+9 -14
View File
@@ -23,28 +23,23 @@ voxels (1.mm dimension) |
-------------------------------------------------------------------------
----> 2.SET-UP
|
-example enviroment with the compiler 3.2
-example enviroment with the compiler 3.2.3
-a standard Geant4 example GNUmakefile is provided |
setup with: |
compiler = gcc-3.2
compiler = gcc-3.2.3
G4SYSTEM = linux-g++ |
The following environment variables need to be set: |
G4LEDATA: points to low energy data base - G4EMLOW2.2 |
G4LEDATA: points to low energy data base - G4EMLOW2.3 |
setup for analysis with AIDA 3.0/Anaphe 5.0.5 for user with account |
on lxplus:
|
setenv G4ANALYSIS_USE 1
|
source /afs/cern.ch/sw/lhcxx/share/LHCXX/5.0.5/scripts/setupAnaphe.csh
setenv PATH ${PATH}:/afs/cern.ch/sw/lhcxx/share/LHCXX/5.0.5/scripts/ |
setup for analysis: AIDA 3.2.1, PI 1.2.1 |
Please take a look to the Anaphe/Lizard web page |
http://anaphe.web.cern.ch/anaphe
for more info |
Users can download the analysis tools from:
|
http://aida.freehep.org/
http://www.cern.ch/PI |
------------------------------------------------------------------------
----> 3.How to run the example. |
@@ -108,4 +103,4 @@ a macro is provided ad example of visualisation: VisualisationMacro.mac|
for comments, advices, doubts and questions: guatelli@ge.infn.it
for more info http://www.ge.infn.it/geant4/examples/index.html
last modified: Susanna Guatelli 11/3/2004
last modified: Susanna Guatelli 14/5/2004
@@ -29,8 +29,8 @@
// * *
// *******************************
//
// $Id: BrachyAnalysisManager.cc,v 1.13 2004/03/11 15:38:42 guatelli Exp $
// GEANT4 tag $Name: geant4-06-01 $
// $Id: BrachyAnalysisManager.cc,v 1.14 2004/05/13 14:47:46 guatelli Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
#ifdef G4ANALYSIS_USE
#include <stdlib.h>
@@ -34,8 +34,8 @@
// * *
// ****************************************
//
// $Id: BrachyDetectorConstruction.cc,v 1.24 2004/03/11 16:05:02 guatelli Exp $
// GEANT4 tag $Name: geant4-06-01 $
// $Id: BrachyDetectorConstruction.cc,v 1.25 2004/05/13 14:47:46 guatelli Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
#include "BrachyPhantomROGeometry.hh"
#include "BrachyPhantomSD.hh"
@@ -101,7 +101,7 @@ BrachyDetectorConstruction::BrachyDetectorConstruction(G4String &SDName)
factory = new BrachyFactoryIr();
pMaterial= new BrachyMaterial();
pMaterial = new BrachyMaterial();
}
@@ -115,9 +115,9 @@ BrachyDetectorConstruction::~BrachyDetectorConstruction()
G4VPhysicalVolume* BrachyDetectorConstruction::Construct()
{
pMaterial-> DefineMaterials();
pMaterial -> DefineMaterials();
ConstructPhantom();
factory->CreateSource(PhantomPhys);
factory -> CreateSource(PhantomPhys); //Build the source inside the phantom
ConstructSensitiveDetector();
return WorldPhys;
@@ -125,7 +125,8 @@ G4VPhysicalVolume* BrachyDetectorConstruction::Construct()
void BrachyDetectorConstruction::SwitchBrachytherapicSeed()
{
factory->CleanSource();
factory -> CleanSource();
delete factory;
switch(detectorChoice)
{
@@ -142,11 +143,10 @@ void BrachyDetectorConstruction::SwitchBrachytherapicSeed()
factory = new BrachyFactoryIr();
break;
}
factory->CreateSource(PhantomPhys);
factory -> CreateSource(PhantomPhys);
// Notify run manager that the new geometry has been built
G4RunManager::GetRunManager()->DefineWorldVolume( WorldPhys );
G4RunManager::GetRunManager() -> DefineWorldVolume( WorldPhys );
}
void BrachyDetectorConstruction::SelectBrachytherapicSeed(G4String val)
@@ -176,28 +176,32 @@ void BrachyDetectorConstruction::ConstructPhantom()
{
G4Colour lblue (0.0, 0.0, .75);
G4Material* air=pMaterial->GetMat("Air") ;
G4Material* water=pMaterial->GetMat("Water");
G4Material* air = pMaterial -> GetMat("Air") ;
G4Material* water = pMaterial -> GetMat("Water");
ComputeDimVoxel();
// World volume
World = new G4Box("World",Worldx,Worldy,Worldz);
WorldLog = new G4LogicalVolume(World,air,"WorldLog",0,0,0);
WorldPhys = new G4PVPlacement(0,G4ThreeVector(),"WorldPhys",WorldLog,0,false,0);
WorldPhys = new G4PVPlacement(0,G4ThreeVector(),
"WorldPhys",WorldLog,0,false,0);
// Water Box
Phantom = new G4Box("Phantom",phantomDimensionX,phantomDimensionY,phantomDimensionZ);
Phantom = new G4Box("Phantom",phantomDimensionX,phantomDimensionY,
phantomDimensionZ);
PhantomLog = new G4LogicalVolume(Phantom,water,"PhantomLog",0,0,0);
PhantomPhys = new G4PVPlacement(0,G4ThreeVector(),"PhantomPhys",PhantomLog,WorldPhys,false,0);
PhantomPhys = new G4PVPlacement(0,G4ThreeVector(),
"PhantomPhys",PhantomLog,
WorldPhys,false,0);
WorldLog->SetVisAttributes (G4VisAttributes::Invisible);
WorldLog -> SetVisAttributes (G4VisAttributes::Invisible);
G4VisAttributes* simpleBoxVisAtt= new G4VisAttributes(lblue);
simpleBoxVisAtt->SetVisibility(true);
simpleBoxVisAtt->SetForceWireframe(true);
G4VisAttributes* simpleBoxVisAtt = new G4VisAttributes(lblue);
simpleBoxVisAtt -> SetVisibility(true);
simpleBoxVisAtt -> SetForceWireframe(true);
PhantomLog->SetVisAttributes(simpleBoxVisAtt);
PhantomLog -> SetVisAttributes(simpleBoxVisAtt);
}
void BrachyDetectorConstruction::ConstructSensitiveDetector()
@@ -209,11 +213,13 @@ void BrachyDetectorConstruction::ConstructSensitiveDetector()
{
phantomSD = new BrachyPhantomSD(sensitiveDetectorName);
G4String ROGeometryName = "PhantomROGeometry";
phantomROGeometry = new BrachyPhantomROGeometry(ROGeometryName,phantomDimensionX,phantomDimensionZ,numberOfVoxelsAlongX,numberOfVoxelsAlongZ);
phantomROGeometry->BuildROGeometry();
phantomSD->SetROgeometry(phantomROGeometry);
pSDManager->AddNewDetector(phantomSD);
PhantomLog->SetSensitiveDetector(phantomSD);
phantomROGeometry = new BrachyPhantomROGeometry(ROGeometryName,
phantomDimensionX,phantomDimensionZ,
numberOfVoxelsAlongX,numberOfVoxelsAlongZ);
phantomROGeometry -> BuildROGeometry();
phantomSD -> SetROgeometry(phantomROGeometry);
pSDManager -> AddNewDetector(phantomSD);
PhantomLog -> SetSensitiveDetector(phantomSD);
}
}
@@ -248,7 +254,7 @@ void BrachyDetectorConstruction::SetPhantomMaterial(G4String materialChoice)
if (pttoMaterial)
{
phantomAbsorberMaterial = pttoMaterial;
PhantomLog->SetMaterial(pttoMaterial);
PhantomLog -> SetMaterial(pttoMaterial);
PrintDetectorParameters();
}
else
@@ -30,8 +30,8 @@
// * *
// ************************************
//
// $Id: BrachyPhantomROGeometry.cc,v 1.8 2004/03/11 15:38:43 guatelli Exp $
// GEANT4 tag $Name: geant4-06-01 $
// $Id: BrachyPhantomROGeometry.cc,v 1.9 2004/05/13 14:47:46 guatelli Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
#include "BrachyPhantomROGeometry.hh"
#include "BrachyDummySD.hh"
@@ -177,7 +177,7 @@ G4VPhysicalVolume* BrachyPhantomROGeometry::Build()
numberOfVoxelsAlongZ,
voxelXThickness);
BrachyDummySD *dummySD = new BrachyDummySD;
ROPhantomYDivisionLog->SetSensitiveDetector(dummySD);
ROPhantomYDivisionLog -> SetSensitiveDetector(dummySD);
return ROWorldPhys;
}
@@ -30,8 +30,8 @@
// * *
// ********************************
//
// $Id: BrachyPhantomSD.cc,v 1.7 2004/03/11 16:05:03 guatelli Exp $
// GEANT4 tag $Name: geant4-06-01 $
// $Id: BrachyPhantomSD.cc,v 1.8 2004/05/13 14:47:46 guatelli Exp $
// GEANT4 tag $Name: geant4-06-02 $
//
#include "BrachyPhantomSD.hh"
#include "BrachyPhantomHit.hh"
@@ -73,6 +73,10 @@ G4bool BrachyPhantomSD::ProcessHits(G4Step* aStep, G4TouchableHistory* ROhist)
if(energyDeposit == 0.)
return false;
if(energyDeposit != 0)
{
#ifdef G4ANALYSIS_USE
// Read Voxel indexes: i is the x index, k is the z index
G4int k = ROhist->GetReplicaNumber(1);
G4int i = ROhist->GetReplicaNumber(2);
@@ -80,16 +84,10 @@ G4bool BrachyPhantomSD::ProcessHits(G4Step* aStep, G4TouchableHistory* ROhist)
G4int numberOfVoxelZ = 300;
G4double voxelWidthZ = 1. *mm;
G4double x = (-numberOfVoxelZ+1+2*i)*voxelWidthZ/2;
G4double y = (- numberOfVoxelZ+1+2*j)*voxelWidthZ/2;
G4double z = (- numberOfVoxelZ+1+2*k)*voxelWidthZ/2;
if(energyDeposit != 0)
{
#ifdef G4ANALYSIS_USE
BrachyAnalysisManager* analysis =
BrachyAnalysisManager::getInstance();
analysis -> FillNtupleWithEnergy(x,y,z,energyDeposit);
@@ -1,5 +1,5 @@
-------------------------------------------------------------------
$Id: History,v 1.21 2003/12/05 07:38:38 gcosmo Exp $
$Id: History,v 1.23 2004/05/27 09:07:50 ribon Exp $
-------------------------------------------------------------------
=========================================================
@@ -9,6 +9,13 @@ $Id: History,v 1.21 2003/12/05 07:38:38 gcosmo Exp $
Example History file
---------------------
27.05.04 - A.Ribon (ccal-V06-01-01)
- Changed use of the ntuple. Now it is simpler and the ntuple
is always correctly filled.
18.05.04 - A.Ribon (ccal-V06-01-00)
- Ported to PI. Only the setup is changed, no changes in the code.
05.12.03 - G.Cosmo (ccal-V05-02-07)
- Changed LISTS_BASE to G4LISTS_BASE for hadronic physics lists path.
Cowork with "ghad-lists-V05-02-01".
+7 -18
View File
@@ -1,5 +1,5 @@
-------------------------------------------------------------------
$Id: README,v 1.10 2003/12/04 16:49:55 ribon Exp $
$Id: README,v 1.11 2004/05/18 14:57:48 ribon Exp $
-------------------------------------------------------------------
=========================================================
@@ -50,24 +50,15 @@ $Id: README,v 1.10 2003/12/04 16:49:55 ribon Exp $
The user should first setup, as "usual", the Geant4 environmental
variables (in particular, the variable G4ANALYSIS_USE must be set
if you want to have the histograms and the ntuple).
Then the specific setup for this example should be run:
Then the specific setup for this example, including the AIDA/PI part
used in the analysis, should be run:
> source envExample.csh in the case of C-shell
or
> . envExample.sh in the case of bash-shell
The analysis part is based on:
*** AIDA version 3.0 & Anaphe version 5.0.6 ***
NB) Be careful that if you want to have this analysis part,
you have not only to set the variable G4ANALYSIS_USE but
also to edit the above script file (envExample.csh or envExample.sh)
and remove the comments "#" on the setup of AIDA/Anaphe,
because, by default, the analysis is not done (the reason being
that, in some platform, such AIDA/Anaphe setup does not work).
Please take a look to the Anaphe/Lizard web page
http://anaphe.web.cern.ch/anaphe
The analysis part is based on AIDA/PI.
Please take a look to the web page: http://www.cern.ch/PI .
2. Sample run
@@ -368,10 +359,8 @@ No Noise and Digitization
----------------------------
The analysis part of CompositeCalorimeter is kept in class CCalAnalysis,
and is based on the AIDA interfaces and their implementation in Anaphe:
*** AIDA version 3.0 & Anaphe version 5.0.6 ***
please look at their documentation for more details:
http://anaphe.web.cern.ch/anaphe
and is based on the AIDA interfaces and their implementation in PI.
Please take a look to the web page: http://www.cern.ch/PI .
Both the histograms and the ntuple are saved at the end of the run in the
HBOOK file "ccal.his". You can than analyze offline the contents of such
a file, using Lizard (or any other AIDA-compliant package) or with
@@ -1,16 +1,12 @@
#------------------------------------------------------------------
# C-shell script to be run before building/executing this example.
# It has two parts: one for the Aida setup (for the histograms,
# ntuples, and more in general for the data analysis); and one
# more specific for this test-beam example.
# Please notice that before running this script, you have to define
# the usual Geant4 variables (in particular, the variable
# G4ANALYSIS_USE must be set to 1).
#------------------------------------------------------------------
#
# --- Aida 3.0 , Anaphe 5.0.6 ---
#source /afs/cern.ch/sw/lhcxx/share/LHCXX/5.0.6/scripts/setupAnaphe.csh
#setenv PATH ${PATH}:/afs/cern.ch/sw/lhcxx/share/LHCXX/5.0.6/scripts
# --- Geant4 specific ---
setenv G4ANALYSIS_USE 1
#
# --- Aida / PI ---
eval `aida-config --runtime csh`
#
# --- Specific setup for this test-beam example ---
setenv CCAL_CONFPATH ./dataconf
@@ -1,16 +1,12 @@
#------------------------------------------------------------------
# Bash-shell script to be run before building/executing this example.
# It has two parts: one for the Aida setup (for the histograms,
# ntuples, and more in general for the data analysis); and one
# more specific for this test-beam example.
# Please notice that before running this script, you have to define
# the usual Geant4 variables (in particular, the variable
# G4ANALYSIS_USE must be set to 1).
#------------------------------------------------------------------
#
# --- Aida 3.0 , Anaphe 5.0.6 ---
#. /afs/cern.ch/sw/lhcxx/share/LHCXX/5.0.6/scripts/setupAnaphe
#export PATH=$PATH:/afs/cern.ch/sw/lhcxx/share/LHCXX/5.0.6/scripts
# --- Geant4 specific ---
export G4ANALYSIS_USE=1
#
# --- Aida / PI ---
eval `aida-config --runtime sh`
#
# --- Specific setup for this test-beam example ---
export CCAL_CONFPATH=./dataconf
@@ -34,6 +34,8 @@
#include <AIDA/AIDA.h>
#include <typeinfo>
//#define debug
CCalAnalysis* CCalAnalysis::instance = 0;
@@ -80,8 +82,8 @@ CCalAnalysis::CCalAnalysis() :analysisFactory(0), tree(0), tuple(0), energy(0) {
tag2 = tag + " ELAB, XPOS, YPOS, ZPOS";
tag = tag2 + ", EDEP, EDEC, EDHC";
//tuple = tupleFactory->create("1","Event info", tag); // Column wise (default)
tuple = tupleFactory->create("1","Event info", tag, "--preferRWN"); // Row wise
tuple = tupleFactory->create("1","Event info", tag); // Column wise (default)
//tuple = tupleFactory->create("1","Event info", tag, "--preferRWN"); // Row wise
assert(tuple);
@@ -292,25 +294,24 @@ void CCalAnalysis::setNtuple(float* hcalE, float* ecalE, float elab,
float x, float y, float z, float edep,
float edec, float edhc) {
AIDA::ITuple * ntuple = dynamic_cast<AIDA::ITuple *> ( tree->find("1") );
if (ntuple) {
if (tuple) {
char tag[10];
for (int i=0; i<28; i++) {
sprintf (tag, "hcal%d", i);
ntuple->fill(tuple->findColumn(tag),hcalE[i]);
tuple->fill(tuple->findColumn(tag),hcalE[i]);
}
for (int i=0; i<49; i++) {
sprintf (tag, "ecal%d", i);
ntuple->fill(tuple->findColumn(tag),ecalE[i]);
tuple->fill(tuple->findColumn(tag),ecalE[i]);
}
ntuple->fill(tuple->findColumn("ELAB"),elab);
ntuple->fill(tuple->findColumn("XPOS"),x);
ntuple->fill(tuple->findColumn("YPOS"),y);
ntuple->fill(tuple->findColumn("ZPOS"),z);
ntuple->fill(tuple->findColumn("EDEP"),edep);
ntuple->fill(tuple->findColumn("EDEC"),edec);
ntuple->fill(tuple->findColumn("EDHC"),edhc);
ntuple->addRow();
tuple->fill(tuple->findColumn("ELAB"),elab);
tuple->fill(tuple->findColumn("XPOS"),x);
tuple->fill(tuple->findColumn("YPOS"),y);
tuple->fill(tuple->findColumn("ZPOS"),z);
tuple->fill(tuple->findColumn("EDEP"),edep);
tuple->fill(tuple->findColumn("EDEC"),edec);
tuple->fill(tuple->findColumn("EDHC"),edhc);
tuple->addRow();
#ifdef debug
G4cout << "CCalAnalysis:: Fill Ntuple " << G4endl;
#endif
@@ -0,0 +1,140 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// ********************************************************************
// * *
// * cosmicray_charging advanced example for Geant4 *
// * (adapted simulation of test-mass charging in the LISA mission) *
// * *
// * Henrique Araujo (h.araujo@imperial.ac.uk) & Peter Wass *
// * Imperial College London *
// * *
// * main program class *
// * *
// ********************************************************************
//
// HISTORY
// 22/02/2004: migrated from LISA-V04
//
// ********************************************************************
#include "G4RunManager.hh"
#include "G4UImanager.hh"
#include "G4UIterminal.hh"
#include "G4UItcsh.hh"
#ifdef G4UI_USE_XM
#include "G4UIXm.hh"
#endif
#include "Randomize.hh"
#ifdef G4VIS_USE
#include "LISAVisManager.hh"
#endif
#include "LISADetectorConstruction.hh"
#include "LISAPhysicsList.hh"
#include "LISAPrimaryGeneratorAction.hh"
#include "LISARunAction.hh"
#include "LISAEventAction.hh"
#include "LISASteppingAction.hh"
#include "LISAStackingAction.hh"
#include <vector>
int main(int argc,char** argv) {
// choose the Random engine
HepRandom::setTheEngine(new RanecuEngine);
// Construct the default run manager
G4RunManager* runManager = new G4RunManager;
// set mandatory initialization classes
LISADetectorConstruction* detector = new LISADetectorConstruction;
runManager->SetUserInitialization(detector);
runManager->SetUserInitialization(new LISAPhysicsList);
LISAPrimaryGeneratorAction* generatorAction = new LISAPrimaryGeneratorAction;
runManager->SetUserAction(generatorAction);
// set user action classes
LISASteppingAction* steppingAction = new LISASteppingAction;
runManager->SetUserAction(steppingAction);
runManager->SetUserAction(new LISAStackingAction);
runManager->SetUserAction(
new LISAEventAction(generatorAction,steppingAction));
runManager->SetUserAction(new LISARunAction);
G4UIsession* session=0;
if (argc==1) { // Define UI session for interactive mode.
// G4UIterminal is a (dumb) terminal.
#ifdef G4UI_USE_XM
session = new G4UIXm(argc,argv);
#else
#ifdef G4UI_USE_TCSH
session = new G4UIterminal(new G4UItcsh);
#else
session = new G4UIterminal();
#endif
#endif
}
#ifdef G4VIS_USE
// visualization manager
G4VisManager* visManager = new LISAVisManager;
visManager->Initialize();
#endif
//Initialize G4 kernel
runManager->Initialize();
// get the pointer to the User Interface manager
G4UImanager* UI = G4UImanager::GetUIpointer();
// Define UI session for interactive mode.
if(session) {
// G4UIterminal is a (dumb) terminal.
UI->ApplyCommand("/control/execute init.mac");
session->SessionStart();
delete session;
}
// Batch mode
else {
G4String command = "/control/execute ";
G4String fileName = argv[1];
UI->ApplyCommand(command+fileName);
}
// job termination
#ifdef G4VIS_USE
delete visManager;
#endif
delete runManager;
return 0;
}
@@ -0,0 +1,22 @@
# --------------------------------------------------------------
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
# --------------------------------------------------------------
name := CRCharging
G4TARGET := $(name)
G4EXLIB := true
ifndef G4INSTALL
G4INSTALL = ../../..
endif
.PHONY: all
all: lib bin
include $(G4INSTALL)/config/binmake.gmk
ifdef G4ANALYSIS_USE
CPPFLAGS += `aida-config --include`
LDFLAGS += `aida-config --lib`
LOADLIBS += `aida-config --lib`
endif
@@ -0,0 +1,24 @@
-------------------------------------------------------------------
=========================================================
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 *
----------------------------------------------------------
07.05.2004 - Henrique Araujo, tag cosmicray_charging-V06-01-00
First submission of cosmicray_charging example.
28.05.2004 - Henrique Araujo, tag cosmicray_charging-V06-01-01
Minor changes to GNUMakeFile
Ported to PI Light (no changes in code required)
@@ -0,0 +1,45 @@
========================================================================
cosmicray_charging advanced example
Henrique Araujo & Peter Wass
Imperial College London
April 2004
========================================================================
This Geant4 example was derived from an application aimed at
simulating the electrostatic charging of isolated test masses in the
LISA mission by galactic cosmic ray protons and helium nuclei. This
work was supported by the European Space Agency through the SEPTIMESS
project under Contract No. 16339/02/NL/FM.
LISA, the Laser Interferometer Space Antenna for the detection of
gravitational waves, is a joint ESA/NASA mission composed of three
identical spacecraft orbiting the Sun in a triangular formation, each
containing two cubic test masses in pure geodesic (drag free) motion.
The interferometric measurements between different spacecraft
are affected by the accrual of charge in the test masses caused by the
interaction of energetic cosmic rays.
With this example we intend to demonstrate an application of Geant4 to
space environment simulations, using an extensive set of physics
models spanning from TeV energies down to a few hundred eV. This code
retains most (but not all) of the complex spacecraft and sensor
geometry implemented for the original purpose. In particular, some
complex elements of the inertial sensor surrounding the test masses
have not been included. Differential energy spectra for protons, He-4
and He-3 nuclei at solar minimum conditions are the only input macros
provided. The remaining application classes have been kept unchanged.
A Software Users' Manual suitable for Geant4 users of all levels is
distributed with this application (/docs). The technical description
of the original software package, including further software
documentation, physics analysis and a similar effort for the precursor
ESA mission LISA Pathfinder are available from the SEPTIMESS project
website at http://reat.space.qinetiq.com/septimess/ or from
http://astro.ic.ac.uk/~haraujo/SEPTIMESS/ .
Any queries regarding this example or the original work can be
directed to h.araujo@imperial.ac.uk.
@@ -0,0 +1,105 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// ********************************************************************
// * *
// * cosmicray_charging advanced example for Geant4 *
// * (adapted simulation of test-mass charging in the LISA mission) *
// * *
// * Henrique Araujo (h.araujo@imperial.ac.uk) & Peter Wass *
// * Imperial College London *
// * *
// ********************************************************************
#ifdef G4ANALYSIS_USE
#ifndef LISAAnalysisManager_h
#define LISAAnalysisManager_h 1
#include "globals.hh"
#include <AIDA/AIDA.h>
namespace AIDA {
class IAnalysisFactory;
class ITree;
class IHistogramFactory;
class ITupleFactory;
class ITuple;
class IHistogram1D;
class IHistogram2D;
class IPlotter;
class IFitter;
class IFitResult;
class IFitData;
class IRangeSet;
class IFitParameterSettings;
class IFunctionFactory;
class IFunction;
class IFitFactory;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class LISAAnalysisManager {
public:
virtual ~LISAAnalysisManager();
void Init();
void Dispose();
// Run analysis
void bookRun(G4String);
void FinishRun();
void analyseRun
(G4int evt, G4int tm, G4double energy, G4int charge,
G4int in, G4int out, long seed1, long seed2);
// grab instance
static LISAAnalysisManager* getInstance();
private:
// private constructor for singleton
LISAAnalysisManager();
static LISAAnalysisManager* instance;
AIDA::IAnalysisFactory *af;
AIDA::ITreeFactory *tf;
AIDA::ITree *run_tree;
AIDA::ITupleFactory *run_tpf;
AIDA::ITuple *run_tuple;
};
#endif
#endif
@@ -0,0 +1,111 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// ********************************************************************
// * *
// * cosmicray_charging advanced example for Geant4 *
// * (adapted simulation of test-mass charging in the LISA mission) *
// * *
// * Henrique Araujo (h.araujo@imperial.ac.uk) & Peter Wass *
// * Imperial College London *
// * *
// ********************************************************************
#ifndef LISADetectorConstruction_h
#define LISADetectorConstruction_h 1
#include "G4VUserDetectorConstruction.hh"
#include "G4UserLimits.hh"
#include "G4Material.hh"
#include "G4MaterialTable.hh"
#include "G4MaterialPropertiesTable.hh"
#include "G4Element.hh"
#include "G4Isotope.hh"
#include "G4UnitsTable.hh"
#include "G4Box.hh"
#include "G4Tubs.hh"
#include "G4Sphere.hh"
#include "G4Cons.hh"
#include "G4Trap.hh"
#include "G4Torus.hh"
#include "G4Trd.hh"
#include "G4VSolid.hh"
#include "G4UnionSolid.hh"
#include "G4SubtractionSolid.hh"
#include "G4ThreeVector.hh"
#include "G4RotationMatrix.hh"
#include "G4Transform3D.hh"
#include "G4PVPlacement.hh"
#include "G4LogicalVolume.hh"
#include "G4VPhysicalVolume.hh"
#include "G4Region.hh"
#include "G4VisAttributes.hh"
#include "G4Colour.hh"
#include "G4ios.hh"
#include "globals.hh"
#include <math.h>
class LISADetectorConstruction : public G4VUserDetectorConstruction {
public:
LISADetectorConstruction();
~LISADetectorConstruction();
G4VPhysicalVolume* Construct();
private:
void ConstructMaterials();
G4VPhysicalVolume* ConstructDetector();
private:
// pointers to materials
G4Material *vacuum;
G4Material *Al6061;
G4Material *AlHoneycomb;
G4Material *Scell;
G4Material *MLImat;
G4Material *molybdenum;
G4Material *TiAlloy;
G4Material *gold;
G4Material *AuPt;
G4Material *CFRP;
G4Material *ULEglass;
G4Material *SHAPAL;
G4Material *SiC;
G4Material *foam;
};
#endif
@@ -0,0 +1,134 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// ********************************************************************
// * *
// * cosmicray_charging advanced example for Geant4 *
// * (adapted simulation of test-mass charging in the LISA mission) *
// * *
// * Henrique Araujo (h.araujo@imperial.ac.uk) & Peter Wass *
// * Imperial College London *
// * *
// ********************************************************************
void LISADetectorConstruction::ConstructMaterials(void) {
// Elements
G4Element* elementH = new G4Element("Hydrogen", "H", 1., 1.0079*g/mole);
G4Element* elementC = new G4Element("Carbon", "C", 6., 12.011*g/mole);
G4Element* elementN = new G4Element("Nitrogen", "N", 7., 14.007*g/mole);
G4Element* elementO = new G4Element("Oxygen", "O", 8., 15.9994*g/mole);
G4Element* elementMg = new G4Element("Magnesium", "Mg",12., 24.3050*g/mole);
G4Element* elementAl = new G4Element("Aluminium", "Al",13., 26.9815*g/mole);
G4Element* elementSi = new G4Element("Silicon", "Si",14., 28.0855*g/mole);
G4Element* elementTi = new G4Element("Titanium", "Ti",22., 47.90*g/mole);
G4Element* elementV = new G4Element("Vanadium", "V", 23., 50.9415*g/mole);
G4Element* elementFe = new G4Element("Iron", "Fe",26., 55.845*g/mole);
G4Element* elementMo = new G4Element("Molybdenum","Mo",42., 95.94*g/mole);
G4Element* elementPt = new G4Element("Platinum", "Pt",78., 195.08*g/mole);
G4Element* elementAu = new G4Element("Gold", "Au",79., 196.97*g/mole);
// Materials
vacuum = new G4Material("vacuum", 1, 1.00794*g/mole,
1.0E-25*g/cm3, kStateGas, 0.1*kelvin, 1.0E-19*pascal);
// Aluminium alloy 6061-T6
Al6061 = new G4Material("Al6061", 2.70*g/cm3, 4);
Al6061->AddElement(elementAl, 0.980);
Al6061->AddElement(elementMg, 0.010);
Al6061->AddElement(elementSi, 0.006);
Al6061->AddElement(elementFe, 0.004);
// Aluminium Alloy honeycomb
AlHoneycomb = new G4Material("AlHoneycomb",0.05*g/cm3, 4);
AlHoneycomb->AddElement(elementAl, 0.980);
AlHoneycomb->AddElement(elementMg, 0.010);
AlHoneycomb->AddElement(elementSi, 0.006);
AlHoneycomb->AddElement(elementFe, 0.004);
// Solar Cells****
Scell = new G4Material("Scell", 7.82*g/cm3, 1);
Scell->AddElement(elementSi, 1.00);
// MLI Blanket: mylar (composition from STAR Stopping Power database)
MLImat = new G4Material("MLImat", 1.40*g/cm3, 3);
MLImat->AddElement(elementH, 0.041959);
MLImat->AddElement(elementC, 0.625017);
MLImat->AddElement(elementO, 0.333025);
// Molybdenum
molybdenum = new G4Material("molybdenum", 10.22*g/cm3, 1);
molybdenum->AddElement(elementMo, 1.00);
// Titanium Alloy (Ti-6Al-4V)
TiAlloy = new G4Material("TiAlloy", 4.43*g/cm3, 3);
TiAlloy->AddElement(elementTi, 0.90);
TiAlloy->AddElement(elementAl, 0.06);
TiAlloy->AddElement(elementV, 0.04);
// Gold
gold = new G4Material("gold", 19.32*g/cm3, 1);
gold->AddElement(elementAu, 1.00);
// Gold-Platinum 70%/30%
AuPt = new G4Material("AuPt", 19.92*g/cm3, 2);
AuPt->AddElement(elementAu, 0.70);
AuPt->AddElement(elementPt, 0.30);
// CRFP (Carbon Fiber Reinforced Polymer): M55 Quasiisotropic Layup
CFRP = new G4Material("CFRP", 1.66*g/cm3, 1);
CFRP->AddElement(elementC,1);
// Silicate glass
G4Material* SiGlass = new G4Material("SiGlass", 2.20*g/cm3, 2);
SiGlass->AddElement(elementO, 2);
SiGlass->AddElement(elementSi,1);
// Titanium glass
G4Material* TiGlass = new G4Material("TiGlass", 4.25*g/cm3, 2);
TiGlass->AddElement(elementO, 2);
TiGlass->AddElement(elementTi,1);
// Corning 7972 ULE Titanium Silicate Glass
ULEglass = new G4Material("ULEglass", 2.21*g/cm3, 2);
ULEglass->AddMaterial(SiGlass, 0.925);
ULEglass->AddMaterial(TiGlass, 0.075);
// SHAPAL-M (AlN)
SHAPAL = new G4Material("SHAPAL-M", 2.90*g/cm3, 2);
SHAPAL->AddElement(elementAl,1);
SHAPAL->AddElement(elementN, 1);
// Silicon carbide
SiC = new G4Material("SiC", 3.1*g/cm3, 2);
SiC->AddElement(elementSi,1);
SiC->AddElement(elementC, 1);
// Foam: Polystyrene-based
foam = new G4Material("foam",0.05*g/cm3, 2);
foam->AddElement(elementC, 0.90);
foam->AddElement(elementH, 0.10);
}
@@ -0,0 +1,75 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// ********************************************************************
// * *
// * cosmicray_charging advanced example for Geant4 *
// * (adapted simulation of test-mass charging in the LISA mission) *
// * *
// * Henrique Araujo (h.araujo@imperial.ac.uk) & Peter Wass *
// * Imperial College London *
// * *
// ********************************************************************
#ifndef LISAEventAction_h
#define LISAEventAction_h 1
#include "G4UserEventAction.hh"
#include "globals.hh"
#include "G4ios.hh"
#include <strstream>
class LISAPrimaryGeneratorAction;
class LISASteppingAction;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class LISAEventAction : public G4UserEventAction {
public:
LISAEventAction(LISAPrimaryGeneratorAction*, LISASteppingAction*);
virtual ~LISAEventAction();
virtual void BeginOfEventAction(const G4Event*);
virtual void EndOfEventAction(const G4Event*);
private:
LISAPrimaryGeneratorAction* genAction;
LISASteppingAction* stepAction;
public:
inline void SetFilename(const G4String& name) {filename = name;};
private:
G4int event_id;
G4double energy_pri;
G4int charge_in[2];
G4int charge_out[2];
G4int charge_tot[2];
const long* seeds;
G4String filename;
};
#endif
@@ -0,0 +1,67 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// ********************************************************************
// * *
// * cosmicray_charging advanced example for Geant4 *
// * (adapted simulation of test-mass charging in the LISA mission) *
// * *
// * Henrique Araujo (h.araujo@imperial.ac.uk) & Peter Wass *
// * Imperial College London *
// * *
// ********************************************************************
#ifndef LISAPhysicsList_h
#define LISAPhysicsList_h 1
#include "G4VUserPhysicsList.hh"
#include "globals.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class LISAPhysicsList: public G4VUserPhysicsList {
public:
LISAPhysicsList();
virtual ~LISAPhysicsList();
public:
virtual void SetCuts();
protected:
// particles and physics
virtual void ConstructParticle();
virtual void ConstructProcess();
// physics processes
virtual void AddTransportation();
virtual void ElectromagneticPhysics();
virtual void HadronicPhysics();
virtual void ElectroNuclearPhysics();
virtual void GeneralPhysics();
private:
G4int VerboseLevel;
};
#endif
@@ -0,0 +1,63 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// ********************************************************************
// * *
// * cosmicray_charging advanced example for Geant4 *
// * (adapted simulation of test-mass charging in the LISA mission) *
// * *
// * Henrique Araujo (h.araujo@imperial.ac.uk) & Peter Wass *
// * Imperial College London *
// * *
// ********************************************************************
#ifndef LISAPrimaryGeneratorAction_h
#define LISAPrimaryGeneratorAction_h 1
#include "G4VUserPrimaryGeneratorAction.hh"
#include "globals.hh"
class G4GeneralParticleSource;
class G4Event;
class LISAPrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction {
public:
LISAPrimaryGeneratorAction();
~LISAPrimaryGeneratorAction();
void GeneratePrimaries(G4Event* anEvent);
private:
G4GeneralParticleSource* particleGun;
private:
long seeds[2];
G4double energy_pri;
public:
const long* GetEventSeeds() {return seeds;};
G4double GetEnergyPrimary() {return energy_pri;};
};
#endif
@@ -0,0 +1,66 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// ********************************************************************
// * *
// * cosmicray_charging advanced example for Geant4 *
// * (adapted simulation of test-mass charging in the LISA mission) *
// * *
// * Henrique Araujo (h.araujo@imperial.ac.uk) & Peter Wass *
// * Imperial College London *
// * *
// ********************************************************************
#ifndef LISARunAction_h
#define LISARunAction_h 1
#include "G4UserRunAction.hh"
#include "globals.hh"
class LISARunActionMessenger;
class G4Run;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class LISARunAction : public G4UserRunAction {
public:
LISARunAction();
~LISARunAction();
public:
void BeginOfRunAction(const G4Run*);
void EndOfRunAction(const G4Run*);
public:
inline void SetAutoSeed (const G4bool val) {autoSeed = val;}
private:
LISARunActionMessenger* runMessenger;
G4bool autoSeed;
};
#endif
@@ -0,0 +1,59 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// ********************************************************************
// * *
// * cosmicray_charging advanced example for Geant4 *
// * (adapted simulation of test-mass charging in the LISA mission) *
// * *
// * Henrique Araujo (h.araujo@imperial.ac.uk) & Peter Wass *
// * Imperial College London *
// * *
// ********************************************************************
#ifndef LISARunActionMessenger_h
#define LISARunActionMessenger_h 1
#include "G4UImessenger.hh"
#include "G4UIcommand.hh"
#include "G4UIcmdWithABool.hh"
#include <strstream>
#include "globals.hh"
class LISARunAction;
class LISARunActionMessenger: public G4UImessenger {
public:
LISARunActionMessenger(LISARunAction*);
~LISARunActionMessenger();
void SetNewValue(G4UIcommand*, G4String);
private:
LISARunAction* runAction;
G4UIcmdWithABool* SetAutoSeedCmd;
};
#endif
@@ -0,0 +1,65 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// ********************************************************************
// * *
// * cosmicray_charging advanced example for Geant4 *
// * (adapted simulation of test-mass charging in the LISA mission) *
// * *
// * Henrique Araujo (h.araujo@imperial.ac.uk) & Peter Wass *
// * Imperial College London *
// * *
// ********************************************************************
#ifndef LISAStackingAction_h
#define LISAStackingAction_h 1
#include "globals.hh"
#include "G4UserStackingAction.hh"
class LISAStackingActionMessenger;
class G4Track;
class LISAStackingAction : public G4UserStackingAction {
public:
LISAStackingAction();
virtual ~LISAStackingAction();
virtual G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track* aTrack);
virtual void NewStage();
virtual void PrepareNewEvent();
public:
inline void SetPrimarySurvey (const G4bool val) {PrimarySurveyFlag = val;}
inline void SetParticleSurvey(const G4bool val) {ParticleSurveyFlag = val;}
private:
LISAStackingActionMessenger* stackingMessenger;
G4bool PrimarySurveyFlag;
G4bool ParticleSurveyFlag;
};
#endif
@@ -0,0 +1,59 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// ********************************************************************
// * *
// * cosmicray_charging advanced example for Geant4 *
// * (adapted simulation of test-mass charging in the LISA mission) *
// * *
// * Henrique Araujo (h.araujo@imperial.ac.uk) & Peter Wass *
// * Imperial College London *
// * *
// ********************************************************************
#ifndef LISAStackingActionMessenger_h
#define LISAStackingActionMessenger_h 1
#include "G4UImessenger.hh"
#include "G4UIcommand.hh"
#include "G4UIcmdWithABool.hh"
#include "globals.hh"
class LISAStackingAction;
class LISAStackingActionMessenger: public G4UImessenger {
public:
LISAStackingActionMessenger(LISAStackingAction*);
~LISAStackingActionMessenger();
void SetNewValue(G4UIcommand*, G4String);
private:
LISAStackingAction* stackingAction;
G4UIcmdWithABool* SetPriSurvey;
G4UIcmdWithABool* SetPartSurvey;
};
#endif
@@ -0,0 +1,73 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// ********************************************************************
// * *
// * cosmicray_charging advanced example for Geant4 *
// * (adapted simulation of test-mass charging in the LISA mission) *
// * *
// * Henrique Araujo (h.araujo@imperial.ac.uk) & Peter Wass *
// * Imperial College London *
// * *
// ********************************************************************
#ifndef LISASteppingAction_h
#define LISASteppingAction_h 1
#include "G4UserSteppingAction.hh"
#include "globals.hh"
class LISAEventAction;
class LISASteppingActionMessenger;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class LISASteppingAction : public G4UserSteppingAction {
public:
LISASteppingAction();
virtual ~LISASteppingAction();
virtual void UserSteppingAction(const G4Step*);
public:
inline void Discharge(void) {charge_in[0]=0; charge_out[0]=0;
charge_in[1]=0; charge_out[1]=0;};
inline G4int GetChargeIn(const G4int tm) {return charge_in[tm];}
inline G4int GetChargeOut(const G4int tm) {return charge_out[tm];}
inline void SetFlagSpectrum(const G4bool val) {FlagSpectrum = val;}
private:
G4int charge_in[2];
G4int charge_out[2];
LISASteppingActionMessenger* steppingMessenger;
G4bool FlagSpectrum;
};
#endif

Some files were not shown because too many files have changed in this diff Show More