Import Geant4 5.0.0 source tree
This commit is contained in:
@@ -18,9 +18,9 @@
|
||||
# you may fetch it yourself from your nearest archive site.)
|
||||
#
|
||||
|
||||
# $Id: Configure,v 1.29 2002/07/01 10:45:04 stesting Exp $
|
||||
# $Id: Configure,v 1.31 2002/12/13 15:46:47 stesting Exp $
|
||||
#
|
||||
# Generated on Mon Jul 1 12:23:24 CEST 2002 [metaconfig 3.0 PL70]
|
||||
# Generated on Fri Dec 13 16:43:52 CET 2002 [metaconfig 3.0 PL70]
|
||||
|
||||
cat >/tmp/c1$$ <<EOF
|
||||
WARNING!!!!!
|
||||
@@ -219,7 +219,6 @@ g4vis_use_openglxm=''
|
||||
g4vis_use_raytracer=''
|
||||
g4vis_use_vrml=''
|
||||
g4vis_use_vrmlfile=''
|
||||
g4use_hepodbms=''
|
||||
g4wanalysis_build=''
|
||||
g4wanalysis_build_jas=''
|
||||
g4wanalysis_build_lab=''
|
||||
@@ -233,6 +232,8 @@ g4_gmake_version=''
|
||||
g4_make=''
|
||||
g4_make_version=''
|
||||
g4make=''
|
||||
g4w_use_g3tog4=''
|
||||
g4wlib_build_g3tog4=''
|
||||
lns=''
|
||||
c=''
|
||||
n=''
|
||||
@@ -449,6 +450,11 @@ while test $# -gt 0; do
|
||||
-d) shift; fastread=yes;;
|
||||
-e) shift; alldone=cont;;
|
||||
-install) shift; install=yes;;
|
||||
-ldlibs) shift; g4ldlibs=yes;;
|
||||
-ldflags) shift; g4ldflags=yes;;
|
||||
-cppflags) shift; g4cppflags=yes;;
|
||||
-cxxflags) shift; g4cxxflags=yes;;
|
||||
-incflags) shift; g4incflags=yes;;
|
||||
-f)
|
||||
shift
|
||||
cd ../..
|
||||
@@ -503,11 +509,16 @@ done
|
||||
case "$error" in
|
||||
true)
|
||||
cat >&2 <<EOM
|
||||
Usage: $me [-dehrsEKOSV] [-install] [-f config.sh] [-D symbol] [-D symbol=value]
|
||||
Usage: $me [-dehrsEKOSV] [-install] [-libs] [-f config.sh] [-D symbol] [-D symbol=value]
|
||||
[-U symbol] [-U symbol=]
|
||||
-d : use defaults for all answers.
|
||||
-e : go on without questioning past the production of config.sh.
|
||||
-install : start configuration AND installation of Geant4 libraries.
|
||||
-ldlibs : retrieve the list of libraries to link
|
||||
-ldflags : retrieve the list of directories where libraries are placed
|
||||
-cxxflags : retrieve the list of cxxflags
|
||||
-cppflags : retrieve the list of cppflags
|
||||
-incflags : retrieve the list of incflags
|
||||
-f : specify an alternate default configuration file.
|
||||
-h : print this help message and exit (with an error status).
|
||||
-r : reuse C symbols value if possible (skips costly nm extraction).
|
||||
@@ -573,7 +584,7 @@ chmod +x contains
|
||||
esac
|
||||
|
||||
: first determine how to suppress newline on echo command
|
||||
echo " "
|
||||
#echo " "
|
||||
#echo "Checking echo to see how to suppress newlines..."
|
||||
(echo "hi there\c" ; echo " ") >.echotmp
|
||||
if $contains c .echotmp >/dev/null 2>&1 ; then
|
||||
@@ -764,8 +775,8 @@ case "$rsrc" in
|
||||
;;
|
||||
../../.) ;;
|
||||
*)
|
||||
echo " "
|
||||
echo "Sources for $package found in $src" >&4
|
||||
# echo " "
|
||||
# echo "Sources for $package found in $src" >&4
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -895,27 +906,27 @@ true)
|
||||
esac
|
||||
|
||||
: Eunice requires " " instead of "", can you believe it
|
||||
echo " "
|
||||
#echo " "
|
||||
: Here we go...
|
||||
if [ X$install = Xyes ] ; then
|
||||
echo " "
|
||||
echo " "
|
||||
echo " "
|
||||
echo " --- Geant4 Toolkit Installation ---"
|
||||
echo " "
|
||||
echo " "
|
||||
echo " "
|
||||
echo " "
|
||||
else
|
||||
echo " "
|
||||
echo " "
|
||||
echo " "
|
||||
echo " --- Geant4 Toolkit Installation ---"
|
||||
echo " (setting environments for USER )"
|
||||
echo " "
|
||||
echo " "
|
||||
echo " "
|
||||
fi
|
||||
#if [ X$install = Xyes ] ; then
|
||||
#echo " "
|
||||
#echo " "
|
||||
#echo " "
|
||||
#echo " --- Geant4 Toolkit Installation ---"
|
||||
#echo " "
|
||||
#echo " "
|
||||
#echo " "
|
||||
#echo " "
|
||||
#else
|
||||
#echo " "
|
||||
#echo " "
|
||||
#echo " "
|
||||
#echo " --- Geant4 Toolkit Installation ---"
|
||||
#echo " (setting environments for USER )"
|
||||
#echo " "
|
||||
#echo " "
|
||||
#echo " "
|
||||
#fi
|
||||
|
||||
trap 'echo " ";rm -rf ../../.config/UU; test -d ../../.config/UU && rm -rf X $rmlist; exit 1' 1 2 3 15
|
||||
|
||||
@@ -936,6 +947,16 @@ case "$user" in
|
||||
'') user=`whoami 2>&1`;;
|
||||
esac
|
||||
if [ X$install = Xyes ] ; then
|
||||
|
||||
echo " "
|
||||
echo " "
|
||||
echo " "
|
||||
echo " --- Geant4 Toolkit Installation ---"
|
||||
echo " "
|
||||
echo " "
|
||||
echo " "
|
||||
echo " "
|
||||
|
||||
if $contains "^$user\$" ../../.config/instruct >/dev/null 2>&1; then
|
||||
firsttime=false
|
||||
echo " "
|
||||
@@ -1560,7 +1581,7 @@ fi
|
||||
fi
|
||||
: Sadilov: g4system.U - inserted here.
|
||||
: 'current' directory is where 'Configure' is started
|
||||
echo " "
|
||||
#echo " "
|
||||
case "$g4osname" in
|
||||
|
||||
'')
|
||||
@@ -1584,7 +1605,7 @@ case "$g4osname" in
|
||||
esac
|
||||
esac
|
||||
|
||||
echo " "
|
||||
#echo " "
|
||||
|
||||
case "$g4compiler" in
|
||||
|
||||
@@ -1752,6 +1773,7 @@ EOM
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
fi
|
||||
|
||||
#
|
||||
@@ -1759,11 +1781,11 @@ fi
|
||||
#
|
||||
g4system=$g4osname-$g4compiler
|
||||
|
||||
cat << EOM
|
||||
|
||||
G4SYSTEM is now set to $g4system.
|
||||
|
||||
EOM
|
||||
#cat << EOM
|
||||
#
|
||||
#G4SYSTEM is now set to $g4system.
|
||||
#
|
||||
#EOM
|
||||
|
||||
cd .config/UU
|
||||
|
||||
@@ -1775,7 +1797,148 @@ dflt=n
|
||||
|
||||
cd ../..
|
||||
if [ X$install = X ] ; then
|
||||
|
||||
|
||||
if test -f $src/.config/bin/$g4system/env.sh; then
|
||||
|
||||
# create not_display flag
|
||||
|
||||
if [ X$g4ldlibs != X -o X$g4ldflags != X -o X$g4cxxflags != X -o X$g4cppflags != X -o X$g4incflags != X ] ; then
|
||||
g4non_display=yes
|
||||
# echo g4non_display=$g4non_display
|
||||
fi
|
||||
|
||||
if [ X$g4cppflags = Xyes ] ; then
|
||||
|
||||
. $src/.config/bin/$g4system/env.sh
|
||||
|
||||
CPPFLAGS=`grep 'CPPFLAGS_FINAL :=' $G4LIB/$G4SYSTEM/GNUmakefile.db | awk -F := '{print $2}'`
|
||||
|
||||
# echo CPPFLAGS=$CPPFLAGS
|
||||
echo $CPPFLAGS
|
||||
|
||||
$rm -rf .config/UU
|
||||
exit 1
|
||||
|
||||
fi #end of cppflags
|
||||
|
||||
if [ X$g4cxxflags = Xyes ] ; then
|
||||
|
||||
. $src/.config/bin/$g4system/env.sh
|
||||
|
||||
CXXFLAGS=`grep 'CXXFLAGS_FINAL :=' $G4LIB/$G4SYSTEM/GNUmakefile.db | awk -F := '{print $2}'`
|
||||
|
||||
# echo CXXFLAGS=$CXXFLAGS
|
||||
echo $CXXFLAGS
|
||||
|
||||
$rm -rf .config/UU
|
||||
exit 1
|
||||
|
||||
fi #end of cxxflags
|
||||
|
||||
if [ X$g4incflags = Xyes ] ; then
|
||||
|
||||
. $src/.config/bin/$g4system/env.sh
|
||||
|
||||
INCFLAGS=`grep 'INCFLAGS_FINAL :=' $G4LIB/$G4SYSTEM/GNUmakefile.db | awk -F := '{print $2}'`
|
||||
|
||||
# echo INCFLAGS=$INCFLAGS
|
||||
echo $INCFLAGS
|
||||
|
||||
$rm -rf .config/UU
|
||||
exit 1
|
||||
|
||||
fi #end of incflags
|
||||
|
||||
if [ X$g4ldflags = Xyes ] ; then
|
||||
|
||||
. $src/.config/bin/$g4system/env.sh
|
||||
|
||||
LDFLAGS=`grep 'LDFLAGS_FINAL :=' $G4LIB/$G4SYSTEM/GNUmakefile.db | awk -F := '{print $2}'`
|
||||
|
||||
# echo LDFLAGS=$LDFLAGS
|
||||
echo $LDFLAGS
|
||||
|
||||
$rm -rf .config/UU
|
||||
exit 1
|
||||
|
||||
fi #end of ldflags
|
||||
|
||||
if [ X$g4ldlibs = Xyes ] ; then
|
||||
|
||||
# cat >&2 <<EOM
|
||||
#---------------------------------------------------
|
||||
#LibList mode :)
|
||||
#---------------------------------------------------
|
||||
#EOM
|
||||
|
||||
. $src/.config/bin/$g4system/env.sh
|
||||
|
||||
# echo TEST
|
||||
|
||||
# ls -l $G4INSTALL/config/scripts/GNUmakefile
|
||||
# ls -l $G4LIB/$G4SYSTEM/GNUmakefile.db
|
||||
|
||||
# LDLIBS_1=`grep 'LDLIBS_FINAL :=' $G4LIB/$G4SYSTEM/GNUmakefile.db | awk -F := '{print $2}'`
|
||||
# LDLIBS_2=`echo $LDLIBS_1 | awk -F -lMarker '{print $2}'`
|
||||
|
||||
# echo LDLIBS_2=$LDLIBS_2
|
||||
# echo $LDLIBS_2
|
||||
|
||||
if [ X$G4LIB_USE_GRANULAR = X ] ; then
|
||||
|
||||
# Global libs
|
||||
|
||||
LDLIBS_1=`grep 'LDLIBS_FINAL :=' $G4LIB/$G4SYSTEM/GNUmakefile.db | awk -F := '{print $2}'`
|
||||
LDLIBS_2=`echo $LDLIBS_1 | awk -F -lMarker '{print $2}'`
|
||||
|
||||
echo "$LDLIBS_2 $c"
|
||||
|
||||
# echo "-L$G4WORKDIR/lib/$G4SYSTEM -lG4persistency -lG4readout -lG4run -lG4event -lG4tracking -lG4parmodels -lG4processes -lG4digits+hits -lG4track -lG4particles -lG4geometry -lG4materials -lG4graphics_reps -lG4intercoms -lG4global $c"
|
||||
|
||||
$rm -rf .config/UU
|
||||
exit 1
|
||||
|
||||
else
|
||||
|
||||
# Granular libs
|
||||
|
||||
# echo $n "-L$G4WORKDIR/lib/$G4SYSTEM $c" ; $G4WORKDIR/lib/$G4SYSTEM/liblist -m $G4WORKDIR/lib/$G4SYSTEM < $G4WORKDIR/lib/$G4SYSTEM/libname.map
|
||||
|
||||
# echo G4LIB=$G4LIB/$G4SYSTEM
|
||||
|
||||
LIBLIST_LIST=`$G4LIB/$G4SYSTEM/liblist -m $G4LIB/$G4SYSTEM < $G4LIB/$G4SYSTEM/libname.map`
|
||||
|
||||
LDLIBS3=`grep 'LDLIBS3 :=' $G4LIB/$G4SYSTEM/GNUmakefile.db | awk -F := '{print $2}'`
|
||||
LDLIBS4=`grep 'LDLIBS4 :=' $G4LIB/$G4SYSTEM/GNUmakefile.db | awk -F := '{print $2}'`
|
||||
|
||||
LDLIBS=$LIBLIST_LIST $LDLIBS3 $LDLIBS4
|
||||
|
||||
echo $LDLIBS
|
||||
|
||||
$rm -rf .config/UU
|
||||
|
||||
exit 1
|
||||
fi #end of check for global/granular
|
||||
|
||||
else #if not -lib but user mode
|
||||
|
||||
# header for User
|
||||
echo " "
|
||||
echo " "
|
||||
echo " "
|
||||
echo " --- Geant4 Toolkit Installation ---"
|
||||
echo " (setting environments for USER )"
|
||||
echo " "
|
||||
echo " "
|
||||
echo " "
|
||||
|
||||
#cat << EOM
|
||||
#
|
||||
#G4SYSTEM is now set to $g4system.
|
||||
#
|
||||
#EOM
|
||||
|
||||
cat >&2 <<EOM
|
||||
---------------------------------------------------
|
||||
The Geant4 toolkit installation was found.
|
||||
@@ -1800,7 +1963,19 @@ cp -i $src/.config/bin/$g4system/env.csh .
|
||||
cp -i $src/.config/bin/$g4system/env.sh .
|
||||
|
||||
exit 1
|
||||
else
|
||||
fi #end of -lib or user
|
||||
else #there is no env.sh
|
||||
|
||||
# header for Installer
|
||||
echo " "
|
||||
echo " "
|
||||
echo " "
|
||||
echo " --- Geant4 Toolkit Installation ---"
|
||||
echo " "
|
||||
echo " "
|
||||
echo " "
|
||||
echo " "
|
||||
|
||||
echo " "
|
||||
echo "WARNING: Geant4 is NOT installed yet!"
|
||||
echo "You (or the administrator if you have not enough privileges)"
|
||||
@@ -1809,8 +1984,9 @@ else
|
||||
echo " "
|
||||
$rm -rf .config/UU
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi #end of check for existence of env.sh
|
||||
fi #end of check for "not -install"
|
||||
|
||||
cd .config/UU
|
||||
|
||||
case "$knowitall" in
|
||||
@@ -2360,7 +2536,7 @@ esac
|
||||
|
||||
case "$g4neutronhpcrosssections" in
|
||||
'')
|
||||
g4neutronhpcrosssections=$g4install/../G4NDL3.5
|
||||
g4neutronhpcrosssections=$g4install/../G4NDL3.7
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -2417,7 +2593,7 @@ gans=$ans
|
||||
4)
|
||||
dflt=$g4neutronhpcrosssections
|
||||
fn='f~'
|
||||
rp="Where is G4NDL3.5 installed?"
|
||||
rp="Where is G4NDL3.7 installed?"
|
||||
. ./getfile
|
||||
g4neutronhpcrosssections=$ans
|
||||
;;
|
||||
@@ -2594,7 +2770,7 @@ echo " "
|
||||
# Will be set (if needed) in GNUmakefile!
|
||||
case "$g4lib_use_granular" in
|
||||
'')
|
||||
g4lib_use_granular=n
|
||||
g4lib_use_granular=y
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -2620,7 +2796,7 @@ gans=$ans
|
||||
n*|N*)
|
||||
g4global=n
|
||||
g4granular=y
|
||||
g4lib_use_granular=n
|
||||
g4lib_use_granular=y
|
||||
break
|
||||
;;
|
||||
y*|Y*)
|
||||
@@ -2703,6 +2879,7 @@ gans=$ans
|
||||
case $gans in
|
||||
|
||||
n*|N*)
|
||||
g4lib_use_granular=n
|
||||
break
|
||||
;;
|
||||
y*|Y*)
|
||||
@@ -3931,25 +4108,30 @@ g4vis_oglhome=$ans
|
||||
|
||||
fi
|
||||
echo " "
|
||||
case "$g4use_hepodbms" in
|
||||
case "$g4wlib_build_g3tog4" in
|
||||
'')
|
||||
g4use_hepodbms=n
|
||||
g4wlib_build_g3tog4=n
|
||||
;;
|
||||
esac
|
||||
|
||||
case "$g4w_use_g4tog4" in
|
||||
'')
|
||||
g4w_use_g3tog4=n
|
||||
;;
|
||||
esac
|
||||
|
||||
echo ""
|
||||
|
||||
g4message=`cat << EOM
|
||||
|
||||
G4USE_HEPODBMS
|
||||
In Geant4, object persistency is provided as an optional category, so
|
||||
that the users could be able to run Geant4 with or without a commercial
|
||||
ODBMS package. How to store and retrieve Geant4 events, hits and geometry
|
||||
objects is explained in documentation.
|
||||
G4USE_G3TOG4
|
||||
|
||||
If this variable is set, it will be built G3TOG4 module.
|
||||
Do you want to set this variable ?
|
||||
|
||||
For setting this you should have an ODMG compliant database
|
||||
(e.g. Objectivity/DB) installed and running on your system!
|
||||
EOM`
|
||||
|
||||
dflt=$g4use_hepodbms
|
||||
dflt=$g4wlib_build_g3tog4
|
||||
rp=$g4message
|
||||
. ./myread
|
||||
gans=$ans
|
||||
@@ -3957,15 +4139,16 @@ gans=$ans
|
||||
case $gans in
|
||||
|
||||
n*|N*)
|
||||
g4use_hepodbms=n
|
||||
g4wlib_build_g3tog4=n
|
||||
g4w_use_g4tog4=n
|
||||
;;
|
||||
y*|Y*)
|
||||
g4use_hepodbms=y
|
||||
g4wlib_build_g3tog4=y
|
||||
g4w_use_g3tog4=y
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
|
||||
echo " "
|
||||
|
||||
case "$g4wanalysis_use" in
|
||||
@@ -4118,7 +4301,6 @@ g4ui_use_win32='$g4ui_use_win32'
|
||||
g4ui_use_wo='$g4ui_use_wo'
|
||||
g4ui_use_xaw='$g4ui_use_xaw'
|
||||
g4ui_use_xm='$g4ui_use_xm'
|
||||
g4use_hepodbms='$g4use_hepodbms'
|
||||
g4vis_build_asciitree_driver='$g4vis_build_asciitree_driver'
|
||||
g4vis_build_dawn_driver='$g4vis_build_dawn_driver'
|
||||
g4vis_build_dawnfile_driver='$g4vis_build_dawnfile_driver'
|
||||
@@ -4144,6 +4326,7 @@ g4vis_use_openglxm='$g4vis_use_openglxm'
|
||||
g4vis_use_raytracer='$g4vis_use_raytracer'
|
||||
g4vis_use_vrml='$g4vis_use_vrml'
|
||||
g4vis_use_vrmlfile='$g4vis_use_vrmlfile'
|
||||
g4w_use_g3tog4='$g4w_use_g3tog4'
|
||||
g4wanalysis_build='$g4wanalysis_build'
|
||||
g4wanalysis_build_jas='$g4wanalysis_build_jas'
|
||||
g4wanalysis_build_lab='$g4wanalysis_build_lab'
|
||||
@@ -4152,6 +4335,7 @@ g4wanalysis_use='$g4wanalysis_use'
|
||||
g4wanalysis_use_jas='$g4wanalysis_use_jas'
|
||||
g4wanalysis_use_lab='$g4wanalysis_use_lab'
|
||||
g4wanalysis_use_lizard='$g4wanalysis_use_lizard'
|
||||
g4wlib_build_g3tog4='$g4wlib_build_g3tog4'
|
||||
g4workdir='$g4workdir'
|
||||
hint='$hint'
|
||||
lns='$lns'
|
||||
|
||||
@@ -0,0 +1,112 @@
|
||||
|
||||
Geant4 4.1 - patch-01 Release Notes
|
||||
-----------------------------------
|
||||
|
||||
31st July 2002
|
||||
|
||||
List of fixes included in this public patch to release 4.1:
|
||||
|
||||
o Config:
|
||||
------
|
||||
- Upgraded WIN32-g++ setup to compile with -ansi and gcc-2.95.3 for
|
||||
most recent versions of CygWin.
|
||||
|
||||
o Electromagnetic processes (low-energy):
|
||||
--------------------------------------
|
||||
- Bug fix in delta-electron spectra.
|
||||
- Bug fix in simulation of EM processes in compounds.
|
||||
- Optimised loading of data in G4AugerData.
|
||||
|
||||
o Event:
|
||||
-----
|
||||
- G4PrimaryParticle:
|
||||
o Bug fixed in the initialisation of 'charge' for all constructors.
|
||||
|
||||
o Geometry:
|
||||
--------
|
||||
+ magnetic-field:
|
||||
- G4FieldManager:
|
||||
o made 'fDefault_Delta_One_Step_Value' and
|
||||
'fDefault_Delta_Intersection_Val' non static constants to resolve
|
||||
initialisation problems. Fixes problem report #383.
|
||||
- G4ChordFinder:
|
||||
o in NewStep, fixed case of stepTrial >> stepTrialOld, to take
|
||||
large multiple - not small
|
||||
o added guard for stepTrial==0.0 in FindNextChord().
|
||||
- G4MagIntegratorDriver:
|
||||
o added protection against error of 0.0 in ComputeNewStepSize.
|
||||
o cleared warning of unused variable.
|
||||
- G4EquationOfMotion:
|
||||
o made RightHandSide() an inline method
|
||||
o in GetFieldValue() signature of Point is double[4],
|
||||
instead of double[3]
|
||||
o defined G4maximum_number_of_field_components as enum.
|
||||
+ solids/CSG:
|
||||
- G4Cons:
|
||||
o Bug fixed in DistanceToIn(p,v) concerning z-crossing at
|
||||
the edge with Rmin,Rmax.
|
||||
+ solids/STEP:
|
||||
- Fixed GNUmakefile to parse 'g++' string in G4SYSTEM to detect
|
||||
non-ISO setup for gcc-2.95 and higher.
|
||||
+ solids/STEPinterface:
|
||||
- Fixed GNUmakefile to parse 'g++' string in G4SYSTEM to detect
|
||||
non-ISO setup for gcc-2.95 and higher.
|
||||
+ verification:
|
||||
- G4GeomTestVolume:
|
||||
o Fixed recursive call to G4GeomTestVolume to consider also
|
||||
'tolerance' as argument in the recursive test algorithm.
|
||||
+ volumes:
|
||||
- Code cleanup and cosmetics for most classes.
|
||||
- G4PropagatorInField:
|
||||
o In ComputeStep(), reset status to original by setting 'fNoZeroStep'
|
||||
to zero if (fNoZeroStep > fAbandonThreshold_NoZeroSteps).
|
||||
Fixes a problem observed in cases when a looping track is killed,
|
||||
the bug was causing also subsequent tracks to be killed.
|
||||
o Removed not-implemented constructor taking G4Navigator* as argument.
|
||||
o Get rid of static const data for default 'epsilonStep' size.
|
||||
o Initialised all data members in constructor!
|
||||
|
||||
o Global:
|
||||
------
|
||||
- G4Allocator:
|
||||
o Moved page size to become data-member of G4Allocator.
|
||||
'fPageSize' is now computed according to the size of the object
|
||||
to be allocated. The default size is 1024 bytes for objects whose
|
||||
size is less than 512 bytes, 10 times the size of the object otherwise.
|
||||
|
||||
o Hadronic processes:
|
||||
------------------
|
||||
+ management, utils, models/high_energy:
|
||||
o Introduced accounting of strange baryons.
|
||||
o Introduced accounting for anti-nucleons and strange mesons.
|
||||
o Improved treatement of inelasticity for annihilation events and pion
|
||||
absorptive reactions.
|
||||
o Added protection in the call to phase-space method for pion induced
|
||||
reactions.
|
||||
o Fixed error in energy conservation observed by BTEV.
|
||||
Used to show (1/500) for 1.5-2.5 GeV pion reactions in medium A nuclei.
|
||||
+ cross-sections:
|
||||
o Fixed bug in caching information in gamma nuclear cross-sections
|
||||
(G4PhotoNuclearCrossSection).
|
||||
|
||||
o Examples:
|
||||
--------
|
||||
- Corrected README in exampleN01.
|
||||
- Updated reference outputs.
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
Technical Notes
|
||||
---------------
|
||||
|
||||
o This patch should be applied on top of release 4.1.
|
||||
o Technical notes distributed for release 4.1 are also applicable and
|
||||
valid for this patch.
|
||||
|
||||
The code and rebuilt binary libraries for release 4.1 are available through
|
||||
our "Source Code" Web page:
|
||||
- see our <A href="http://cern.ch/geant4">Geant4 Home Page</A>.
|
||||
|
||||
Please refer to <A
|
||||
href="http://cern.ch/geant4/G4UsersDocuments/Overview/html/index.html">Geant4
|
||||
User Documentation</A> for further information about using Geant4.
|
||||
@@ -0,0 +1,652 @@
|
||||
|
||||
Geant4 5.0 Release Notes
|
||||
------------------------
|
||||
|
||||
13th December 2002
|
||||
|
||||
These are the main new features/fixes included in this release since the
|
||||
last public release (for the detailed list of fixes/additions, please refer
|
||||
to the related History files):
|
||||
|
||||
|
||||
o Configuration:
|
||||
-------------
|
||||
- Specific setups:
|
||||
o Linux-g++.gmk: added assignment 'CC := gcc' for default 'cc' compiler.
|
||||
o SUN-CC.gmk: removed -L/usr/lib path specification from LOADLIBS
|
||||
definition.
|
||||
o AIX-xlC.gmk: updated for porting on AIX with xlC 6.0 (unsupported).
|
||||
o WIN32-g++.gmk: updated setup to compile with -ansi and gcc-2.95.3
|
||||
for most recent versions of CygWin (unsupported).
|
||||
o Darwin-g++.gmk: updated setup to support MacOS 10.2 (unsupported).
|
||||
- liblist.c:
|
||||
o Enhanced script to provide the whole list of installed libraries
|
||||
in the correct order, without requiring parsing of dependencies.
|
||||
The functionality is achieved by invoking "liblist" with option '-m",
|
||||
i.e. - liblist -m [libpath] < libname.map
|
||||
where [libpath] is the path where libraries are placed
|
||||
(i.e. $G4LIB/$G4SYSTEM).
|
||||
- binmake.gmk:
|
||||
o Use "liblist -m [libpath]" to retrieve the list of libraries to link
|
||||
in case headers are installed in $G4INCLUDE, and granular libraries
|
||||
are used.
|
||||
- Adopt new dependency file algorithm to avoid leaving corrupt .d files
|
||||
when #include's cannot be found.
|
||||
- Removed ODBMS setup. Now library for persistency is built as part of the
|
||||
kernel and specific implementations for persistency have been moved to
|
||||
examples. Setup for ODBMS no more required. G4USE_HEPODBMS is no longer
|
||||
used.
|
||||
- Removed obsolete setup for ObjectSpace-STL (G4USE_OSPACE and related
|
||||
variables). Removed obsolete variable G4USE_STL.
|
||||
- Made compilation of g3tog4 module optional (only if G4USE_G3TOG4 is
|
||||
defined). The module is not built by default.
|
||||
|
||||
o Digitization & Hits:
|
||||
-------------------
|
||||
- Added classes for event scoring in module "detector":
|
||||
G4CellScoreComposer[.hh.cc], G4CellScoreValues.hh,
|
||||
G4CellStoreScorer[.hh.cc], G4TrackLogger[.hh.cc].
|
||||
- Added methods to G4VHit:
|
||||
virtual const G4std::vector<G4AttDef>* GetAttDefs/Values()
|
||||
- Added GetHit() and GetSize() to G4VHitsCollection.
|
||||
- Fixed minor memory leak in G4SDManager.
|
||||
|
||||
o Event:
|
||||
-----
|
||||
- Added classes for scoring management:
|
||||
G4CellScorer[.hh.cc], G4CellScorerStore[.hh.cc],
|
||||
G4ScoreTable[.hh.cc], G4Scorer[.hh.cc].
|
||||
- Introduced first implementation of HepMC interfaces (not functional
|
||||
yet on Windows platforms, pending HepMC support in CLHEP).
|
||||
- Critical bug fix in G4PrimaryParticle for initialisation of non
|
||||
charged particles.
|
||||
- G4Event: introduced 'EventAborted' flag.
|
||||
- Added protection against user's mis-use of destruction of
|
||||
G4TrajectoryContainer.
|
||||
- Fix memory leak caused by deleting stacked tracks.
|
||||
|
||||
o Electromagnetic Processes (Low-energy):
|
||||
--------------------------------------
|
||||
- Bug fix in delta-electron spectra.
|
||||
- Bug fix in simulation of EM processes in compounds.
|
||||
- Optimised loading of data in G4AugerData.
|
||||
- Fix in calculation of restricted energy loss of e-.
|
||||
- Fixed memory leak problem in G4AtomicTransition.
|
||||
- Bug fixes for ion ionisation, related to the interaction between
|
||||
energy loss and fluorescence.
|
||||
- Bug fix in G4BremsstrahlungParameters, to load EEDL correctly.
|
||||
Fixes problem report #430.
|
||||
- New model for angular distribution in Rayleigh.
|
||||
Fixes problem report #406.
|
||||
- Optimisation of tables in G4LowEnergyIonisation, G4eLowEnergyLoss,
|
||||
G4hLowEnergyLoss and G4hLowEnergyIonisation.
|
||||
|
||||
o Electromagnetic Processes (Standard):
|
||||
------------------------------------
|
||||
- Introduced new prototype implementation of model-dependent processes:
|
||||
G4MuBremsstrahlungSTD, G4MuIonisationSTD, G4MuPairProductionSTD,
|
||||
G4eBremsstrahlungSTD, G4eIonisationSTD, G4hIonisationSTD.
|
||||
G4MultipleScatteringSTD, G4VEnergyLossSTD, G4EnergyLossMessengerSTD.
|
||||
- G4Scintillation:
|
||||
o now allowing for fast and slow components. Scintillation properties
|
||||
are stored with the material and retrieved with GetConstProperty().
|
||||
o now allowing for particle dependent excitation levels.
|
||||
o using Poisson distribution (G4Poissin) for small MeanNumPhotons in
|
||||
a step.
|
||||
o using the nearest integer to calculate the number of photons in DoIt().
|
||||
- G4MultipleScattering:
|
||||
o Bug fix in PostStepDoIt() for lateral displacement.
|
||||
o Corrected angle distribution and fixes in the boundary algorithm.
|
||||
This new parameterisation improves the ~100 MeV proton scattering.
|
||||
- G4eBremsstrahlung::BuiltLossTable(): fixed rare cases of division by 0.
|
||||
- GammaConversionToMuons: corrected syntax of OR conditions in DoIt().
|
||||
- G4VEnergyLoss: fix for gaussian fluctuations sampling at very low energy.
|
||||
- Fixes in proton scattering and LossTableBuilder.
|
||||
- G4PAIonisation[.hh.icc.cc]: patched access to public static data.
|
||||
Added static accessor to be used in the kernel for inline functions
|
||||
to allow porting on Windows DLLs.
|
||||
|
||||
o General Processes, Parameterisation, Decay, Optical:
|
||||
---------------------------------------------------
|
||||
- Added new command /process/setVerbose for G4ProcessTableMessenger.
|
||||
- Fixed memory leak in G4ProcessTable::Insert().
|
||||
- Optical processes: fixed calculation of polarization on dielectric
|
||||
dielectric interfaces. Fixes problem report #427.
|
||||
- Fast simulation management:
|
||||
o Added method to retrieve G4VFastSimulationModel by name
|
||||
G4GlobalFastSimulationManager::GetFastSimulationModel().
|
||||
The method is matched also in G4FastSimulationManager.
|
||||
o Patched access to public static data in G4FastStep.cc and
|
||||
G4GlobalFastSimulationManager.cc to allow porting on Windows DLLs.
|
||||
|
||||
o Geometry:
|
||||
--------
|
||||
- Importance biasing
|
||||
o New design iteration for importance biasing and scoring and
|
||||
reorganisation of classes to proper modules (digits+hits/detector,
|
||||
event and processes/transportation).
|
||||
+ no biasing is applied between cells that are not known by
|
||||
the G4IStore and its neighbors.
|
||||
+ importance value 0 is allowed to flag that no biasing should
|
||||
be done betweeen the cell and its neighbors.
|
||||
+ changed G4ParallelNavigator to use G4TouchableHanle and
|
||||
LocateGlobalPointAndSetup().
|
||||
+ renamed G4VPScorer to G4VScorer and G4PStep to G4GeometryCellStep
|
||||
+ changes to handle 'pre' and 'post' importance in
|
||||
G4(V)ImportanceAlgorithm, G4ImportanceSplitExaminer and
|
||||
G4ImportanceFinder.
|
||||
+ renamed G4PTouchableKey to G4GeometryCell.
|
||||
+ removed G4VPrintableScorer.hh G4VPrintableScorerFactory.hh.
|
||||
+ added G4VCellScorer.hh and G4VCellScorerStore.hh.
|
||||
- Management
|
||||
o Added checks for illegal geometry contructions for G4PVReplica and
|
||||
G4PVParameterised. Contructors now verify unicity of daughter volumes
|
||||
for replicas and parameterised volumes, as well as checks for attempt
|
||||
to replicate/parameterise the world volume.
|
||||
o Added pure virtual method StreamInfo() in G4VSolid to stream contents
|
||||
of a solid to a generic output stream. Interface change required for
|
||||
all derived concrete solids.
|
||||
Added method DumpInfo() using StreamInfo() to dump contents to the
|
||||
standard output.
|
||||
o G4AssemblyVolume:
|
||||
+ Fixed bug #409 concerning missing imprint counter method.
|
||||
+ Fixed bug #410 concerning the internal counting mechanism.
|
||||
Added accessor methods for retrieving the instance ID.
|
||||
o Added new method IsParameterised() for G4PVParameterised and
|
||||
G4PVPlacement, to enquire for existing parameterisation for a placed
|
||||
volume.
|
||||
o Added methods IsParameterised() and GetMultiplicity() for G4PVReplica
|
||||
and G4VPhysicalVolume to enquire for existing parameterisation of
|
||||
placed volume, and number of replicated volumes.
|
||||
o Fixed bug in G4GeometryManager for the initialisation of
|
||||
fine-grained timer for voxelisation statistics.
|
||||
o Correction in G4LogicalVolume to allow correct propagation of the
|
||||
Field Manager to the daughter volumes. Fixes bug report for field
|
||||
by logical volume.
|
||||
- Solids
|
||||
o Implemented mechanism for dumping contents of solids to streams.
|
||||
o G4Cons: bug fixed in DistanceToIn(p,v) concerning z-crossing at
|
||||
the edge with Rmin,Rmax.
|
||||
o Boolean solids:
|
||||
+ Added method CleanTransformations() to G4DisplacedSolid and
|
||||
corrected implementation in destructor of G4BooleanSolid not to
|
||||
call for deletion of G4VSolid in the case where displacement is used.
|
||||
Fixes a problem noticed on Linux-g++ at application closeout for
|
||||
double deletion of a solid in such special case.
|
||||
o BREPS solids:
|
||||
+ Fix in G4BREPSolidPCone in construction for creation of
|
||||
begin & end planar surfaces in the case where
|
||||
[RMIN[0] == 0.0 && RMAX[0] > 0.0] and/or
|
||||
[RMIN[sections] == 0.0 && RMAX[sections] > 0.0].
|
||||
Fixes problem report #419.
|
||||
+ G4Ray, G4Surface: made static inline methods not inlined
|
||||
to allow porting on Windows DLLs.
|
||||
o Specific solids: fixed un-initialised data members in constructors
|
||||
of classes: G4ClippablePolygon, G4EnclosingCylinder, G4PolyconeSide,
|
||||
G4ReduciblePolygon, G4VCSGfaceted.
|
||||
o STEPinterface: made all static inline methods not inlined,
|
||||
to allow porting on Windows DLLs.
|
||||
o Some general cleanup.
|
||||
- Verification
|
||||
o G4GeomTestVolume: fixed recursive call to G4GeomTestVolume to
|
||||
consider also 'tolerance' as argument in the recursive test algorithm.
|
||||
- Volumes
|
||||
o Introduced abstract class G4VCurvedTrajectoryFilter, and created
|
||||
class G4IdentityTrajectoryFilter, concrete filter for trajectory
|
||||
points.
|
||||
o Code cleanup and cosmetics for most classes.
|
||||
o G4PropagatorInField:
|
||||
+ Fix in ComputeStep() to correctly handle cases when tracks
|
||||
get killed.
|
||||
+ Introduced memory of Charge Mass and Momentum in order for it to
|
||||
message the correct ChordFinder at each step. Fixes problem observed
|
||||
when multiple field managers are used.
|
||||
+ Removed not-implemented constructor taking G4Navigator* as argument.
|
||||
+ Get rid of static const data for default 'epsilonStep' size.
|
||||
+ Initialised all data members in constructor!
|
||||
o G4BlockingList.cc: fixed initialisation of fBlockTagNo.
|
||||
Fixes warnings reported by Valgrind to G4BlockingList,
|
||||
G4VoxelNavigation and G4ParameterisedNavigation.
|
||||
o Formatting cleanup in source implementation files.
|
||||
|
||||
o Global:
|
||||
------
|
||||
- Introduced new G4Exception scheme based on severity level.
|
||||
Added enumeration G4ExceptionSeverity.
|
||||
o Modified : G4VStateDependent[.hh.cc], G4Exception.cc,
|
||||
G4StateManager.hh and globals.hh
|
||||
- Migration to new G4ApplicationState, prepending "G4State_" to each
|
||||
application state ID.
|
||||
- G4Allocator: moved page size to become data-member of G4Allocator.
|
||||
'fPageSize' is now computed according to the size of the object
|
||||
to be allocated. The default size is 1024 bytes for objects whose
|
||||
size is less than 512 bytes, 10 times the size of the object otherwise.
|
||||
- G4UnitsTable: made GetUnitsTable() static method not inlined.
|
||||
- G4Integrator: plugged minor memory leak and fixed uninitialised values.
|
||||
|
||||
o Graphical representations:
|
||||
-------------------------
|
||||
- Introduced classes G4AttDef, G4AttDefStore and G4AttValue.
|
||||
- Added const G4std::vector<G4AttValue>* fAttValues/Defs to
|
||||
G4VisAttributes.
|
||||
- HepPolyhedron:
|
||||
o added methods createTwistedTrap() and createPolyhedron().
|
||||
o minor bug fix in method GetFacet().
|
||||
o changed inline static methods to not inlined.
|
||||
- Small revison of G4Scale and improvements in G4VMarker class description.
|
||||
- G4Colour class description corrected.
|
||||
- Patched access to public static data in G4Scale and G4VisAttributes.
|
||||
Added static accessors to be used in the kernel to allow porting on
|
||||
Windows DLLs.
|
||||
|
||||
o Hadronic Processes:
|
||||
------------------
|
||||
- cross_sections
|
||||
+ added protection for low nuclear mass limit in high precision classes
|
||||
for neutron and proton nuclear scattering
|
||||
+ added protection in electro-nuclear scattering (solves the problem
|
||||
seen in CMS, linear collider, and electron beam-dump studies)
|
||||
+ added alternative description of pion nuclear reactions cross-sections
|
||||
(G4PiNuclearCrossSection), affecting in particular the absorption
|
||||
dominated (T<500MeV) region.
|
||||
- management
|
||||
+ changed the memory management policy for model classes
|
||||
(G4HadronicInteraction derived), so they get deleted exactly once,
|
||||
no matter what the physics list looks like.
|
||||
- processes
|
||||
+ corrected documentation for electro and gamma nuclear process classes.
|
||||
- stopping
|
||||
+ fixed light material problem and neutrino-flavour problem in
|
||||
muon-nuclear scatterering
|
||||
- util
|
||||
+ enabled tracing of originator model (in development mode) for more
|
||||
detailed verfication
|
||||
+ more work on energy conservation for low energy models in the case
|
||||
of annihilation events, charge exchange reactions, and strangeness
|
||||
production.
|
||||
- models/cascade
|
||||
+ first release of the cascade part of the HETC re-write
|
||||
- models/chiral_inv_phase_space
|
||||
+ bug fixes, and revised rho width.
|
||||
- models/coherent_elastic
|
||||
+ removed some conservative programming in favour of performance.
|
||||
- models/high_energy
|
||||
+ fixed known bug in the Cross method, and energy non-conservation
|
||||
problems in cases of strangeness production and anti-particle
|
||||
reactions
|
||||
- models/leading_particle
|
||||
+ extended neutron spectrum to reach below 1 MeV
|
||||
- models/low_energy
|
||||
+ improved treatement of the K0 system.
|
||||
+ removed long-standing (small) memory leak in light ion reactions
|
||||
+ improved treatement of pion absorption at lowest energies
|
||||
- models/neutron_hp
|
||||
+ added description of inelastic channel in case no energy distributions
|
||||
are given, and there are exactely two secondaries
|
||||
Fixes a problem seen in neutron scattering off iron
|
||||
+ added protection a case where cross-sections went negative in
|
||||
non-linear interpolation mode
|
||||
+ added an exception in case heavy elements with no data provided are
|
||||
searched for
|
||||
- models/de_excitation
|
||||
+ new feature: internal conversion now available
|
||||
+ fixes for integration problem in multi-fragmentation and random
|
||||
numbers generation
|
||||
- models/radiative_decay
|
||||
+ now also using internal conversion
|
||||
- models/high_energy
|
||||
+ cleared compilation warnings
|
||||
- models/kinetic_model
|
||||
+ first release of the binary-cascade model
|
||||
- models/management
|
||||
+ added coulomb barrier information to nucleus interface
|
||||
- models/pre_equilibrium
|
||||
+ enabled source tracing in developer mode
|
||||
+ fixed rare integration problem in the probability distribution
|
||||
function for ion emission
|
||||
- models/quark_gluon_string
|
||||
+ added developer mode
|
||||
- models/scattering
|
||||
+ First release of the generic scattering term, currently used by
|
||||
binary cascade.
|
||||
- models/string_fragmentation
|
||||
+ removed some conservative programming
|
||||
- models/util
|
||||
+ added coulomb barrier to nucleus' public interface
|
||||
+ kinetic track now decay in cascade type codes with correct life-time
|
||||
+ track 4-momentum can now be updated by specifying new energy
|
||||
- New data required for photon-evaporation and radioactive decay databases.
|
||||
- High precision neutron code will work with G4NDL0.2 through G4NDL3.7.
|
||||
|
||||
|
||||
o Magnetic Field:
|
||||
--------------
|
||||
- G4FieldManager:
|
||||
o made 'fDefault_Delta_One_Step_Value' and
|
||||
'fDefault_Delta_Intersection_Val' non static constants to resolve
|
||||
initialisation problems. Fixes problem report #383.
|
||||
- G4ChordFinder:
|
||||
o fixed case of stepTrial >> stepTrialOld, for large multiple.
|
||||
o added guard for null stepTrial in FindNextChord().
|
||||
o correction from zero dChord in case of not-updated 'Unconstrained'
|
||||
step estimate (state).
|
||||
o Added instance variables to store number of calls and chord-trials.
|
||||
- G4EquationOfMotion:
|
||||
o made RightHandSide() inlined.
|
||||
o changed signature of Point in GetFieldValue(), now double[4].
|
||||
- Protection against division by 0 in
|
||||
G4MagIntegratorDriver::ComputeNewStepSize.
|
||||
- Fixes for unitialised variables in G4MagIntegratorStepper,
|
||||
G4FieldTrack, G4MagErrorStepper, G4Mag_SpinEqRhs, G4ExplicitEuler,
|
||||
and G4ImplicitEuler
|
||||
- Fixed memory leaks in G4ImplicitEuler and ExplicitEuler.
|
||||
|
||||
o Materials:
|
||||
---------
|
||||
- G4Material: removed constructors with chemical formula.
|
||||
- Added constant material properties to G4MaterialPropertiesTable.
|
||||
- G4IonisParamElm: fix in excitation energy interpolation.
|
||||
- G4IonisParamMat: added methods to Set/Find the mean excitation energy.
|
||||
|
||||
o Particles:
|
||||
---------
|
||||
- Updated mass width for resonance particles.
|
||||
- Fixed PDG codes for k0_star(1430), a0(1450) and f0(1370).
|
||||
- Made static inline method G4VDecayChannel::GetNoName() not inlined
|
||||
for porting on Windows DLLs.
|
||||
|
||||
o Persistency:
|
||||
-----------
|
||||
- Implementation of abstract layer for persistency. Removed ODBMS
|
||||
specific implementation and setup. Now persistency library is part of
|
||||
the Geant4 kernel (see documentation on user manuals for details)
|
||||
o HepMC is not currently supported by CLHEP on Windows, so HepMC
|
||||
persistency is temporarly excluded from compilation on Windows.
|
||||
|
||||
o Run, Intercoms and Interfaces
|
||||
-----------------------------
|
||||
- G4RunManager, G4RunMessenger:
|
||||
o Introduced "soft abortion", to allow event loop to abort after
|
||||
processing the current event. G4RunManager sets "eventAbortion"
|
||||
flag of G4Event if that particular event is aborted.
|
||||
o Introduced AbortEvent() method and corresponding UI command.
|
||||
- Introduced new G4Exception scheme: added G4ExceptionHandler class.
|
||||
- G4RunManager: introduced ResetNavigator() method needed in cases
|
||||
where a geometry has been modified between runs in order to properly
|
||||
re-initialize navigator's state.
|
||||
- Added two new pure virtual functions to G4VGraphicsScene:
|
||||
void AddThis(const G4VTrajectory&)
|
||||
void AddThis(const G4VHit&)
|
||||
- Fixed uninitialized data member and minor memory leak in G4UIcommand.
|
||||
- Fixed G4UIArrayStrings to work for "konsole" type termcap.
|
||||
- Patched access to public static data in G4VGlobalFastSimulationManager
|
||||
and G4VVisManager. Added static accessors to be used in the kernel to
|
||||
allow porting on Windows DLLs.
|
||||
|
||||
o Tracking & Track:
|
||||
----------------
|
||||
- Extensions of G4VTrajectory and introduction of curved trajectories
|
||||
o Added classes G4SmoothTrajectory and G4SmoothTrajectoryPoint.
|
||||
o Implemented default Show/DrawTrajectory() in G4VTrajectory.
|
||||
- G4SteppingManager:
|
||||
o implemented new ForceCondition flag StronglyForced.
|
||||
o fixed problem observed with optical processes.
|
||||
- G4TrackingManager
|
||||
o Re-implemented EventAborted() method to ensure this command
|
||||
works properly during stepping phase.
|
||||
o Set fpTrajectory pointer to zero when the trajectory is deleted.
|
||||
- Added accessors to auxiliary point vector, in both G4Step and
|
||||
G4ParticleChangeForTransport.
|
||||
- Set 'fUndefined' for the StepStatus in G4PostStepPoint.
|
||||
- Fixed initialisation of 'fCharge' in G4StepPoint constructor.
|
||||
- Patched access to public static data in G4VParticleChange.
|
||||
Added accessors to be used in the kernel to allow porting on
|
||||
Windows DLLs.
|
||||
|
||||
o Transportation:
|
||||
--------------
|
||||
- G4Transportation: enable use of smooth (curved) trajectories.
|
||||
- Design iteration for standard scoring and class reorganisation
|
||||
o changed sampler concept: instead of separate samplers for
|
||||
all combinations of importance sampling, scoring, weight roulette
|
||||
for parallel and mass geometry, two samplers now are used
|
||||
for the mass and parallel geometry: G4MassGeometrySampler
|
||||
and G4ParallelGeometrySampler.
|
||||
o bug fixes in G4MassGeometrySampler, G4ParallelGeometrySampler,
|
||||
and G4MassGeometry.
|
||||
o moved G4CellStoreScorer, G4TrackLogger to digits+hits/detector.
|
||||
|
||||
o Visualization:
|
||||
-------------
|
||||
- New implementation of HepRep driver (version 2).
|
||||
- Precision control of g4_XX.prim files are now generated by the
|
||||
DAWNFILE/DAWN-Network drivers, by use of a new variable for tuning
|
||||
precision G4DAWNFILE_PRECISION. Default precision is now set to
|
||||
9 digits.
|
||||
- Fix (removal) of ambiguous G4VVisCommand::GetNewDoubleValue().
|
||||
- Added /vis/viewer/set/globalMarkerScale.
|
||||
- Improved algorithm of CompareForKernelVisit on OpenGL and OpenInventor.
|
||||
- OpenGL driver: fixes for WIN32 architecture at compilation level.
|
||||
Viewer still to be implemented.
|
||||
- Patched access to static data in G4VisCommandsSceneAdd.cc,
|
||||
G4VisManager.cc and G4FlavoredParallelWorldModel.cc to allow porting
|
||||
on Windows DLLs.
|
||||
- Corrected inclusion of G4OpenGLXViewer #ifdef X_DRIVER for Windows
|
||||
and other small changes in OpenGL.
|
||||
- Added integer argument to /vis/scene/add/trajectories [drawing-mode].
|
||||
drawing-mode is passed to DrawTrajectory.
|
||||
- Fixed bug in G4VisManager wich lead to zero G4VModel pointer.
|
||||
- Improved handling of models.
|
||||
- Fixed division-by-zero cases in G4RayTracer.
|
||||
- VRML driver: bug fix for marker size.
|
||||
- Improved end of run behaviour for non-post-processing graphics systems.
|
||||
|
||||
o g3tog4 tool:
|
||||
-----------
|
||||
- Fix in G4gsdvn G4gsposp to enable larger number of clone volumes
|
||||
- Fix for division defined in a mother with not yet defined parameters.
|
||||
|
||||
o data
|
||||
----
|
||||
- Updated data-sets for:
|
||||
o PhotonEvaporation: data-base now includes internal conversion
|
||||
coefficients.
|
||||
o RadiativeDecay.
|
||||
|
||||
o Examples:
|
||||
--------
|
||||
- advanced:
|
||||
+ Migration of most examples to use AIDA 3.X for histogramming.
|
||||
+ Added "composite_calorimeter" example based on CMS test-beam setup.
|
||||
+ Added "lAr_calorimeter" example based on ATLAS lAr-calorimeter
|
||||
test-beam setup.
|
||||
+ underground_physics:
|
||||
o Updates to cope with new interface for G4scintillation process.
|
||||
o Updated geometry for better comparison with data. Corrected
|
||||
overlapping volumes and inefficient physics list.
|
||||
- extended
|
||||
o analysis
|
||||
+ added "A01" example for usage of analysis and HepRep.
|
||||
o biasing
|
||||
+ reduced examples to three:
|
||||
B01 - importance sampling and scoring. Importance values are
|
||||
defined according to the mass geometry. Scoring performed.
|
||||
B02 - uses a parallel geometry to define G4GeometryCell objects
|
||||
for scoring and importance sampling. In addition it customizes
|
||||
the scoring. In this example one scorer creates a histogram.
|
||||
It can be run through a Python script.
|
||||
B03 - importance sampling and scoring interactively through Python.
|
||||
o electromagnetic:
|
||||
+ migrated histogramming to AIDA 3.X.
|
||||
+ fixes to allow compilation in gcc-3.2 (TestEm1, TestEm2, TestEm3).
|
||||
o eventGenerator
|
||||
+ enhanced interface to HepMC to use CLHEP module.
|
||||
o gdml:
|
||||
+ fixed warnings on SUN and SUN linker problem.
|
||||
o persistency
|
||||
+ introduced example (PersEx01) for persistency of calorimeter hits
|
||||
using ROOT-I/O.
|
||||
+ removed old ODBMS-based examples.
|
||||
- novice
|
||||
o N06: updates according to new interface for G4Scintillation process.
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
Technical Notes
|
||||
---------------
|
||||
|
||||
The code and some binary libraries are available through our "Source Code"
|
||||
Web page:
|
||||
- see our <A href="http://cern.ch/geant4">Geant4 Home Page</A>.
|
||||
|
||||
Please refer to <A
|
||||
href="http://cern.ch/geant4/G4UsersDocuments/Overview/html/index.html">Geant4
|
||||
User Documentation</A> for further information about using Geant4.
|
||||
|
||||
|
||||
Contents
|
||||
--------
|
||||
|
||||
1. Supported and Tested Platforms
|
||||
2. AIDA and CLHEP
|
||||
3. The Standard Template Library (STL)
|
||||
4. Compiler Specific Problems
|
||||
5. Known Run-Time Problems
|
||||
6. Compilation Warnings
|
||||
7. Known Run-Time Warnings
|
||||
8. Items for migration of user code
|
||||
|
||||
1. Supported and Tested Platforms
|
||||
---------------------------------
|
||||
|
||||
o SUN Solaris 5.8, C++ 5.3 Patch 111685-07, C++ 5.4 Patch 111715-02.
|
||||
o Linux, gcc 2.95.2, gcc 3.2.
|
||||
This configuration was tested with the RedHat 7.2 and 7.3 distributions,
|
||||
versions of Geant4 have also been compiled successfully on other Linux
|
||||
distributions, like Debian or Suse.
|
||||
The default RedHat compiler gcc-2.96 ditributed in RedHat 7.X is NOT
|
||||
supported. It has been verified that it produces incorrect binaries,
|
||||
therefore is not reliable. See also note below.
|
||||
o Windows-2000/XP and CygWin Tools with: Visual C++ 6.0 Service Pack 5
|
||||
|
||||
Platforms configured but not tested and not supported:
|
||||
o DEC V4.0, cxx C++ V6.1-027
|
||||
o HP 10.20, aCC C++ B3910B A.01.23
|
||||
o SGI V6.5.5, CC 7.2.1
|
||||
o AIX 4.3.2, xlC 6.0
|
||||
o MacOS 10.2, gcc 2.92.2 / gcc-3.2
|
||||
|
||||
2. AIDA and CLHEP
|
||||
-----------------
|
||||
|
||||
Geant4 5.0 requires the installation of CLHEP.
|
||||
|
||||
See <A href="http://cern.ch/clhep/INSTALLATION/clhep.html">
|
||||
CLHEP</A>. Tests have been performed with CLHEP 1.8.0.0.
|
||||
|
||||
Geant4 5.0 examples with histogramming cowork with AIDA 3.0 implementations.
|
||||
These include:
|
||||
- ANAPHE and components included therein
|
||||
(see: <A href="http://cern.ch/anaphe">ANAPHE</A>)
|
||||
- JAS (Java Analysis Studio)
|
||||
(see: <A href="http://jas.freehep.org">JAS</A>)
|
||||
- Open Scientist
|
||||
(see: <A href="http://www.lal.in2p3.fr/OpenScientist">Open Scientist</A>)
|
||||
|
||||
AIDA headers can be downloaded from:
|
||||
<A href="http://aida.freehep.org">AIDA</A>
|
||||
|
||||
|
||||
3. The Standard Template Library
|
||||
--------------------------------
|
||||
|
||||
Native versions of STL have been tested on the following platforms:
|
||||
|
||||
Windows/2000, Linux, and SUN.
|
||||
|
||||
NOTES:
|
||||
|
||||
- Platform specific setup:
|
||||
o SUN: Native STL is required for ISO/ANSI setup.
|
||||
o Linux: Native STL is required (non ISO/ANSI setup for egcs compiler only).
|
||||
o Windows: Native STL and ISO/ANSI setup required (VC++ 6.0).
|
||||
|
||||
|
||||
4. Compiler Specific Problems
|
||||
-----------------------------
|
||||
|
||||
o Linux Red Hat 7.X, gcc-2.96.
|
||||
|
||||
- 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
|
||||
iostream classes, problems which apparently have all been solved in
|
||||
more recent versions of the compiler (3.X series).
|
||||
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
|
||||
http://gcc.gnu.org/gcc-2.96.html).
|
||||
|
||||
|
||||
5. Known Run-Time Problems and Limitations
|
||||
------------------------------------------
|
||||
|
||||
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
|
||||
Geant4 Problem Reporting System, available on the Web at this address:
|
||||
|
||||
http://wwwinfo.cern.ch/asd/cgi-bin/geant4/problemreport
|
||||
|
||||
|
||||
6. Compilation Warnings
|
||||
-----------------------
|
||||
|
||||
There are compilation warnings on some platforms. We do not believe
|
||||
that any will lead to incorrect run-time behaviour, but we are working
|
||||
on reducing them.
|
||||
|
||||
|
||||
7. Known Run-Time Warnings
|
||||
--------------------------
|
||||
|
||||
The following messages can be written to error output while tracking.
|
||||
We believe none give rise to incorrect behaviour.
|
||||
|
||||
o G4PropagateInField: Warning: Particle is looping
|
||||
- tracking in field will be stopped.
|
||||
It has performed 10000 steps in Field while a maximum of 10000
|
||||
are allowed.
|
||||
|
||||
|
||||
8. Items for migration of user code
|
||||
-----------------------------------
|
||||
|
||||
o Compilation/installation of the 'g3tog4' module is now -optional- in
|
||||
release 5.0 and can be triggered only if G4USE_G3TOG4 is set during
|
||||
installation.
|
||||
o The new data sets for photon-evaporation and radioactive-decay are
|
||||
required, old data-sets are not compatible with this release.
|
||||
o Definition of the state IDs in G4ApplicationState have changed to
|
||||
prepend the "G4State_" prefix to the original state ID (i.e. "Idle"
|
||||
becomes "G4State_Idle", "Init" becomes "G4State_Init", and so on...).
|
||||
The user code (particularly, user defined messengers defining state
|
||||
dependent commands) will need to migrate to this new convention.
|
||||
o The interface for usage of the scintillation process has changed.
|
||||
Refer to the user's manual to learn about how to migrate the user code
|
||||
to use the new interface.
|
||||
o Interfaces for importance biasing and scoring have substantially changed
|
||||
and migration of the user code using these classes is required. Refer to
|
||||
the user's manual to learn about how to migrate the user code
|
||||
to use the new interfaces.
|
||||
o User defined solids will need to implement a new method:
|
||||
std::ostream& StreamInfo(std::ostream& os) const
|
||||
to dump solid's contents to an output stream.
|
||||
The method is now pure virtual in the base class G4VSolid.
|
||||
o The base class G4VTrajectory has been enhanced and new pure virtual
|
||||
functions have been introduced in G4VGraphicsScene:
|
||||
void AddThis(const G4VTrajectory&)
|
||||
void AddThis(const G4VHit&)
|
||||
User inherited classes require concrete implementations of the methods
|
||||
above, as well.
|
||||
@@ -1,17 +0,0 @@
|
||||
# $Id: G4ODBMS_BUILD.gmk,v 1.2 1999/09/17 13:15:29 morita Exp $
|
||||
# ----------------------------------------------------------------
|
||||
# GNUmakefile for CPPFLAGS for HepODBMS and Objectivity/DB.
|
||||
# Youhei Morita, 9th July 1998.
|
||||
#--------------------------------------------------------------------
|
||||
# Objectivity and HepODBMS definitions
|
||||
|
||||
ifdef OBJY_DIR
|
||||
CPPFLAGS += -I$(OBJY_DIR)/include
|
||||
endif
|
||||
|
||||
ifdef HEP_ODBMS_DIR
|
||||
CPPFLAGS += -I$(HEP_ODBMS_DIR)/include \
|
||||
-DHEP_ODBMS_EXPORT="" \
|
||||
-DHep_HAS_BUILDIN_BOOL_CONSTANTS
|
||||
endif
|
||||
#--------------------------------------------------------------------
|
||||
+9
-5
@@ -1,4 +1,4 @@
|
||||
# $Id: G4UI_USE.gmk,v 1.5 2001/11/13 16:00:44 johna Exp $
|
||||
# $Id: G4UI_USE.gmk,v 1.6 2002/11/22 11:53:02 gcosmo Exp $
|
||||
# -------------------------------------------------------------
|
||||
# GNUmakefile for CPPFLAGS for interfaces USE phase.
|
||||
# John Allison, 6th July 1998.
|
||||
@@ -21,11 +21,13 @@ UILIBS :=
|
||||
# C-pre-processor variable G4UI_USE_TERMINAL is set by default, although
|
||||
# there is no need to use it.
|
||||
|
||||
CPPFLAGS += -I$(G4BASE)/interfaces/basic/include
|
||||
ifneq ($(G4INCLUDE_EXEC),1)
|
||||
CPPFLAGS += -I$(G4BASE)/interfaces/basic/include
|
||||
CPPFLAGS += -I$(G4BASE)/interfaces/common/include
|
||||
CPPFLAGS += -I$(G4BASE)/interfaces/GAG/include
|
||||
endif
|
||||
UILIBS += -lG4UIbasic
|
||||
CPPFLAGS += -I$(G4BASE)/interfaces/common/include
|
||||
UILIBS += -lG4UIcommon
|
||||
CPPFLAGS += -I$(G4BASE)/interfaces/GAG/include
|
||||
UILIBS += -lG4UIGAG
|
||||
|
||||
ifdef G4UI_USE_TERMINAL
|
||||
@@ -74,7 +76,9 @@ ifdef G4UI_USE_WO
|
||||
G4UI_USE = 1
|
||||
G4INTY_USE_XT = 1
|
||||
CPPFLAGS += -DG4UI_USE_WO
|
||||
CPPFLAGS += -I$(G4BASE)/interfaces/OPACS/include
|
||||
ifneq ($(G4INCLUDE_EXEC),1)
|
||||
CPPFLAGS += -I$(G4BASE)/interfaces/OPACS/include
|
||||
endif
|
||||
UILIBS += -lG4UIOPACS
|
||||
INC_OPACS = 1
|
||||
LOAD_OPACS = 1
|
||||
|
||||
+22
-11
@@ -1,4 +1,4 @@
|
||||
# $Id: G4VIS_USE.gmk,v 1.13 2002/03/09 03:12:33 johna Exp $
|
||||
# $Id: G4VIS_USE.gmk,v 1.14 2002/11/22 11:53:09 gcosmo Exp $
|
||||
# -------------------------------------------------------------
|
||||
# GNUmakefile for CPPFLAGS for visualization USE phase.
|
||||
# John Allison, 24th January 1998.
|
||||
@@ -13,26 +13,29 @@ endif
|
||||
# Set old USE C-pre-processor flags for backwards compatibility of user code...
|
||||
|
||||
CPPFLAGS += -DG4VIS_USE_DAWNFILE
|
||||
CPPFLAGS += -I$(G4BASE)/visualization/FukuiRenderer/include
|
||||
VISLIBS += -lG4FR
|
||||
|
||||
CPPFLAGS += -DG4VIS_USE_HEPREPFILE
|
||||
CPPFLAGS += -I$(G4BASE)/visualization/HepRep/include
|
||||
VISLIBS += -lG4visHepRep
|
||||
|
||||
CPPFLAGS += -DG4VIS_USE_RAYTRACER
|
||||
CPPFLAGS += -I$(G4BASE)/visualization/RayTracer/include
|
||||
VISLIBS += -lG4RayTracer
|
||||
|
||||
CPPFLAGS += -DG4VIS_USE_VRMLFILE
|
||||
CPPFLAGS += -I$(G4BASE)/visualization/VRML/include
|
||||
VISLIBS += -lG4VRML
|
||||
|
||||
CPPFLAGS += -DG4VIS_USE_ASCIITREE
|
||||
CPPFLAGS += -DG4VIS_USE_GAGTREE
|
||||
CPPFLAGS += -I$(G4BASE)/visualization/Tree/include
|
||||
VISLIBS += -lG4Tree
|
||||
|
||||
ifneq ($(G4INCLUDE_EXEC),1)
|
||||
CPPFLAGS += -I$(G4BASE)/visualization/FukuiRenderer/include
|
||||
CPPFLAGS += -I$(G4BASE)/visualization/HepRep/include
|
||||
CPPFLAGS += -I$(G4BASE)/visualization/RayTracer/include
|
||||
CPPFLAGS += -I$(G4BASE)/visualization/VRML/include
|
||||
CPPFLAGS += -I$(G4BASE)/visualization/Tree/include
|
||||
endif
|
||||
|
||||
ifdef G4VIS_USE_DAWN
|
||||
CPPFLAGS += -DG4VIS_USE_DAWN
|
||||
# CPPFLAGS += -I... and VISLIBS += set above.
|
||||
@@ -42,7 +45,9 @@ ifdef G4VIS_USE_OPACS
|
||||
INC_OPACS = 1
|
||||
LOAD_OPACS = 1
|
||||
CPPFLAGS += -DG4VIS_USE_OPACS
|
||||
CPPFLAGS += -I$(G4BASE)/visualization/OPACS/include
|
||||
ifneq ($(G4INCLUDE_EXEC),1)
|
||||
CPPFLAGS += -I$(G4BASE)/visualization/OPACS/include
|
||||
endif
|
||||
VISLIBS += -lG4OPACS
|
||||
endif
|
||||
|
||||
@@ -64,7 +69,9 @@ ifdef G4VIS_USE_OPENGLWIN32
|
||||
endif
|
||||
ifdef G4VIS_USE_OPENGL
|
||||
CPPFLAGS += -DG4VIS_USE_OPENGL
|
||||
CPPFLAGS += -I$(G4BASE)/visualization/OpenGL/include
|
||||
ifneq ($(G4INCLUDE_EXEC),1)
|
||||
CPPFLAGS += -I$(G4BASE)/visualization/OpenGL/include
|
||||
endif
|
||||
VISLIBS += -lG4OpenGL
|
||||
INC_GL = 1
|
||||
LOAD_GL = 1
|
||||
@@ -82,7 +89,9 @@ ifdef G4VIS_USE_OIWIN32
|
||||
endif
|
||||
ifdef G4VIS_USE_OI
|
||||
CPPFLAGS += -DG4VIS_USE_OI
|
||||
CPPFLAGS += -I$(G4BASE)/visualization/OpenInventor/include
|
||||
ifneq ($(G4INCLUDE_EXEC),1)
|
||||
CPPFLAGS += -I$(G4BASE)/visualization/OpenInventor/include
|
||||
endif
|
||||
VISLIBS += -lG4OpenInventor
|
||||
INC_IV = 1
|
||||
LOAD_IV = 1
|
||||
@@ -106,8 +115,10 @@ endif
|
||||
ifdef G4_SOLVE_VIS_TEMPLATES
|
||||
CPPFLAGS += -DG4_SOLVE_VIS_TEMPLATES
|
||||
endif
|
||||
CPPFLAGS += -I$(G4BASE)/visualization/management/include
|
||||
CPPFLAGS += -I$(G4BASE)/visualization/modeling/include
|
||||
ifneq ($(G4INCLUDE_EXEC),1)
|
||||
CPPFLAGS += -I$(G4BASE)/visualization/management/include
|
||||
CPPFLAGS += -I$(G4BASE)/visualization/modeling/include
|
||||
endif
|
||||
VISLIBS += -lG4vis_management
|
||||
VISLIBS += -lG4modeling
|
||||
|
||||
|
||||
+72
-3
@@ -1,6 +1,5 @@
|
||||
$Id: History,v 1.193 2002/06/26 17:27:18 gcosmo Exp $
|
||||
$Name: geant4-04-01 $
|
||||
|
||||
$Id: History,v 1.209 2002/12/10 14:05:59 gcosmo Exp $
|
||||
$Name: geant4-05-00 $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -18,6 +17,76 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
4th December 2002 Gabriele Cosmo (config-V04-01-08)
|
||||
- Removed obsolete setup for ObjectSpace-STL (G4USE_OSPACE and related
|
||||
variables). Removed obsolete variable G4USE_STL.
|
||||
- Updated Configure scripts.
|
||||
|
||||
2nd December 2002 John Allison (config-V04-01-07)
|
||||
- common.gmk, binmake.gmk: New dependency file algorithm that avoids
|
||||
leaving corrupt .d files when #include'd files cannot be found.
|
||||
- Removed obsolete schema targets in common.gmk.
|
||||
|
||||
25th November 2002 Gabriele Cosmo (config-V04-01-06)
|
||||
- Removed ODBMS setup. Now library for persistency is built as part of the
|
||||
kernel and specific implementations for persistency have been moved to
|
||||
examples. Setup for ODBMS no more required. G4USE_HEPODBMS is no longer
|
||||
used.
|
||||
- Updated configuration file AIX-xlC.gmk to port code on AIX with xlC 6.0
|
||||
(K.Murakami).
|
||||
|
||||
22nd November 2002 Gabriele Cosmo (config-V04-01-05)
|
||||
- liblist.c:
|
||||
o Enhanced script to provide the whole list of installed libraries
|
||||
in the correct order, without requiring parsing of dependencies.
|
||||
The functionality is achieved by invoking "liblist" with option '-m",
|
||||
i.e. - liblist -m [libpath] < libname.map
|
||||
where [libpath] is the path where libraries are placed
|
||||
(i.e. $G4LIB/$G4SYSTEM).
|
||||
- binmake.gmk:
|
||||
o Use "liblist -m [libpath]" to retrieve the list of libraries to link in
|
||||
case headers are installed in $G4INCLUDE, and granular libraries are used.
|
||||
- G4UI_USE.gmk, G4VIS_USE.gmk:
|
||||
o Protected specification of -I paths for headers, in case $G4INCLUDE is
|
||||
used. A single -I$G4INCLUDE path will be used for compilation in such case.
|
||||
|
||||
16th November 2002 Hans-Peter Wellisch
|
||||
- binmake.gmk:
|
||||
o Added hadronic/models/cascade/cascade and
|
||||
hadronic/models/generator/scattering include paths.
|
||||
|
||||
8th November 2002 Gabriele Cosmo (config-V04-01-04)
|
||||
- Darwin-g++.gmk:
|
||||
o Updated setup to support MacOS 10.2 (H.Burkhardt).
|
||||
|
||||
30th October 2002 Gabriele Cosmo (config-V04-01-03)
|
||||
- architecture.gmk:
|
||||
o Issue an error if G4SYSTEM is not defined in the environment or not valid.
|
||||
o Define G4LIB_BUILD_G3TOG4 and G4USE_G3TOG4 for optional installation and
|
||||
usage of the g3tog4 module.
|
||||
o Updated list of supported systems/compilers.
|
||||
- binmake.gmk:
|
||||
o Include path and library for g3tog4 module only if G4USE_G3TOG4 is defined.
|
||||
Implies proper handling of G4USE_G3TOG4 in source/GNUmakefile.
|
||||
- Removed obsolete OSPACE setup for WIN32-VC, HP-aCC, DEC-cxx. Still kept for
|
||||
platforms with ODBMS setup.
|
||||
- SUN-CC.gmk: removed -L/usr/lib path specification from LOADLIBS definition.
|
||||
|
||||
10th September 2002 Gabriele Cosmo (config-V04-01-02)
|
||||
- Linux-g++.gmk: added assignment 'CC := gcc' for default 'cc' compiler.
|
||||
|
||||
26th August 2002 Gabriele Cosmo (config-V04-01-01)
|
||||
- binmake.gmk: added include path to persistency/run/include which was
|
||||
missing. Removed unnecessary processes/general/include.
|
||||
|
||||
8th July 2002 John Allison
|
||||
- liblist.c: added protection and warning for file/directory not found
|
||||
in parsedir. Also small cosmetic improvements.
|
||||
|
||||
4th July 2002 Gabriele Cosmo (config-V04-01-00)
|
||||
- Upgraded WIN32-g++ to compile with -ansi and gcc-2.95.3 for most recent versions
|
||||
of CygWin.
|
||||
|
||||
26th June 2002 Gabriele Cosmo (config-V04-00-10)
|
||||
- Moved STEP PERL scripts to examples/extended/geometry/cad/scripts.
|
||||
- Updated scripts for Configure.
|
||||
|
||||
+21
-94
@@ -1,4 +1,4 @@
|
||||
# $Id: architecture.gmk,v 1.78 2002/06/27 14:24:28 gcosmo Exp $
|
||||
# $Id: architecture.gmk,v 1.84 2002/12/04 14:44:23 gcosmo Exp $
|
||||
# ------------------------------------------------------------------------
|
||||
# GEANT 4 - Architecture configuration script for GNU Make
|
||||
#
|
||||
@@ -13,34 +13,16 @@
|
||||
# List of the supported architectures/compilers and related flavors for
|
||||
# the environment variable G4SYSTEM:
|
||||
#
|
||||
# Linux-g++ Linux (Red Hat 6.1 or 7.2), gcc-2.95.2 (default)
|
||||
# Linux-g++ Linux (Red Hat 7.3), gcc-2.95.2 or gcc-3.2 (default)
|
||||
#
|
||||
# Linux-egcs Linux (Red Hat 6.1), egcs-1.1.2
|
||||
# SUN-CC SunOS 5.8, CC 5.3 or 5.4
|
||||
#
|
||||
# SUN-CC SunOS 5.7, CC 5.2
|
||||
#
|
||||
# WIN32-VC Windows/2000 and Microsoft Visual C++ 6.0 - SP5
|
||||
# WIN32-VC Windows/2000/XP and Microsoft Visual C++ 6.0 - SP5
|
||||
# Adding CYGWIN32 tools
|
||||
# -------------------------------------------------------------------------
|
||||
|
||||
# Definition of HEP_ODBMS_LIBS, OBJY_LIBS and OSPACE_LIBS by HepODBMS.
|
||||
# Note: If G4ODBMS is defined, it calls for HEP_ODBMS setup files in
|
||||
# $(HEP_ODBMS_DIR)/etc/.
|
||||
#
|
||||
ifdef G4ODBMS
|
||||
# variables LHCXXTOP and PLATF are used in HepODBMS setup
|
||||
include $(HEP_ODBMS_DIR)/etc/$(OS).mk
|
||||
G4ODBMS_LIBS := $(HEP_ODBMS_LIBS) $(OBJY_LIBS) $(OSPACE_LIBS)
|
||||
endif
|
||||
|
||||
MAKEFLAGS= --no-print-directory
|
||||
|
||||
# If not specified, the default platform for G4SYSTEM is Linux-g++ ...
|
||||
#
|
||||
ifndef G4SYSTEM
|
||||
G4SYSTEM := Linux-g++
|
||||
endif
|
||||
|
||||
# If not specified, the default path for G4 installation G4INSTALL is
|
||||
# set to $HOME/geant4 ...
|
||||
#
|
||||
@@ -87,19 +69,27 @@ ifndef G4INCLUDE
|
||||
endif
|
||||
G4DUMMY_VARIABLE:=$(shell [ ! -d $(G4INCLUDE) ] && mkdir -p $(G4INCLUDE) )
|
||||
|
||||
# backwards compatiblity
|
||||
# Backwards compatibility
|
||||
#
|
||||
ifneq ($(G4MAKESHLIB),)
|
||||
G4LIB_BUILD_SHARED = 1
|
||||
endif
|
||||
|
||||
# defaults for library BUILD. No default for USE, ie. take what is found.
|
||||
# Defaults for library BUILD. No default for USE, ie. take what is found.
|
||||
# Default is building static libraries.
|
||||
#
|
||||
ifeq ($(G4LIB_BUILD_SHARED),)
|
||||
ifeq ($(G4LIB_BUILD_STATIC),)
|
||||
# default is building static libs
|
||||
G4LIB_BUILD_STATIC = 1
|
||||
endif
|
||||
endif
|
||||
|
||||
# Specify if to build the G3TOG4 module or not. Default is NO.
|
||||
#
|
||||
ifneq ($(G4LIB_BUILD_G3TOG4),)
|
||||
G4LIB_BUILD_G3TOG4 = 1
|
||||
G4USE_G3TOG4 = 1
|
||||
endif
|
||||
|
||||
# If not specified, the default path for G4 binaries G4BIN is
|
||||
# set to $G4WORKDIR/bin/$G4SYSTEM ...
|
||||
@@ -109,56 +99,6 @@ ifndef G4BIN
|
||||
endif
|
||||
G4DUMMY_VARIABLE:=$(shell [ ! -d $(G4BIN) ] && mkdir -p $(G4BIN) )
|
||||
|
||||
#################### schema directories & setup for G4ODBMS ###################
|
||||
#
|
||||
ifdef G4ODBMS
|
||||
# If not specified, the default path for G4 schema G4SCHEMA_DIR is
|
||||
# set to $G4LIB/$G4SYSTEM/schema ...
|
||||
#
|
||||
ifndef G4SCHEMA_DIR
|
||||
G4SCHEMA_DIR := $(G4LIB)/$(G4SYSTEM)/schema
|
||||
G4SCHEMA_BOOT := $(G4SCHEMA_DIR)/G4SCHEMA
|
||||
G4SCHEMA_INCLUDE := $(G4SCHEMA_DIR)/include
|
||||
endif
|
||||
ifndef G4SCHEMA_FDID
|
||||
G4SCHEMA_FDID := 207
|
||||
endif
|
||||
|
||||
G4DUMMY_VARIABLE:=$(shell [ ! -d $(G4SCHEMA_DIR) ] && mkdir -p $(G4SCHEMA_DIR) )
|
||||
G4DUMMY_VARIABLE:=$(shell [ ! -d $(G4SCHEMA_INCLUDE) ] && mkdir -p $(G4SCHEMA_INCLUDE) )
|
||||
|
||||
# If not specified, the default path for G4 example schema G4EXAMPLE_BOOT_DIR is
|
||||
# set to $G4WORKDIR/exampleSchema (for persistency examples)...
|
||||
#
|
||||
ifndef G4EXAMPLE_BOOT_DIR
|
||||
G4EXAMPLE_BOOT_DIR := $(G4WORKDIR)/exampleSchema/$(G4SYSTEM)
|
||||
endif
|
||||
|
||||
G4DUMMY_VARIABLE:=$(shell [ ! -d $(G4EXAMPLE_BOOT_DIR) ] && mkdir -p $(G4EXAMPLE_BOOT_DIR) )
|
||||
|
||||
ifndef G4EXAMPLE_BOOT
|
||||
G4EXAMPLE_BOOT = $(G4EXAMPLE_BOOT_DIR)/$(name)
|
||||
endif
|
||||
|
||||
# If not specified, the default path for G4 example runtime federated
|
||||
# database directory G4EXAMPLE_FD_DIR is set to $G4WORKDIR/exampleFD
|
||||
# (for persistency examples)...
|
||||
#
|
||||
ifndef G4EXAMPLE_FD_DIR
|
||||
G4EXAMPLE_FD_DIR := $(G4WORKDIR)/exampleFD/$(G4SYSTEM)
|
||||
endif
|
||||
|
||||
G4DUMMY_VARIABLE:=$(shell [ ! -d $(G4EXAMPLE_FD_DIR) ] && mkdir -p $(G4EXAMPLE_FD_DIR) )
|
||||
G4DDLX_FLAGS := -DTEMPLATEP_HIDES_FNCD
|
||||
|
||||
ifndef G4EXAMPLE_FD
|
||||
G4EXAMPLE_FD = $(G4EXAMPLE_FD_DIR)/$(name)
|
||||
endif
|
||||
|
||||
endif
|
||||
#
|
||||
########################### end setup for G4ODBMS #############################
|
||||
|
||||
# If G4DEBUG or G4NO_OPTIMISE are not specified,
|
||||
# the default compilation is optimised ...
|
||||
#
|
||||
@@ -191,23 +131,6 @@ ifndef CLHEP_LIB
|
||||
endif
|
||||
endif
|
||||
|
||||
# Native STL is the default
|
||||
#
|
||||
CPPFLAGS += -DG4USE_STL
|
||||
|
||||
# Path to ObjectSpace STL (NOT supported. Kept for backward compatibility)
|
||||
#
|
||||
ifdef G4USE_OSPACE
|
||||
#
|
||||
# ObjectSpace STL implementation
|
||||
#
|
||||
ifndef OSPACE_BASE_DIR
|
||||
OSPACE_BASE_DIR := /afs/cern.ch/sw/geant4/dev/ObjectSpace/$(G4SYSTEM)/pro/ToolKit
|
||||
endif
|
||||
OSPACEINC := -I$(OSPACE_BASE_DIR)/ospace/std -I$(OSPACE_BASE_DIR)/ospace/stl
|
||||
OSPACELIBS := -L$(OSPACE_BASE_DIR)/lib -lospace
|
||||
endif #OSPACE
|
||||
|
||||
# Paths for G4 data
|
||||
#
|
||||
ifndef G4DATA
|
||||
@@ -262,9 +185,7 @@ ifeq ($(G4SYSTEM),WIN32-VC)
|
||||
LOADLIBS := $(CLHEP_LIB)
|
||||
else
|
||||
LDFLAGS := -L$(CLHEP_LIB_DIR)
|
||||
# LDFLAGS :=
|
||||
LOADLIBS := -l$(CLHEP_LIB)
|
||||
# LOADLIBS := $(CLHEP_LIB_DIR)/lib$(CLHEP_LIB).a
|
||||
LOADLIBS += -lm
|
||||
endif
|
||||
|
||||
@@ -395,3 +316,9 @@ ifdef CFRONT
|
||||
G4DUMMY_VARIABLE:=$(shell [ ! -d $(G4TREP)/exec ] &&mkdir -p $(G4TREP)/exec )
|
||||
endif
|
||||
|
||||
# If G4SYSTEM is not specified or not valid, issue an ERROR !
|
||||
#
|
||||
#$(G4INSTALL)/config/sys/$(G4SYSTEM).gmk:
|
||||
# @echo "ERROR - G4SYSTEM is not defined in the environment"
|
||||
# @echo " or $(G4SYSTEM) architecture is not a valid one !"
|
||||
# exit 1
|
||||
|
||||
+53
-116
@@ -1,4 +1,4 @@
|
||||
# $Id: binmake.gmk,v 1.76 2002/06/13 11:08:08 jwellisc Exp $
|
||||
# $Id: binmake.gmk,v 1.85 2002/12/04 14:44:23 gcosmo Exp $
|
||||
# ----------------------------------------------------------
|
||||
# Script defining rules and paths for making binaries.
|
||||
# First implementation: Gabriele Cosmo, 25/06/1998.
|
||||
@@ -10,6 +10,11 @@ endif
|
||||
|
||||
G4LIBDIR := $(G4LIB)/$(G4SYSTEM)
|
||||
|
||||
# Define variable checking for existence of centrally installed headers.
|
||||
# If check will be true, avoid explicit definition of paths to INCFLAGS.
|
||||
#
|
||||
G4INCLUDE_EXEC := $(shell [ -r $(G4INCLUDE)/globals.hh ] && echo 1)
|
||||
|
||||
include $(G4INSTALL)/config/G4UI_USE.gmk
|
||||
include $(G4INSTALL)/config/G4VIS_USE.gmk
|
||||
include $(G4INSTALL)/config/interactivity.gmk
|
||||
@@ -27,18 +32,6 @@ ifndef SHAREDLIBS
|
||||
SHAREDLIBS := $(shell test -f $(G4LIB)/$(G4SYSTEM)/libG4globman.$(SHEXT) && echo yes)
|
||||
endif
|
||||
|
||||
# Define variable checking for existence of centrally installed headers,
|
||||
# and global compound libraries installed (in future, the mechanism will
|
||||
# be extended to the granular libraries as well. The liblist application
|
||||
# must be re-engineered for that).
|
||||
# If check will be true, avoid explicit definition of paths to INCFLAGS.
|
||||
#
|
||||
ifndef GLOBALLIBS
|
||||
G4INCLUDE_EXEC := 0
|
||||
else
|
||||
G4INCLUDE_EXEC := $(shell [ -r $(G4INCLUDE)/globals.hh ] && echo 1)
|
||||
endif
|
||||
|
||||
ifndef INCFLAGS
|
||||
ifeq ($(G4INCLUDE_EXEC),1)
|
||||
INCFLAGS := -I$(G4INCLUDE)
|
||||
@@ -59,7 +52,6 @@ ifndef INCFLAGS
|
||||
-I$(G4BASE)/particles/hadrons/mesons/include \
|
||||
-I$(G4BASE)/particles/shortlived/include \
|
||||
-I$(G4BASE)/processes/management/include \
|
||||
-I$(G4BASE)/processes/general/include \
|
||||
-I$(G4BASE)/processes/decay/include \
|
||||
-I$(G4BASE)/processes/optical/include \
|
||||
-I$(G4BASE)/processes/transportation/include \
|
||||
@@ -76,6 +68,7 @@ ifndef INCFLAGS
|
||||
-I$(G4BASE)/processes/hadronic/cross_sections/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/cascade/evaporation/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/cascade/utils/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/cascade/cascade/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/coherent_elastic/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/chiral_inv_phase_space/body/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/chiral_inv_phase_space/interface/include \
|
||||
@@ -88,6 +81,7 @@ ifndef INCFLAGS
|
||||
-I$(G4BASE)/processes/hadronic/models/generator/quark_gluon_string/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/generator/string_common/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/generator/string_fragmentation/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/generator/scattering/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/generator/util/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/high_energy/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/low_energy/include \
|
||||
@@ -112,34 +106,17 @@ ifndef INCFLAGS
|
||||
-I$(G4BASE)/digits+hits/detector/include \
|
||||
-I$(G4BASE)/digits+hits/hits/include \
|
||||
-I$(G4BASE)/digits+hits/digits/include \
|
||||
-I$(G4BASE)/persistency/include \
|
||||
-I$(G4BASE)/readout/include \
|
||||
-I$(G4BASE)/event/include \
|
||||
-I$(G4BASE)/graphics_reps/include \
|
||||
-I$(G4BASE)/intercoms/include \
|
||||
-I$(G4BASE)/g3tog4/include
|
||||
-I$(G4BASE)/intercoms/include
|
||||
ifdef G4USE_G3TOG4
|
||||
INCFLAGS += -I$(G4BASE)/g3tog4/include
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef G4ODBMS
|
||||
ifneq ($(G4INCLUDE_EXEC),1)
|
||||
INCFLAGS += \
|
||||
-I$(G4BASE)/persistency/global/include \
|
||||
-I$(G4BASE)/persistency/digits+hits/hits/include \
|
||||
-I$(G4BASE)/persistency/digits+hits/digits/include \
|
||||
-I$(G4BASE)/persistency/events/include \
|
||||
-I$(G4BASE)/persistency/geometry/global/include \
|
||||
-I$(G4BASE)/persistency/geometry/solids/CSG/include \
|
||||
-I$(G4BASE)/persistency/geometry/solids/Boolean/include \
|
||||
-I$(G4BASE)/persistency/geometry/solids/specific/include \
|
||||
-I$(G4BASE)/persistency/geometry/management/include \
|
||||
-I$(G4BASE)/persistency/management/include \
|
||||
-I$(G4SCHEMA_INCLUDE)
|
||||
endif
|
||||
INCFLAGS += -I$(OBJY_DIR)/include \
|
||||
-I$(HEP_ODBMS_DIR)/include \
|
||||
-DHep_HAS_BUILDIN_BOOL_CONSTANTS
|
||||
endif
|
||||
|
||||
CPPFLAGS += $(INCFLAGS)
|
||||
LDFLAGS += -L$(G4LIBDIR)
|
||||
|
||||
@@ -179,19 +156,15 @@ LDLIBS1 += $(EXTRALIBS)
|
||||
# VISLIBS and UILIBS are now handled by the granular library script...
|
||||
#
|
||||
ifdef GLOBALLIBS
|
||||
LDLIBS1 += $(VISLIBS) $(UILIBS)
|
||||
endif
|
||||
LDLIBS1 += $(VISLIBS) $(UILIBS) -lG4persistency
|
||||
|
||||
ifdef GLOBALLIBS
|
||||
|
||||
ifdef G4ODBMS
|
||||
LDLIBS1 += -lG4persistency
|
||||
ifdef G4USE_G3TOG4
|
||||
LDLIBS1 += -lG3toG4
|
||||
endif
|
||||
|
||||
LDLIBS2 := -lG4readout \
|
||||
-lG4run \
|
||||
-lG4event \
|
||||
-lG3toG4 \
|
||||
-lG4tracking \
|
||||
-lG4parmodels \
|
||||
-lG4processes \
|
||||
@@ -204,9 +177,18 @@ ifdef GLOBALLIBS
|
||||
-lG4intercoms \
|
||||
-lG4global
|
||||
else
|
||||
# The next line specifically should read LDLIBS2 = , not LDLIBS2 :=, so
|
||||
# that it is not expanded until the directory G4TMPDIR is created.
|
||||
LDLIBS2 = $(shell \
|
||||
# The next lines specifically should read LDLIBS2 = , not LDLIBS2 :=, so
|
||||
# that it is not expanded until the directory G4TMPDIR is created.
|
||||
ifeq ($(G4INCLUDE_EXEC),1)
|
||||
LDLIBS2 = $(shell \
|
||||
G4TMP=$(G4TMP); export G4TMP; \
|
||||
if [ \( -f $(G4LIB)/$(G4SYSTEM)/liblist \
|
||||
-a -f $(G4LIB)/$(G4SYSTEM)/libname.map \) ]; then \
|
||||
$(G4LIB)/$(G4SYSTEM)/liblist \
|
||||
-m $(G4LIB)/$(G4SYSTEM) \
|
||||
< $(G4LIB)/$(G4SYSTEM)/libname.map; fi)
|
||||
else
|
||||
LDLIBS2 = $(shell \
|
||||
G4TMP=$(G4TMP); export G4TMP; \
|
||||
if [ \( -f $(G4LIB)/$(G4SYSTEM)/liblist \
|
||||
-a -f $(G4LIB)/$(G4SYSTEM)/libname.map \) ]; then \
|
||||
@@ -217,6 +199,7 @@ else
|
||||
# expanded too soon. Hence extra libraries must have a different name...
|
||||
# Extra libraries to resolve remaining circular dependencies...
|
||||
# LDLIBS2EXTRA =
|
||||
endif
|
||||
endif
|
||||
|
||||
# LDLIBS3 contains the first set of low level libraries...
|
||||
@@ -229,19 +212,6 @@ endif # ifndef USER_DEFINED_LDLIBS
|
||||
# LDLIBS4 contains the next set of low level libraries which historically
|
||||
# (why?) the user is not supposed to be able to define...
|
||||
#
|
||||
ifdef G4ODBMS
|
||||
LDFLAGS += -L$(OBJY_DIR)/lib \
|
||||
-L$(HEP_ODBMS_DIR)/lib
|
||||
|
||||
# Note: $(G4ODBMS_LIBS) should be placed
|
||||
# _before_ -l$(CLHEP_LIB)
|
||||
|
||||
LDLIBS4 += $(G4ODBMS_LIBS)
|
||||
endif
|
||||
ifdef G4USE_OSPACE
|
||||
LDLIBS4 += $(OSPACELIBS)
|
||||
endif
|
||||
|
||||
LDLIBS4 += $(LOADLIBS)
|
||||
|
||||
# Finally assemble libraries...
|
||||
@@ -273,16 +243,7 @@ dependencies := $(patsubst %.cc,$(G4TMPDIR)/exe/%.d,$(sources))
|
||||
|
||||
LINK_DEPENDENCIES := $(G4TMPDIR)/exe/obj.last $(EXTRA_LINK_DEPENDENCIES)
|
||||
|
||||
ifndef G4ODBMS
|
||||
.PHONY: bin clean clean_bin debug
|
||||
else
|
||||
.PHONY: bin clean clean_bin debug cleandb newboot newfd
|
||||
endif
|
||||
|
||||
#
|
||||
# Target "bin" requires dependency files when G4ODBMS=1.
|
||||
# gmake must be recursively called with MAKE_DFILES=1.
|
||||
#
|
||||
|
||||
# Make $(G4TARGET) executable.
|
||||
|
||||
@@ -338,20 +299,37 @@ else
|
||||
-c $(OUT_OBJ)$(G4TMPDIR)/exe/$(G4TARGET).o $(G4TARGET).cc
|
||||
endif
|
||||
|
||||
ifdef G4ODBMS
|
||||
GPPFLAGS := "-MM"
|
||||
else
|
||||
GPPFLAGS := "-M"
|
||||
endif
|
||||
GPPFLAGS := "-M"
|
||||
|
||||
# Make the $(G4TARGET).d file and include it.
|
||||
|
||||
# The ideas for this come from the GNU Make Manual, Section 4.12,
|
||||
# Generating Prerequisites Automatically. The g++ compiler has an
|
||||
# option -M or -MM to write to standard output a list of dependencies
|
||||
# based on the #include statements. The "sed" adds the dependency
|
||||
# file itself as a second target. The result is a mini-makefile which
|
||||
# specifies the .o and .d files as targets which depend on all the
|
||||
# files found through the #include statements. This file is then
|
||||
# included, causing GNU Make to honour these dependencies.
|
||||
|
||||
# The "set -e" causes the shell to exit with an error when the "g++"
|
||||
# fails (otherwise it would only notice the last command in the
|
||||
# pipeline, namely "sed"). GNU Make notices the error and exits
|
||||
# sooner than it otherwise would (still not as soon as I expect,
|
||||
# though!). Even then, an empty file is made, so "[ -s $@ ] || rm -f
|
||||
# $@" removes it ([ -s filename ] gives zero exit code only if file
|
||||
# exists and has a size greater than zero). This avoids making
|
||||
# corrupt .d files which would play havoc with your next build.
|
||||
|
||||
$(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) $(G4TMPDIR)/exe/\\c ; \
|
||||
g++ $(GPPFLAGS) $(CPPFLAGS) $< ) | sed 's!$(G4TMPDIR)/exe/$*.o!& $@!' >$@
|
||||
@set -e;\
|
||||
g++ $(GPPFLAGS) $(CPPFLAGS) $< |\
|
||||
sed 's!$(G4TARGET)\.o!$(G4TMPDIR)/exe/& $@!' >$@;\
|
||||
[ -s $@ ] || rm -f $@
|
||||
ifneq ($(dependencies),)
|
||||
-include $(dependencies)
|
||||
endif
|
||||
@@ -370,44 +348,3 @@ clean_bin:
|
||||
@echo Removing application $(G4TARGET) ...
|
||||
@rm -f ./core
|
||||
@rm -f $(G4BINDIR)/$(G4TARGET)
|
||||
|
||||
############################+ targets for G4ODBMS +############################
|
||||
ifdef G4ODBMS
|
||||
|
||||
cleandb: clean newboot
|
||||
|
||||
$(G4EXAMPLE_BOOT):
|
||||
@echo Copying schema file to $(G4EXAMPLE_BOOT) for FDID $(G4EXAMPLE_FDID)
|
||||
@rm -f $(G4EXAMPLE_BOOT_DIR)/$(name)
|
||||
@rm -f $(G4EXAMPLE_BOOT_DIR)/$(name).FDDB
|
||||
@rm -f $(G4EXAMPLE_BOOT_DIR)/*.$(name).DB
|
||||
@$(HEP_ODBMS_DIR)/etc/getdb $(G4SCHEMA_DIR)/G4SCHEMA \
|
||||
$(G4EXAMPLE_BOOT) $(G4SCHEMA_FDID)
|
||||
|
||||
newboot:
|
||||
@echo Copying schema file to $(G4EXAMPLE_BOOT) for FDID $(G4EXAMPLE_FDID)
|
||||
@rm -f $(G4EXAMPLE_BOOT_DIR)/$(name)
|
||||
@rm -f $(G4EXAMPLE_BOOT_DIR)/$(name).FDDB
|
||||
@rm -f $(G4EXAMPLE_BOOT_DIR)/*.$(name).DB
|
||||
@$(HEP_ODBMS_DIR)/etc/getdb $(G4SCHEMA_DIR)/G4SCHEMA \
|
||||
$(G4EXAMPLE_BOOT) $(G4SCHEMA_FDID)
|
||||
|
||||
$(G4EXAMPLE_FD):
|
||||
@echo Creating new runtime federated database $(G4EXAMPLE_BOOT) for FDID $(G4EXAMPLE_FDID)
|
||||
@rm -f $(G4EXAMPLE_FD_DIR)/$(name)
|
||||
@rm -f $(G4EXAMPLE_FD_DIR)/$(name).FDDB
|
||||
@rm -f $(G4EXAMPLE_FD_DIR)/*.$(name).DB
|
||||
@$(HEP_ODBMS_DIR)/etc/getdb $(G4EXAMPLE_BOOT) \
|
||||
$(G4EXAMPLE_FD) $(G4EXAMPLE_FDID)
|
||||
|
||||
newfd:
|
||||
@echo Creating new runtime federated database $(G4EXAMPLE_BOOT) for FDID $(G4EXAMPLE_FDID)
|
||||
@rm -f $(G4EXAMPLE_FD_DIR)/$(name)
|
||||
@rm -f $(G4EXAMPLE_FD_DIR)/$(name).FDDB
|
||||
@rm -f $(G4EXAMPLE_FD_DIR)/*.$(name).DB
|
||||
@$(HEP_ODBMS_DIR)/etc/getdb $(G4EXAMPLE_BOOT) \
|
||||
$(G4EXAMPLE_FD) $(G4EXAMPLE_FDID)
|
||||
|
||||
endif
|
||||
############################- targets for G4ODBMS -############################
|
||||
|
||||
|
||||
+38
-49
@@ -1,12 +1,9 @@
|
||||
# $Id: common.gmk,v 1.30 2001/06/25 10:58:51 morita Exp $
|
||||
# $Id: common.gmk,v 1.34 2002/12/04 08:36:14 gcosmo Exp $
|
||||
# ----------------------------------------------------------------
|
||||
# Common part of GNUmakefile for libraries. John Allison, 5/7/95.
|
||||
# ----------------------------------------------------------------
|
||||
# Libraries are created according to G4SYSTEM. G.Cosmo, 11/6/96.
|
||||
# Introduced G4LIBDIR and G4TMPDIR. G.Cosmo, 23/6/98.
|
||||
# Introduced G4SCHEMA_HEADER_DIR and G4SCHEMA_SRC_DIR. Y.Morita, 16/11/99.
|
||||
# Actual targets splitted into common_kernel.gmk and common_objy.gmk,
|
||||
# Y.Morita, 15/3/01.
|
||||
|
||||
ifndef G4LIBDIR
|
||||
G4LIBDIR := $(G4LIB)/$(G4SYSTEM)
|
||||
@@ -26,33 +23,15 @@ ifneq ($(G4LIB_BUILD_STATIC),)
|
||||
endif
|
||||
|
||||
# GPPFLAGS is defined here to make the .d file(s) and include it(them).
|
||||
# This variable is actually used in common_kernel.gmk and common_objy.gmk.
|
||||
|
||||
ifdef G4ODBMS
|
||||
GPPFLAGS := "-MM"
|
||||
else
|
||||
GPPFLAGS := "-M"
|
||||
endif
|
||||
GPPFLAGS := "-M"
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Actual gmake targets.
|
||||
#
|
||||
|
||||
#
|
||||
# Target "lib" requires dependency files when G4ODBMS=1.
|
||||
# gmake must be recursively called with MAKE_DFILES=1.
|
||||
#
|
||||
|
||||
ifdef G4ODBMS
|
||||
lib:
|
||||
@if [ ! -d $(G4TMPDIR) ] ; then mkdir -p $(G4TMPDIR) ;fi
|
||||
@(MAKE_DFILES=1; export MAKE_DFILES; $(MAKE) lib_d)
|
||||
|
||||
lib_d: $(g4libraries_to_build)
|
||||
else
|
||||
lib: $(g4libraries_to_build)
|
||||
endif
|
||||
|
||||
ifneq ($(G4LIB_BUILD_SHARED),)
|
||||
# Make shared library.
|
||||
@@ -76,42 +55,56 @@ endif
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Actual targets for .o, .d files and others are defined in
|
||||
# common_kernel.gmk and common_objy.gmk.
|
||||
# Actual targets for .o, .d files
|
||||
#
|
||||
ifndef G4ODBMS
|
||||
|
||||
include $(G4INSTALL)/config/common_kernel.gmk
|
||||
|
||||
$(G4TMPDIR)/%.o: src/%.cc
|
||||
ifdef CPPVERBOSE
|
||||
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(OUT_OBJ)$(G4TMPDIR)/$(*F).o src/$*.cc
|
||||
else
|
||||
|
||||
include $(G4INSTALL)/config/common_objy.gmk
|
||||
|
||||
@echo Compiling $*.cc ...
|
||||
@$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(OUT_OBJ)$(G4TMPDIR)/$(*F).o src/$*.cc
|
||||
endif
|
||||
###############################################################################
|
||||
|
||||
# .PHONY targets are executed regardless of time-stamp of any file of
|
||||
# same name.
|
||||
.PHONY: all obj lib clean clean_libs includes
|
||||
|
||||
obj: $(G4TMPDIR)/obj.last
|
||||
|
||||
# Touch the versioning file
|
||||
$(G4TMPDIR)/obj.last: $(objects) $(schema_o)
|
||||
$(G4TMPDIR)/obj.last: $(objects)
|
||||
@touch $@
|
||||
|
||||
# Make the .d file(s) and include it(them).
|
||||
# g++ -MM (or -M) is good at this, except it forgets the subdirectory
|
||||
# (hence the use of $G4TMP/).
|
||||
# schema_hh and schema_ref_hh are defined in common_objy.gmk.
|
||||
|
||||
$(G4TMPDIR)/%.d: src/%.cc $(schema_hh) $(schema_ref_hh)
|
||||
# The ideas for this come from the GNU Make Manual, Section 4.12,
|
||||
# Generating Prerequisites Automatically. The g++ compiler has an
|
||||
# option -M or -MM to write to standard output a list of dependencies
|
||||
# based on the #include statements. The "sed" adds the dependency
|
||||
# file itself as a second target. The result is a mini-makefile which
|
||||
# specifies the .o and .d files as targets which depend on all the
|
||||
# files found through the #include statements. This file is then
|
||||
# included, causing GNU Make to honour these dependencies.
|
||||
|
||||
# The "set -e" causes the shell to exit with an error when the "g++"
|
||||
# fails (otherwise it would only notice the last command in the
|
||||
# pipeline, namely "sed"). GNU Make notices the error and exits
|
||||
# sooner than it otherwise would (still not as soon as I expect,
|
||||
# though!). Even then, an empty file is made, so "[ -s $@ ] || rm -f
|
||||
# $@" removes it ([ -s filename ] gives zero exit code only if file
|
||||
# exists and has a size greater than zero). This avoids making
|
||||
# corrupt .d files which would play havoc with your next build.
|
||||
|
||||
$(G4TMPDIR)/%.d: src/%.cc
|
||||
@echo Making dependency for file $< ...
|
||||
@if [ ! -d $(G4TMPDIR) ] ; then mkdir -p $(G4TMPDIR) ;fi
|
||||
@($(ECHO) $(G4TMPDIR)/\\c ; \
|
||||
g++ $(GPPFLAGS) $(CPPFLAGS) $< ) | sed 's!$(G4TMPDIR)/$*.o!& $@!' >$@
|
||||
@set -e;\
|
||||
g++ $(GPPFLAGS) $(CPPFLAGS) $< |\
|
||||
sed 's!$*\.o!$(G4TMPDIR)/& $@!' >$@;\
|
||||
[ -s $@ ] || rm -f $@
|
||||
ifneq ($(dependencies),)
|
||||
ifndef G4ODBMS
|
||||
-include $(dependencies)
|
||||
else
|
||||
ifdef MAKE_DFILES
|
||||
-include $(dependencies)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
#
|
||||
@@ -138,9 +131,6 @@ clean:
|
||||
@echo Cleaning up ...
|
||||
@rm -f $(G4LIBDIR)/lib$(name).a
|
||||
@rm -f $(G4LIBDIR)/lib$(name).$(SHEXT)
|
||||
ifdef schema_hh
|
||||
@rm -f $(schema_hh) $(schema_ref_hh)
|
||||
endif
|
||||
@rm -rf $(G4TMPDIR)
|
||||
endif
|
||||
|
||||
@@ -151,4 +141,3 @@ clean_libs:
|
||||
@if [ -f $(G4LIBDIR)/lib$(name).$(SHEXT) ] ; then \
|
||||
$(ECHO) Removing library lib$(name).$(SHEXT) ... ; \
|
||||
$(RM) -f $(G4LIBDIR)/lib$(name).$(SHEXT) ; fi
|
||||
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
# $Id: common_kernel.gmk,v 1.3 2001/06/21 17:48:33 morita Exp $
|
||||
# ----------------------------------------------------------------
|
||||
# Common part of GNUmakefile for libraries. John Allison, 5/7/95.
|
||||
# ----------------------------------------------------------------
|
||||
# Splitted from common.gmk for transient part of G4. Y.Morita, 15/3/01.
|
||||
|
||||
$(G4TMPDIR)/%.o: src/%.cc
|
||||
ifdef CPPVERBOSE
|
||||
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(OUT_OBJ)$(G4TMPDIR)/$(*F).o src/$*.cc
|
||||
else
|
||||
@echo Compiling $*.cc ...
|
||||
@$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(OUT_OBJ)$(G4TMPDIR)/$(*F).o src/$*.cc
|
||||
endif
|
||||
|
||||
# .PHONY targets are executed regardless of time-stamp of any file of
|
||||
# same name.
|
||||
.PHONY: all obj lib clean clean_libs includes
|
||||
|
||||
obj: $(G4TMPDIR)/obj.last
|
||||
|
||||
@@ -1,105 +0,0 @@
|
||||
# $Id: common_objy.gmk,v 1.3 2001/06/22 15:09:25 gunter Exp $
|
||||
# ----------------------------------------------------------------
|
||||
# Common part of GNUmakefile for libraries. John Allison, 5/7/95.
|
||||
# ----------------------------------------------------------------
|
||||
# Splitted from common.gmk for persistency part of G4. Y.Morita, 15/3/01.
|
||||
|
||||
PWD := $(shell (dirname `pwd`/dummy | sed -e 's/ //g'))
|
||||
|
||||
ifdef G4ODBMS_INSTALLATION
|
||||
G4_SCHEMA_NAME := -schema Geant4
|
||||
else
|
||||
G4_SCHEMA_NAME :=
|
||||
endif
|
||||
G4SCHEMA_HEADER_DIR := $(G4TMPDIR)
|
||||
|
||||
G4DDLX := ooddlx -notitle $(G4_SCHEMA_NAME)
|
||||
G4DDLX_FLAGS += -header_suffix .hh -ref_suffix _ref.hh -c++_suffix _ddl.cc
|
||||
|
||||
schema_ddl := $(wildcard include/*.ddl)
|
||||
schema_hh := $(patsubst include/%.ddl,$(G4SCHEMA_HEADER_DIR)/%.hh,$(schema_ddl))
|
||||
schema_ref_hh := $(patsubst include/%.ddl,$(G4SCHEMA_HEADER_DIR)/%_ref.hh,$(schema_ddl))
|
||||
schema_cc := $(patsubst include/%.ddl,$(G4SCHEMA_HEADER_DIR)/%_ddl.cc,$(schema_ddl))
|
||||
schema_o := $(patsubst include/%.ddl,$(G4SCHEMA_HEADER_DIR)/%_ddl.o ,$(schema_ddl))
|
||||
|
||||
# output of ooddlx in G4TMPDIR (.hh, _ref.hh, _ddl.cc)
|
||||
#
|
||||
temporaries := $(patsubst include/%.ddl,$(G4SCHEMA_HEADER_DIR)/%.hh,$(schema_ddl))
|
||||
|
||||
# output of ooddlx in the current directory (if the process does not finish)
|
||||
#
|
||||
temporaries2 := $(patsubst include/%.ddl,%.hh,$(schema_ddl))
|
||||
|
||||
temporaries += $(patsubst include/%.ddl,$(G4SCHEMA_HEADER_DIR)/%_ddl.cc,$(schema_ddl)) \
|
||||
$(patsubst include/%.ddl,$(G4SCHEMA_HEADER_DIR)/%_ref.hh,$(schema_ddl))
|
||||
temporaries2 += $(patsubst include/%.ddl,%_ddl.cc,$(schema_ddl)) \
|
||||
$(patsubst include/%.ddl,%_ref.hh,$(schema_ddl))
|
||||
objects += $(patsubst include/%.ddl,$(G4TMPDIR)/%_ddl.o,$(schema_ddl))
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Actual target.
|
||||
#
|
||||
|
||||
# Make the .o files.
|
||||
$(G4TMPDIR)/%.o: src/%.cc $(G4TMPDIR)/%.d $(G4OODDLX_BOOT)
|
||||
ifdef CPPVERBOSE
|
||||
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(OUT_OBJ) $@ $<
|
||||
else
|
||||
@echo Compiling $*.cc ...
|
||||
@$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(OUT_OBJ) $@ $<
|
||||
endif
|
||||
|
||||
$(G4TMPDIR)/%_ddl.o: $(G4SCHEMA_HEADER_DIR)/%_ddl.cc \
|
||||
$(G4SCHEMA_HEADER_DIR)/%.hh \
|
||||
$(G4SCHEMA_HEADER_DIR)/%_ref.hh \
|
||||
$(G4TMPDIR)/%.d $(G4OODDLX_BOOT)
|
||||
ifdef CPPVERBOSE
|
||||
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(OUT_OBJ) $@ $<
|
||||
else
|
||||
@echo Compiling $*.cc ...
|
||||
@$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(OUT_OBJ) $@ $<
|
||||
endif
|
||||
|
||||
# Make the temporary files.
|
||||
.PRECIOUS: $(G4SCHEMA_HEADER_DIR)/%_ddl.cc $(G4SCHEMA_HEADER_DIR)/%.hh \
|
||||
$(G4SCHEMA_HEADER_DIR)/%_ref.hh
|
||||
|
||||
$(G4SCHEMA_HEADER_DIR)/%_ddl.cc \
|
||||
$(G4SCHEMA_HEADER_DIR)/%.hh \
|
||||
$(G4SCHEMA_HEADER_DIR)/%_ref.hh: include/%.ddl $(G4OODDLX_BOOT)
|
||||
ifndef G4OODDLX_BOOT
|
||||
@echo G4OODDLX_BOOT is not defined. Stop.
|
||||
exit 1
|
||||
endif
|
||||
@if [ ! -d $(G4TMPDIR) ] ; then mkdir -p $(G4TMPDIR) ;fi
|
||||
@if [ ! -d $(G4SCHEMA_HEADER_DIR) ] ; then mkdir -p $(G4SCHEMA_HEADER_DIR) ;fi
|
||||
ifdef CPPVERBOSE
|
||||
(cd $(G4SCHEMA_HEADER_DIR) ; \
|
||||
$(G4DDLX) $(G4DDLX_FLAGS) $(CPPFLAGS) $(PWD)/$< $(G4OODDLX_BOOT) )
|
||||
else
|
||||
@echo Preprocessing $< ...
|
||||
@(cd $(G4SCHEMA_HEADER_DIR) ; \
|
||||
$(G4DDLX) $(G4DDLX_FLAGS) $(CPPFLAGS) $(PWD)/$< $(G4OODDLX_BOOT) )
|
||||
endif
|
||||
|
||||
# .PHONY targets are executed regardless of time-stamp of any file of
|
||||
# same name.
|
||||
.PHONY: all obj lib clean clean_libs includes
|
||||
|
||||
obj: $(G4TMPDIR)/obj.last
|
||||
|
||||
$(schema_hh): $(schema_ddl)
|
||||
|
||||
install_schema:
|
||||
@echo installing schema header files ...
|
||||
-@(cp -f $(G4TMPDIR)/*.hh $(G4SCHEMA_INCLUDE)/ || \
|
||||
echo " schema header file does not exist, so ignore the error message...")
|
||||
|
||||
$(G4SCHEMA_BOOT):
|
||||
@rm -f $(G4SCHEMA_DIR)/G4SCHEMA
|
||||
@rm -f $(G4SCHEMA_DIR)/G4SCHEMA.FDDB
|
||||
@echo Copying schema file to $(G4SCHEMA_DIR) for FDID $(G4SCHEMA_FDID)
|
||||
@$(HEP_ODBMS_DIR)/etc/getdb $(HEP_ODBMS_DIR)/schema/HEP_BASE \
|
||||
$(G4SCHEMA_BOOT) $(G4SCHEMA_FDID)
|
||||
|
||||
+2
-10
@@ -1,4 +1,4 @@
|
||||
# $Id: globlib.gmk,v 1.18 2001/06/26 02:16:10 morita Exp $
|
||||
# $Id: globlib.gmk,v 1.19 2002/11/25 12:10:44 gcosmo Exp $
|
||||
# --------------------------------------------------------------
|
||||
# Script for compound libraries. Gabriele Cosmo, 25/6/98.
|
||||
# --------------------------------------------------------------
|
||||
@@ -13,15 +13,10 @@ G4LIBDIR = $(G4LIB)/$(G4SYSTEM)
|
||||
|
||||
.PHONY : all glob global objs includes clean clean_libs wipe_libs
|
||||
|
||||
all: makesub $(G4SCHEMA_BOOT)
|
||||
all: makesub
|
||||
|
||||
makesub:
|
||||
@for dir in $(SUBDIRS); do (cd $$dir && $(MAKE)); done
|
||||
ifdef G4ODBMS
|
||||
@echo Copying tmp schema header from G4TMPDIR to $(G4SCHEMA_INCLUDE)
|
||||
@rm -f $(G4SCHEMA_INCLUDE)/*.hh
|
||||
@for dir in $(SUBDIRS); do (cd $$dir && $(MAKE) install_schema); done
|
||||
endif
|
||||
|
||||
g4libraries_to_build:=
|
||||
|
||||
@@ -100,9 +95,6 @@ objs:
|
||||
|
||||
includes::
|
||||
@for dir in $(SUBDIRS); do (cd $$dir && $(MAKE) $@ ); done
|
||||
ifdef G4ODBMS
|
||||
-@cp -p $(G4SCHEMA_INCLUDE)/*.hh $(G4INCLUDE)/
|
||||
endif
|
||||
|
||||
wipe_libs:
|
||||
@for lib in $(SUBLIBS); do (rm -f $(G4LIBDIR)/lib$$lib.a); done
|
||||
|
||||
+144
-96
@@ -1,4 +1,4 @@
|
||||
/* $Id: liblist.c,v 1.14 2002/05/03 12:59:08 gcosmo Exp $ */
|
||||
/* $Id: liblist.c,v 1.17 2002/11/22 11:53:10 gcosmo Exp $ */
|
||||
|
||||
/*
|
||||
Given a "libname.map" file on standard input and a list or directory
|
||||
@@ -9,7 +9,9 @@ of .d dependency files liblist produces:
|
||||
original libname.map file, then reordered according to the dependencies
|
||||
found in the .d files. This option is used for compiling the file
|
||||
libname.map from all the dependencies.
|
||||
The .d files are specfied in the argument(s).
|
||||
c) with -m <lpath> option, the whole existing libraries list ordered
|
||||
according to the libname.map, where libraries are placed in <lpath>.
|
||||
The .d files are specified in the argument(s).
|
||||
The libname.map is on standard input.
|
||||
|
||||
Usage:
|
||||
@@ -18,8 +20,11 @@ Usage:
|
||||
liblist -l *.d < libname.map
|
||||
liblist -ld <ddir> < libname.map
|
||||
liblist -l -d <ddir> < libname.map
|
||||
where <ddir> is a directory name of a directory which is recursively
|
||||
searched for dependency files.
|
||||
liblist -m <lpath> < libname.map
|
||||
where:
|
||||
<ddir> is a directory name of a directory which is recursively
|
||||
searched for dependency files
|
||||
<lpath> is the path where libraries are located
|
||||
|
||||
Frank Behner, John Allison 13th February 1999.
|
||||
*/
|
||||
@@ -103,7 +108,13 @@ char** parsedir(char *directory,int *argc)
|
||||
}
|
||||
}
|
||||
else
|
||||
perror(" No status");
|
||||
{
|
||||
fprintf
|
||||
(stderr,
|
||||
" No status - perhaps file %s does not exist.\n",
|
||||
directory);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
if(buffer) free(buffer);
|
||||
@@ -116,9 +127,10 @@ char** parsedir(char *directory,int *argc)
|
||||
int main (int argc, char** argv) {
|
||||
|
||||
char static buffer[BUFSIZE],*bufferPtr,workbuf[256];
|
||||
char *ptr,*p,**pp,**pp1,**pp2,*directory=0;
|
||||
char *ptr,*p,**pp,**pp1,**pp2,*directory=0,*libpath=0;
|
||||
char **rargv;
|
||||
int i,optl=0,swapping,c,rargc;
|
||||
char libname[128];
|
||||
int i,optl=0,optm=0,swapping,c,rargc;
|
||||
FILE *fp;
|
||||
|
||||
#if defined ( _WIN32 ) || defined ( __CYGWIN__ ) || defined ( __CYGWIN32__ )
|
||||
@@ -138,7 +150,7 @@ int main (int argc, char** argv) {
|
||||
struct libmap_ *libmap=0,*libmapPtr=0,*libmapPtr1=0,*libmapPtr2=0,
|
||||
*prevPtr1,*prevPtr2,*tmpp,*userLibmapPtr;
|
||||
|
||||
while((c=getopt(argc,argv,"ld:"))!=EOF)
|
||||
while((c=getopt(argc,argv,"ld: m:"))!=EOF)
|
||||
{
|
||||
switch(c)
|
||||
{
|
||||
@@ -148,6 +160,10 @@ int main (int argc, char** argv) {
|
||||
case 'd':
|
||||
directory=strdup(optarg);
|
||||
break;
|
||||
case 'm':
|
||||
optm=1;
|
||||
libpath=strdup(optarg);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -172,8 +188,10 @@ int main (int argc, char** argv) {
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf(stderr," ERROR: If you specify a directory don't also specify files\n");
|
||||
exit(-1);
|
||||
fprintf
|
||||
(stderr,
|
||||
" ERROR: If you specify a directory don't also specify files\n");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -215,7 +233,7 @@ int main (int argc, char** argv) {
|
||||
libmapPtr->uses=(char**)calloc(NLIBMAX,sizeof(char*));
|
||||
|
||||
/* If option -l not specified, fill uses list... */
|
||||
if(!optl)
|
||||
if(!optl && !optm)
|
||||
{
|
||||
pp=libmapPtr->uses;
|
||||
if(ptr)
|
||||
@@ -230,34 +248,39 @@ int main (int argc, char** argv) {
|
||||
}
|
||||
}
|
||||
|
||||
/* Get directory name... */
|
||||
gets(buffer);
|
||||
ptr=strtok(buffer,"/");
|
||||
if(!ptr)
|
||||
{
|
||||
fprintf(stderr," ERROR: \"/\" before \"source\" expected.\n");
|
||||
exit(1);
|
||||
}
|
||||
while(ptr&&strcmp (ptr,"source"))ptr=strtok(NULL,"/");
|
||||
ptr=strtok(NULL,"/");
|
||||
if(!ptr)
|
||||
{
|
||||
fprintf(stderr," ERROR: \"source\" expected.\n");
|
||||
exit(1);
|
||||
}
|
||||
libmapPtr->trigger=(char*)malloc(TRIGSIZE);
|
||||
strcpy(libmapPtr->trigger,ptr);
|
||||
ptr=strtok(NULL,"/");
|
||||
while(ptr&&strcmp(ptr,"GNUmakefile"))
|
||||
{
|
||||
strcat(libmapPtr->trigger,"/");
|
||||
strcat(libmapPtr->trigger,ptr);
|
||||
ptr=strtok(NULL,"/");
|
||||
}
|
||||
if(!ptr)
|
||||
{
|
||||
fprintf(stderr," ERROR: \"source/<unique-sub-path>/GNUmakefile\" expected.\n");
|
||||
exit(1);
|
||||
if(!optm)
|
||||
{
|
||||
/* Get directory name... */
|
||||
gets(buffer);
|
||||
ptr=strtok(buffer,"/");
|
||||
if(!ptr)
|
||||
{
|
||||
fprintf(stderr," ERROR: \"/\" before \"source\" expected.\n");
|
||||
exit(1);
|
||||
}
|
||||
while(ptr&&strcmp (ptr,"source"))ptr=strtok(NULL,"/");
|
||||
ptr=strtok(NULL,"/");
|
||||
if(!ptr)
|
||||
{
|
||||
fprintf(stderr," ERROR: \"source\" expected.\n");
|
||||
exit(1);
|
||||
}
|
||||
libmapPtr->trigger=(char*)malloc(TRIGSIZE);
|
||||
strcpy(libmapPtr->trigger,ptr);
|
||||
ptr=strtok(NULL,"/");
|
||||
while(ptr&&strcmp(ptr,"GNUmakefile"))
|
||||
{
|
||||
strcat(libmapPtr->trigger,"/");
|
||||
strcat(libmapPtr->trigger,ptr);
|
||||
ptr=strtok(NULL,"/");
|
||||
}
|
||||
if(!ptr)
|
||||
{
|
||||
fprintf
|
||||
(stderr,
|
||||
" ERROR: \"source/<unique-sub-path>/GNUmakefile\" expected.\n");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -310,69 +333,72 @@ int main (int argc, char** argv) {
|
||||
userLibmapPtr=0;
|
||||
}
|
||||
|
||||
/* Look for a "used" library and add it to the "user" uses list... */
|
||||
bufferPtr=strtok(NULL,"\n"); /* Start *after* ":". */
|
||||
if (!bufferPtr)
|
||||
if(!optm)
|
||||
{
|
||||
fprintf(stderr," WARNING: It seems there is nothing after \':\' in dependency file %s.\n", rargv[i]);
|
||||
}
|
||||
else {
|
||||
do
|
||||
{
|
||||
for(libmapPtr=libmap;libmapPtr;libmapPtr=libmapPtr->next)
|
||||
{
|
||||
/* Look for trigger string. */
|
||||
strcpy(workbuf,libmapPtr->trigger);
|
||||
strcat(workbuf,"/include");
|
||||
ptr=strstr(bufferPtr,workbuf);
|
||||
if(ptr && (userLibmapPtr != libmapPtr))
|
||||
{
|
||||
libmapPtr->used=1;
|
||||
if(userLibmapPtr)
|
||||
{
|
||||
for(pp=userLibmapPtr->uses;*pp;pp++)
|
||||
{
|
||||
if(strcmp(*pp,libmapPtr->lib)==0)break;
|
||||
}
|
||||
if(!*pp)*pp=libmapPtr->lib;
|
||||
}
|
||||
}
|
||||
/* Also look for library name in case header files are
|
||||
placed in temporary directories under a subdirectory
|
||||
with the same name as the library name. This can
|
||||
happen with Objectivity which makes header files
|
||||
from .ddl files and places them in a temporary
|
||||
directory. */
|
||||
strcpy(workbuf,libmapPtr->lib);
|
||||
strcat(workbuf,"/");
|
||||
ptr=strstr(bufferPtr,workbuf);
|
||||
if(ptr && (userLibmapPtr != libmapPtr))
|
||||
{
|
||||
libmapPtr->used=1;
|
||||
if(userLibmapPtr)
|
||||
{
|
||||
for(pp=userLibmapPtr->uses;*pp;pp++)
|
||||
{
|
||||
if(strcmp(*pp,libmapPtr->lib)==0)break;
|
||||
}
|
||||
if(!*pp)*pp=libmapPtr->lib;
|
||||
}
|
||||
}
|
||||
}
|
||||
fgets(buffer,BUFSIZE,fp);
|
||||
bufferPtr=buffer;
|
||||
/* Look for a "used" library and add it to the "user" uses list... */
|
||||
bufferPtr=strtok(NULL,"\n"); /* Start *after* ":". */
|
||||
if (!bufferPtr)
|
||||
{
|
||||
fprintf(stderr," WARNING: It seems there is nothing after \':\' in dependency file %s.\n", rargv[i]);
|
||||
}
|
||||
else {
|
||||
do
|
||||
{
|
||||
for(libmapPtr=libmap;libmapPtr;libmapPtr=libmapPtr->next)
|
||||
{
|
||||
/* Look for trigger string. */
|
||||
strcpy(workbuf,libmapPtr->trigger);
|
||||
strcat(workbuf,"/include");
|
||||
ptr=strstr(bufferPtr,workbuf);
|
||||
if(ptr && (userLibmapPtr != libmapPtr))
|
||||
{
|
||||
libmapPtr->used=1;
|
||||
if(userLibmapPtr)
|
||||
{
|
||||
for(pp=userLibmapPtr->uses;*pp;pp++)
|
||||
{
|
||||
if(strcmp(*pp,libmapPtr->lib)==0)break;
|
||||
}
|
||||
if(!*pp)*pp=libmapPtr->lib;
|
||||
}
|
||||
}
|
||||
/* Also look for library name in case header files are
|
||||
placed in temporary directories under a subdirectory
|
||||
with the same name as the library name. This can
|
||||
happen with Objectivity which makes header files
|
||||
from .ddl files and places them in a temporary
|
||||
directory. */
|
||||
strcpy(workbuf,libmapPtr->lib);
|
||||
strcat(workbuf,"/");
|
||||
ptr=strstr(bufferPtr,workbuf);
|
||||
if(ptr && (userLibmapPtr != libmapPtr))
|
||||
{
|
||||
libmapPtr->used=1;
|
||||
if(userLibmapPtr)
|
||||
{
|
||||
for(pp=userLibmapPtr->uses;*pp;pp++)
|
||||
{
|
||||
if(strcmp(*pp,libmapPtr->lib)==0)break;
|
||||
}
|
||||
if(!*pp)*pp=libmapPtr->lib;
|
||||
}
|
||||
}
|
||||
}
|
||||
fgets(buffer,BUFSIZE,fp);
|
||||
bufferPtr=buffer;
|
||||
|
||||
#if defined ( _WIN32 ) || defined ( __CYGWIN__ ) || defined ( __CYGWIN32__ )
|
||||
while ( ptr=strchr(buffer,'\\') ) *ptr='/';
|
||||
while ( ptr=strchr(buffer,'\\') ) *ptr='/';
|
||||
|
||||
while (ntg4tmp1 && (ptr=strstr(buffer,ntg4tmp1)) )
|
||||
{
|
||||
for(nti=0;nti<strlen(ntg4tmp1);nti++) ptr[nti]=' ';
|
||||
}
|
||||
while (ntg4tmp1 && (ptr=strstr(buffer,ntg4tmp1)) )
|
||||
{
|
||||
for(nti=0;nti<strlen(ntg4tmp1);nti++) ptr[nti]=' ';
|
||||
}
|
||||
#endif
|
||||
|
||||
} while(!feof(fp));
|
||||
fclose(fp);
|
||||
} while(!feof(fp));
|
||||
fclose(fp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -509,6 +535,28 @@ int main (int argc, char** argv) {
|
||||
printf("source/%s/GNUmakefile\n",libmapPtr->trigger);
|
||||
}
|
||||
}
|
||||
else if (optm)
|
||||
{
|
||||
/* Write out full library list... */
|
||||
for(libmapPtr=libmap;libmapPtr;libmapPtr=libmapPtr->next)
|
||||
{
|
||||
/* Check existance of libraries and print out only installed ones */
|
||||
sprintf(libname, "%s/lib%s.a", libpath, libmapPtr->lib);
|
||||
if (access(libname,R_OK))
|
||||
{
|
||||
sprintf(libname, "%s/lib%s.so", libpath, libmapPtr->lib);
|
||||
if (!access(libname,R_OK))
|
||||
{
|
||||
printf("-l%s ",libmapPtr->lib);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("-l%s ",libmapPtr->lib);
|
||||
}
|
||||
libmapPtr=libmapPtr->next;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Add dependent libraries... */
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
# $Id: GNUmakefile,v 1.1 2002/12/13 15:47:31 stesting Exp $
|
||||
# --------------------------------------------------------------
|
||||
# GNUmakefile for tests module. Gabriele Cosmo, 27/06/98.
|
||||
# --------------------------------------------------------------
|
||||
|
||||
name := Marker
|
||||
G4TARGET := $(name)
|
||||
G4EXLIB := true
|
||||
|
||||
ifndef G4INSTALL
|
||||
G4INSTALL = ../..
|
||||
endif
|
||||
|
||||
.PHONY: all
|
||||
|
||||
all: lib bin
|
||||
|
||||
include $(G4INSTALL)/config/scripts/binmake.gmk
|
||||
|
||||
CXXFLAGS_FINAL := $(CXXFLAGS)
|
||||
INCFLAGS_FINAL := $(INCFLAGS)
|
||||
LDLIBS_FINAL := $(LDLIBS)
|
||||
#LDFLAGS_FINAL := $(LDFLAGS)
|
||||
@@ -0,0 +1,354 @@
|
||||
# $Id: binmake.gmk,v 1.1 2002/12/13 15:47:27 stesting Exp $
|
||||
# ----------------------------------------------------------
|
||||
# Script defining rules and paths for making binaries.
|
||||
# First implementation: Gabriele Cosmo, 25/06/1998.
|
||||
# ----------------------------------------------------------
|
||||
|
||||
ifndef LDFLAGS
|
||||
include $(G4INSTALL)/config/architecture.gmk
|
||||
endif
|
||||
|
||||
G4LIBDIR := $(G4LIB)/$(G4SYSTEM)
|
||||
|
||||
# Define variable checking for existence of centrally installed headers.
|
||||
# If check will be true, avoid explicit definition of paths to INCFLAGS.
|
||||
#
|
||||
G4INCLUDE_EXEC := $(shell [ -r $(G4INCLUDE)/globals.hh ] && echo 1)
|
||||
|
||||
include $(G4INSTALL)/config/G4UI_USE.gmk
|
||||
include $(G4INSTALL)/config/G4VIS_USE.gmk
|
||||
include $(G4INSTALL)/config/interactivity.gmk
|
||||
include $(G4INSTALL)/config/analysis.gmk
|
||||
|
||||
ifndef G4LIB_USE_GRANULAR
|
||||
GLOBALLIBS := 1
|
||||
ifndef GLOBALLIBS
|
||||
GLOBALLIBS := $(shell test -f $(G4LIB)/$(G4SYSTEM)/libG4global.$(SHEXT) && echo yes)
|
||||
SHAREDLIBS := $(shell test -f $(G4LIB)/$(G4SYSTEM)/libG4global.$(SHEXT) && echo yes)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifndef SHAREDLIBS
|
||||
SHAREDLIBS := $(shell test -f $(G4LIB)/$(G4SYSTEM)/libG4globman.$(SHEXT) && echo yes)
|
||||
endif
|
||||
|
||||
ifndef INCFLAGS
|
||||
ifeq ($(G4INCLUDE_EXEC),1)
|
||||
INCFLAGS := -I$(G4INCLUDE)
|
||||
else
|
||||
INCFLAGS := \
|
||||
-I$(G4BASE)/global/management/include \
|
||||
-I$(G4BASE)/global/HEPRandom/include \
|
||||
-I$(G4BASE)/global/HEPGeometry/include \
|
||||
-I$(G4BASE)/global/HEPNumerics/include \
|
||||
-I$(G4BASE)/run/include \
|
||||
-I$(G4BASE)/materials/include \
|
||||
-I$(G4BASE)/parameterisations/include \
|
||||
-I$(G4BASE)/particles/management/include \
|
||||
-I$(G4BASE)/particles/bosons/include \
|
||||
-I$(G4BASE)/particles/leptons/include \
|
||||
-I$(G4BASE)/particles/hadrons/barions/include \
|
||||
-I$(G4BASE)/particles/hadrons/ions/include \
|
||||
-I$(G4BASE)/particles/hadrons/mesons/include \
|
||||
-I$(G4BASE)/particles/shortlived/include \
|
||||
-I$(G4BASE)/processes/management/include \
|
||||
-I$(G4BASE)/processes/decay/include \
|
||||
-I$(G4BASE)/processes/optical/include \
|
||||
-I$(G4BASE)/processes/transportation/include \
|
||||
-I$(G4BASE)/processes/parameterisation/include \
|
||||
-I$(G4BASE)/processes/photolepton_hadron/include \
|
||||
-I$(G4BASE)/processes/electromagnetic/standard/include \
|
||||
-I$(G4BASE)/processes/electromagnetic/muons/include \
|
||||
-I$(G4BASE)/processes/electromagnetic/utils/include \
|
||||
-I$(G4BASE)/processes/electromagnetic/xrays/include \
|
||||
-I$(G4BASE)/processes/electromagnetic/lowenergy/include \
|
||||
-I$(G4BASE)/processes/hadronic/management/include \
|
||||
-I$(G4BASE)/processes/hadronic/processes/include \
|
||||
-I$(G4BASE)/processes/hadronic/util/include \
|
||||
-I$(G4BASE)/processes/hadronic/cross_sections/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/cascade/evaporation/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/cascade/utils/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/cascade/cascade/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/coherent_elastic/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/generator/de_excitation/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/generator/diffractive_string/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/generator/high_energy/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/generator/kinetic_model/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/generator/management/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/generator/pre_equilibrium/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/generator/quark_gluon_string/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/generator/string_common/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/generator/string_fragmentation/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/generator/scattering/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/generator/util/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/high_energy/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/low_energy/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/neutron_hp/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/isotope_production/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/radiative_decay/include \
|
||||
-I$(G4BASE)/processes/hadronic/models/leading_particle/include \
|
||||
-I$(G4BASE)/processes/hadronic/stopping/include \
|
||||
-I$(G4BASE)/geometry/management/include \
|
||||
-I$(G4BASE)/geometry/solids/CSG/include \
|
||||
-I$(G4BASE)/geometry/solids/specific/include \
|
||||
-I$(G4BASE)/geometry/solids/BREPS/include \
|
||||
-I$(G4BASE)/geometry/solids/Boolean/include \
|
||||
-I$(G4BASE)/geometry/solids/STEP/include \
|
||||
-I$(G4BASE)/geometry/solids/STEPinterface/include \
|
||||
-I$(G4BASE)/geometry/volumes/include \
|
||||
-I$(G4BASE)/geometry/verification/include \
|
||||
-I$(G4BASE)/geometry/magneticfield/include \
|
||||
-I$(G4BASE)/geometry/biasing/include \
|
||||
-I$(G4BASE)/track/include \
|
||||
-I$(G4BASE)/tracking/include \
|
||||
-I$(G4BASE)/digits+hits/detector/include \
|
||||
-I$(G4BASE)/digits+hits/hits/include \
|
||||
-I$(G4BASE)/digits+hits/digits/include \
|
||||
-I$(G4BASE)/persistency/include \
|
||||
-I$(G4BASE)/readout/include \
|
||||
-I$(G4BASE)/event/include \
|
||||
-I$(G4BASE)/graphics_reps/include \
|
||||
-I$(G4BASE)/intercoms/include
|
||||
ifdef G4USE_G3TOG4
|
||||
INCFLAGS += -I$(G4BASE)/g3tog4/include
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
CPPFLAGS_FINAL := $(CPPFLAGS)
|
||||
|
||||
CPPFLAGS += $(INCFLAGS)
|
||||
LDFLAGS += -L$(G4LIBDIR)
|
||||
|
||||
G4TMPDIR := $(G4TMP)/$(G4SYSTEM)/$(G4TARGET)
|
||||
G4BINDIR := $(G4BIN)/$(G4SYSTEM)
|
||||
|
||||
LDFLAGS_FINAL := $(LDFLAGS)
|
||||
|
||||
ifdef G4EXLIB
|
||||
G4LIBDIR := $(G4TMPDIR)
|
||||
LDFLAGS += -L$(G4LIBDIR)
|
||||
ifdef SHAREDLIBS
|
||||
ifdef G4RUNPATHOPTION
|
||||
# For the example dependent directory, keep the
|
||||
# path to the shared lib in the executable.
|
||||
LDFLAGS += $(G4RUNPATHOPTION)$(G4LIBDIR)
|
||||
endif
|
||||
endif
|
||||
include $(G4INSTALL)/config/common.gmk
|
||||
endif
|
||||
|
||||
ifdef LDLIBS
|
||||
USER_DEFINED_LDLIBS := 1
|
||||
endif
|
||||
|
||||
# Because of the script for granular libraries which replaces part of LDLIBS
|
||||
# and because of the way user defined LDLIBS was augmented historically I
|
||||
# have split LDLIBS into 4 parts...
|
||||
#
|
||||
ifndef USER_DEFINED_LDLIBS
|
||||
|
||||
# LDLIBS1 contains the very high level libraries...
|
||||
#
|
||||
ifdef G4EXLIB
|
||||
LDLIBS1 := -l$(G4TARGET)
|
||||
endif
|
||||
LDLIBS1 += $(EXTRALIBS)
|
||||
|
||||
# VISLIBS and UILIBS are now handled by the granular library script...
|
||||
#
|
||||
ifdef GLOBALLIBS
|
||||
LDLIBS1 += $(VISLIBS) $(UILIBS) -lG4persistency
|
||||
|
||||
ifdef G4USE_G3TOG4
|
||||
LDLIBS1 += -lG3toG4
|
||||
endif
|
||||
|
||||
LDLIBS2 := -lG4readout \
|
||||
-lG4run \
|
||||
-lG4event \
|
||||
-lG4tracking \
|
||||
-lG4parmodels \
|
||||
-lG4processes \
|
||||
-lG4digits+hits \
|
||||
-lG4track \
|
||||
-lG4particles \
|
||||
-lG4geometry \
|
||||
-lG4materials \
|
||||
-lG4graphics_reps \
|
||||
-lG4intercoms \
|
||||
-lG4global
|
||||
else
|
||||
# The next lines specifically should read LDLIBS2 = , not LDLIBS2 :=, so
|
||||
# that it is not expanded until the directory G4TMPDIR is created.
|
||||
ifeq ($(G4INCLUDE_EXEC),1)
|
||||
LDLIBS2 = $(shell \
|
||||
G4TMP=$(G4TMP); export G4TMP; \
|
||||
if [ \( -f $(G4LIB)/$(G4SYSTEM)/liblist \
|
||||
-a -f $(G4LIB)/$(G4SYSTEM)/libname.map \) ]; then \
|
||||
$(G4LIB)/$(G4SYSTEM)/liblist \
|
||||
-m $(G4LIB)/$(G4SYSTEM) \
|
||||
< $(G4LIB)/$(G4SYSTEM)/libname.map; fi)
|
||||
else
|
||||
LDLIBS2 = $(shell \
|
||||
G4TMP=$(G4TMP); export G4TMP; \
|
||||
if [ \( -f $(G4LIB)/$(G4SYSTEM)/liblist \
|
||||
-a -f $(G4LIB)/$(G4SYSTEM)/libname.map \) ]; then \
|
||||
$(G4LIB)/$(G4SYSTEM)/liblist \
|
||||
-d $(G4TMPDIR) \
|
||||
< $(G4LIB)/$(G4SYSTEM)/libname.map; fi)
|
||||
# Warning: do not add to LDLIBS2 with += because this causes it to be
|
||||
# expanded too soon. Hence extra libraries must have a different name...
|
||||
# Extra libraries to resolve remaining circular dependencies...
|
||||
# LDLIBS2EXTRA =
|
||||
endif
|
||||
endif
|
||||
|
||||
# LDLIBS3 contains the first set of low level libraries...
|
||||
#
|
||||
LDLIBS3 += $(INTYLIBS)
|
||||
LDLIBS3 += $(ANALYSISLIBS)
|
||||
|
||||
endif # ifndef USER_DEFINED_LDLIBS
|
||||
|
||||
# LDLIBS4 contains the next set of low level libraries which historically
|
||||
# (why?) the user is not supposed to be able to define...
|
||||
#
|
||||
LDLIBS4 += $(LOADLIBS)
|
||||
|
||||
# Finally assemble libraries...
|
||||
#
|
||||
ifdef USER_DEFINED_LDLIBS
|
||||
LDLIBS_PREFINAL := $(LDLIBS)
|
||||
else
|
||||
# Again, do not use := or +=. See note on LDLIBS2 above.
|
||||
LDLIBS_PREFINAL = $(LDLIBS1) $(LDLIBS2) $(LDLIBS2EXTRA) $(LDLIBS3)
|
||||
endif
|
||||
LDLIBS_PREFINAL += $(LDLIBS4)
|
||||
|
||||
ifeq ($(G4SYSTEM),WIN32-VC)
|
||||
WIN32TMP := $(patsubst -L%,$(LIB_PATH)%,$(LDFLAGS))
|
||||
LDFLAGS = $(patsubst /,$(PATH_DEL),$(WIN32TMP))
|
||||
LDLIBS = $(patsubst -l%,lib%.a,$(LDLIBS_PREFINAL))
|
||||
else
|
||||
LDLIBS = $(LDLIBS_PREFINAL)
|
||||
endif
|
||||
|
||||
ifdef transform-RPath
|
||||
#invoke system specific transformation of
|
||||
include $(G4INSTALL)/config/sys/$(G4SYSTEM)-runpath.gmk
|
||||
endif
|
||||
|
||||
sources := $(wildcard $(G4TARGET).cc)
|
||||
objects := $(patsubst %.cc,$(G4TMPDIR)/exe/%.o,$(sources))
|
||||
dependencies := $(patsubst %.cc,$(G4TMPDIR)/exe/%.d,$(sources))
|
||||
|
||||
LINK_DEPENDENCIES := $(G4TMPDIR)/exe/obj.last $(EXTRA_LINK_DEPENDENCIES)
|
||||
|
||||
.PHONY: bin clean clean_bin debug
|
||||
|
||||
# Make $(G4TARGET) executable.
|
||||
|
||||
bin: $(G4BINDIR)/$(G4TARGET)
|
||||
|
||||
$(G4BINDIR)/$(G4TARGET): $(LINK_DEPENDENCIES)
|
||||
ifndef USER_DEFINED_LDLIBS
|
||||
ifndef GLOBALLIBS
|
||||
@echo "Using granular libraries ..."
|
||||
@if [ ! \( -f $(G4LIB)/$(G4SYSTEM)/liblist \
|
||||
-a -f $(G4LIB)/$(G4SYSTEM)/libname.map \) ]; then \
|
||||
echo "ERROR: No liblist program or library map file."; \
|
||||
echo " These are needed for building with granular"; \
|
||||
echo " libraries."; \
|
||||
echo ' cd $$G4INSTALL/source'; \
|
||||
echo " gmake"; \
|
||||
echo " or if you are sure you have already made all the"; \
|
||||
echo " granular libraries:"; \
|
||||
echo " gmake libmap"; \
|
||||
exit 1; fi
|
||||
else
|
||||
@echo "Using global libraries."
|
||||
endif
|
||||
endif
|
||||
@if [ ! -d $(G4BINDIR) ] ; then mkdir $(G4BINDIR) ;fi
|
||||
ifdef CPPVERBOSE
|
||||
$(CXX) $(CXXFLAGS) $(CPPFLAGS) \
|
||||
-o $(G4BINDIR)/$(G4TARGET) $(objects) $(LDFLAGS) \
|
||||
$(LDLIBS)
|
||||
else
|
||||
@echo Linking $(G4TARGET) ...
|
||||
@$(CXX) $(CXXFLAGS) $(CPPFLAGS) \
|
||||
-o $(G4BINDIR)/$(G4TARGET) $(objects) $(LDFLAGS) \
|
||||
$(LDLIBS)
|
||||
endif
|
||||
|
||||
# Touch the versioning file
|
||||
ifdef G4EXLIB
|
||||
$(G4TMPDIR)/exe/obj.last: lib $(objects)
|
||||
else
|
||||
$(G4TMPDIR)/exe/obj.last: $(objects)
|
||||
endif
|
||||
@touch $@
|
||||
|
||||
# Make the $(G4TARGET).o file.
|
||||
$(G4TMPDIR)/exe/$(G4TARGET).o : $(G4TARGET).cc
|
||||
ifdef CPPVERBOSE
|
||||
$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(APPFLAGS) \
|
||||
-c $(OUT_OBJ)$(G4TMPDIR)/exe/$(G4TARGET).o $(G4TARGET).cc
|
||||
else
|
||||
@echo Compiling $(G4TARGET).cc ...
|
||||
@$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(APPFLAGS) \
|
||||
-c $(OUT_OBJ)$(G4TMPDIR)/exe/$(G4TARGET).o $(G4TARGET).cc
|
||||
endif
|
||||
|
||||
GPPFLAGS := "-M"
|
||||
|
||||
# Make the $(G4TARGET).d file and include it.
|
||||
|
||||
# The ideas for this come from the GNU Make Manual, Section 4.12,
|
||||
# Generating Prerequisites Automatically. The g++ compiler has an
|
||||
# option -M or -MM to write to standard output a list of dependencies
|
||||
# based on the #include statements. The "sed" adds the dependency
|
||||
# file itself as a second target. The result is a mini-makefile which
|
||||
# specifies the .o and .d files as targets which depend on all the
|
||||
# files found through the #include statements. This file is then
|
||||
# included, causing GNU Make to honour these dependencies.
|
||||
|
||||
# The "set -e" causes the shell to exit with an error when the "g++"
|
||||
# fails (otherwise it would only notice the last command in the
|
||||
# pipeline, namely "sed"). GNU Make notices the error and exits
|
||||
# sooner than it otherwise would (still not as soon as I expect,
|
||||
# though!). Even then, an empty file is made, so "[ -s $@ ] || rm -f
|
||||
# $@" removes it ([ -s filename ] gives zero exit code only if file
|
||||
# exists and has a size greater than zero). This avoids making
|
||||
# corrupt .d files which would play havoc with your next build.
|
||||
|
||||
$(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 $<...
|
||||
@set -e;\
|
||||
g++ $(GPPFLAGS) $(CPPFLAGS) $< |\
|
||||
sed 's!$(G4TARGET)\.o!$(G4TMPDIR)/exe/& $@!' >$@;\
|
||||
[ -s $@ ] || rm -f $@
|
||||
ifneq ($(dependencies),)
|
||||
-include $(dependencies)
|
||||
endif
|
||||
|
||||
clean:
|
||||
@echo Cleaning up ...
|
||||
@rm -f ./core
|
||||
@rm -rf $(G4TMPDIR)
|
||||
@rm -f $(G4LIBDIR)/lib$(G4TARGET).a
|
||||
@rm -f $(G4BINDIR)/$(G4TARGET)
|
||||
ifdef CFRONT
|
||||
@rm -rf $(G4TREP)/exec
|
||||
endif
|
||||
|
||||
clean_bin:
|
||||
@echo Removing application $(G4TARGET) ...
|
||||
@rm -f ./core
|
||||
@rm -f $(G4BINDIR)/$(G4TARGET)
|
||||
+14
-10
@@ -117,16 +117,6 @@ setenv G4ANALYSIS_USE 1
|
||||
echo "On this machine the G4ANALYSIS_USE=\$G4ANALYSIS_USE"
|
||||
endif
|
||||
|
||||
#+
|
||||
#
|
||||
# g4persistency
|
||||
#
|
||||
if ( X$g4use_hepodbms == Xy ) then
|
||||
setenv G4USE_HEPODBMS 1
|
||||
source \$G4INSTALL/examples/extended/persistency/PersistentEx01/g4odbms_setup.csh
|
||||
echo "On this machine the G4USE_HEPODBMS=\$G4USE_HEPODBMS"
|
||||
endif
|
||||
|
||||
#
|
||||
# g4ui
|
||||
#
|
||||
@@ -283,6 +273,20 @@ setenv OGLHOME "$g4vis_oglhome"
|
||||
echo "On this machine the OGLHOME=\$OGLHOME"
|
||||
endif
|
||||
|
||||
#
|
||||
# Use G3TOG4 module
|
||||
#
|
||||
#+
|
||||
if ( X$g4wlib_build_g3tog4 == Xy ) then
|
||||
setenv G4LIB_BUILD_G3TOG4 1
|
||||
echo "On this machine the G4LIB_BUILD_G3TOG4=\$G4LIB_BUILD_G3TOG4"
|
||||
endif
|
||||
|
||||
if ( X$g4w_use_g3tog4 == Xy ) then
|
||||
setenv G4USE_G3TOG4 1
|
||||
echo "On this machine the G4USE_G3TOG4=\$G4USE_G3TOG4"
|
||||
endif
|
||||
|
||||
#+
|
||||
#
|
||||
# g4shared
|
||||
|
||||
+112
-11
@@ -29,7 +29,9 @@ $spitshell >env.sh <<!GROK!THIS!
|
||||
#+
|
||||
G4SYSTEM="$g4system"
|
||||
export G4SYSTEM
|
||||
if [ X\$g4non_display = X ] ; then
|
||||
echo "On this machine the G4SYSTEM=\$G4SYSTEM"
|
||||
fi
|
||||
|
||||
#
|
||||
# g4dirs.U
|
||||
@@ -37,49 +39,63 @@ echo "On this machine the G4SYSTEM=\$G4SYSTEM"
|
||||
#+
|
||||
G4INSTALL="$g4install"
|
||||
export G4INSTALL
|
||||
if [ X\$g4non_display = X ] ; then
|
||||
echo "On this machine the G4INSTALL=\$G4INSTALL"
|
||||
fi
|
||||
|
||||
#+
|
||||
if [ X$g4include != X ] ; then
|
||||
G4INCLUDE="$g4include"
|
||||
export G4INCLUDE
|
||||
if [ X\$g4non_display = X ] ; then
|
||||
echo "On this machine the G4INCLUDE=\$G4INCLUDE"
|
||||
fi
|
||||
fi
|
||||
|
||||
#+
|
||||
if [ X$g4lib != X ] ; then
|
||||
G4LIB="$g4lib"
|
||||
export G4LIB
|
||||
if [ X\$g4non_display = X ] ; then
|
||||
echo "On this machine the G4LIB=\$G4LIB"
|
||||
fi
|
||||
fi
|
||||
|
||||
#+
|
||||
if [ X$g4levelgammadata != X ] ; then
|
||||
G4LEVELGAMMADATA="$g4levelgammadata"
|
||||
export G4LEVELGAMMADATA
|
||||
if [ X\$g4non_display = X ] ; then
|
||||
echo "On this machine the G4LEVELGAMMADATA=\$G4LEVELGAMMADATA"
|
||||
fi
|
||||
fi
|
||||
|
||||
#+
|
||||
if [ X$g4radioactivedata != X ] ; then
|
||||
G4RADIOACTIVEDATA="$g4radioactivedata"
|
||||
export G4RADIOACTIVEDATA
|
||||
if [ X\$g4non_display = X ] ; then
|
||||
echo "On this machine the G4RADIOACTIVEDATA=\$G4RADIOACTIVEDATA"
|
||||
fi
|
||||
fi
|
||||
|
||||
#+
|
||||
if [ X$g4ledata != X ] ; then
|
||||
G4LEDATA="$g4ledata"
|
||||
export G4LEDATA
|
||||
if [ X\$g4non_display = X ] ; then
|
||||
echo "On this machine the G4LEDATA=\$G4LEDATA"
|
||||
fi
|
||||
fi
|
||||
|
||||
#+
|
||||
if [ X$g4neutronhpcrosssections != X ] ; then
|
||||
NeutronHPCrossSections="$g4neutronhpcrosssections"
|
||||
export NeutronHPCrossSections
|
||||
if [ X\$g4non_display = X ] ; then
|
||||
echo "On this machine the NeutronHPCrossSections=\$NeutronHPCrossSections"
|
||||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
# g4clhep.U
|
||||
@@ -87,29 +103,37 @@ fi
|
||||
if [ X$g4clhep_base_dir != X ] ; then
|
||||
CLHEP_BASE_DIR="$g4clhep_base_dir"
|
||||
export CLHEP_BASE_DIR
|
||||
if [ X\$g4non_display = X ] ; then
|
||||
echo "On this machine the CLHEP_BASE_DIR=\$CLHEP_BASE_DIR"
|
||||
fi
|
||||
fi
|
||||
|
||||
#+
|
||||
if [ X$g4clhep_include_dir != X ] ; then
|
||||
CLHEP_INCLUDE_DIR="$g4clhep_include_dir"
|
||||
export CLHEP_INCLUDE_DIR
|
||||
if [ X\$g4non_display = X ] ; then
|
||||
echo "On this machine the CLHEP_INCLUDE_DIR=\$CLHEP_INCLUDE_DIR"
|
||||
fi
|
||||
fi
|
||||
|
||||
#+
|
||||
if [ X$g4clhep_lib_dir != X ] ; then
|
||||
CLHEP_LIB_DIR="$g4clhep_lib_dir"
|
||||
export CLHEP_LIB_DIR
|
||||
if [ X\$g4non_display = X ] ; then
|
||||
echo "On this machine the CLHEP_LIB_DIR=\$CLHEP_LIB_DIR"
|
||||
fi
|
||||
fi
|
||||
|
||||
#+
|
||||
if [ X$g4clhep_lib != X ] ; then
|
||||
CLHEP_LIB="$g4clhep_lib"
|
||||
export CLHEP_LIB
|
||||
if [ X\$g4non_display = X ] ; then
|
||||
echo "On this machine the CLHEP_LIB=\$CLHEP_LIB"
|
||||
fi
|
||||
fi
|
||||
|
||||
#+
|
||||
#
|
||||
@@ -118,8 +142,10 @@ fi
|
||||
if [ X$g4debug != X ] ; then
|
||||
G4DEBUG="$g4debug"
|
||||
export G4DEBUG
|
||||
if [ X\$g4non_display = X ] ; then
|
||||
echo "On this machine the G4DEBUG=\$G4DEBUG"
|
||||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
# g4analysis
|
||||
@@ -128,18 +154,9 @@ fi
|
||||
if [ X$g4wanalysis_use = Xy ] ; then
|
||||
G4ANALYSIS_USE=1
|
||||
export G4ANALYSIS_USE
|
||||
if [ X\$g4non_display = X ] ; then
|
||||
echo "On this machine the G4ANALYSIS_USE=\$G4ANALYSIS_USE"
|
||||
fi
|
||||
|
||||
#+
|
||||
#
|
||||
# g4persistency
|
||||
#
|
||||
if [ X$g4use_hepodbms = Xy ] ; then
|
||||
G4USE_HEPODBMS=1
|
||||
export G4USE_HEPODBMS
|
||||
. \$G4INSTALL/examples/extended/persistency/PersistentEx01/g4odbms_setup.sh
|
||||
echo "On this machine the G4USE_HEPODBMS=\$G4USE_HEPODBMS"
|
||||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
@@ -149,56 +166,72 @@ fi
|
||||
if [ X$g4ui_build_xaw_session = Xy ] ; then
|
||||
G4UI_BUILD_XAW_SESSION=1
|
||||
export G4UI_BUILD_XAW_SESSION
|
||||
if [ X\$g4non_display = X ] ; then
|
||||
echo "On this machine the G4UI_BUILD_XAW_SESSION=\$G4UI_BUILD_XAW_SESSION"
|
||||
fi
|
||||
fi
|
||||
|
||||
#+
|
||||
if [ X$g4ui_use_xaw = Xy ] ; then
|
||||
G4UI_USE_XAW=1
|
||||
export G4UI_USE_XAW
|
||||
if [ X\$g4non_display = X ] ; then
|
||||
echo "On this machine the G4UI_USE_XAW=\$G4UI_USE_XAW"
|
||||
fi
|
||||
fi
|
||||
|
||||
#+
|
||||
if [ X$g4ui_build_xm_session = Xy ] ; then
|
||||
G4UI_BUILD_XM_SESSION=1
|
||||
export G4UI_BUILD_XM_SESSION
|
||||
if [ X\$g4non_display = X ] ; then
|
||||
echo "On this machine the G4UI_BUILD_XM_SESSION=\$G4UI_BUILD_XM_SESSION"
|
||||
fi
|
||||
fi
|
||||
|
||||
#+
|
||||
if [ X$g4ui_use_xm = Xy ] ; then
|
||||
G4UI_USE_XM=1
|
||||
export G4UI_USE_XM
|
||||
if [ X\$g4non_display = X ] ; then
|
||||
echo "On this machine the G4UI_USE_XM=\$G4UI_USE_XM"
|
||||
fi
|
||||
fi
|
||||
|
||||
#+
|
||||
if [ X$g4ui_build_win32_session = Xy ] ; then
|
||||
G4UI_BUILD_WIN32_SESSION=1
|
||||
export G4UI_BUILD_WIN32_SESSION
|
||||
if [ X\$g4non_display = X ] ; then
|
||||
echo "On this machine the G4UI_BUILD_WIN32_SESSION=\$G4UI_BUILD_WIN32_SESSION"
|
||||
fi
|
||||
fi
|
||||
|
||||
#+
|
||||
if [ X$g4ui_use_win32 = Xy ] ; then
|
||||
G4UI_USE_WIN32=1
|
||||
export G4UI_USE_WIN32
|
||||
if [ X\$g4non_display = X ] ; then
|
||||
echo "On this machine the G4UI_USE_WIN32=\$G4UI_USE_WIN32"
|
||||
fi
|
||||
fi
|
||||
|
||||
#+
|
||||
if [ X$g4ui_build_wo_session = Xy ] ; then
|
||||
G4UI_BUILD_WO_SESSION=1
|
||||
export G4UI_BUILD_WO_SESSION
|
||||
if [ X\$g4non_display = X ] ; then
|
||||
echo "On this machine the G4UI_BUILD_WO_SESSION=\$G4UI_BUILD_WO_SESSION"
|
||||
fi
|
||||
fi
|
||||
|
||||
#+
|
||||
if [ X$g4ui_use_wo = Xy ] ; then
|
||||
G4UI_USE_WO=1
|
||||
export G4UI_USE_WO
|
||||
if [ X\$g4non_display = X ] ; then
|
||||
echo "On this machine the G4UI_USE_WO=\$G4UI_USE_WO"
|
||||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
@@ -208,119 +241,173 @@ fi
|
||||
if [ X$g4vis_build_dawn_driver = Xy ] ; then
|
||||
G4VIS_BUILD_DAWN_DRIVER=1
|
||||
export G4VIS_BUILD_DAWN_DRIVER
|
||||
if [ X\$g4non_display = X ] ; then
|
||||
echo "On this machine the G4VIS_BUILD_DAWN_DRIVER=\$G4VIS_BUILD_DAWN_DRIVER"
|
||||
fi
|
||||
fi
|
||||
|
||||
#+
|
||||
if [ X$g4vis_build_opacs_driver = Xy ] ; then
|
||||
G4VIS_BUILD_OPACS_DRIVER=1
|
||||
export G4VIS_BUILD_OPACS_DRIVER
|
||||
if [ X\$g4non_display = X ] ; then
|
||||
echo "On this machine the G4VIS_BUILD_OPACS_DRIVER=\$G4VIS_BUILD_OPACS_DRIVER"
|
||||
fi
|
||||
fi
|
||||
|
||||
#+
|
||||
if [ X$g4vis_build_openglx_driver = Xy ] ; then
|
||||
G4VIS_BUILD_OPENGLX_DRIVER=1
|
||||
export G4VIS_BUILD_OPENGLX_DRIVER
|
||||
if [ X\$g4non_display = X ] ; then
|
||||
echo "On this machine the G4VIS_BUILD_OPENGLX_DRIVER=\$G4VIS_BUILD_OPENGLX_DRIVER"
|
||||
fi
|
||||
fi
|
||||
|
||||
#+
|
||||
if [ X$g4vis_build_openglxm_driver = Xy ] ; then
|
||||
G4VIS_BUILD_OPENGLXM_DRIVER=1
|
||||
export G4VIS_BUILD_OPENGLXM_DRIVER
|
||||
if [ X\$g4non_display = X ] ; then
|
||||
echo "On this machine the G4VIS_BUILD_OPENGLXM_DRIVER=\$G4VIS_BUILD_OPENGLXM_DRIVER"
|
||||
fi
|
||||
fi
|
||||
|
||||
#+
|
||||
if [ X$g4vis_build_openglwin32_driver = Xy ] ; then
|
||||
G4VIS_BUILD_OPENGLWIN32_DRIVER=1
|
||||
export G4VIS_BUILD_OPENGLWIN32_DRIVER
|
||||
if [ X\$g4non_display = X ] ; then
|
||||
echo "On this machine the G4VIS_BUILD_OPENGLWIN32_DRIVER=\$G4VIS_BUILD_OPENGLWIN32_DRIVER"
|
||||
fi
|
||||
fi
|
||||
|
||||
#+
|
||||
if [ X$g4vis_build_oix_driver = Xy ] ; then
|
||||
G4VIS_BUILD_OIX_DRIVER=1
|
||||
export G4VIS_BUILD_OIX_DRIVER
|
||||
if [ X\$g4non_display = X ] ; then
|
||||
echo "On this machine the G4VIS_BUILD_OIX_DRIVER=\$G4VIS_BUILD_OIX_DRIVER"
|
||||
fi
|
||||
fi
|
||||
|
||||
#+
|
||||
if [ X$g4vis_build_oiwin32_driver = Xy ] ; then
|
||||
G4VIS_BUILD_OIWIN32_DRIVER=1
|
||||
export G4VIS_BUILD_OIWIN32_DRIVER
|
||||
if [ X\$g4non_display = X ] ; then
|
||||
echo "On this machine the G4VIS_BUILD_OIWIN32_DRIVER=\$G4VIS_BUILD_OIWIN32_DRIVER"
|
||||
fi
|
||||
fi
|
||||
|
||||
#+
|
||||
if [ X$g4vis_build_vrml_driver = Xy ] ; then
|
||||
G4VIS_BUILD_VRML_DRIVER=1
|
||||
export G4VIS_BUILD_VRML_DRIVER
|
||||
if [ X\$g4non_display = X ] ; then
|
||||
echo "On this machine the G4VIS_BUILD_VRML_DRIVER=\$G4VIS_BUILD_VRML_DRIVER"
|
||||
fi
|
||||
fi
|
||||
|
||||
#+
|
||||
if [ X$g4vis_use_dawn = Xy ] ; then
|
||||
G4VIS_USE_DAWN=1
|
||||
export G4VIS_USE_DAWN
|
||||
if [ X\$g4non_display = X ] ; then
|
||||
echo "On this machine the G4VIS_USE_DAWN=\$G4VIS_USE_DAWN"
|
||||
fi
|
||||
fi
|
||||
|
||||
#+
|
||||
if [ X$g4vis_use_opacs = Xy ] ; then
|
||||
G4VIS_USE_OPACS=1
|
||||
export G4VIS_USE_OPACS
|
||||
if [ X\$g4non_display = X ] ; then
|
||||
echo "On this machine the G4VIS_USE_OPACS=\$G4VIS_USE_OPACS"
|
||||
fi
|
||||
fi
|
||||
|
||||
#+
|
||||
if [ X$g4vis_use_openglx = Xy ] ; then
|
||||
G4VIS_USE_OPENGLX=1
|
||||
export G4VIS_USE_OPENGLX
|
||||
if [ X\$g4non_display = X ] ; then
|
||||
echo "On this machine the G4VIS_USE_OPENGLX=\$G4VIS_USE_OPENGLX"
|
||||
fi
|
||||
fi
|
||||
|
||||
#+
|
||||
if [ X$g4vis_use_openglxm = Xy ] ; then
|
||||
G4VIS_USE_OPENGLXM=1
|
||||
export G4VIS_USE_OPENGLXM
|
||||
if [ X\$g4non_display = X ] ; then
|
||||
echo "On this machine the G4VIS_USE_OPENGLXM=\$G4VIS_USE_OPENGLXM"
|
||||
fi
|
||||
fi
|
||||
|
||||
#+
|
||||
if [ X$g4vis_use_openglwin32 = Xy ] ; then
|
||||
G4VIS_USE_OPENGLWIN32=1
|
||||
export G4VIS_USE_OPENGLWIN32
|
||||
if [ X\$g4non_display = X ] ; then
|
||||
echo "On this machine the G4VIS_USE_OPENGLWIN32=\$G4VIS_USE_OPENGLWIN32"
|
||||
fi
|
||||
fi
|
||||
|
||||
#+
|
||||
if [ X$g4vis_use_oix = Xy ] ; then
|
||||
G4VIS_USE_OIX=1
|
||||
export G4VIS_USE_OIX
|
||||
if [ X\$g4non_display = X ] ; then
|
||||
echo "On this machine the G4VIS_USE_OIX=\$G4VIS_USE_OIX"
|
||||
fi
|
||||
fi
|
||||
|
||||
#+
|
||||
if [ X$g4vis_use_oiwin32 = Xy ] ; then
|
||||
G4VIS_USE_OIWIN32=1
|
||||
export G4VIS_USE_OIWIN32
|
||||
if [ X\$g4non_display = X ] ; then
|
||||
echo "On this machine the G4VIS_USE_OIWIN32=\$G4VIS_USE_OIWIN32"
|
||||
fi
|
||||
fi
|
||||
|
||||
#+
|
||||
if [ X$g4vis_use_vrml = Xy ] ; then
|
||||
G4VIS_USE_VRML=1
|
||||
export G4VIS_USE_VRML
|
||||
if [ X\$g4non_display = X ] ; then
|
||||
echo "On this machine the G4VIS_USE_VRML=\$G4VIS_USE_VRML"
|
||||
fi
|
||||
fi
|
||||
|
||||
#+
|
||||
if [ X$g4vis_oglhome != X ] ; then
|
||||
OGLHOME="$g4vis_oglhome"
|
||||
export OGLHOME
|
||||
if [ X\$g4non_display = X ] ; then
|
||||
echo "On this machine the OGLHOME=\$OGLHOME"
|
||||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
# Use G3TOG4 module
|
||||
#
|
||||
#+
|
||||
if [ X$g4wlib_build_g3tog4 = Xy ] ; then
|
||||
G4LIB_BUILD_G3TOG4=1
|
||||
export G4LIB_BUILD_G3TOG4
|
||||
if [ X\$g4non_display = X ] ; then
|
||||
echo "On this machine the G4LIB_BUILD_G3TOG4=\$G4LIB_BUILD_G3TOG4"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ X$g4w_use_g3tog4 = Xy ] ; then
|
||||
G4USE_G3TOG4=1
|
||||
export G4USE_G3TOG4
|
||||
if [ X\$g4non_display = X ] ; then
|
||||
echo "On this machine the G4USE_G3TOG4=\$G4USE_G3TOG4"
|
||||
fi
|
||||
fi
|
||||
|
||||
#+
|
||||
@@ -330,25 +417,33 @@ fi
|
||||
if [ X$g4lib_build_shared = Xy ] ; then
|
||||
G4LIB_BUILD_SHARED=1
|
||||
export G4LIB_BUILD_SHARED
|
||||
if [ X\$g4non_display = X ] ; then
|
||||
echo "On this machine the G4LIB_BUILD_SHARED=\$G4LIB_BUILD_SHARED"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ X$g4lib_build_static = Xy ] ; then
|
||||
G4LIB_BUILD_STATIC=1
|
||||
export G4LIB_BUILD_STATIC
|
||||
if [ X\$g4non_display = X ] ; then
|
||||
echo "On this machine the G4LIB_BUILD_STATIC=\$G4LIB_BUILD_STATIC"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ X$g4lib_use_shared = Xy ] ; then
|
||||
G4LIB_USE_SHARED=1
|
||||
export G4LIB_USE_SHARED
|
||||
if [ X\$g4non_display = X ] ; then
|
||||
echo "On this machine the G4LIB_USE_SHARED=\$G4LIB_USE_SHARED"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ X$g4lib_use_static = Xy ] ; then
|
||||
G4LIB_USE_STATIC=1
|
||||
export G4LIB_USE_STATIC
|
||||
if [ X\$g4non_display = X ] ; then
|
||||
echo "On this machine the G4LIB_USE_STATIC=\$G4LIB_USE_STATIC"
|
||||
fi
|
||||
fi
|
||||
|
||||
#+
|
||||
@@ -358,7 +453,9 @@ fi
|
||||
if [ X$g4lib_use_granular = Xy ] ; then
|
||||
G4LIB_USE_GRANULAR=1
|
||||
export G4LIB_USE_GRANULAR
|
||||
if [ X\$g4non_display = X ] ; then
|
||||
echo "On this machine the G4LIB_USE_GRANULAR=\$G4LIB_USE_GRANULAR"
|
||||
fi
|
||||
fi
|
||||
|
||||
#####################################################################
|
||||
@@ -373,9 +470,13 @@ $spitshell >>env.sh <<'!NO!SUBS!'
|
||||
# G4WORKDIR
|
||||
#
|
||||
if [ $G4WORKDIR ] ; then
|
||||
if [ X$g4non_display = X ] ; then
|
||||
echo "In your environment you have the G4WORKDIR=$G4WORKDIR"
|
||||
fi
|
||||
else
|
||||
if [ X$g4non_display = X ] ; then
|
||||
echo "G4WORKDIR will be set to HOME=$HOME."
|
||||
fi
|
||||
export G4WORKDIR=$HOME
|
||||
fi
|
||||
|
||||
|
||||
@@ -138,17 +138,6 @@ export G4ANALYSIS_USE
|
||||
echo "On this machine the G4ANALYSIS_USE=\$G4ANALYSIS_USE"
|
||||
fi
|
||||
|
||||
#+
|
||||
#
|
||||
# g4persistency
|
||||
#
|
||||
if [ X$g4use_hepodbms = Xy ] ; then
|
||||
G4USE_HEPODBMS=1
|
||||
export G4USE_HEPODBMS
|
||||
. \$G4INSTALL/examples/extended/persistency/PersistentEx01/g4odbms_setup.sh
|
||||
echo "On this machine the G4USE_HEPODBMS=\$G4USE_HEPODBMS"
|
||||
fi
|
||||
|
||||
#
|
||||
# g4ui
|
||||
#
|
||||
@@ -330,6 +319,22 @@ export OGLHOME
|
||||
echo "On this machine the OGLHOME=\$OGLHOME"
|
||||
fi
|
||||
|
||||
#
|
||||
# Use G3TOG4 module
|
||||
#
|
||||
#+
|
||||
if [ X$g4wlib_build_g3tog4 = Xy ] ; then
|
||||
G4LIB_BUILD_G3TOG4=1
|
||||
export G4LIB_BUILD_G3TOG4
|
||||
echo "On this machine the G4LIB_BUILD_G3TOG4=\$G4LIB_BUILD_G3TOG4"
|
||||
fi
|
||||
|
||||
if [ X$g4w_use_g3tog4 = Xy ] ; then
|
||||
G4USE_G3TOG4=1
|
||||
export G4USE_G3TOG4
|
||||
echo "On this machine the G4USE_G3TOG4=\$G4USE_G3TOG4"
|
||||
fi
|
||||
|
||||
#+
|
||||
#
|
||||
# g4shared
|
||||
@@ -370,13 +375,21 @@ fi
|
||||
|
||||
#####################################################################
|
||||
|
||||
# Create GNUmakefile.db to keep ALL GNUmakefile DB :)
|
||||
|
||||
if test -f \$G4INSTALL/config/scripts/GNUmakefile.db ; then
|
||||
mv \$G4INSTALL/config/scripts/GNUmakefile.db \$G4LIB/\$G4SYSTEM/GNUmakefile.db.bac
|
||||
fi
|
||||
|
||||
$g4make -n -p -f \$G4INSTALL/config/scripts/GNUmakefile > \$G4LIB/\$G4SYSTEM/GNUmakefile.db
|
||||
|
||||
echo ""
|
||||
echo "Starting installation..."
|
||||
echo ""
|
||||
cd $g4install/source
|
||||
echo `pwd`
|
||||
|
||||
# THere is no env!
|
||||
# There is no env!
|
||||
if [ X$g4global = Xy ] ; then
|
||||
$g4make global
|
||||
fi
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#
|
||||
# -------- AIX ---------- !!! not supported !!!
|
||||
# AIX-4.3.2 xlC
|
||||
# AIX-4.3.2 xlC 6.0
|
||||
|
||||
ifeq ($(G4SYSTEM),AIX-xlC)
|
||||
CXX := xlC
|
||||
ifdef G4OPTIMISE
|
||||
@@ -27,13 +28,8 @@ ifeq ($(G4SYSTEM),AIX-xlC)
|
||||
ifndef OGLLIBS
|
||||
OGLLIBS := -L$(OGLHOME)/lib -lGLU -lGL
|
||||
endif
|
||||
CPPFLAGS += -DG4NOT_ISO_DELETES
|
||||
CPPFLAGS += -I$(G4BASE)/global/management/include/g4std/wrappers/$(G4SYSTEM)
|
||||
ifdef G4USE_OSPACE
|
||||
CPPFLAGS += -DOS_AIX_4 -DOS_NEW_CHECK -DOS_STL_ASSERT
|
||||
CPPFLAGS += -DG4USE_OSPACE -DOS_NO_WSTRING -DOS_NO_ALLOCATORS
|
||||
CPPFLAGS += $(OSPACEINC) -I$(OSPACE_BASE_DIR)
|
||||
endif
|
||||
G4USE_STD_NAMESPACE := yes
|
||||
CPPFLAGS += -DG4USE_STD_NAMESPACE
|
||||
|
||||
define build-granular-shared-lib
|
||||
@echo "Shared Libraries not supported on $(G4SYSTEM)
|
||||
|
||||
+5
-14
@@ -1,6 +1,6 @@
|
||||
#
|
||||
# -------- DEC ---------
|
||||
#
|
||||
# -------- DEC --------- !!! not supported !!!
|
||||
# OSF V4.0, cxx C++ V6.1-027
|
||||
ifeq ($(G4SYSTEM),DEC-cxx)
|
||||
CXX := cxx
|
||||
ifdef G4OPTIMISE
|
||||
@@ -28,18 +28,9 @@ ifeq ($(G4SYSTEM),DEC-cxx)
|
||||
# OGLLIBS := -lMesaGLU -lMesaGL
|
||||
endif
|
||||
CPPFLAGS += -I$(G4BASE)/global/management/include/g4std/wrappers/$(G4SYSTEM)
|
||||
ifdef G4USE_OSPACE
|
||||
CPPFLAGS += -DG4USE_OSPACE -DOS_OSF1_4 -DOS_NEW_CHECK -DOS_STL_ASSERT -DOS_NO_WSTRING
|
||||
CPPFLAGS += -DOS_NO_ALLOCATORS -D__NO_EDG_EXCEPTION_CLASSES
|
||||
CPPFLAGS += $(OSPACEINC) -I$(OSPACE_BASE_DIR)
|
||||
CXXFLAGS += -nostdnew
|
||||
else
|
||||
ifndef G4NO_STD_NAMESPACE
|
||||
G4USE_STD_NAMESPACE := yes
|
||||
CXXFLAGS += -std strict_ansi
|
||||
CPPFLAGS += -DG4USE_STD_NAMESPACE
|
||||
endif
|
||||
endif
|
||||
G4USE_STD_NAMESPACE := yes
|
||||
CXXFLAGS += -std strict_ansi
|
||||
CPPFLAGS += -DG4USE_STD_NAMESPACE
|
||||
|
||||
define build-granular-shared-lib
|
||||
@libdir=`(cd $(@D);/bin/pwd)`; \
|
||||
|
||||
@@ -1,13 +1,21 @@
|
||||
#
|
||||
# ------ MacOS-X ------ !!! not supported !!!
|
||||
# MacOS 10.1 GNU-gcc 2.92.2
|
||||
# ------ MacOS-X ------ !!! not generally supported !!!
|
||||
#
|
||||
# MacOS 10.1 GNU-gcc 2.92.2
|
||||
# MacOS 10.2 there is g++2 and g++3, choose consistently one,
|
||||
# like g++2 which is 2.95.2
|
||||
# use echo -n (there is not the echo -e option of Linux)
|
||||
#
|
||||
# Helmut Burkhardt - CERN
|
||||
#
|
||||
ifeq ($(G4SYSTEM),Darwin-g++)
|
||||
CXX := g++
|
||||
# choice of GNU compilers:
|
||||
CXX := g++2
|
||||
# CXX := g++3
|
||||
GNU_GCC = 1
|
||||
CXXFLAGS := -Wall -ansi -pedantic -pipe -fno-for-scope -DGNU_GCC
|
||||
# optionally add verbose flag
|
||||
# CXXFLAGS += -v
|
||||
ifdef G4OPTIMISE
|
||||
CXXFLAGS += -O
|
||||
FCFLAGS := -O
|
||||
@@ -33,7 +41,7 @@ ifeq ($(G4SYSTEM),Darwin-g++)
|
||||
FC := g77
|
||||
FCFLAGS += -fno-automatic -fno-backslash -fno-second-underscore
|
||||
FCLIBS := -lg2c -lnsl
|
||||
ECHO := /bin/echo -e
|
||||
ECHO := /bin/echo -n
|
||||
SHEXT := so
|
||||
X11FLAGS := -I/usr/include/X11/extensions -I/usr/include/X11
|
||||
X11LIBS := -L/usr/X11R6/lib -lXmu -lXt -lXext -lX11 -lSM -lICE
|
||||
@@ -52,9 +60,6 @@ ifeq ($(G4SYSTEM),Darwin-g++)
|
||||
OIVFLAGS += -I$(OIHOME)/include
|
||||
G4USE_STD_NAMESPACE := yes
|
||||
CPPFLAGS += -DG4USE_STD_NAMESPACE
|
||||
ifdef G4ODBMS
|
||||
G4DDLX_FLAGS += -DG4std=""
|
||||
endif
|
||||
define build-granular-shared-lib
|
||||
@libdir=`(cd $(@D);/bin/pwd)`; \
|
||||
cd $(G4TMPDIR); \
|
||||
|
||||
@@ -39,11 +39,6 @@ ifeq ($(G4SYSTEM),HP-aCC)
|
||||
OGLLIBS += -L/opt/graphics/common/lib -lXwindow -lhpgfx -lXhp11 -ldld
|
||||
endif
|
||||
CPPFLAGS += -DG4NOT_ISO_DELETES -DG4NO_ISO_VECDIST
|
||||
ifdef G4USE_OSPACE
|
||||
CPPFLAGS += -DOS_HPUX_10_20 -DOS_NEW_CHECK -DOS_STL_ASSERT
|
||||
CPPFLAGS += -DG4USE_OSPACE -DOS_NO_WSTRING -DOS_NO_ALLOCATORS -D__HPACC_NOEH
|
||||
CPPFLAGS += $(OSPACEINC) -I$(OSPACE_BASE_DIR)
|
||||
endif
|
||||
|
||||
define build-granular-shared-lib
|
||||
@libdir=`(cd $(@D);/bin/pwd)`; \
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#
|
||||
# ------ GNU/LINUX ------ egcs-1.1.2 (gcc-2.91.66)
|
||||
#
|
||||
# ------ GNU/LINUX ------ !!! not supported !!!
|
||||
# Red-Hat 6.1, egcs-1.1.2 (gcc-2.91.66)
|
||||
ifeq ($(G4SYSTEM),Linux-egcs)
|
||||
CXX := g++
|
||||
GNU_GCC = 1
|
||||
@@ -44,14 +44,6 @@ ifeq ($(G4SYSTEM),Linux-egcs)
|
||||
OGLLIBS := -L$(OGLHOME)/lib -lGLU -lGL
|
||||
endif
|
||||
OIVFLAGS += -I$(OIHOME)/include
|
||||
ifdef G4USE_OSPACE
|
||||
CPPFLAGS += -DOS_LINUX_2 -DOS_NEW_CHECK -DOS_STL_ASSERT
|
||||
CPPFLAGS += -DG4USE_OSPACE -DOS_NO_WSTRING -DOS_NO_ALLOCATORS
|
||||
CPPFLAGS += -I$(OSPACE_BASE_DIR)/ospace/std -I$(OSPACE_BASE_DIR)
|
||||
endif
|
||||
ifdef G4ODBMS
|
||||
G4DDLX_FLAGS += -D__STL_CLASS_PARTIAL_SPECIALIZATION -Dstd="" -DG4std=""
|
||||
endif
|
||||
define build-granular-shared-lib
|
||||
@libdir=`(cd $(@D);/bin/pwd)`; \
|
||||
cd $(G4TMPDIR); \
|
||||
|
||||
@@ -28,6 +28,7 @@ ifeq ($(G4SYSTEM),Linux-g++)
|
||||
CCFLAGS += -fPIC
|
||||
endif
|
||||
G4RUNPATHOPTION := -Wl,-rpath
|
||||
CC := gcc
|
||||
FC := g77
|
||||
FCFLAGS += -fno-automatic -fno-backslash -fno-second-underscore
|
||||
FCLIBS := -lg2c -lnsl
|
||||
@@ -47,9 +48,6 @@ ifeq ($(G4SYSTEM),Linux-g++)
|
||||
OIVFLAGS += -I$(OIHOME)/include
|
||||
G4USE_STD_NAMESPACE := yes
|
||||
CPPFLAGS += -DG4USE_STD_NAMESPACE
|
||||
ifdef G4ODBMS
|
||||
G4DDLX_FLAGS += -DG4std=""
|
||||
endif
|
||||
define build-granular-shared-lib
|
||||
@libdir=`(cd $(@D);/bin/pwd)`; \
|
||||
cd $(G4TMPDIR); \
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#
|
||||
# -------- SGI --------- !!! not supported !!!
|
||||
# Irix-6.5.5 CC-7.2.1
|
||||
# Irix-6.5.5 CC-8
|
||||
ifeq ($(G4SYSTEM),SGI-CC)
|
||||
CXX := CC
|
||||
ifdef G4OPTIMISE
|
||||
@@ -26,13 +26,8 @@ ifeq ($(G4SYSTEM),SGI-CC)
|
||||
ifndef OGLLIBS
|
||||
OGLLIBS := -L/usr/lib -lGLU -lGL
|
||||
endif
|
||||
CPPFLAGS += -DSOCKET_IRIX_SOLARIS
|
||||
CPPFLAGS += -I$(G4BASE)/global/management/include/g4std/wrappers/$(G4SYSTEM)
|
||||
ifdef G4USE_OSPACE
|
||||
CPPFLAGS += -DOS_IRIX_6_5 -DOS_NEW_CHECK -DOS_STL_ASSERT
|
||||
CPPFLAGS += -DG4USE_OSPACE -DOS_NO_WSTRING -DOS_NO_ALLOCATORS
|
||||
CPPFLAGS += $(OSPACEINC) -I$(OSPACE_BASE_DIR)
|
||||
endif
|
||||
G4USE_STD_NAMESPACE := yes
|
||||
CPPFLAGS += -DSOCKET_IRIX_SOLARIS -DG4USE_STD_NAMESPACE
|
||||
|
||||
define build-granular-shared-lib
|
||||
@echo "Shared Libraries not supported on $(G4SYSTEM)
|
||||
|
||||
+3
-21
@@ -13,7 +13,6 @@ ifeq ($(G4SYSTEM),SUN-CC)
|
||||
endif
|
||||
endif
|
||||
CXXFLAGS += -features=no%anachronisms -mt -lpthread
|
||||
# CXXFLAGS += -fnonstd
|
||||
ifdef G4LIB_BUILD_SHARED
|
||||
CXXFLAGS += -KPIC
|
||||
FCFLAGS += -KPIC
|
||||
@@ -44,27 +43,10 @@ ifeq ($(G4SYSTEM),SUN-CC)
|
||||
OGLLIBS := -L$(OGLHOME)/lib -lGLU -lGL
|
||||
endif
|
||||
CPPFLAGS += -DSOCKET_IRIX_SOLARIS
|
||||
LOADLIBS += -L/usr/lib -lsocket -lnsl
|
||||
LOADLIBS += -lsocket -lnsl
|
||||
CPPFLAGS += -DG4NOT_ISO_DELETES -DG4NO_ISO_VECDIST
|
||||
ifdef G4ODBMS
|
||||
G4DDLX_FLAGS += -noline
|
||||
endif
|
||||
ifdef G4USE_OSPACE
|
||||
CPPFLAGS += -DOS_SOLARIS_2_5 -DOS_NEW_CHECK -DOS_STL_ASSERT
|
||||
CPPFLAGS += -DG4USE_OSPACE -DOS_NO_WSTRING -DOS_NO_ALLOCATORS
|
||||
CPPFLAGS += $(OSPACEINC) -I$(OSPACE_BASE_DIR)
|
||||
CXXFLAGS += -compat
|
||||
else
|
||||
ifndef G4NO_STD_NAMESPACE
|
||||
G4USE_STD_NAMESPACE := yes
|
||||
CPPFLAGS += -DG4USE_STD_NAMESPACE
|
||||
ifdef G4ODBMS
|
||||
G4DDLX_FLAGS += -DG4std="std"
|
||||
endif
|
||||
else
|
||||
CXXFLAGS += -compat
|
||||
endif
|
||||
endif
|
||||
G4USE_STD_NAMESPACE := yes
|
||||
CPPFLAGS += -DG4USE_STD_NAMESPACE
|
||||
|
||||
define build-granular-shared-lib
|
||||
@libdir=`(cd $(@D);/bin/pwd)`; \
|
||||
|
||||
+3
-13
@@ -15,20 +15,10 @@ ifeq ($(G4SYSTEM),WIN32-VC)
|
||||
CXXFLAGS += -D_WIN32 -DOS
|
||||
CPPFLAGS += -DWIN32
|
||||
#
|
||||
# Should set $INCLUDE environment, if not set as below
|
||||
# Use ISO standard version.
|
||||
#
|
||||
ifdef G4USE_OSPACE
|
||||
CXXFLAGS += $(OSPACEINC)
|
||||
CPPFLAGS += -DG4USE_OSPACE
|
||||
else
|
||||
ifdef G4USE_STLPORT
|
||||
CXXFLAGS += $(OSPACEINC)
|
||||
else
|
||||
# If native STL is selected, use ISO standard version.
|
||||
G4USE_STD_NAMESPACE := yes
|
||||
CPPFLAGS += -DG4USE_STD_NAMESPACE
|
||||
endif
|
||||
endif #ospace
|
||||
G4USE_STD_NAMESPACE := yes
|
||||
CPPFLAGS += -DG4USE_STD_NAMESPACE
|
||||
|
||||
LDFLAGS += -FORCE /NODEFAULTLIB:MSVCRT.dll
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
#
|
||||
# ------ GNU/WIN32 CYGNUS ------ !!! not supported !!!
|
||||
# cygnus b20 with cygwin1.dll 1.1.5 patch
|
||||
# Windows 95 4.00.1111
|
||||
# Cygnus CygWin - gcc-2.95.3
|
||||
# Windows 2000
|
||||
#
|
||||
# Stefano Agostinelli - IST Group, Genova
|
||||
# Stefano Agostinelli (agos001@pn.itnet.it) - IST Group, Genova
|
||||
#
|
||||
ifeq ($(G4SYSTEM),WIN32-g++)
|
||||
CXX := g++
|
||||
GNU_GCC = 1
|
||||
CXXFLAGS := -pipe -fno-for-scope -DGNU_GCC
|
||||
CXXFLAGS := -Wall -ansi -pedantic -pipe -fno-for-scope -DGNU_GCC
|
||||
ifdef G4OPTIMISE
|
||||
CXXFLAGS += -O
|
||||
FCFLAGS := -O
|
||||
@@ -40,14 +40,8 @@ ifeq ($(G4SYSTEM),WIN32-g++)
|
||||
OGLLIBS := -L$(OGLHOME)/lib -lGLU -lGL
|
||||
endif
|
||||
OIVFLAGS += -I$(OIHOME)/include
|
||||
ifdef G4USE_OSPACE
|
||||
CPPFLAGS += -DOS_LINUX_2 -DOS_NEW_CHECK -DOS_STL_ASSERT
|
||||
CPPFLAGS += -DG4USE_OSPACE -DOS_NO_WSTRING -DOS_NO_ALLOCATORS
|
||||
CPPFLAGS += -I$(OSPACE_BASE_DIR)/ospace/std -I$(OSPACE_BASE_DIR)
|
||||
endif
|
||||
ifdef G4ODBMS
|
||||
G4DDLX_FLAGS += -D__STL_CLASS_PARTIAL_SPECIALIZATION -Dstd="" -DG4std=""
|
||||
endif
|
||||
G4USE_STD_NAMESPACE := yes
|
||||
CPPFLAGS += -DG4USE_STD_NAMESPACE
|
||||
|
||||
define build-granular-shared-lib
|
||||
@echo "Shared Libraries not supported on $(G4SYSTEM)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$Id: History,v 1.6 2000/06/09 10:09:21 barrand Exp $
|
||||
$Id: History,v 1.7 2002/12/06 16:19:38 gcosmo Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -18,6 +18,10 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
envs-V04-01-00 06 December 2002 Gabriele Cosmo
|
||||
- Synchronized HEAD (disclaimer of liability).
|
||||
- Updates for new G4ApplicationState.
|
||||
|
||||
envs-V01-01-01 09 June 2000 John Allison
|
||||
- Only OPACS and History tagged.
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: EXPO.cc,v 1.8.4.1 2001/06/28 19:06:29 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: EXPO.cc,v 1.9 2001/07/11 09:56:40 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: TEST.cc,v 1.3.4.1 2001/06/28 19:06:29 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: TEST.cc,v 1.4 2001/07/11 09:56:40 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: EXPO_Detector.icc,v 1.3.4.1 2001/06/28 19:06:31 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: EXPO_Detector.icc,v 1.4 2001/07/11 09:56:42 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// See also G4/run/example/MyDetectorConstruction.cc.
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: EXPO_PhysicsList.hh,v 1.4.4.1 2001/06/28 19:06:31 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: EXPO_PhysicsList.hh,v 1.5 2001/07/11 09:56:43 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: EXPO_PhysicsList.icc,v 1.4.4.1 2001/06/28 19:06:31 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: EXPO_PhysicsList.icc,v 1.5 2001/07/11 09:56:43 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: EXPO_Primary.icc,v 1.3.4.1 2001/06/28 19:06:31 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: EXPO_Primary.icc,v 1.4 2001/07/11 09:56:43 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// See also G4/run/example/EXPO_PrimaryGeneratorAction.cc.
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4o.h,v 1.3.4.1 2001/06/28 19:06:31 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4o.h,v 1.4 2001/07/11 09:56:43 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
/* +---------------------- Copyright notice -------------------------------+ */
|
||||
/* | Copyright (C) 1995, Guy Barrand, LAL Orsay, (barrand@lal.in2p3.fr) | */
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4oCommon.hh,v 1.3.4.1 2001/06/28 19:06:32 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4oCommon.hh,v 1.4 2001/07/11 09:56:43 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
/*
|
||||
Included by G4o.h.
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4oCommon.icc,v 1.3.4.1 2001/06/28 19:06:32 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4oCommon.icc,v 1.4 2001/07/11 09:56:43 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
/*
|
||||
Included by G4o.cc.
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4oDrawer.hh,v 1.3.4.1 2001/06/28 19:06:32 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4oDrawer.hh,v 1.4 2001/07/11 09:56:44 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
/* +---------------------- Copyright notice -------------------------------+ */
|
||||
/* | Copyright (C) 1995, Guy Barrand, LAL Orsay, (barrand@lal.in2p3.fr) | */
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4oEXPO.h,v 1.3.4.1 2001/06/28 19:06:32 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4oEXPO.h,v 1.4 2001/07/11 09:56:44 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
/* +---------------------- Copyright notice -------------------------------+ */
|
||||
/* | Copyright (C) 1995, Guy Barrand, LAL Orsay, (barrand@lal.in2p3.fr) | */
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4oScene.hh,v 1.4.4.1 2001/06/28 19:06:33 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4oScene.hh,v 1.5 2001/07/11 09:56:44 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
/* +---------------------- Copyright notice -------------------------------+ */
|
||||
/* | Copyright (C) 1995, Guy Barrand, LAL Orsay, (barrand@lal.in2p3.fr) | */
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4oState.hh,v 1.4.4.1 2001/06/28 19:06:33 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4oState.hh,v 1.5 2001/07/11 09:56:44 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
#ifndef G4oState_h
|
||||
#define G4oState_h
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: WoG4o.h,v 1.3.4.1 2001/06/28 19:06:33 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: WoG4o.h,v 1.4 2001/07/11 09:56:44 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
/* +---------------------- Copyright notice -------------------------------+ */
|
||||
/* | Copyright (C) 1995, Guy Barrand, LAL Orsay, (barrand@lal.in2p3.fr) | */
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4o.cc,v 1.7.4.1 2001/06/28 19:06:33 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4o.cc,v 1.8 2001/07/11 09:56:45 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
/*
|
||||
#define DEBUG
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4oDrawer.cc,v 1.6.4.1 2001/06/28 19:06:34 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4oDrawer.cc,v 1.7 2001/07/11 09:56:45 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
/*
|
||||
From geant4/visualization/management/src/G4VisManager.cc.
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4oScene.cc,v 1.7.4.1 2001/06/28 19:06:34 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4oScene.cc,v 1.8 2001/07/11 09:56:45 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
/* +---------------------- Copyright notice -------------------------------+ */
|
||||
/* | Copyright (C) 1995, Guy Barrand, LAL Orsay, (barrand@lal.in2p3.fr) | */
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4oState.cc,v 1.6.4.1 2001/06/28 19:06:34 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4oState.cc,v 1.8 2002/12/06 16:19:22 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//#define DEBUG
|
||||
|
||||
@@ -65,22 +65,22 @@ G4bool G4oState::Notify (
|
||||
G4StateManager* statM = G4StateManager::GetStateManager();
|
||||
G4ApplicationState previousState = statM->GetPreviousState();
|
||||
|
||||
if(previousState==Idle && requestedState==GeomClosed) {
|
||||
if(previousState==G4State_Idle && requestedState==G4State_GeomClosed) {
|
||||
//beginOfRun
|
||||
G4String string = name;
|
||||
string += "RunBegin.osh";
|
||||
OShellExecuteFile (G4oGetShell(),(char*)string.data());
|
||||
} else if(previousState==GeomClosed && requestedState==Idle) {
|
||||
} else if(previousState==G4State_GeomClosed && requestedState==G4State_Idle) {
|
||||
//endOfRun
|
||||
G4String string = name;
|
||||
string += "RunEnd.osh";
|
||||
OShellExecuteFile (G4oGetShell(),(char*)string.data());
|
||||
} else if(previousState==GeomClosed && requestedState==EventProc) {
|
||||
} else if(previousState==G4State_GeomClosed && requestedState==G4State_EventProc) {
|
||||
//beginOfEvent
|
||||
G4String string = name;
|
||||
string += "EventBegin.osh";
|
||||
OShellExecuteFile (G4oGetShell(),(char*)string.data());
|
||||
} else if(previousState==EventProc && requestedState==GeomClosed) {
|
||||
} else if(previousState==G4State_EventProc && requestedState==G4State_GeomClosed) {
|
||||
// EndOfEvent
|
||||
G4String string = name;
|
||||
string += "EventEnd.osh";
|
||||
|
||||
+7
-1
@@ -1,4 +1,4 @@
|
||||
$Id: History,v 1.63 2001/12/13 17:49:48 gcosmo Exp $
|
||||
$Id: History,v 1.65 2002/12/06 19:02:55 gcosmo Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -17,6 +17,12 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
6th December 2002 Gabriele Cosmo (examples-V04-01-04)
|
||||
- Merged with recent development
|
||||
|
||||
4th December 2002 Makoto Asai (examples-V04-01-03)
|
||||
- Migration to new G4ApplicationState
|
||||
|
||||
13th December 2001 Gabriele Cosmo (examples-V03-02-05)
|
||||
- Updated reference outputs.
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
@@ -20,33 +19,39 @@
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: Brachy.cc
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
// GEANT 4 - Brachytherapy example
|
||||
// --------------------------------------------------------------
|
||||
//
|
||||
// Code developed by:
|
||||
// S. Agostinelli, F. Foppiano, S. Garelli , M. Tropeano,S.Guatelli
|
||||
// S. Agostinelli, F. Foppiano, S. Garelli , M. Tropeano, S.Guatelli
|
||||
|
||||
//
|
||||
// *******************************
|
||||
// * *
|
||||
// * Brachy.cc *
|
||||
// * *
|
||||
// *******************************
|
||||
//
|
||||
// Brachytherapy simulates the energy deposition in a cubic (30*cm)
|
||||
//
|
||||
// Brachytherapy simulates the dose deposition in a cubic (30*cm)
|
||||
// water phantom for a IsoSeed I-125 Bebig
|
||||
// brachytherapy source.
|
||||
//
|
||||
// Simplified gamma generation is used.
|
||||
// Source axis is oriented along Z axis.
|
||||
// Voxel data on the X-Z plan
|
||||
//e is output to
|
||||
// "Brachy3.hbk".
|
||||
// Source axis is oriented along Z axis. The source is in the centre
|
||||
//of the box.
|
||||
|
||||
|
||||
// $Id: Brachy.cc,v 1.11 2002/06/18 22:20:37 guatelli Exp $
|
||||
// GEANT4 tag $Name: brachy-V04-00-05 $
|
||||
//default source Ir-192
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4UImanager.hh"
|
||||
#include "G4UIterminal.hh"
|
||||
#include "G4UItcsh.hh"
|
||||
|
||||
#include "BrachyFactoryIr.hh"
|
||||
#ifdef G4UI_USE_XM
|
||||
#include "G4UIXm.hh"
|
||||
#endif
|
||||
@@ -58,55 +63,67 @@
|
||||
#include "BrachyEventAction.hh"
|
||||
#include "BrachyDetectorConstruction.hh"
|
||||
#include "BrachyPhysicsList.hh"
|
||||
#include "BrachyPrimaryGeneratorAction.hh"
|
||||
#include "BrachyPhantomSD.hh"
|
||||
|
||||
#include "BrachyPrimaryGeneratorActionIr.hh"
|
||||
#include "G4SDManager.hh"
|
||||
|
||||
#include"BrachyRunAction.hh"
|
||||
|
||||
#include "Randomize.hh"
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4SDManager.hh"
|
||||
#include "G4UImanager.hh"
|
||||
|
||||
|
||||
#include "G4UImessenger.hh"
|
||||
|
||||
//Interactive mode//
|
||||
|
||||
int main(int argc ,char ** argv)
|
||||
|
||||
{
|
||||
// semi diversi li ha usati per l'errore
|
||||
|
||||
|
||||
//HepRandom::setTheSeed(16520);
|
||||
|
||||
// fix the seed
|
||||
// HepRandom::setTheSeed(16520);
|
||||
|
||||
HepRandom::setTheEngine(new RanecuEngine);
|
||||
|
||||
|
||||
G4int seed=time(NULL);
|
||||
HepRandom ::setTheSeed(seed);
|
||||
|
||||
|
||||
// Construct the default run manager
|
||||
G4RunManager* pRunManager = new G4RunManager;
|
||||
G4RunManager* pRunManager = new G4RunManager;
|
||||
|
||||
|
||||
// Set mandatory initialization classes
|
||||
G4String SDName = "Phantom";
|
||||
|
||||
BrachyDetectorConstruction *pDetectorConstruction=new BrachyDetectorConstruction(SDName);
|
||||
// Set mandatory initialization classes
|
||||
G4String SDName = "Phantom";
|
||||
|
||||
BrachyDetectorConstruction *pDetectorConstruction=new BrachyDetectorConstruction(SDName);
|
||||
|
||||
pRunManager->SetUserInitialization(pDetectorConstruction) ;
|
||||
|
||||
pRunManager->SetUserInitialization(new BrachyPhysicsList);
|
||||
|
||||
|
||||
pRunManager->SetUserInitialization(new BrachyPhysicsList);
|
||||
|
||||
/*
|
||||
#ifdef G4VIS_USE
|
||||
// visualization manager
|
||||
G4VisManager* visManager = new BrachyVisManager;
|
||||
visManager->Initialize();
|
||||
G4VisManager* visManager = new BrachyVisManager;
|
||||
visManager->Initialize();
|
||||
#endif
|
||||
|
||||
G4UIsession* session=0;
|
||||
*/
|
||||
|
||||
|
||||
// output environment variables:
|
||||
#ifdef G4ANALYSIS_USE
|
||||
G4cout << G4endl << G4endl << G4endl
|
||||
<< " User Environment " << G4endl
|
||||
<< " Using AIDA 3.0 analysis " << G4endl;
|
||||
# else
|
||||
G4cout << G4endl << G4endl << G4endl
|
||||
<< " User Environment " << G4endl
|
||||
<< " G4ANALYSIS_USE environment variable not set, NO ANALYSIS "
|
||||
<< G4endl;
|
||||
#endif
|
||||
/*
|
||||
G4UIsession* session=0;
|
||||
|
||||
|
||||
if (argc==1) // Define UI session for interactive mode.
|
||||
{
|
||||
// G4UIterminal is a (dumb) terminal.
|
||||
@@ -120,19 +137,18 @@ int main(int argc ,char ** argv)
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
*/
|
||||
BrachyEventAction *pEventAction=new BrachyEventAction(SDName);
|
||||
pRunManager->SetUserAction(pEventAction );
|
||||
|
||||
|
||||
BrachyEventAction *pEventAction=new BrachyEventAction(SDName);
|
||||
|
||||
pRunManager->SetUserAction(pEventAction );
|
||||
pRunManager->SetUserAction(new BrachyPrimaryGeneratorAction);
|
||||
|
||||
BrachyRunAction *pRunAction=new BrachyRunAction();
|
||||
|
||||
BrachyRunAction *pRunAction=new BrachyRunAction(SDName);
|
||||
pRunManager->SetUserAction(pRunAction);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//Initialize G4 kernel
|
||||
pRunManager->Initialize();
|
||||
|
||||
@@ -142,7 +158,9 @@ int main(int argc ,char ** argv)
|
||||
UI->ApplyCommand("/event/verbose 0");
|
||||
UI->ApplyCommand("/tracking/verbose 0");
|
||||
|
||||
if (session) // Define UI session for interactive mode.
|
||||
/*
|
||||
|
||||
if (session) // Define UI session for interactive mode.
|
||||
{
|
||||
// G4UIterminal is a (dumb) terminal.
|
||||
UI->ApplyCommand("/control/execute initInter.mac");
|
||||
@@ -159,25 +177,24 @@ int main(int argc ,char ** argv)
|
||||
G4String fileName = argv[1];
|
||||
UI->ApplyCommand(command+fileName);
|
||||
}
|
||||
|
||||
//int numberOfEvent = 10000;
|
||||
//pRunManager->BeamOn(numberOfEvent);
|
||||
|
||||
|
||||
|
||||
// Job termination
|
||||
*/
|
||||
int numberOfEvent = 1000;
|
||||
pRunManager->BeamOn(numberOfEvent);
|
||||
|
||||
|
||||
|
||||
|
||||
// Job termination
|
||||
|
||||
/*
|
||||
#ifdef G4VIS_USE
|
||||
delete visManager;
|
||||
#endif
|
||||
|
||||
|
||||
*/
|
||||
|
||||
delete pRunManager;
|
||||
|
||||
return 0;
|
||||
delete pRunManager;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# --------------------------------------------------------------
|
||||
# $Id: GNUmakefile,v 1.6 2002/06/13 15:11:27 guatelli Exp $
|
||||
# $Id: GNUmakefile,v 1.7 2002/11/15 17:36:55 guatelli Exp $
|
||||
# --------------------------------------------------------------
|
||||
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
|
||||
# --------------------------------------------------------------
|
||||
@@ -14,10 +14,10 @@ G4ANALYSIS_USE = 1
|
||||
|
||||
|
||||
ifndef G4INSTALL
|
||||
G4INSTALL = ../../../
|
||||
G4INSTALL =~/GEANT4/geant4/
|
||||
endif
|
||||
|
||||
CPPFLAGS += -I${LHCXX_REL_DIR}/include -I/afs/cern.ch/sw/contrib/AIDA/2.2/cpp
|
||||
CPPFLAGS += -I${LHCXX_REL_DIR}/include -I/afs/cern.ch/sw/contrib/AIDA/3.0/cpp -g
|
||||
|
||||
|
||||
.PHONY: all
|
||||
@@ -25,9 +25,5 @@ all: lib bin
|
||||
|
||||
|
||||
include $(G4INSTALL)/config/binmake.gmk
|
||||
# From lowenergy/test/GNUmakefile
|
||||
CPPFLAGS += `aida-config --useHBook --include`
|
||||
LDFLAGS += `aida-config --useHBook --lib`
|
||||
LOADLIBS += `aida-config --useHBook --lib`
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
-------------------------------------------------------------------
|
||||
$Id: History,v 1.3 2000/12/10 08:42:44 chauvie Exp $
|
||||
$Id: History,v 1.4 2002/12/06 16:32:25 gcosmo Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -9,6 +9,9 @@ $Id: History,v 1.3 2000/12/10 08:42:44 chauvie Exp $
|
||||
Category History file
|
||||
---------------------
|
||||
|
||||
06.12.2002 - Gabriele Cosmo, tag brachy-V04-01-04
|
||||
Migration to new G4ApplicationState.
|
||||
|
||||
09.11.2000 - SA, tag brachy-V02-00-00
|
||||
(dvnote) First submission of Brachytherapy advanced example.
|
||||
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
-------------------------------------------------------------------
|
||||
$Id: README,v 1.5 2002/06/13 15:59:43 guatelli Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
Geant4 - Brachytherapy example
|
||||
@@ -11,52 +8,63 @@ $Id: README,v 1.5 2002/06/13 15:59:43 guatelli Exp $
|
||||
|
||||
0. Introduction.
|
||||
|
||||
Brachytherapy example simulates energy deposition on a voxel grid
|
||||
for a Ir brachytherapy source.
|
||||
Brachytherapy example simulates energy deposition in a Phantom filled with
|
||||
soft tissue for:
|
||||
1) Ir brachytherapy source.
|
||||
2) I brachytherapy source.
|
||||
3) Leipzig Applicator.
|
||||
|
||||
1. Technical description
|
||||
1.Technical information.
|
||||
|
||||
1.0. the source is constructed in the
|
||||
brachyDetectorConstruction class. The source is composed by
|
||||
an iridium core encapsulated in a capsule (body + tip).
|
||||
The source is put in the center of a 30*cm water box.
|
||||
The default source is an Ir source put in the center of the Phantom.
|
||||
The Phantom is a box (dimension:30cm)
|
||||
|
||||
1.1. The water box is made sensitive detector. A longitudinal slice
|
||||
of it is associated to a planar read out geometry. At every hit
|
||||
energy deposition is read and stored in a 2D histogram.
|
||||
2.How to run the example.
|
||||
|
||||
- run "Brachy" executable.
|
||||
- you can run the example in batch or interative mode.
|
||||
|
||||
1.2. the output is the file brachy2.hbk
|
||||
(e.g. anysotropy and isodose calculations):
|
||||
1)1Dhistogram with the spectrum of initial energy of gamma
|
||||
Default: batch mode with 1000 events
|
||||
|
||||
|
||||
In interative mode, you can choose:
|
||||
|
||||
1)Ir source:
|
||||
idle>/run/beamOn NumberOfEvents and then
|
||||
idle> exit
|
||||
|
||||
2)Leipzig Applicator:
|
||||
idle>/geom/switch Leipzig
|
||||
idle>/run/beamOn NumberOfEvents and then
|
||||
idle> exit
|
||||
|
||||
3) I source:
|
||||
idle>/geom/switch Iodium
|
||||
idle>/run/energy Iodium
|
||||
idle>/run/beamOn NumberOfEvents
|
||||
idle>exit
|
||||
|
||||
Before the run you can also change the absorber material of the Phantom:
|
||||
idle>/detecor/setMaterial name
|
||||
|
||||
4)simulation output: brachytherapy.hbk
|
||||
It contains:
|
||||
1)1Dhistogram with the primary particle energy
|
||||
2)2Dhistogram with the distribution of energy in the plane (x,z,energy)
|
||||
2. Make
|
||||
3)Ntuple with the energy deposit in the Phantom
|
||||
|
||||
1.3.the default visualization is with Dawn
|
||||
|
||||
5)the default visualization is with Dawn
|
||||
|
||||
A standard Geant4 example GNUmakefile is provided.
|
||||
|
||||
2. Usage
|
||||
|
||||
run "Brachy" executable.
|
||||
The framework in in interactive mode,so
|
||||
you have to do:
|
||||
idle>/run/beamOn ( numberofevents)
|
||||
|
||||
The output is ("brachy2.hbk")
|
||||
|
||||
|
||||
|
||||
|
||||
------How to run the new version of AIDA:----------------------
|
||||
|
||||
|
||||
1)Aida platform for Linux:gcc compiler 2.95.2
|
||||
|
||||
-------------------------enviroment with the compiler 2.95.2 on lxplus---------
|
||||
|
||||
|
||||
setenv G4LEDATA /afs/cern.ch/sw/geant4/dev/data/G4EMLOW1.1
|
||||
setenv G4INSTALL /...
|
||||
setenv CLHEP_BASE_DIR /afs/cern.ch/sw/geant4/dev/CLHEP/Linux-g++/1.7.5
|
||||
#
|
||||
# ---- Linux setup ----
|
||||
#
|
||||
@@ -95,7 +103,7 @@ setenv G4VIS_USE_DAWN 1
|
||||
setenv G4VIS_USE_DAWNFILE 1
|
||||
setenv PATH ${PATH}:"/afs/cern.ch/sw/geant4/dev/DAWN/Linux-g++"
|
||||
|
||||
|
||||
setenv LD_LIBRARY_PATH $OGLHOME/lib
|
||||
|
||||
-----------------------------------------------------------------------------------
|
||||
|
||||
@@ -103,21 +111,15 @@ setenv PATH ${PATH}:"/afs/cern.ch/sw/geant4/dev/DAWN/Linux-g++"
|
||||
# ---- Analysis----
|
||||
|
||||
setenv G4ANALYSIS_BUILD 1
|
||||
setenv PATH "${PATH}:/afs/cern.ch/sw/lhcxx/specific/redhat61/gcc-2.95.2/4.0.0/bin"
|
||||
source /afs/cern.ch/sw/lhcxx/share/LHCXX/4.0.0/install/sharedstart.csh
|
||||
setenv G4ANALYSIS_AIDA_CONFIG_CFLAGS `aida-config --noLicense --include`
|
||||
setenv G4ANALYSIS_AIDA_CONFIG_LIBS `aida-config --noLicense --libs`
|
||||
setenv PATH "${PATH}:/afs/cern.ch/sw/lhcxx/specific/redhat61/gcc-2.95.2/5.0.1/bin"
|
||||
setenv G4ANALYSIS_AIDA_CONFIG_LIBS "-L/afs/cern.ch/sw/lhcxx/specific/redhat61/gcc-2.95.2/5.0.1/lib -lAnaphe_AIDA_AnalysisFactory_native -lAnaphe_AIDA_Annotation_native -lAnaphe_AIDA_Histogram_native -lAnaphe_AIDA_Tree_native -lAnaphe_AIDA_HBookStore -lg2c-forMinuit -lHepUtilities -lCLHEP -lAnaphe_AIDA_Tuple_native"
|
||||
setenv G4ANALYSIS_AIDA_CONFIG_CFLAGS "-I/afs/cern.ch/sw/contrib/AIDA/3.0/src/cpp -I/afs/cern.ch/sw/lhcxx/specific/redhat61/gcc-2.95.2/5.0.1/include"
|
||||
setenv ANAPHE5_REL_DIR /afs/cern.ch/sw/contrib/AIDA/3.0/src/cpp
|
||||
setenv LD_LIBRARY_PATH /afs/cern.ch/sw/lhcxx/specific/redhat61/gcc-2.95.2/5.0.1/lib:$LD_LIBRARY_PATH
|
||||
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:"/afs/cern.ch/sw/lhcxx/specific/redhat61/gcc-2.95.2/5.0.1/lib"
|
||||
|
||||
|
||||
# ---- add to the LD_LIBRARY_PATH
|
||||
setenv LD_LIBRARY_PATH $OGLHOME/lib
|
||||
#
|
||||
# ---- end of Linux set-up ----
|
||||
|
||||
before running remenber to delete *.hbk
|
||||
|
||||
in the file brachy.py there are the instructions to visualize the histograms with the old version of Lizard;
|
||||
|
||||
in order to do that open another lxplus with egcs-2.91.66 and make:
|
||||
source /afs/cern.ch/sw/lhcxx/share/LHCXX/3.6.3-sec/install/sharedstart.csh
|
||||
then digit lizard in the directory where brachy3.hbk is and then follow the instruction of the brachy.py
|
||||
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
hm.selectStore("brachy3.hbk")
|
||||
#Lizard 3.6.6
|
||||
|
||||
|
||||
hm.selectStore("brachytherapy.hbk")
|
||||
hm.ls()
|
||||
#spectrum of initial particles
|
||||
hEn=hm.load1D("30")
|
||||
hEn=hm.load1D("20")
|
||||
hplot(hEn)
|
||||
#if you want to print the results:pl.psPrint("Brachyspettro.ps")
|
||||
h2=hm.load2D("20")
|
||||
#if you want to print the results:pl.psPrint("Brachytherapy.ps")
|
||||
h2=hm.load2D("10")
|
||||
hplot(h2)
|
||||
v=vm.from2D(h2)
|
||||
vm.list()
|
||||
vector=vm.retrieve2D (3)
|
||||
pl.dataOption("representation","color")
|
||||
pl.plot(vector)
|
||||
vector.toAscii("brachy.dat")
|
||||
pl.reset()
|
||||
pl.reset()
|
||||
|
||||
Binary file not shown.
@@ -1,55 +1,102 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// Code developed by:
|
||||
// S.Guatelli
|
||||
//
|
||||
//
|
||||
// $Id: BrachyAnalysisManager.hh,v 1.6 2002/11/27 11:11:22 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// **********************************
|
||||
// * *
|
||||
// * BrachyAnalysisManager.hh *
|
||||
// * *
|
||||
// **********************************
|
||||
//
|
||||
|
||||
// the class Analysis creates and managed histograms and ntuples
|
||||
//
|
||||
#ifdef G4ANALYSIS_USE
|
||||
#ifndef G4PROCESSTESTANALYSIS_HH
|
||||
#define G4PROCESSTESTANALYSIS_HH
|
||||
|
||||
#include "globals.hh"
|
||||
#include "g4std/vector"
|
||||
#include "G4ThreeVector.hh"
|
||||
|
||||
#include "AIDA/IHistogram1D.h"
|
||||
#include "AIDA/IHistogram2D.h"
|
||||
#include "AIDA/IAnalysisFactory.h"
|
||||
namespace AIDA{
|
||||
class ITree;
|
||||
class IHistogramFactory;
|
||||
class IAnalysisFactory;
|
||||
class ITupleFactory;
|
||||
class ITuple;
|
||||
class ITreeFactory;
|
||||
};
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
class BrachyAnalysisManager
|
||||
{
|
||||
public:
|
||||
|
||||
~BrachyAnalysisManager();
|
||||
|
||||
void book();
|
||||
|
||||
void finish();
|
||||
~BrachyAnalysisManager();
|
||||
|
||||
static BrachyAnalysisManager* getInstance();
|
||||
|
||||
void analyse(G4double,G4double,G4float);
|
||||
void hist(G4double,G4double,G4float);
|
||||
void Spectrum(G4double);
|
||||
void book();
|
||||
|
||||
void finish();
|
||||
|
||||
static BrachyAnalysisManager* getInstance();
|
||||
|
||||
void fill_Tuple(G4double,G4double,G4double,G4float);
|
||||
void hist(G4double,G4double,G4float);
|
||||
void Spectrum(G4double);
|
||||
|
||||
private:
|
||||
|
||||
G4double xx,zz;
|
||||
G4float en;
|
||||
G4double x,z;
|
||||
static BrachyAnalysisManager* instance;
|
||||
G4double xx,zz,yy;
|
||||
G4float en;
|
||||
G4double x,y,z;
|
||||
static BrachyAnalysisManager* instance;
|
||||
|
||||
private:
|
||||
BrachyAnalysisManager();
|
||||
BrachyAnalysisManager();
|
||||
|
||||
private:
|
||||
|
||||
IAnalysisFactory *aFact;
|
||||
ITree *theTree;
|
||||
IHistogramFactory *histFact;
|
||||
ITupleFactory *tupFact;
|
||||
|
||||
AIDA::IAnalysisFactory* aFact;
|
||||
AIDA::ITree* theTree;
|
||||
AIDA::IHistogramFactory *histFact;
|
||||
AIDA::ITupleFactory *tupFact;
|
||||
AIDA::ITreeFactory *treeFact;
|
||||
AIDA::IHistogram2D *h1;
|
||||
AIDA::IHistogram1D *h2;
|
||||
AIDA::ITuple *ntuple;
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,9 +1,36 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: BrachyDetectorConstruction.hh,v 1.13 2002/11/18 15:18:35 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ****************************************
|
||||
// * *
|
||||
// * BrachyDetectorConstruction.hh *
|
||||
// * *
|
||||
// ****************************************
|
||||
|
||||
// this class manages the geometry of the simulation set up
|
||||
//
|
||||
|
||||
#ifndef BrachyDetectorConstruction_H
|
||||
#define BrachyDetectorConstruction_H 1
|
||||
@@ -12,7 +39,6 @@
|
||||
#include "G4VUserDetectorConstruction.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
|
||||
|
||||
class BrachyPhantomSD;
|
||||
class BrachyDetectorMessenger;
|
||||
class G4LogicalVolume;
|
||||
@@ -21,89 +47,107 @@ class G4Tubs;
|
||||
class G4Box;
|
||||
class G4Sphere;
|
||||
class G4Tubs;
|
||||
|
||||
class G4Colour;
|
||||
class G4VPhysicalVolume;
|
||||
|
||||
|
||||
|
||||
class BrachyPhantomSD;
|
||||
class BrachyPhantomROGeometry;
|
||||
class G4VPhysicalVolume;
|
||||
class BrachyMaterial;
|
||||
class BrachyFactoryIr;
|
||||
class BrachyFactoryI;
|
||||
class BrachyFactoryLeipzig;
|
||||
class BrachyVoxelParameterisation;
|
||||
class BrachyDetectorConstruction : public G4VUserDetectorConstruction
|
||||
{
|
||||
public:
|
||||
BrachyDetectorConstruction(G4String&);
|
||||
~BrachyDetectorConstruction();
|
||||
BrachyDetectorConstruction(G4String&);
|
||||
~BrachyDetectorConstruction();
|
||||
|
||||
|
||||
private:
|
||||
G4double m_BoxDimX;
|
||||
G4double m_BoxDimY;
|
||||
G4double m_BoxDimZ;
|
||||
G4int NumVoxelX;
|
||||
G4int NumVoxelZ;
|
||||
G4double dimVoxel;
|
||||
G4String m_SDName;
|
||||
G4int* pVoxel;
|
||||
G4double m_BoxDimX;
|
||||
G4double m_BoxDimY;
|
||||
G4double m_BoxDimZ;
|
||||
G4int NumVoxelX;
|
||||
G4int NumVoxelZ;
|
||||
G4double dimVoxel;
|
||||
G4String m_SDName;
|
||||
G4int detectorChoice;
|
||||
G4double ExpHall_x ;
|
||||
G4double ExpHall_y ;
|
||||
G4double ExpHall_z ;
|
||||
|
||||
|
||||
BrachyPhantomSD* pPhantomSD;
|
||||
BrachyPhantomROGeometry* pPhantomROGeometry;
|
||||
|
||||
|
||||
BrachyFactoryLeipzig* factoryLeipzig;
|
||||
BrachyFactoryI* factoryI;
|
||||
BrachyFactoryIr* factoryIr;
|
||||
BrachyMaterial* pMat;
|
||||
|
||||
|
||||
public:
|
||||
void PrintDetectorParameters();
|
||||
void SetAbsorberMaterial(G4String);
|
||||
const G4double VoxelWidth_X() {return m_BoxDimX/NumVoxelX;};//num voxel
|
||||
const G4double VoxelWidth_Z() {return m_BoxDimZ/NumVoxelZ;};
|
||||
const G4int GetNumVoxelX(){return NumVoxelX;};
|
||||
const G4int GetNumVoxelZ(){return NumVoxelZ;};
|
||||
const G4double GetDimX(){return m_BoxDimX;};
|
||||
|
||||
const G4double GetBoxDim_Z() {return m_BoxDimZ;};
|
||||
|
||||
|
||||
|
||||
private:
|
||||
void PrintDetectorParameters();
|
||||
void SetAbsorberMaterial(G4String);
|
||||
|
||||
BrachyDetectorMessenger* detectorMessenger;
|
||||
const G4double VoxelWidth_X() {return m_BoxDimX/NumVoxelX;};//num voxel
|
||||
const G4double VoxelWidth_Z() {return m_BoxDimZ/NumVoxelZ;};
|
||||
const G4int GetNumVoxelX(){return NumVoxelX;};
|
||||
const G4int GetNumVoxelZ(){return NumVoxelZ;};
|
||||
const G4double GetDimX(){return m_BoxDimX;};
|
||||
|
||||
G4Box* ExpHall; //pointer to the solid World
|
||||
G4LogicalVolume* ExpHallLog; //pointer to the logical World
|
||||
G4VPhysicalVolume* ExpHallPhys; //pointer to the physical World
|
||||
const G4double GetBoxDim_Z() {return m_BoxDimZ;};
|
||||
|
||||
|
||||
G4Box* Phantom;
|
||||
G4LogicalVolume* PhantomLog;
|
||||
G4VPhysicalVolume* PhantomPhys;
|
||||
|
||||
|
||||
G4Tubs* Capsule ;
|
||||
G4LogicalVolume* CapsuleLog; //pointer to the logical World
|
||||
G4VPhysicalVolume* CapsulePhys;
|
||||
|
||||
G4Sphere* CapsuleTip;
|
||||
G4LogicalVolume* CapsuleTipLog;
|
||||
G4VPhysicalVolume* CapsuleTipPhys;
|
||||
|
||||
G4Tubs* IridiumCore;
|
||||
G4LogicalVolume* IridiumCoreLog;
|
||||
G4VPhysicalVolume* IridiumCorePhys;
|
||||
|
||||
G4Material* air;
|
||||
//G4Material* water;
|
||||
G4Material* CapsuleMat;
|
||||
G4Material* IridiumMat;
|
||||
G4Material* AbsorberMaterial;
|
||||
|
||||
G4VPhysicalVolume* Construct();
|
||||
void SwitchDetector();
|
||||
|
||||
private:
|
||||
|
||||
void DefineMaterials();
|
||||
void ComputeDimVoxel();
|
||||
|
||||
|
||||
BrachyDetectorMessenger* detectorMessenger;
|
||||
|
||||
G4Box* ExpHall; //pointer to the solid World
|
||||
G4LogicalVolume* ExpHallLog; //pointer to the logical World
|
||||
G4VPhysicalVolume* ExpHallPhys; //pointer to the physical World
|
||||
|
||||
G4Box* solidVoxel;
|
||||
G4LogicalVolume* logicVoxel;
|
||||
G4VPhysicalVolume* physiVoxel;
|
||||
|
||||
|
||||
G4Box* Phantom;
|
||||
G4LogicalVolume* PhantomLog;
|
||||
G4VPhysicalVolume* PhantomPhys;
|
||||
G4Box* Voxel;
|
||||
G4LogicalVolume* VoxelLog;
|
||||
G4VPhysicalVolume* VoxelPhys;
|
||||
|
||||
|
||||
G4Material* AbsorberMaterial;
|
||||
|
||||
|
||||
void ConstructPhantom();
|
||||
void ConstructSensitiveDetector();
|
||||
|
||||
private:
|
||||
G4VPhysicalVolume* Construct();
|
||||
|
||||
void ComputeDimVoxel();
|
||||
|
||||
|
||||
public:
|
||||
G4VPhysicalVolume* ConstructDetector();
|
||||
|
||||
|
||||
G4VPhysicalVolume* ConstructDetector();
|
||||
void SelectDetector(G4String val);
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
inline void BrachyDetectorConstruction::ComputeDimVoxel()
|
||||
{
|
||||
dimVoxel=m_BoxDimX/NumVoxelX;
|
||||
dimVoxel=m_BoxDimX/NumVoxelX;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -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: BrachyDetectorConstructionI.hh,v 1.2 2002/11/18 15:18:35 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ****************************************
|
||||
// * *
|
||||
// * BrachyDetectorConstructionI.hh *
|
||||
// * *
|
||||
// ****************************************
|
||||
//Management of the Iodium source
|
||||
|
||||
#ifndef BrachyDetectorConstructionI_H
|
||||
#define BrachyDetectorConstructionI_H 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VUserDetectorConstruction.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
|
||||
|
||||
class G4LogicalVolume;
|
||||
|
||||
class G4Tubs;
|
||||
class G4Box;
|
||||
class G4Sphere;
|
||||
class G4Tubs;
|
||||
class G4Colour;
|
||||
class G4VPhysicalVolume;
|
||||
class G4VPhysicalVolume;
|
||||
class BrachyMaterial;
|
||||
|
||||
class BrachyDetectorConstructionI
|
||||
{
|
||||
public:
|
||||
BrachyDetectorConstructionI();
|
||||
~BrachyDetectorConstructionI();
|
||||
|
||||
|
||||
private:
|
||||
G4VisAttributes* simpleMarkerVisAtt;
|
||||
G4VisAttributes* simpleIodiumVisAtt;
|
||||
|
||||
G4VisAttributes* simpleCapsuleVisAtt;
|
||||
G4VisAttributes* simpleCapsuleTipVisAtt;
|
||||
|
||||
public:
|
||||
|
||||
|
||||
void ConstructIodium(G4VPhysicalVolume*);
|
||||
private:
|
||||
G4Tubs* DefaultTub;
|
||||
G4LogicalVolume* DefaultTub_log;
|
||||
G4VPhysicalVolume*DefaultTub_Phys;
|
||||
|
||||
G4Tubs* Capsule ;
|
||||
G4LogicalVolume* CapsuleLog; //pointer to the logical World
|
||||
G4VPhysicalVolume* CapsulePhys;
|
||||
|
||||
G4Sphere* CapsuleTip;
|
||||
G4LogicalVolume* CapsuleTipLog;
|
||||
G4VPhysicalVolume* CapsuleTipPhys1;
|
||||
G4VPhysicalVolume* CapsuleTipPhys2;
|
||||
|
||||
G4Tubs* IodiumCore;
|
||||
G4LogicalVolume* ICoreLog;
|
||||
G4VPhysicalVolume* ICorePhys;
|
||||
|
||||
G4Tubs* Marker;
|
||||
G4LogicalVolume* MarkerLog;
|
||||
G4VPhysicalVolume* MarkerPhys;
|
||||
|
||||
BrachyMaterial* pMat;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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: BrachyDetectorConstructionIr.hh,v 1.2 2002/11/18 15:18:36 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ****************************************
|
||||
// * *
|
||||
// * BrachyDetectorConstructionIr.hh *
|
||||
// * *
|
||||
// ****************************************
|
||||
//
|
||||
//Management of the Iridium source
|
||||
//
|
||||
|
||||
#ifndef BrachyDetectorConstructionIr_H
|
||||
#define BrachyDetectorConstructionIr_H 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VUserDetectorConstruction.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
|
||||
|
||||
class G4LogicalVolume;
|
||||
|
||||
class G4Tubs;
|
||||
class G4Box;
|
||||
class G4Sphere;
|
||||
class G4Tubs;
|
||||
class G4Colour;
|
||||
class G4VPhysicalVolume;
|
||||
class G4VPhysicalVolume;
|
||||
class BrachyMaterial;
|
||||
|
||||
class BrachyDetectorConstructionIr
|
||||
{
|
||||
public:
|
||||
BrachyDetectorConstructionIr();
|
||||
~BrachyDetectorConstructionIr();
|
||||
|
||||
|
||||
private:
|
||||
|
||||
G4VisAttributes* simpleCapsuleVisAtt;
|
||||
G4VisAttributes* simpleCapsuleTipVisAtt;
|
||||
G4VisAttributes* simpleIridiumVisAtt;
|
||||
|
||||
|
||||
|
||||
public:
|
||||
|
||||
void CleanIridium();
|
||||
void ConstructIridium(G4VPhysicalVolume*);
|
||||
private:
|
||||
|
||||
G4Box* WaterBox;
|
||||
G4LogicalVolume* WaterBoxLog;
|
||||
G4VPhysicalVolume* WaterBoxPhys;
|
||||
|
||||
G4Tubs* Capsule ;
|
||||
G4LogicalVolume* CapsuleLog; //pointer to the logical World
|
||||
G4VPhysicalVolume* CapsulePhys;
|
||||
|
||||
G4Sphere* CapsuleTip;
|
||||
G4LogicalVolume* CapsuleTipLog;
|
||||
G4VPhysicalVolume* CapsuleTipPhys;
|
||||
|
||||
G4Tubs* IridiumCore;
|
||||
G4LogicalVolume* IridiumCoreLog;
|
||||
G4VPhysicalVolume* IridiumCorePhys;
|
||||
|
||||
|
||||
BrachyMaterial* pMat;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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: BrachyDetectorConstructionLeipzig.hh,v 1.2 2002/11/18 15:18:36 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// ************************************************
|
||||
// * *
|
||||
// * BrachyDetectorConstructionLeipzig.hh *
|
||||
// * *
|
||||
// ************************************************
|
||||
//
|
||||
//Management of Leipzig Applicator
|
||||
//
|
||||
#ifndef BrachyDetectorConstructionLeipzig_H
|
||||
#define BrachyDetectorConstructionLeipzig_H 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VUserDetectorConstruction.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
|
||||
|
||||
class G4LogicalVolume;
|
||||
|
||||
class G4Tubs;
|
||||
class G4Box;
|
||||
class G4Sphere;
|
||||
class G4Tubs;
|
||||
class G4Colour;
|
||||
class G4VPhysicalVolume;
|
||||
class G4VPhysicalVolume;
|
||||
class BrachyMaterial;
|
||||
|
||||
class BrachyDetectorConstructionLeipzig
|
||||
{
|
||||
public:
|
||||
BrachyDetectorConstructionLeipzig();
|
||||
~BrachyDetectorConstructionLeipzig();
|
||||
|
||||
|
||||
private:
|
||||
|
||||
G4VisAttributes* simpleCapsuleVisAtt;
|
||||
G4VisAttributes* simpleCapsuleTipVisAtt;
|
||||
public:
|
||||
|
||||
void ConstructLeipzig(G4VPhysicalVolume*);
|
||||
|
||||
private:G4Tubs* Capsule ;
|
||||
G4LogicalVolume* CapsuleLog; //pointer to the logical World
|
||||
G4VPhysicalVolume* CapsulePhys;
|
||||
|
||||
G4Sphere* CapsuleTip;
|
||||
G4LogicalVolume* CapsuleTipLog;
|
||||
G4VPhysicalVolume* CapsuleTipPhys;
|
||||
|
||||
G4Tubs* IridiumCore;
|
||||
G4LogicalVolume* IridiumCoreLog;
|
||||
G4VPhysicalVolume* IridiumCorePhys;
|
||||
|
||||
G4Tubs* Appl1;
|
||||
G4LogicalVolume* Appl1Log ;
|
||||
G4VPhysicalVolume* Appl1Phys;
|
||||
|
||||
G4Tubs* Appl2;
|
||||
G4LogicalVolume* Appl2Log ;
|
||||
G4VPhysicalVolume* Appl2Phys;
|
||||
|
||||
BrachyMaterial* pMat;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -21,8 +21,14 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: BrachyDetectorMessenger.hh,v 1.2 2002/06/18 22:24:22 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// *****************************************
|
||||
// * *
|
||||
// * BrachyDetectrorMessenger.hh *
|
||||
// * *
|
||||
// *****************************************
|
||||
//
|
||||
// $Id: BrachyDetectorMessenger.hh,v 1.4 2002/11/18 15:18:36 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -36,6 +42,8 @@
|
||||
#include "G4UImessenger.hh"
|
||||
|
||||
class BrachyDetectorConstruction;
|
||||
class BrachyFactoryIr;
|
||||
class BrachyRunAction;
|
||||
class G4UIdirectory;
|
||||
class G4UIcmdWithAString;
|
||||
class G4UIcmdWithAnInteger;
|
||||
@@ -46,19 +54,24 @@ class G4UIcmdWithoutParameter;
|
||||
|
||||
class BrachyDetectorMessenger: public G4UImessenger
|
||||
{
|
||||
public:
|
||||
BrachyDetectorMessenger(BrachyDetectorConstruction* );
|
||||
~BrachyDetectorMessenger();
|
||||
public:
|
||||
BrachyDetectorMessenger(BrachyDetectorConstruction* );
|
||||
~BrachyDetectorMessenger();
|
||||
|
||||
void SetNewValue(G4UIcommand*, G4String);
|
||||
|
||||
private:
|
||||
BrachyDetectorConstruction* Detector;
|
||||
|
||||
G4UIdirectory* detDir;
|
||||
G4UIcmdWithAString* AbsMaterCmd;
|
||||
|
||||
G4UIcmdWithoutParameter* UpdateCmd;
|
||||
void SetNewValue(G4UIcommand*, G4String);
|
||||
|
||||
private:
|
||||
|
||||
BrachyDetectorConstruction* Detector;
|
||||
G4UIcmdWithAString* selDetCmd;
|
||||
G4UIcmdWithAString* switchCmd;
|
||||
G4UIcmdWithAString* cleanCmd;
|
||||
G4UIdirectory* detDir;
|
||||
G4UIdirectory* mydetDir;
|
||||
G4UIcmdWithAString* AbsMaterCmd;
|
||||
G4int detectorChoice;
|
||||
G4int flag;
|
||||
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -36,16 +36,16 @@ class G4Step;
|
||||
|
||||
class BrachyDummySD : public G4VSensitiveDetector
|
||||
{
|
||||
public:
|
||||
BrachyDummySD();
|
||||
~BrachyDummySD() {};
|
||||
public:
|
||||
BrachyDummySD();
|
||||
~BrachyDummySD() {};
|
||||
|
||||
void Initialize(G4HCofThisEvent*HCE) {};
|
||||
G4bool ProcessHits(G4Step*aStep,G4TouchableHistory*ROhist) {return false;}
|
||||
void EndOfEvent(G4HCofThisEvent*HCE) {};
|
||||
void clear() {};
|
||||
void DrawAll() {};
|
||||
void PrintAll() {};
|
||||
void Initialize(G4HCofThisEvent*HCE) {};
|
||||
G4bool ProcessHits(G4Step*aStep,G4TouchableHistory*ROhist) {return false;}
|
||||
void EndOfEvent(G4HCofThisEvent*HCE) {};
|
||||
void clear() {};
|
||||
void DrawAll() {};
|
||||
void PrintAll() {};
|
||||
};
|
||||
|
||||
BrachyDummySD::BrachyDummySD() : G4VSensitiveDetector("dummySD")
|
||||
|
||||
@@ -20,6 +20,13 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: BrachyEventAction.hh,v 1.11 2002/11/18 15:18:36 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// Code developed by:
|
||||
// S.Guatelli
|
||||
//
|
||||
// **********************************
|
||||
// * *
|
||||
// * BrachyEventAction.hh *
|
||||
@@ -33,42 +40,42 @@
|
||||
#include "globals.hh"
|
||||
class BrachyDetectorConstruction;
|
||||
class BrachyAnalysisManager;
|
||||
class BrachyPrimaryGeneratorActionI;
|
||||
class BrachyPrimaryGeneratorActionIr;
|
||||
class BrachyEventAction : public G4UserEventAction
|
||||
{
|
||||
public:
|
||||
BrachyEventAction(G4String&);
|
||||
~BrachyEventAction();
|
||||
BrachyEventAction(G4String&);
|
||||
~BrachyEventAction();
|
||||
|
||||
public:
|
||||
void BeginOfEventAction(const G4Event*);
|
||||
void EndOfEventAction(const G4Event*);
|
||||
|
||||
|
||||
|
||||
void BeginOfEventAction(const G4Event*);
|
||||
void EndOfEventAction(const G4Event*);
|
||||
|
||||
private:
|
||||
G4double EnergyDep;
|
||||
G4int m_NumVoxelX;
|
||||
G4int m_NumVoxelZ;
|
||||
|
||||
BrachyDetectorConstruction *pDetector;
|
||||
G4double VoxelWidth_Z;
|
||||
G4double VoxelWidth_X;
|
||||
|
||||
G4double EnergyDep;
|
||||
G4int m_NumVoxelX;
|
||||
G4int m_NumVoxelZ;
|
||||
|
||||
G4double VoxelWidth_Z;
|
||||
G4double VoxelWidth_X;
|
||||
|
||||
private:
|
||||
G4int m_HitsCollectionID;
|
||||
G4String drawFlag;
|
||||
G4int j;
|
||||
G4int i;
|
||||
G4int k;
|
||||
G4double x;
|
||||
G4double z;
|
||||
G4String SDname;
|
||||
G4int printModulo;
|
||||
|
||||
G4int m_HitsCollectionID;
|
||||
G4String drawFlag;
|
||||
G4int j;
|
||||
G4int i;
|
||||
G4int k;
|
||||
G4double x;
|
||||
G4double z;
|
||||
G4double y;
|
||||
G4String SDname;
|
||||
G4int printModulo;
|
||||
BrachyDetectorConstruction* pDetector;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+38
-17
@@ -21,29 +21,50 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: B08PrimaryGeneratorAction.hh,v 1.1 2002/06/04 11:14:52 dressel Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: BrachyFactory.hh,v 1.2 2002/11/18 15:18:36 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// **********************************
|
||||
// * *
|
||||
// * BrachyFactory.hh *
|
||||
// * *
|
||||
// **********************************
|
||||
//
|
||||
// this is the abstract class which manages the sources
|
||||
|
||||
#ifndef B08PrimaryGeneratorAction_hh
|
||||
#define B08PrimaryGeneratorAction_hh B08PrimaryGeneratorAction_hh
|
||||
|
||||
#ifndef BrachyFactory_h
|
||||
#define BrachyFactory_h 1
|
||||
#include "G4VUserPrimaryGeneratorAction.hh"
|
||||
|
||||
#include "G4RadioactiveDecay.hh"
|
||||
class G4ParticleGun;
|
||||
class G4Run;
|
||||
class G4Event;
|
||||
class BrachyAnalysisManager;
|
||||
|
||||
class B08PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
|
||||
class BrachyFactory
|
||||
{
|
||||
public:
|
||||
B08PrimaryGeneratorAction();
|
||||
~B08PrimaryGeneratorAction();
|
||||
|
||||
public:
|
||||
void GeneratePrimaries(G4Event* anEvent);
|
||||
|
||||
private:
|
||||
G4ParticleGun* particleGun;
|
||||
public:
|
||||
BrachyFactory();
|
||||
virtual ~BrachyFactory();
|
||||
virtual G4VUserPrimaryGeneratorAction* CreatePrimaryGeneratorAction()=0;
|
||||
virtual void CreateSource(G4VPhysicalVolume*)=0;
|
||||
virtual void CleanSource()=0;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+25
-18
@@ -20,30 +20,37 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: BrachyFactoryI.hh,v 1.3 2002/12/13 09:25:32 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// $Id: B07PrimaryGeneratorAction.hh,v 1.2 2002/04/19 10:54:34 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
|
||||
#ifndef B07PrimaryGeneratorAction_hh
|
||||
#define B07PrimaryGeneratorAction_hh B07PrimaryGeneratorAction_hh
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
#ifndef BrachyFactoryI_h
|
||||
#define BrachyFactoryI_h 1
|
||||
|
||||
#include "G4VUserPrimaryGeneratorAction.hh"
|
||||
|
||||
#include "G4RadioactiveDecay.hh"
|
||||
#include"BrachyDetectorConstructionI.hh"
|
||||
#include"BrachyFactory.hh"
|
||||
#include "G4RunManager.hh"
|
||||
class G4ParticleGun;
|
||||
class G4Run;
|
||||
class G4Event;
|
||||
|
||||
class B07PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
|
||||
class BrachyAnalysisManager;
|
||||
class BrachyFactory;
|
||||
class BrachyPrimaryGeneratorActionI;
|
||||
class BrachyDetectorConstructionI;
|
||||
class BrachyFactoryI:public BrachyFactory
|
||||
{
|
||||
public:
|
||||
B07PrimaryGeneratorAction();
|
||||
~B07PrimaryGeneratorAction();
|
||||
public:
|
||||
BrachyFactoryI();
|
||||
~BrachyFactoryI();
|
||||
G4VUserPrimaryGeneratorAction* CreatePrimaryGeneratorAction();
|
||||
void CreateSource(G4VPhysicalVolume*);
|
||||
void CleanSource();
|
||||
private:
|
||||
BrachyDetectorConstructionI* pIodio;
|
||||
|
||||
|
||||
public:
|
||||
void GeneratePrimaries(G4Event* anEvent);
|
||||
|
||||
private:
|
||||
G4ParticleGun* particleGun;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,60 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: BrachyFactoryIr.hh,v 1.2 2002/11/18 15:18:36 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// **********************************
|
||||
// * *
|
||||
// * BrachyFactoryIr.hh *
|
||||
// * *
|
||||
// **********************************
|
||||
//
|
||||
//
|
||||
//
|
||||
#ifndef BrachyFactoryIr_h
|
||||
#define BrachyFactoryIr_h 1
|
||||
#include "G4VUserPrimaryGeneratorAction.hh"
|
||||
#include "G4RadioactiveDecay.hh"
|
||||
#include"BrachyFactory.hh"
|
||||
#include "G4RunManager.hh"
|
||||
class G4ParticleGun;
|
||||
class G4Run;
|
||||
class G4Event;
|
||||
class BrachyAnalysisManager;
|
||||
class BrachyFactory;
|
||||
class BrachyPrimaryGeneratorActionIr;
|
||||
class BrachyDetectorConstructionIr;
|
||||
|
||||
class BrachyFactoryIr:public BrachyFactory
|
||||
{
|
||||
public:
|
||||
BrachyFactoryIr();
|
||||
~BrachyFactoryIr();
|
||||
G4VUserPrimaryGeneratorAction* CreatePrimaryGeneratorAction();
|
||||
void CreateSource(G4VPhysicalVolume*);
|
||||
void CleanSource();
|
||||
private:
|
||||
BrachyDetectorConstructionIr* pIridio;
|
||||
};
|
||||
#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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: BrachyFactoryLeipzig.hh,v 1.2 2002/11/18 15:18:36 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// **********************************
|
||||
// * *
|
||||
// * BrachyFactoryLeipzig.hh *
|
||||
// * *
|
||||
// **********************************
|
||||
//
|
||||
//
|
||||
#ifndef BrachyFactoryLeipzig_h
|
||||
#define BrachyFactoryLeipzig_h 1
|
||||
#include "G4VUserPrimaryGeneratorAction.hh"
|
||||
#include "G4RadioactiveDecay.hh"
|
||||
#include"BrachyFactory.hh"
|
||||
#include "G4RunManager.hh"
|
||||
class G4ParticleGun;
|
||||
class G4Run;
|
||||
class G4Event;
|
||||
class BrachyAnalysisManager;
|
||||
class BrachyFactory;
|
||||
class BrachyPrimaryGeneratorActionIr;
|
||||
class BrachyDetectorConstructionLeipzig;
|
||||
|
||||
class BrachyFactoryLeipzig:public BrachyFactory
|
||||
{
|
||||
public:
|
||||
BrachyFactoryLeipzig();
|
||||
~BrachyFactoryLeipzig();
|
||||
G4VUserPrimaryGeneratorAction* CreatePrimaryGeneratorAction();
|
||||
void CreateSource(G4VPhysicalVolume*);
|
||||
void CleanSource();
|
||||
private:
|
||||
BrachyDetectorConstructionLeipzig* pLeipzig;
|
||||
};
|
||||
#endif
|
||||
+22
-21
@@ -21,32 +21,33 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: B06ScorePrinter.hh,v 1.4 2002/04/19 10:54:31 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: BrachyMaterial.hh,v 1.2 2002/11/18 15:18:36 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
|
||||
#ifndef B06ScorePrinter_hh
|
||||
#define B06ScorePrinter_hh B06ScorePrinter_hh
|
||||
|
||||
#include "g4std/iostream"
|
||||
#include "g4std/iomanip"
|
||||
|
||||
// **********************************
|
||||
// * *
|
||||
// * BrachyMaterial.hh *
|
||||
// * *
|
||||
// **********************************
|
||||
//This class manages the elments and materials nedded by the simulation
|
||||
// set-up
|
||||
//
|
||||
#ifndef BrachyMaterial_H
|
||||
#define BrachyMaterial_H 1
|
||||
#include "globals.hh"
|
||||
#include "G4PMapPtkTallys.hh"
|
||||
class G4Material;
|
||||
|
||||
|
||||
class BrachyMaterial
|
||||
{ public:
|
||||
BrachyMaterial();
|
||||
~ BrachyMaterial();
|
||||
|
||||
class B06ScorePrinter
|
||||
{
|
||||
public:
|
||||
B06ScorePrinter();
|
||||
~B06ScorePrinter(){}
|
||||
void PrintHeader(G4std::ostream *out);
|
||||
void PrintTable(const G4PMapPtkTallys &aMapPtkTallys, G4std::ostream *out);
|
||||
G4std::string FillString(const G4std::string &name,
|
||||
char c, G4int n, G4bool back = true);
|
||||
private:
|
||||
G4int FieldName;
|
||||
G4int FieldValue;
|
||||
void DefineMaterials();
|
||||
|
||||
public:
|
||||
G4Material* GetMat(G4String);
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -20,11 +20,17 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: BrachyPhantomHit.hh,v 1.4 2002/11/18 15:18:36 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
// ********************************
|
||||
// * *
|
||||
// * BrachyPhantomHit.hh *
|
||||
// * *
|
||||
// ********************************
|
||||
// It manages the hits
|
||||
|
||||
#ifndef BrachyPhantomHit_h
|
||||
#define BrachyPhantomHit_h 1
|
||||
@@ -39,52 +45,56 @@
|
||||
|
||||
class BrachyPhantomHit : public G4VHit
|
||||
{
|
||||
public:
|
||||
BrachyPhantomHit(G4LogicalVolume* logVol,G4int XID,G4int ZID);
|
||||
~BrachyPhantomHit();
|
||||
BrachyPhantomHit(const BrachyPhantomHit &right);
|
||||
const BrachyPhantomHit& operator=(const BrachyPhantomHit &right);
|
||||
int operator==(const BrachyPhantomHit &right) const;
|
||||
public:
|
||||
BrachyPhantomHit(G4LogicalVolume* ,G4int ,G4int ,G4int );
|
||||
~BrachyPhantomHit();
|
||||
BrachyPhantomHit(const BrachyPhantomHit &right);
|
||||
const BrachyPhantomHit& operator=(const BrachyPhantomHit &right);
|
||||
int operator==(const BrachyPhantomHit &right) const;
|
||||
|
||||
inline void *operator new(size_t);
|
||||
inline void operator delete(void *aHit);
|
||||
inline void *operator new(size_t);
|
||||
inline void operator delete(void *aHit);
|
||||
|
||||
void Draw();
|
||||
void Print();
|
||||
void Draw();
|
||||
void Print();
|
||||
|
||||
private:
|
||||
G4ThreeVector m_Pos;
|
||||
G4RotationMatrix m_Rot;
|
||||
const G4LogicalVolume* m_pLogV;
|
||||
private:
|
||||
G4ThreeVector m_Pos;
|
||||
G4RotationMatrix m_Rot;
|
||||
const G4LogicalVolume* m_pLogV;
|
||||
|
||||
G4double m_Edep;
|
||||
G4double m_Edep;
|
||||
|
||||
G4int m_XID;
|
||||
G4int m_ZID;
|
||||
|
||||
public:
|
||||
inline void SetCellID(G4int XID,G4int ZID)
|
||||
{m_XID = XID;m_ZID = ZID;}
|
||||
inline G4int GetXID()
|
||||
{return m_XID;}
|
||||
inline G4int GetZID()
|
||||
{return m_ZID;}
|
||||
inline void SetEdep(G4double edep)
|
||||
{m_Edep = edep;}
|
||||
inline void AddEdep(G4double edep)
|
||||
{m_Edep += edep;}
|
||||
inline G4double GetEdep()
|
||||
{return m_Edep;}
|
||||
inline void SetPos(G4ThreeVector xyz)
|
||||
{m_Pos = xyz;}
|
||||
inline G4ThreeVector GetPos()
|
||||
{return m_Pos;}
|
||||
inline void SetRot(G4RotationMatrix rmat)
|
||||
{m_Rot = rmat;}
|
||||
inline G4RotationMatrix GetRot()
|
||||
{return m_Rot;}
|
||||
inline const G4LogicalVolume * GetLogV()
|
||||
{return m_pLogV;}
|
||||
G4int m_XID;
|
||||
G4int m_ZID;
|
||||
G4int m_YID;
|
||||
public:
|
||||
inline void SetCellID(G4int XID,G4int YID,G4int ZID)
|
||||
{m_XID = XID;m_ZID = ZID; m_YID = YID; }
|
||||
inline G4int GetXID()
|
||||
{return m_XID;}
|
||||
inline G4int GetZID()
|
||||
{return m_ZID;}
|
||||
|
||||
inline G4int GetYID()
|
||||
{return m_YID;}
|
||||
|
||||
inline void SetEdep(G4double edep)
|
||||
{m_Edep = edep;}
|
||||
inline void AddEdep(G4double edep)
|
||||
{m_Edep += edep;}
|
||||
inline G4double GetEdep()
|
||||
{return m_Edep;}
|
||||
inline void SetPos(G4ThreeVector xyz)
|
||||
{m_Pos = xyz;}
|
||||
inline G4ThreeVector GetPos()
|
||||
{return m_Pos;}
|
||||
inline void SetRot(G4RotationMatrix rmat)
|
||||
{m_Rot = rmat;}
|
||||
inline G4RotationMatrix GetRot()
|
||||
{return m_Rot;}
|
||||
inline const G4LogicalVolume * GetLogV()
|
||||
{return m_pLogV;}
|
||||
};
|
||||
|
||||
typedef G4THitsCollection<BrachyPhantomHit> BrachyPhantomHitsCollection;
|
||||
@@ -92,14 +102,14 @@ extern G4Allocator<BrachyPhantomHit> BrachyPhantomHitAllocator;
|
||||
|
||||
inline void* BrachyPhantomHit::operator new(size_t)
|
||||
{
|
||||
void *aHit;
|
||||
aHit = (void *) BrachyPhantomHitAllocator.MallocSingle();
|
||||
return aHit;
|
||||
void *aHit;
|
||||
aHit = (void *) BrachyPhantomHitAllocator.MallocSingle();
|
||||
return aHit;
|
||||
}
|
||||
|
||||
inline void BrachyPhantomHit::operator delete(void *aHit)
|
||||
{
|
||||
BrachyPhantomHitAllocator.FreeSingle((BrachyPhantomHit*) aHit);
|
||||
BrachyPhantomHitAllocator.FreeSingle((BrachyPhantomHit*) aHit);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -20,13 +20,18 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: BrachyPhantomROGeometry.hh,v 1.3 2002/11/18 15:18:36 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ************************************
|
||||
// * *
|
||||
// * BrachyWaterBoxROGeometry.hh *
|
||||
// * BrachyPhantomROGeometry.hh *
|
||||
// * *
|
||||
// ************************************
|
||||
|
||||
|
||||
//
|
||||
//The phantom is devided in voxels. the dimension of the voxel is 1mm
|
||||
//
|
||||
#ifndef BrachyPhantomROGeometry_h
|
||||
#define BrachyPhantomROGeometry_h
|
||||
|
||||
@@ -34,18 +39,18 @@
|
||||
|
||||
class BrachyPhantomROGeometry : public G4VReadOutGeometry
|
||||
{
|
||||
public:
|
||||
BrachyPhantomROGeometry(G4String aString,G4double DetDimX,G4double DetDimZ,G4int NumVoxelX,G4int NumVoxelZ);
|
||||
~BrachyPhantomROGeometry();
|
||||
public:
|
||||
BrachyPhantomROGeometry(G4String aString,G4double DetDimX,G4double DetDimZ,G4int NumVoxelX,G4int NumVoxelZ);
|
||||
~BrachyPhantomROGeometry();
|
||||
|
||||
private:
|
||||
const G4double m_DetDimX;
|
||||
const G4double m_DetDimZ;
|
||||
const G4int m_NumVoxelX;
|
||||
const G4int m_NumVoxelZ;
|
||||
private:
|
||||
const G4double m_DetDimX;
|
||||
const G4double m_DetDimZ;
|
||||
const G4int m_NumVoxelX;
|
||||
const G4int m_NumVoxelZ;
|
||||
|
||||
private:
|
||||
G4VPhysicalVolume* Build();
|
||||
private:
|
||||
G4VPhysicalVolume* Build();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -20,14 +20,18 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: BrachyPhantomSD.hh,v 1.3 2002/11/18 15:18:36 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ********************************
|
||||
// * *
|
||||
// * BrachyWaterBoxSD.hh *
|
||||
// * BrachyPhantomSD.hh *
|
||||
// * *
|
||||
// ********************************
|
||||
|
||||
#ifndef BrachyPhantomSD_h
|
||||
#define BrachyPHANTOMSD_h 1
|
||||
#define BrachyPhantomSD_h 1
|
||||
|
||||
#include "G4VSensitiveDetector.hh"
|
||||
#include "BrachyPhantomHit.hh"
|
||||
@@ -38,22 +42,23 @@ class G4TouchableHistory;
|
||||
|
||||
class BrachyPhantomSD : public G4VSensitiveDetector
|
||||
{
|
||||
public:
|
||||
BrachyPhantomSD(G4String name, G4int NumVoxelX, G4int NumVoxelZ);
|
||||
~BrachyPhantomSD();
|
||||
public:
|
||||
BrachyPhantomSD(G4String name, G4int NumVoxelX, G4int NumVoxelZ);
|
||||
~BrachyPhantomSD();
|
||||
|
||||
void Initialize(G4HCofThisEvent*HCE);
|
||||
G4bool ProcessHits(G4Step*aStep,G4TouchableHistory*ROhist);
|
||||
void EndOfEvent(G4HCofThisEvent*HCE);
|
||||
void clear();
|
||||
void DrawAll();
|
||||
void PrintAll();
|
||||
private:
|
||||
BrachyPhantomHitsCollection *m_pPhantomHitsCollection;
|
||||
void Initialize(G4HCofThisEvent*HCE);
|
||||
G4bool ProcessHits(G4Step*aStep,G4TouchableHistory*ROhist);
|
||||
void EndOfEvent(G4HCofThisEvent*HCE);
|
||||
void clear();
|
||||
void DrawAll();
|
||||
void PrintAll();
|
||||
private:
|
||||
BrachyPhantomHitsCollection *m_pPhantomHitsCollection;
|
||||
|
||||
const G4int m_NumVoxelX;
|
||||
const G4int m_NumVoxelZ;
|
||||
G4int *m_pVoxelID;
|
||||
const G4int m_NumVoxelX;
|
||||
const G4int m_NumVoxelZ;
|
||||
G4int *m_pVoxelID;
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -20,6 +20,10 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: BrachyPhysicsList.hh,v 1.6 2002/11/18 15:18:36 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// **********************************
|
||||
// * *
|
||||
// * BrachyPhysicsList.hh *
|
||||
@@ -40,46 +44,46 @@ class G4LowEnergyBremsstrahlung;
|
||||
|
||||
class BrachyPhysicsList: public G4VUserPhysicsList
|
||||
{
|
||||
public:
|
||||
BrachyPhysicsList();
|
||||
~BrachyPhysicsList();
|
||||
public:
|
||||
BrachyPhysicsList();
|
||||
~BrachyPhysicsList();
|
||||
|
||||
protected:
|
||||
// Construct particle and physics
|
||||
void ConstructParticle();
|
||||
void ConstructProcess();
|
||||
protected:
|
||||
// Construct particle and physics
|
||||
void ConstructParticle();
|
||||
void ConstructProcess();
|
||||
|
||||
void SetCuts();
|
||||
void SetCuts();
|
||||
|
||||
public:
|
||||
// Set Cuts
|
||||
void SetGammaCut(G4double);
|
||||
void SetElectronCut(G4double);
|
||||
void SetPositronCut(G4double);
|
||||
public:
|
||||
// Set Cuts
|
||||
void SetGammaCut(G4double);
|
||||
void SetElectronCut(G4double);
|
||||
void SetPositronCut(G4double);
|
||||
|
||||
void SetGammaLowLimit(G4double);
|
||||
void SetElectronLowLimit(G4double);
|
||||
void SetGELowLimit(G4double);
|
||||
void SetLowEnSecPhotCut(G4double);
|
||||
void SetLowEnSecElecCut(G4double);
|
||||
void SetGammaLowLimit(G4double);
|
||||
void SetElectronLowLimit(G4double);
|
||||
void SetGELowLimit(G4double);
|
||||
void SetLowEnSecPhotCut(G4double);
|
||||
void SetLowEnSecElecCut(G4double);
|
||||
|
||||
private:
|
||||
private:
|
||||
|
||||
G4double cutForGamma;
|
||||
G4double cutForElectron;
|
||||
G4double cutForPositron;
|
||||
G4double cutForGamma;
|
||||
G4double cutForElectron;
|
||||
G4double cutForPositron;
|
||||
|
||||
protected:
|
||||
// these methods Construct particles
|
||||
void ConstructBosons();
|
||||
void ConstructLeptons();
|
||||
protected:
|
||||
// these methods Construct particles
|
||||
void ConstructBosons();
|
||||
void ConstructLeptons();
|
||||
|
||||
protected:
|
||||
protected:
|
||||
// these methods Construct physics processes and register them
|
||||
void ConstructGeneral();
|
||||
void ConstructEM();
|
||||
void ConstructGeneral();
|
||||
void ConstructEM();
|
||||
|
||||
private:
|
||||
private:
|
||||
G4LowEnergyIonisation* loweIon;
|
||||
G4LowEnergyPhotoElectric* lowePhot;
|
||||
G4LowEnergyBremsstrahlung* loweBrem;
|
||||
|
||||
@@ -1,3 +1,29 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: BrachyPrimaryGeneratorAction.hh,v 1.8 2002/11/18 15:18:36 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ********************************************
|
||||
// * *
|
||||
// * BrachyPrimaryGeneratorAction.hh *
|
||||
@@ -15,25 +41,18 @@ class G4ParticleGun;
|
||||
class G4Run;
|
||||
class G4Event;
|
||||
class BrachyAnalysisManager;
|
||||
|
||||
class BrachyPrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
|
||||
{
|
||||
public:
|
||||
BrachyPrimaryGeneratorAction();
|
||||
~BrachyPrimaryGeneratorAction();
|
||||
public:
|
||||
BrachyPrimaryGeneratorAction();
|
||||
~BrachyPrimaryGeneratorAction();
|
||||
|
||||
public:
|
||||
void GeneratePrimaries(G4Event* anEvent);
|
||||
public:
|
||||
virtual void GeneratePrimaries(G4Event* anEvent)=0;
|
||||
|
||||
|
||||
private:
|
||||
G4ParticleGun* m_pParticleGun;
|
||||
|
||||
|
||||
G4RadioactiveDecay *m_pRadioactiveDecay;
|
||||
G4double Energy;
|
||||
|
||||
// BrachyPrimaryGeneratorMessenger* gunMessenger;
|
||||
G4std::vector<G4double> vettore;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: BrachyPrimaryGeneratorActionI.hh,v 1.2 2002/11/18 15:18:37 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
//
|
||||
// ********************************************
|
||||
// * *
|
||||
// * BrachyPrimaryGeneratorActionI.hh *
|
||||
// * *
|
||||
// ********************************************
|
||||
//Primary particles of the Iodium source. They are delivered from a random
|
||||
//point of the radionuclide with random direction. The energy spectrum
|
||||
// of the gamma delivered is activated
|
||||
|
||||
#ifndef BrachyPrimaryGeneratorActionI_h
|
||||
#define BrachyPrimaryGeneratorActionI_h 1
|
||||
|
||||
#include "G4VUserPrimaryGeneratorAction.hh"
|
||||
#include "G4RadioactiveDecay.hh"
|
||||
#include "BrachyPrimaryGeneratorAction.hh"
|
||||
class G4ParticleGun;
|
||||
class G4Run;
|
||||
class G4Event;
|
||||
class BrachyAnalysisManager;
|
||||
class BrachyPrimaryGeneratorAction;
|
||||
//class BrachyPrimaryGeneratorMessenger;
|
||||
class BrachyPrimaryGeneratorActionI : public G4VUserPrimaryGeneratorAction
|
||||
{
|
||||
public:
|
||||
BrachyPrimaryGeneratorActionI();
|
||||
~BrachyPrimaryGeneratorActionI();
|
||||
|
||||
public:
|
||||
void GeneratePrimaries(G4Event* anEvent);
|
||||
|
||||
G4double GetEnergy();
|
||||
private:
|
||||
G4ParticleGun* m_pParticleGun;
|
||||
|
||||
G4RadioactiveDecay *m_pRadioactiveDecay;
|
||||
G4double Energy;
|
||||
|
||||
// BrachyPrimaryGeneratorMessenger* gunMessenger;
|
||||
G4std::vector<G4double> vettore;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,131 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: BrachyPrimaryGeneratorActionIr.hh,v 1.2 2002/11/18 15:18:37 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// *************************************************
|
||||
// * *
|
||||
// * BrachyPrimaryGeneratorActionIr.hh" *
|
||||
// * *
|
||||
// *************************************************
|
||||
//
|
||||
//
|
||||
//Primary particles of the Iridium source. They are delivered from a random
|
||||
//point of the radionuclide with random direction.
|
||||
|
||||
#ifndef BrachyPrimaryGeneratorActionIr_h
|
||||
#define BrachyPrimaryGeneratorActionIr_h 1
|
||||
|
||||
#include "G4VUserPrimaryGeneratorAction.hh"
|
||||
#include "G4RadioactiveDecay.hh"
|
||||
#include "BrachyPrimaryGeneratorAction.hh"
|
||||
|
||||
class G4ParticleGun;
|
||||
class G4Run;
|
||||
class G4Event;
|
||||
class BrachyAnalysisManager;
|
||||
class BrachyPrimaryGeneratorAction;
|
||||
class BrachyPrimaryGeneratorActionIr: public G4VUserPrimaryGeneratorAction
|
||||
{
|
||||
public:
|
||||
BrachyPrimaryGeneratorActionIr();
|
||||
~BrachyPrimaryGeneratorActionIr();
|
||||
|
||||
public:
|
||||
void GeneratePrimaries(G4Event* anEvent);
|
||||
G4double GetEnergy(){return Energy;};
|
||||
|
||||
private:
|
||||
// G4ParticleGun* m_pParticleGun;
|
||||
G4ParticleGun* m_pParticleGun;
|
||||
//G4RadioactiveDecay *m_pRadioactiveDecay;
|
||||
G4double Energy;
|
||||
G4RadioactiveDecay *m_pRadioactiveDecay;
|
||||
// BrachyPrimaryGeneratorMessenger* gunMessenger;
|
||||
G4std::vector<G4double> vettore;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,28 +1,76 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: BrachyRunAction.hh,v 1.6 2002/11/18 15:18:37 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
//
|
||||
// ********************************************
|
||||
// * *
|
||||
// * BrachyRunAction.hh *
|
||||
// * *
|
||||
// ********************************************
|
||||
//
|
||||
#ifndef BrachyRunAction_h
|
||||
#define BrachyRunAction_h 1
|
||||
|
||||
#include "G4UserRunAction.hh"
|
||||
#include "G4RunManager.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
|
||||
class G4Run;
|
||||
class BrachyAnalysisManager;
|
||||
class BrachyDetectorConstruction;
|
||||
class BrachyRunMessenger;
|
||||
|
||||
class BrachyFactory;
|
||||
class BrachyFactoryIr;
|
||||
class BrachyFactoryI;
|
||||
class BrachyRunAction : public G4UserRunAction
|
||||
{
|
||||
public:
|
||||
BrachyRunAction( );
|
||||
~BrachyRunAction();
|
||||
public:
|
||||
BrachyRunAction(G4String& );
|
||||
~BrachyRunAction();
|
||||
|
||||
public:
|
||||
void BeginOfRunAction(const G4Run*);
|
||||
void EndOfRunAction(const G4Run* );
|
||||
private:
|
||||
|
||||
G4String SDname;
|
||||
public:
|
||||
void BeginOfRunAction(const G4Run*);
|
||||
void EndOfRunAction(const G4Run* );
|
||||
void SelectEnergy(G4int);
|
||||
private:
|
||||
|
||||
G4String SDname;
|
||||
BrachyFactory *factory;
|
||||
G4VUserDetectorConstruction* pDetector;
|
||||
BrachyDetectorConstruction* pDet;
|
||||
|
||||
G4int a;
|
||||
BrachyRunMessenger* pRun;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
+45
-42
@@ -21,57 +21,60 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: B08ImportanceMessenger.hh,v 1.1 2002/06/04 11:14:51 dressel Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: BrachyRunMessenger.hh,v 1.2 2002/11/18 15:18:37 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
// ********************************************
|
||||
// * *
|
||||
// * BrachyRunMessenger.hh *
|
||||
// * *
|
||||
// ********************************************
|
||||
// This class permits to switch the energy of the gamma delivered from the
|
||||
//radionuclides (Iodium/Iridium)
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#ifndef B08ImportanceMessenger_hh
|
||||
#define B08ImportanceMessenger_hh B08ImportanceMessenger_hh
|
||||
#ifndef BrachyRunMessenger_h
|
||||
#define BrachyRunMessenger_h 1
|
||||
|
||||
#include "G4UImessenger.hh"
|
||||
#include "globals.hh"
|
||||
#include "g4std/map"
|
||||
#include "G4UImessenger.hh"
|
||||
|
||||
class G4VIStore;
|
||||
class BrachyRunAction;
|
||||
class BrachyFactoryIr;
|
||||
class BrachyRunAction;
|
||||
class G4UIdirectory;
|
||||
class G4UIcmdWithAString;
|
||||
class G4UIcmdWithAnInteger;
|
||||
class G4UIcmdWithADouble;
|
||||
class G4UIcommand;
|
||||
class G4VPhysicalVolume;
|
||||
class G4UIcmdWithADoubleAndUnit;
|
||||
class G4UIcmdWithoutParameter;
|
||||
|
||||
class B08BaseExp {
|
||||
public:
|
||||
B08BaseExp(G4double b = 1, G4double e = 1) : fBase(b), fExp(e){}
|
||||
void SetBase(G4double b){fBase = b;}
|
||||
void SetExponent(G4double e){fExp = e;}
|
||||
G4double GetImportance() const {return pow(fBase, fExp);}
|
||||
private:
|
||||
G4double fBase;
|
||||
G4double fExp;
|
||||
};
|
||||
|
||||
class B08ImportanceMessenger: public G4UImessenger{
|
||||
public:
|
||||
B08ImportanceMessenger(G4VIStore &istore);
|
||||
~B08ImportanceMessenger(){}
|
||||
void SetNewValue(G4UIcommand* pCmd,G4String szValue);
|
||||
void AddCell(const G4String &cellname, G4VPhysicalVolume *p);
|
||||
void SetImportanceBase(const G4String &cellname, G4double base);
|
||||
void SetImportanceExponent(const G4String &cellname, G4double exp);
|
||||
|
||||
typedef G4std::map<G4UIcmdWithADouble *, G4VPhysicalVolume *> B08BaseMap;
|
||||
typedef G4std::map<G4UIcmdWithADouble *, G4VPhysicalVolume *> B08ExpMap;
|
||||
typedef G4std::map<G4VPhysicalVolume *, B08BaseExp> B08BaseExpMap;
|
||||
typedef G4std::map<G4String, G4VPhysicalVolume *> B08CellVolMap;
|
||||
|
||||
private:
|
||||
G4VIStore &fIStore;
|
||||
|
||||
B08BaseMap fBaseMap;
|
||||
B08ExpMap fExpMap;
|
||||
B08BaseExpMap fBaseExpMap;
|
||||
B08CellVolMap fCellVolMap;
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
class BrachyRunMessenger: public G4UImessenger
|
||||
{
|
||||
public:
|
||||
BrachyRunMessenger(BrachyRunAction* );
|
||||
~BrachyRunMessenger();
|
||||
|
||||
void SetNewValue(G4UIcommand*, G4String);
|
||||
|
||||
private:
|
||||
|
||||
BrachyRunAction* pRun;
|
||||
G4UIcmdWithAString* selDetCmd;
|
||||
|
||||
G4UIdirectory* detDir;
|
||||
G4UIdirectory* mydetDir;
|
||||
|
||||
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,4 +1,39 @@
|
||||
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: BrachyVisManager.hh,v 1.4 2002/11/18 15:18:37 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
//
|
||||
// ********************************************
|
||||
// * *
|
||||
// * BrachyVisManager.hh *
|
||||
// * *
|
||||
// ********************************************
|
||||
//
|
||||
//This class permits the visualisation of the experimerimental set up
|
||||
//
|
||||
#ifndef BrachyVisManager_h
|
||||
#define BrachyVisManager_h 1
|
||||
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
#/vis/open OGLIX
|
||||
/vis/open DAWNFILE
|
||||
/vis/viewer/flush
|
||||
|
||||
|
||||
#
|
||||
# draw scene/
|
||||
#
|
||||
|
||||
@@ -1,5 +1,38 @@
|
||||
|
||||
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
// ********************************************************************
|
||||
// Code developed by:
|
||||
// S.Guatelli
|
||||
//
|
||||
// *******************************
|
||||
// * *
|
||||
// * BrachyAnalysisManager.cc *
|
||||
// * *
|
||||
// *******************************
|
||||
//
|
||||
// $Id: BrachyAnalysisManager.cc,v 1.9 2002/12/12 19:16:18 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
#ifdef G4ANALYSIS_USE
|
||||
#include <stdlib.h>
|
||||
#include "g4std/fstream"
|
||||
#include "BrachyAnalysisManager.hh"
|
||||
@@ -25,20 +58,19 @@ BrachyAnalysisManager::BrachyAnalysisManager() :
|
||||
|
||||
{
|
||||
//build up the factories
|
||||
aFact = AIDA_createAnalysisFactory();
|
||||
aFact = AIDA_createAnalysisFactory();
|
||||
|
||||
ITreeFactory * treeFact = aFact->createTreeFactory();
|
||||
AIDA::ITreeFactory *treeFact = aFact->createTreeFactory();
|
||||
|
||||
|
||||
|
||||
//parameters for the TreeFactory
|
||||
bool fileExists = false;
|
||||
bool readOnly = false;
|
||||
std::string fileName="Brachy3.hbk";
|
||||
theTree = treeFact->create(fileName, readOnly, fileExists, "hbook");
|
||||
//parameters for the TreeFactory
|
||||
|
||||
std::string fileName="brachytherapy.hbk";
|
||||
theTree = treeFact->create(fileName,"hbook",false, true);
|
||||
|
||||
delete treeFact;
|
||||
//HistoFactory and TupleFactory depend on theTree
|
||||
|
||||
histFact = aFact->createHistogramFactory( *theTree );
|
||||
tupFact = aFact->createTupleFactory ( *theTree );
|
||||
|
||||
@@ -51,7 +83,7 @@ BrachyAnalysisManager::~BrachyAnalysisManager()
|
||||
delete tupFact;
|
||||
tupFact=0;
|
||||
|
||||
delete histFact;
|
||||
delete histFact;
|
||||
histFact=0;
|
||||
|
||||
delete theTree;
|
||||
@@ -71,71 +103,53 @@ BrachyAnalysisManager* BrachyAnalysisManager::getInstance()
|
||||
|
||||
void BrachyAnalysisManager::book()
|
||||
{
|
||||
|
||||
h1 = histFact->createHistogram2D("10","Energy, pos",300 ,-150.,150.,300,-150.,150.);
|
||||
|
||||
// histograms and ntuple are managed by theTree
|
||||
// h2 e h3 are not necessary ,useful for:check for non-zero
|
||||
//you could do histFact->create2D("20","Energy, pos",300 ,-150.,150.,300,-15 //0.,150.);
|
||||
|
||||
|
||||
IHistogram2D *h2 = histFact->create2D("20","Energy, pos",300 ,-150.,150.,300,-150.,150.);
|
||||
|
||||
// check for non-zero
|
||||
h2= histFact->createHistogram1D("20","Initial Energy", 100,0.,4.);
|
||||
|
||||
IHistogram1D *h3 = histFact->create1D("30","Initial Energy", 100,0.,1.);
|
||||
// check for non-zero
|
||||
|
||||
//Ntuple management
|
||||
std::string columnNames = "float energy, float x, float z";
|
||||
std::string options = "";
|
||||
ITuple *tup = tupFact->create("1","brachy",columnNames, options);
|
||||
// check for non-zero ...
|
||||
if (tup) G4cout<<"The Ntuple is non-zero"<<G4endl;
|
||||
std::string columnNames = "float energy, float x,float y, float z";
|
||||
std::string options = "";
|
||||
if (tupFact) ntuple = tupFact->create("1","1",columnNames, options);
|
||||
// check for non-zero ...
|
||||
if (ntuple) G4cout<<"The Ntuple is non-zero"<<G4endl;
|
||||
}
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
|
||||
void BrachyAnalysisManager::analyse(G4double xx,G4double zz,G4float en)
|
||||
void BrachyAnalysisManager::fill_Tuple(G4double xx,G4double yy, G4double zz,G4float en)
|
||||
{
|
||||
|
||||
ITuple * ntuple = dynamic_cast<ITuple *> ( theTree->find("1") );
|
||||
//ntuple = dynamic_cast<ITuple *> ( theTree->find("1") );
|
||||
|
||||
if (ntuple == 0) {
|
||||
cout << "AAAAAAAGH" << endl;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
ntuple->fill(1, en);// fill ( int column, double value )
|
||||
ntuple->fill(2, xx);
|
||||
ntuple->fill(3, zz);
|
||||
ntuple->fill(3, yy);
|
||||
ntuple->fill(4, zz);
|
||||
|
||||
// alternatively(if all the columns are of the same type):
|
||||
// std::vector<float> row;
|
||||
// row.push_back(en);
|
||||
// row.push_back(xx);
|
||||
// row.push_back(zz);
|
||||
// ntuple->fill(row);
|
||||
|
||||
// write Ntuple-row to file
|
||||
// Should be called after fill is called for the columns.
|
||||
// Unfilled columns will be filled with the default value for that column.
|
||||
ntuple->addRow();
|
||||
|
||||
}
|
||||
|
||||
void BrachyAnalysisManager::hist(G4double x,G4double z, G4float enn)
|
||||
{
|
||||
|
||||
|
||||
IHistogram2D* h2 = dynamic_cast<IHistogram2D *> ( theTree->find("20") );
|
||||
h2->fill(x,z,enn);
|
||||
h1->fill(x,z,enn);
|
||||
|
||||
}
|
||||
|
||||
|
||||
void BrachyAnalysisManager::Spectrum(G4double Init_En)
|
||||
{
|
||||
IHistogram1D* h3 = dynamic_cast<IHistogram1D *> ( theTree->find("30") );
|
||||
h3->fill(Init_En);
|
||||
{
|
||||
h2->fill(Init_En);
|
||||
}
|
||||
|
||||
|
||||
void BrachyAnalysisManager::finish()
|
||||
{
|
||||
// write all histograms to file
|
||||
@@ -145,7 +159,7 @@ void BrachyAnalysisManager::finish()
|
||||
theTree->close();
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,9 +1,44 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
// ********************************************************************
|
||||
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
// GEANT 4 - Brachytherapy example
|
||||
// --------------------------------------------------------------
|
||||
//
|
||||
// Code developed by:
|
||||
// S. Agostinelli, F. Foppiano, S. Garelli , M. Tropeano, S.Guatelli
|
||||
//
|
||||
//
|
||||
// ****************************************
|
||||
// * *
|
||||
// * BrachyDetectorConstruction.cc *
|
||||
// * *
|
||||
// ****************************************
|
||||
|
||||
//
|
||||
// $Id: BrachyDetectorConstruction.cc,v 1.13 2002/12/12 19:16:18 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
#include "BrachyPhantomROGeometry.hh"
|
||||
#include "BrachyPhantomSD.hh"
|
||||
#include "BrachyDetectorMessenger.hh"
|
||||
@@ -23,8 +58,8 @@
|
||||
#include "G4PVPlacement.hh"
|
||||
#include "globals.hh"
|
||||
#include "G4MaterialTable.hh"
|
||||
|
||||
|
||||
#include "Randomize.hh"
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4Element.hh"
|
||||
#include "G4ElementTable.hh"
|
||||
#include "G4PVParameterised.hh"
|
||||
@@ -38,386 +73,258 @@
|
||||
#include "G4UnionSolid.hh"
|
||||
#include "G4VisAttributes.hh"
|
||||
#include "G4Colour.hh"
|
||||
|
||||
#include "BrachyMaterial.hh"
|
||||
#include "BrachyFactoryLeipzig.hh"
|
||||
#include "BrachyFactoryIr.hh"
|
||||
#include "BrachyFactoryI.hh"
|
||||
|
||||
BrachyDetectorConstruction::BrachyDetectorConstruction(G4String &SDName):
|
||||
NumVoxelX(0),NumVoxelZ(0),m_BoxDimX(0), m_BoxDimY(0), m_BoxDimZ(0),
|
||||
ExpHall(0),ExpHallLog(0),ExpHallPhys(0),
|
||||
Phantom(0), PhantomLog(0), PhantomPhys(0),
|
||||
Capsule(0),CapsuleLog(0),CapsulePhys(0),
|
||||
CapsuleTip(0),CapsuleTipLog(0),CapsuleTipPhys(0),
|
||||
IridiumCore(0),IridiumCoreLog(0),IridiumCorePhys(0)
|
||||
|
||||
NumVoxelX(0),NumVoxelZ(0),m_BoxDimX(0), m_BoxDimY(0), m_BoxDimZ(0),
|
||||
ExpHall(0),ExpHallLog(0),ExpHallPhys(0),
|
||||
Phantom(0), PhantomLog (0), PhantomPhys (0),
|
||||
detectorChoice(0)
|
||||
|
||||
{
|
||||
NumVoxelX=300;
|
||||
NumVoxelZ=300;
|
||||
|
||||
NumVoxelX=300;
|
||||
NumVoxelZ=300;
|
||||
m_BoxDimX=30*cm ;
|
||||
m_BoxDimY=30*cm;
|
||||
m_BoxDimZ=30*cm;
|
||||
|
||||
m_BoxDimX=30*cm ;
|
||||
m_BoxDimY=30*cm;
|
||||
m_BoxDimZ=30*cm;
|
||||
ComputeDimVoxel();
|
||||
|
||||
ComputeDimVoxel();
|
||||
|
||||
|
||||
m_SDName = SDName;//pointer to sensitive detector
|
||||
// create commands for interactive definition of the calorimeter
|
||||
detectorMessenger = new BrachyDetectorMessenger(this);
|
||||
ExpHall_x = 4.0*m;
|
||||
ExpHall_y = 4.0*m;
|
||||
ExpHall_z = 4.0*m;
|
||||
|
||||
m_SDName = SDName;
|
||||
m_SDName = SDName;//pointer to sensitive detector
|
||||
|
||||
detectorMessenger = new BrachyDetectorMessenger(this);
|
||||
|
||||
|
||||
G4Colour white (1.0, 1.0, 1.0) ;
|
||||
G4Colour grey (0.5, 0.5, 0.5) ;
|
||||
G4Colour lgrey (.75, .75, .75) ;
|
||||
G4Colour red (1.0, 0.0, 0.0) ;
|
||||
G4Colour blue (0.0, 0.0, 1.0) ;
|
||||
G4Colour cyan (0.0, 1.0, 1.0) ;
|
||||
G4Colour magenta (1.0, 0.0, 1.0) ;
|
||||
G4Colour yellow (1.0, 1.0, 0.0) ;
|
||||
G4Colour lblue (0.0, 0.0, .75);
|
||||
|
||||
factoryIr=new BrachyFactoryIr();
|
||||
|
||||
pMat= new BrachyMaterial();
|
||||
|
||||
}
|
||||
|
||||
|
||||
//....
|
||||
|
||||
BrachyDetectorConstruction::~BrachyDetectorConstruction()
|
||||
{
|
||||
|
||||
|
||||
delete detectorMessenger;
|
||||
delete pMat;
|
||||
|
||||
if (factoryLeipzig) delete factoryLeipzig;
|
||||
if (factoryI) delete factoryI;
|
||||
delete factoryIr;
|
||||
}
|
||||
|
||||
//....
|
||||
|
||||
G4VPhysicalVolume* BrachyDetectorConstruction::Construct()
|
||||
{
|
||||
DefineMaterials();
|
||||
return ConstructDetector();
|
||||
}
|
||||
{ pMat-> DefineMaterials();
|
||||
|
||||
void BrachyDetectorConstruction::DefineMaterials()
|
||||
if (ExpHallPhys==0)
|
||||
{
|
||||
// Define required materials
|
||||
ConstructPhantom(); }
|
||||
|
||||
G4double A; // atomic mass
|
||||
G4double Z; // atomic number
|
||||
G4double d; // density
|
||||
|
||||
// General elements
|
||||
|
||||
A = 1.01*g/mole;
|
||||
G4Element* elH = new G4Element ("Hydrogen","H",Z=1.,A);
|
||||
|
||||
A = 14.01*g/mole;
|
||||
G4Element* elN = new G4Element("Nitrogen","N",Z=7.,A);
|
||||
switch(detectorChoice)
|
||||
{
|
||||
case 1:
|
||||
factoryI=new BrachyFactoryI();
|
||||
factoryI->CreateSource(PhantomPhys);
|
||||
|
||||
A = 16.00*g/mole;
|
||||
|
||||
G4Element* elO = new G4Element("Oxygen","O",Z=8.,A);
|
||||
|
||||
A=12.011*g/mole;
|
||||
G4Element* elC=new G4Element("Carbon","C",Z=6.,A);
|
||||
|
||||
A=22.99*g/mole;
|
||||
G4Element* elNa=new G4Element("Sodium","Na",Z=11.,A);
|
||||
|
||||
A=24.305*g/mole;
|
||||
G4Element* elMg=new G4Element("Magnesium","Mg",Z=12.,A);
|
||||
|
||||
A=30.974*g/mole;
|
||||
G4Element* elP=new G4Element("Phosphorus","P",Z=15.,A);
|
||||
|
||||
A=32.06*g/mole;
|
||||
G4Element* elS=new G4Element("Sulfur","S",Z=16.,A);
|
||||
|
||||
A=35.453*g/mole;
|
||||
G4Element* elCl=new G4Element("Chlorine","Cl",Z=17.,A);
|
||||
|
||||
|
||||
A=39.098*g/mole;
|
||||
G4Element* elK=new G4Element("Potassium","K",Z=19.,A);
|
||||
|
||||
A=40.08*g/mole;
|
||||
G4Element* elCa=new G4Element("Calcium","Ca",Z=20.,A);
|
||||
break;
|
||||
|
||||
|
||||
|
||||
// Elements for source capsule and cable
|
||||
case 2:
|
||||
factoryLeipzig=new BrachyFactoryLeipzig();
|
||||
factoryLeipzig->CreateSource(PhantomPhys);
|
||||
break;
|
||||
|
||||
|
||||
|
||||
|
||||
A=65.38*g/mole;
|
||||
G4Element* elZn=new G4Element("Zinc","Zn",Z=30.,A);
|
||||
A=26.98*g/mole;
|
||||
G4Element* elAl=new G4Element("Aluminum","Al", Z=13.,A);
|
||||
case 3:
|
||||
factoryIr->CreateSource(PhantomPhys);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
|
||||
A = 54.94*g/mole;
|
||||
G4Element* elMn = new G4Element("Manganese","Mn",Z=25.,A);
|
||||
|
||||
A = 28.09*g/mole;
|
||||
G4Element* elSi = new G4Element("Silicon","Si",Z=14.,A);
|
||||
|
||||
A = 52.00*g/mole;
|
||||
G4Element* elCr = new G4Element("Chromium","Cr",Z=24.,A);
|
||||
|
||||
A = 58.70*g/mole;
|
||||
G4Element* elNi = new G4Element("Nickel","Ni",Z=28.,A);
|
||||
|
||||
A = 55.85*g/mole;
|
||||
G4Element* elFe = new G4Element("Iron","Fe",Z=26.,A);
|
||||
|
||||
// Lead material
|
||||
A = 207.19*g/mole;
|
||||
Z = 82;
|
||||
d = 11.35*g/cm3;
|
||||
G4Material* matPb = new G4Material("Lead",Z,A,d);
|
||||
|
||||
// Iridium (Medical Physics, Vol 25, No 10, Oct 1998)
|
||||
d = 22.42*g/cm3;
|
||||
A = 191.96260*g/mole ;
|
||||
Z = 77;
|
||||
G4Material* matIr192 = new G4Material("Iridium",Z,A,d);
|
||||
|
||||
//titanium
|
||||
A=47.88*g/mole;
|
||||
d=4.50*g/cm3;
|
||||
G4Material* Titanium=new G4Material("titanium" ,Z=22.,A,d);
|
||||
|
||||
// Air material
|
||||
d = 1.290*mg/cm3;
|
||||
G4Material* matAir = new G4Material("Air",d,2);
|
||||
matAir->AddElement(elN,0.7);
|
||||
matAir->AddElement(elO,0.3);
|
||||
|
||||
|
||||
// Water
|
||||
d = 1.000*g/cm3;
|
||||
G4Material* matH2O = new G4Material("Water",d,2);
|
||||
matH2O->AddElement(elH,2);
|
||||
matH2O->AddElement(elO,1);
|
||||
|
||||
//soft tissue(NIST data)
|
||||
|
||||
d=1.0*g/cm3;
|
||||
G4Material* soft=new G4Material("tissue",d,13);
|
||||
soft->AddElement(elH,0.104472);
|
||||
soft->AddElement(elC,0.23219);
|
||||
soft->AddElement(elN,0.02488);
|
||||
soft->AddElement(elO,0.630238);
|
||||
soft->AddElement(elNa,0.00113);
|
||||
soft->AddElement(elMg,0.00013);
|
||||
soft->AddElement(elP,0.00133);
|
||||
soft->AddElement(elS,0.00199);
|
||||
soft->AddElement(elCl,0.00134);
|
||||
soft->AddElement(elK,0.00199);
|
||||
soft->AddElement(elCa,0.00023);
|
||||
soft->AddElement(elFe,0.00005);
|
||||
soft->AddElement(elZn,0.00003);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Stainless steel (Medical Physics, Vol 25, No 10, Oct 1998)
|
||||
d = 8.02*g/cm3 ;
|
||||
G4Material* matSteel = new G4Material("Stainless steel",d,5);
|
||||
matSteel->AddElement(elMn, 0.02);
|
||||
matSteel->AddElement(elSi, 0.01);
|
||||
matSteel->AddElement(elCr, 0.19);
|
||||
matSteel->AddElement(elNi, 0.10);
|
||||
matSteel->AddElement(elFe, 0.68);
|
||||
|
||||
|
||||
//--elements for Iodium source which will be introduced in the next release
|
||||
|
||||
|
||||
|
||||
|
||||
//--elements for Iodium source which will be introduced in the next release
|
||||
|
||||
//gold(chimica degli elementi N.N Greenwood,A.Earnshaw)
|
||||
A=196.97*g/mole;
|
||||
d=19.32*g/cm3;
|
||||
G4Material* gold=new G4Material("gold",Z=79.,A,d);
|
||||
|
||||
|
||||
|
||||
//IodiumCore(chimica degli elementi N.N Greenwood,A.Earnshaw)
|
||||
A=124.9*g/mole;
|
||||
d=4.862*g/cm3;
|
||||
G4Material* matI=new G4Material("Iodium",Z=53.,A,d);
|
||||
|
||||
//ceramica(Medical Physics, May 2000)
|
||||
|
||||
d=2.88*g/cm3;
|
||||
G4Material* ceramica=new G4Material("allumina",d,2);
|
||||
ceramica->AddElement(elAl,2);
|
||||
ceramica->AddElement(elO,3);
|
||||
|
||||
|
||||
AbsorberMaterial=matH2O;
|
||||
air= matAir;
|
||||
CapsuleMat=matSteel;
|
||||
IridiumMat=matIr192;
|
||||
|
||||
factoryIr->CreateSource(PhantomPhys);
|
||||
}
|
||||
|
||||
|
||||
ConstructSensitiveDetector();
|
||||
|
||||
G4VPhysicalVolume* BrachyDetectorConstruction::ConstructDetector()
|
||||
{// Volumes
|
||||
ComputeDimVoxel();
|
||||
// EXPERIMENTAL HALL (our world volume)
|
||||
G4double ExpHall_x = 4.0*m;
|
||||
G4double ExpHall_y = 4.0*m;
|
||||
G4double ExpHall_z = 4.0*m;
|
||||
return ExpHallPhys;
|
||||
|
||||
|
||||
|
||||
}
|
||||
void BrachyDetectorConstruction::SwitchDetector()
|
||||
{
|
||||
factoryIr->CleanSource();
|
||||
switch(detectorChoice)
|
||||
{
|
||||
case 1:
|
||||
factoryI=new BrachyFactoryI();
|
||||
factoryI->CreateSource(PhantomPhys);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
factoryLeipzig=new BrachyFactoryLeipzig();
|
||||
factoryLeipzig->CreateSource(PhantomPhys);
|
||||
|
||||
break;
|
||||
|
||||
case 3:
|
||||
factoryIr->CreateSource(PhantomPhys);
|
||||
|
||||
break;
|
||||
default:
|
||||
factoryIr->CreateSource(PhantomPhys);
|
||||
}
|
||||
|
||||
// Notify run manager that the new geometry has been built
|
||||
|
||||
G4RunManager::GetRunManager()->DefineWorldVolume( ExpHallPhys );
|
||||
G4RunManager::GetRunManager()->GeometryHasBeenModified();
|
||||
|
||||
// Let the navigator to know about the new top of the new geometry
|
||||
G4TransportationManager::GetTransportationManager()->GetNavigatorForTracking()->SetWorldVolume(ExpHallPhys);
|
||||
// We have to tweak the navigator's state. By the following dummy call we ensure that navigator's
|
||||
// state is reset properly
|
||||
G4ThreeVector center(0,0,0);
|
||||
G4TransportationManager::GetTransportationManager()->GetNavigatorForTracking()->LocateGlobalPointAndSetup(center,0,false);
|
||||
|
||||
|
||||
G4Colour white (1.0, 1.0, 1.0) ;
|
||||
G4Colour grey (0.5, 0.5, 0.5) ;
|
||||
G4Colour lgrey (.75, .75, .75) ;
|
||||
G4Colour red (1.0, 0.0, 0.0) ;
|
||||
G4Colour blue (0.0, 0.0, 1.0) ;
|
||||
G4Colour cyan (0.0, 1.0, 1.0) ;
|
||||
G4Colour magenta (1.0, 0.0, 1.0) ;
|
||||
G4Colour yellow (1.0, 1.0, 0.0) ;
|
||||
G4Colour lblue (0.0, 0.0, .75);
|
||||
}
|
||||
|
||||
|
||||
//World volume
|
||||
ExpHall = new G4Box("ExpHall",ExpHall_x,ExpHall_y,ExpHall_z);
|
||||
ExpHallLog = new G4LogicalVolume(ExpHall,air,"ExpHallLog",0,0,0);
|
||||
ExpHallPhys = new G4PVPlacement(0,G4ThreeVector(),"ExpHallPhys",ExpHallLog,NULL,false,0);
|
||||
void BrachyDetectorConstruction::SelectDetector(G4String val)
|
||||
{ if(val=="Iodium")
|
||||
{ detectorChoice = 1; }
|
||||
else
|
||||
{if(val=="Leipzig") detectorChoice = 2;
|
||||
else { if(val=="Iridium")detectorChoice = 3;}}
|
||||
|
||||
// Water Box
|
||||
Phantom= new G4Box("Phantom",m_BoxDimX/2,m_BoxDimY/2,m_BoxDimZ/2);
|
||||
PhantomLog = new G4LogicalVolume(Phantom,AbsorberMaterial,"PhantomLog",0,0,0);
|
||||
G4cout << "Now Detector is " << val << G4endl;
|
||||
}
|
||||
void BrachyDetectorConstruction::ConstructPhantom()
|
||||
|
||||
{
|
||||
G4Colour white (1.0, 1.0, 1.0) ;
|
||||
G4Colour grey (0.5, 0.5, 0.5) ;
|
||||
G4Colour lgrey (.75, .75, .75) ;
|
||||
G4Colour red (1.0, 0.0, 0.0) ;
|
||||
G4Colour blue (0.0, 0.0, 1.0) ;
|
||||
G4Colour cyan (0.0, 1.0, 1.0) ;
|
||||
G4Colour magenta (1.0, 0.0, 1.0) ;
|
||||
G4Colour yellow (1.0, 1.0, 0.0) ;
|
||||
G4Colour lblue (0.0, 0.0, .75);
|
||||
|
||||
PhantomPhys = new G4PVPlacement(0,G4ThreeVector(),"WaterBoxPhys",PhantomLog,ExpHallPhys,false,0);
|
||||
G4Material* air=pMat->GetMat("Air") ;
|
||||
G4Material* soft=pMat->GetMat("tissue");
|
||||
|
||||
ComputeDimVoxel();
|
||||
|
||||
//World volume
|
||||
ExpHall = new G4Box("ExpHall",ExpHall_x,ExpHall_y,ExpHall_z);
|
||||
ExpHallLog = new G4LogicalVolume(ExpHall,air,"ExpHallLog",0,0,0);
|
||||
ExpHallPhys = new G4PVPlacement(0,G4ThreeVector(),"ExpHallPhys",ExpHallLog,NULL,false,0);
|
||||
|
||||
// Water Box
|
||||
Phantom = new G4Box("Phantom",m_BoxDimX/2,m_BoxDimY/2,m_BoxDimZ/2);
|
||||
PhantomLog = new G4LogicalVolume(Phantom,soft,"PhantomLog",0,0,0);
|
||||
|
||||
PhantomPhys = new G4PVPlacement(0,G4ThreeVector(),"PhantomPhys",PhantomLog,ExpHallPhys,false,0);
|
||||
|
||||
ExpHallLog->SetVisAttributes (G4VisAttributes::Invisible);
|
||||
|
||||
// Capsule main body
|
||||
G4VisAttributes* simpleBoxVisAtt= new G4VisAttributes(lblue);
|
||||
simpleBoxVisAtt->SetVisibility(true);
|
||||
simpleBoxVisAtt->SetForceWireframe(true);
|
||||
|
||||
PhantomLog->SetVisAttributes(simpleBoxVisAtt);
|
||||
|
||||
G4Tubs* Capsule = new G4Tubs("Capsule",0,0.55*mm,3.725*mm,0.*deg,360.*deg);
|
||||
G4LogicalVolume* CapsuleLog = new G4LogicalVolume(Capsule,CapsuleMat,"CapsuleLog");
|
||||
G4VPhysicalVolume* CapsulePhys = new G4PVPlacement(0,G4ThreeVector(0,0,-1.975),"CapsulePhys",CapsuleLog,PhantomPhys,false,0);
|
||||
}
|
||||
|
||||
// Capsule tip
|
||||
void BrachyDetectorConstruction::ConstructSensitiveDetector()
|
||||
// Sensitive Detector and ReadOut geometry definition
|
||||
{
|
||||
G4SDManager* pSDManager = G4SDManager::GetSDMpointer();
|
||||
|
||||
G4Sphere* CapsuleTip = new G4Sphere("CapsuleTip",0.*mm,0.55*mm,0.*deg,360.*deg,0.*deg,90.*deg);
|
||||
G4LogicalVolume* CapsuleTipLog = new G4LogicalVolume(CapsuleTip,CapsuleMat,"CapsuleTipLog");
|
||||
G4VPhysicalVolume* CapsuleTipPhys = new G4PVPlacement(0,G4ThreeVector(0.,0.,1.75*mm),"CapsuleTipPhys",CapsuleTipLog,PhantomPhys,false,0);
|
||||
|
||||
// Iridium core
|
||||
|
||||
G4Tubs* IridiumCore = new G4Tubs("IrCore",0,0.30*mm,1.75*mm,0.*deg,360.*deg);
|
||||
G4LogicalVolume* IridiumCoreLog = new G4LogicalVolume(IridiumCore,IridiumMat,"IridiumCoreLog");
|
||||
G4VPhysicalVolume* IridiumCorePhys = new G4PVPlacement(0,G4ThreeVector(),"IridiumCorePhys",IridiumCoreLog,CapsulePhys,false,0);
|
||||
|
||||
|
||||
|
||||
// Sensitive Detector and ReadOut geometry definition
|
||||
//
|
||||
G4SDManager* pSDManager = G4SDManager::GetSDMpointer();
|
||||
BrachyPhantomSD* pPhantomSD = new BrachyPhantomSD(m_SDName,NumVoxelX,NumVoxelZ);
|
||||
if(pPhantomSD)
|
||||
{
|
||||
if( pPhantomSD ==0)
|
||||
{
|
||||
pPhantomSD = new BrachyPhantomSD(m_SDName,NumVoxelX,NumVoxelZ);
|
||||
if(pPhantomSD)
|
||||
{
|
||||
G4String ROGeometryName = "PhantomROGeometry";
|
||||
BrachyPhantomROGeometry* pPhantomROGeometry = new BrachyPhantomROGeometry(ROGeometryName,m_BoxDimX,m_BoxDimZ,NumVoxelX,NumVoxelZ);
|
||||
pPhantomROGeometry = new BrachyPhantomROGeometry(ROGeometryName,m_BoxDimX,m_BoxDimZ,NumVoxelX,NumVoxelZ);
|
||||
|
||||
|
||||
pPhantomROGeometry->BuildROGeometry();
|
||||
pPhantomSD->SetROgeometry(pPhantomROGeometry);
|
||||
pSDManager->AddNewDetector(pPhantomSD);
|
||||
|
||||
|
||||
PhantomLog->SetSensitiveDetector(pPhantomSD);
|
||||
CapsuleLog->SetSensitiveDetector(pPhantomSD);
|
||||
CapsuleTipLog->SetSensitiveDetector(pPhantomSD);
|
||||
IridiumCoreLog->SetSensitiveDetector(pPhantomSD);
|
||||
|
||||
}
|
||||
|
||||
//
|
||||
// Visualization attributes
|
||||
//
|
||||
ExpHallLog->SetVisAttributes (G4VisAttributes::Invisible);
|
||||
|
||||
G4VisAttributes* simpleBoxVisAtt= new G4VisAttributes(lblue);
|
||||
simpleBoxVisAtt->SetVisibility(true);
|
||||
simpleBoxVisAtt->SetForceWireframe(true);
|
||||
|
||||
PhantomLog->SetVisAttributes(simpleBoxVisAtt);
|
||||
|
||||
|
||||
|
||||
G4VisAttributes* simpleIridiumVisAtt= new G4VisAttributes(magenta);
|
||||
simpleIridiumVisAtt->SetVisibility(true);
|
||||
simpleIridiumVisAtt->SetForceWireframe(true);
|
||||
IridiumCoreLog->SetVisAttributes(simpleIridiumVisAtt);
|
||||
|
||||
|
||||
|
||||
G4VisAttributes* simpleCapsuleVisAtt= new G4VisAttributes(red);
|
||||
simpleCapsuleVisAtt->SetVisibility(true);
|
||||
simpleCapsuleVisAtt->SetForceWireframe(true);
|
||||
CapsuleLog->SetVisAttributes( simpleCapsuleVisAtt);
|
||||
|
||||
G4VisAttributes* simpleCapsuleTipVisAtt= new G4VisAttributes(red);
|
||||
simpleCapsuleTipVisAtt->SetVisibility(true);
|
||||
simpleCapsuleTipVisAtt->SetForceSolid(true);
|
||||
CapsuleTipLog->SetVisAttributes( simpleCapsuleTipVisAtt);
|
||||
|
||||
|
||||
//always return the physical World
|
||||
|
||||
PrintDetectorParameters();
|
||||
return ExpHallPhys;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
void BrachyDetectorConstruction::PrintDetectorParameters()
|
||||
{
|
||||
G4cout << "-----------------------------------------------------------------------"
|
||||
<< G4endl
|
||||
<<"the detector is a box whose size is: "
|
||||
<<G4endl
|
||||
<<m_BoxDimX/cm
|
||||
<< " cm * "
|
||||
<<m_BoxDimY/cm
|
||||
<< " cm * "
|
||||
<<m_BoxDimZ/cm
|
||||
<< " cm"
|
||||
<< G4endl
|
||||
<<"numVoxel: "
|
||||
<<NumVoxelX
|
||||
<<G4endl
|
||||
<<"dim voxel: "
|
||||
<<dimVoxel/mm
|
||||
<<"mm"
|
||||
<<G4endl
|
||||
<<"material of the box : "
|
||||
<<AbsorberMaterial->GetName()
|
||||
<<G4endl
|
||||
<<"the source is at the center of the detector"
|
||||
<<G4endl
|
||||
|
||||
G4cout << "-----------------------------------------------------------------------"
|
||||
<< G4endl
|
||||
<<"the detector is a box whose size is: "
|
||||
<<G4endl
|
||||
<<m_BoxDimX/cm
|
||||
<< " cm * "
|
||||
<<m_BoxDimY/cm
|
||||
<< " cm * "
|
||||
<<m_BoxDimZ/cm
|
||||
<< " cm"
|
||||
<< G4endl
|
||||
<<"numVoxel: "
|
||||
<<NumVoxelX
|
||||
<<G4endl
|
||||
<<"dim voxel: "
|
||||
<<dimVoxel/mm
|
||||
<<"mm"
|
||||
<<G4endl
|
||||
<<"material of the box : "
|
||||
<<AbsorberMaterial->GetName()
|
||||
<<G4endl
|
||||
<<"the source is at the center of the detector"
|
||||
<<G4endl
|
||||
|
||||
<<"-------------------------------------------------------------------------"
|
||||
<< G4endl;
|
||||
|
||||
<<"-------------------------------------------------------------------------"
|
||||
<< G4endl;
|
||||
}
|
||||
|
||||
|
||||
void BrachyDetectorConstruction::SetAbsorberMaterial(G4String materialChoice)
|
||||
|
||||
{
|
||||
// search the material by its name
|
||||
G4Material* pttoMaterial = G4Material::GetMaterial(materialChoice);
|
||||
if (pttoMaterial)
|
||||
{AbsorberMaterial = pttoMaterial;
|
||||
PhantomLog->SetMaterial(pttoMaterial);
|
||||
PrintDetectorParameters();
|
||||
}
|
||||
else G4cout<<"that's not avaiable!"<<G4endl;
|
||||
// search the material by its name
|
||||
G4Material* pttoMaterial = G4Material::GetMaterial(materialChoice);
|
||||
if (pttoMaterial)
|
||||
{AbsorberMaterial = pttoMaterial;
|
||||
PhantomLog->SetMaterial(pttoMaterial);
|
||||
PrintDetectorParameters();
|
||||
}
|
||||
else G4cout<<"that's not avaiable!"<<G4endl;
|
||||
}
|
||||
|
||||
|
||||
@@ -433,12 +340,6 @@ void BrachyDetectorConstruction::SetAbsorberMaterial(G4String materialChoice)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,207 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
// GEANT 4 - Brachytherapy example
|
||||
// --------------------------------------------------------------
|
||||
//
|
||||
// Code developed by: S.Guatelli
|
||||
//
|
||||
/// ****************************************
|
||||
// * *
|
||||
// * BrachyDetectorConstructionI.cc *
|
||||
// * *
|
||||
// ****************************************
|
||||
//
|
||||
// $Id: BrachyDetectorConstructionI.cc,v 1.2 2002/11/18 15:18:37 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
#include "BrachyDetectorConstructionI.hh"
|
||||
#include "G4CSGSolid.hh"
|
||||
#include "G4Sphere.hh"
|
||||
#include "G4MaterialPropertyVector.hh"
|
||||
#include "G4SDManager.hh"
|
||||
#include "G4SubtractionSolid.hh"
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4MaterialPropertiesTable.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "G4Box.hh"
|
||||
#include "G4Tubs.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4PVPlacement.hh"
|
||||
#include "globals.hh"
|
||||
#include "G4MaterialTable.hh"
|
||||
#include "Randomize.hh"
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4Element.hh"
|
||||
#include "G4ElementTable.hh"
|
||||
#include "G4PVParameterised.hh"
|
||||
#include "G4Transform3D.hh"
|
||||
#include "G4RotationMatrix.hh"
|
||||
#include "G4FieldManager.hh"
|
||||
#include "G4TransportationManager.hh"
|
||||
#include "G4UnionSolid.hh"
|
||||
#include "BrachyMaterial.hh"
|
||||
#include "G4VisAttributes.hh"
|
||||
#include "G4Colour.hh"
|
||||
|
||||
BrachyDetectorConstructionI::BrachyDetectorConstructionI():
|
||||
DefaultTub(0), DefaultTub_log(0),DefaultTub_Phys(0),
|
||||
Capsule(0),CapsuleLog(0),CapsulePhys(0),
|
||||
CapsuleTip(0),CapsuleTipLog(0),CapsuleTipPhys1(0),CapsuleTipPhys2(0),
|
||||
IodiumCore(0),ICoreLog(0),ICorePhys(0),
|
||||
Marker(0),MarkerLog(0),MarkerPhys(0)
|
||||
|
||||
{
|
||||
pMat= new BrachyMaterial() ;
|
||||
|
||||
}
|
||||
|
||||
|
||||
//....
|
||||
|
||||
BrachyDetectorConstructionI::~BrachyDetectorConstructionI()
|
||||
{
|
||||
|
||||
delete pMat;
|
||||
}
|
||||
|
||||
//....
|
||||
void BrachyDetectorConstructionI::ConstructIodium(G4VPhysicalVolume* mother)
|
||||
{
|
||||
// Volumes
|
||||
|
||||
|
||||
G4Material* titanium=pMat->GetMat("titanium");
|
||||
G4Material* air =pMat->GetMat("Air");
|
||||
G4Material* Iodio=pMat->GetMat("Iodium");
|
||||
G4Material* Gold=pMat->GetMat("gold");
|
||||
|
||||
G4Colour white (1.0, 1.0, 1.0) ;
|
||||
G4Colour grey (0.5, 0.5, 0.5) ;
|
||||
G4Colour lgrey (.75, .75, .75) ;
|
||||
G4Colour red (1.0, 0.0, 0.0) ;
|
||||
G4Colour blue (0.0, 0.0, 1.0) ;
|
||||
G4Colour cyan (0.0, 1.0, 1.0) ;
|
||||
G4Colour magenta (1.0, 0.0, 1.0) ;
|
||||
G4Colour yellow (1.0, 1.0, 0.0) ;
|
||||
G4Colour lblue (0.0, 0.0, .75);
|
||||
|
||||
// Rotation Matrix
|
||||
G4RotationMatrix* rotateMatrix=new G4RotationMatrix(); //=new G4RotationMatrix() ;
|
||||
rotateMatrix->rotateX(180.0*deg);
|
||||
|
||||
DefaultTub=new G4Tubs("DefaultTub",
|
||||
0.*mm,
|
||||
0.40*mm,
|
||||
1.84*mm,
|
||||
0.*deg,
|
||||
360.*deg);
|
||||
DefaultTub_log = new G4LogicalVolume(DefaultTub,air,"DefaultTub_Log");
|
||||
DefaultTub_Phys = new G4PVPlacement(0,G4ThreeVector(),"DefaultTub_Phys",DefaultTub_log,
|
||||
mother,false,0);
|
||||
// Capsule main body
|
||||
G4double CapsuleR=0.35*mm;
|
||||
Capsule = new G4Tubs("Capsule",
|
||||
CapsuleR,//raggio interno
|
||||
0.40*mm,//raggio esterno
|
||||
1.84*mm,//meta' lunghezza
|
||||
0.*deg,//angolo di partenza
|
||||
360.*deg);//angolo di rotazione
|
||||
|
||||
CapsuleLog = new G4LogicalVolume(Capsule,titanium,"CapsuleLog");
|
||||
CapsulePhys = new G4PVPlacement
|
||||
(0,G4ThreeVector(),"CapsulePhys",CapsuleLog,
|
||||
DefaultTub_Phys,false,0);
|
||||
|
||||
// Capsule tip
|
||||
|
||||
CapsuleTip = new G4Sphere("CapsuleTip",0.*mm,0.40*mm,0.*deg,360.*deg,0.*deg,90.*deg);
|
||||
CapsuleTipLog = new G4LogicalVolume(CapsuleTip,titanium,"CapsuleTipLog");
|
||||
CapsuleTipPhys1 = new G4PVPlacement
|
||||
(0,G4ThreeVector(0.,0.,1.84*mm), "CapsuleTipPhys1",CapsuleTipLog,mother,false,0);
|
||||
|
||||
|
||||
CapsuleTipPhys2 = new G4PVPlacement(rotateMatrix, G4ThreeVector(0,0,-1.84*mm),"CapsuleTipPhys2",CapsuleTipLog,mother,false,0);
|
||||
|
||||
|
||||
IodiumCore = new G4Tubs("ICore",0.085*mm,0.35*mm,1.75*mm,0.*deg,360.*deg);
|
||||
|
||||
ICoreLog = new G4LogicalVolume(IodiumCore,Iodio,"IodiumCoreLog");
|
||||
ICorePhys = new G4PVPlacement(0,G4ThreeVector(0.,0.,0.),
|
||||
"IodiumCorePhys",ICoreLog,DefaultTub_Phys,false,0);
|
||||
|
||||
Marker=new G4Tubs("GoldenMarker",0.*mm,0.085*mm,1.75*mm,
|
||||
0.*deg,360.*deg);
|
||||
MarkerLog = new G4LogicalVolume(Marker,Gold,"MarkerLog");
|
||||
MarkerPhys=new G4PVPlacement(0,G4ThreeVector(0.,0.,0.),"MarkerPhys",MarkerLog,DefaultTub_Phys,false,0);
|
||||
|
||||
G4VisAttributes* simpleMarkerVisAtt= new G4VisAttributes(lblue);
|
||||
simpleMarkerVisAtt->SetVisibility(true);
|
||||
simpleMarkerVisAtt->SetForceSolid(true);
|
||||
|
||||
|
||||
|
||||
G4VisAttributes* simpleIodiumVisAtt= new G4VisAttributes(magenta);
|
||||
simpleIodiumVisAtt->SetVisibility(true);
|
||||
simpleIodiumVisAtt->SetForceWireframe(true);
|
||||
ICoreLog->SetVisAttributes(simpleIodiumVisAtt);
|
||||
|
||||
|
||||
|
||||
G4VisAttributes* simpleCapsuleVisAtt= new G4VisAttributes(red);
|
||||
simpleCapsuleVisAtt->SetVisibility(true);
|
||||
simpleCapsuleVisAtt->SetForceWireframe(true);
|
||||
CapsuleLog->SetVisAttributes( simpleCapsuleVisAtt);
|
||||
|
||||
G4VisAttributes* simpleCapsuleTipVisAtt= new G4VisAttributes(red);
|
||||
simpleCapsuleTipVisAtt->SetVisibility(true);
|
||||
simpleCapsuleTipVisAtt->SetForceSolid(true);
|
||||
CapsuleTipLog->SetVisAttributes( simpleCapsuleTipVisAtt);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,203 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
// ********************************************************************
|
||||
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
// GEANT 4 - Brachytherapy example
|
||||
// --------------------------------------------------------------
|
||||
//
|
||||
// Code developed by:
|
||||
// S. Agostinelli, F. Foppiano, S. Garelli , M. Tropeano, S.Guatelli
|
||||
//
|
||||
// ****************************************
|
||||
// * *
|
||||
// * BrachyDetectorConstructionIr.cc *
|
||||
// * *
|
||||
// ****************************************
|
||||
//
|
||||
// $Id: BrachyDetectorConstructionIr.cc,v 1.3 2002/12/12 19:16:18 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
#include "BrachyDetectorConstructionIr.hh"
|
||||
#include "G4CSGSolid.hh"
|
||||
#include "G4Sphere.hh"
|
||||
#include "G4MaterialPropertyVector.hh"
|
||||
#include "G4SDManager.hh"
|
||||
#include "G4SubtractionSolid.hh"
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4MaterialPropertiesTable.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "G4Box.hh"
|
||||
#include "G4Tubs.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4PVPlacement.hh"
|
||||
#include "globals.hh"
|
||||
#include "G4MaterialTable.hh"
|
||||
#include "Randomize.hh"
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4Element.hh"
|
||||
#include "G4ElementTable.hh"
|
||||
#include "G4PVParameterised.hh"
|
||||
#include "G4Transform3D.hh"
|
||||
#include "G4RotationMatrix.hh"
|
||||
#include "G4FieldManager.hh"
|
||||
#include "G4TransportationManager.hh"
|
||||
#include "G4UnionSolid.hh"
|
||||
#include "BrachyMaterial.hh"
|
||||
#include "G4VisAttributes.hh"
|
||||
#include "G4Colour.hh"
|
||||
|
||||
BrachyDetectorConstructionIr::BrachyDetectorConstructionIr():
|
||||
Capsule(0),CapsuleLog(0),CapsulePhys(0),
|
||||
CapsuleTip(0),CapsuleTipLog(0),CapsuleTipPhys(0),
|
||||
IridiumCore(0),IridiumCoreLog(0),IridiumCorePhys(0)
|
||||
|
||||
{
|
||||
pMat= new BrachyMaterial() ;
|
||||
|
||||
}
|
||||
|
||||
|
||||
//....
|
||||
|
||||
BrachyDetectorConstructionIr::~BrachyDetectorConstructionIr()
|
||||
{
|
||||
|
||||
delete pMat;
|
||||
}
|
||||
|
||||
//....
|
||||
void BrachyDetectorConstructionIr::ConstructIridium(G4VPhysicalVolume* mother)
|
||||
{
|
||||
|
||||
G4Colour white (1.0, 1.0, 1.0) ;
|
||||
G4Colour grey (0.5, 0.5, 0.5) ;
|
||||
G4Colour lgrey (.75, .75, .75) ;
|
||||
G4Colour red (1.0, 0.0, 0.0) ;
|
||||
G4Colour blue (0.0, 0.0, 1.0) ;
|
||||
G4Colour cyan (0.0, 1.0, 1.0) ;
|
||||
G4Colour magenta (1.0, 0.0, 1.0) ;
|
||||
G4Colour yellow (1.0, 1.0, 0.0) ;
|
||||
G4Colour lblue (0.0, 0.0, .75);
|
||||
|
||||
G4Material* CapsuleMat=pMat->GetMat("Stainless steel");
|
||||
G4Material*IridiumMat=pMat->GetMat("Iridium");
|
||||
|
||||
// Capsule main body
|
||||
|
||||
|
||||
G4Tubs* Capsule = new G4Tubs("Capsule",0,0.55*mm,3.725*mm,0.*deg,360.*deg);
|
||||
G4LogicalVolume* CapsuleLog = new G4LogicalVolume(Capsule,CapsuleMat,"CapsuleLog");
|
||||
G4VPhysicalVolume* CapsulePhys = new G4PVPlacement
|
||||
(0,G4ThreeVector(0,0,-1.975),"CapsulePhys",CapsuleLog,mother,false,0);
|
||||
|
||||
// Capsule tip
|
||||
|
||||
G4Sphere* CapsuleTip = new G4Sphere("CapsuleTipIridium",0.*mm,0.55*mm,0.*deg,360.*deg,0.*deg,90.*deg);
|
||||
|
||||
G4LogicalVolume* CapsuleTipLog = new G4LogicalVolume(CapsuleTip,CapsuleMat,"CapsuleTipIridumLog");
|
||||
G4VPhysicalVolume* CapsuleTipPhys = new G4PVPlacement(0,G4ThreeVector(0.,0.,1.75*mm),"CapsuleTipIridiumPhys",CapsuleTipLog,mother,false,0);
|
||||
|
||||
// Iridium core
|
||||
|
||||
G4Tubs* IridiumCore = new G4Tubs("IrCore",0,0.30*mm,1.75*mm,0.*deg,360.*deg);
|
||||
G4LogicalVolume* IridiumCoreLog = new G4LogicalVolume(IridiumCore,IridiumMat,"IridiumCoreLog");
|
||||
G4VPhysicalVolume* IridiumCorePhys = new G4PVPlacement(0,G4ThreeVector(),"IridiumCorePhys",IridiumCoreLog,CapsulePhys,false,0);
|
||||
|
||||
simpleIridiumVisAtt= new G4VisAttributes(magenta);
|
||||
simpleIridiumVisAtt->SetVisibility(true);
|
||||
simpleIridiumVisAtt->SetForceWireframe(true);
|
||||
IridiumCoreLog->SetVisAttributes(simpleIridiumVisAtt);
|
||||
|
||||
simpleCapsuleVisAtt= new G4VisAttributes(red);
|
||||
simpleCapsuleVisAtt->SetVisibility(true);
|
||||
simpleCapsuleVisAtt->SetForceWireframe(true);
|
||||
CapsuleLog->SetVisAttributes( simpleCapsuleVisAtt);
|
||||
|
||||
simpleCapsuleTipVisAtt= new G4VisAttributes(red);
|
||||
simpleCapsuleTipVisAtt->SetVisibility(true);
|
||||
simpleCapsuleTipVisAtt->SetForceSolid(true);
|
||||
CapsuleTipLog->SetVisAttributes( simpleCapsuleTipVisAtt);
|
||||
}
|
||||
|
||||
void BrachyDetectorConstructionIr::CleanIridium()
|
||||
{
|
||||
G4VPhysicalVolume* toDieCapsule = CapsulePhys;
|
||||
G4VPhysicalVolume* toDieTip =CapsuleTipPhys;
|
||||
G4VPhysicalVolume* toDieCore = IridiumCorePhys;
|
||||
|
||||
|
||||
|
||||
if ( toDieTip != 0 ){delete toDieTip;}
|
||||
if ( toDieCore !=0){delete toDieCore;}
|
||||
if(toDieCapsule !=0){delete toDieCapsule;}
|
||||
|
||||
if(CapsuleTipLog !=0)
|
||||
{G4VSolid* solToDieTip =CapsuleTipLog->GetSolid();
|
||||
if (solToDieTip !=0)
|
||||
{delete solToDieTip;}
|
||||
delete CapsuleTipLog;
|
||||
CapsuleTipLog=0; }
|
||||
|
||||
if( CapsuleLog !=0)
|
||||
{G4VSolid* solToDieCapsule =CapsuleLog->GetSolid();
|
||||
if (solToDieCapsule !=0)
|
||||
{delete solToDieCapsule;}
|
||||
delete CapsuleLog;
|
||||
CapsuleLog=0;}
|
||||
|
||||
if (IridiumCoreLog !=0)
|
||||
{G4VSolid* solToDieCore =IridiumCoreLog->GetSolid();
|
||||
if (solToDieCore !=0)
|
||||
{delete solToDieCore;}
|
||||
delete IridiumCoreLog;
|
||||
IridiumCoreLog=0 ;}
|
||||
|
||||
if( simpleIridiumVisAtt !=0){delete simpleIridiumVisAtt;}
|
||||
if (simpleCapsuleVisAtt !=0){ delete simpleCapsuleVisAtt;}
|
||||
if (simpleCapsuleTipVisAtt !=0) {delete simpleCapsuleTipVisAtt;}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,158 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
// ********************************************************************
|
||||
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
// GEANT 4 - Brachytherapy example
|
||||
// --------------------------------------------------------------
|
||||
//
|
||||
// Code developed by:
|
||||
// S. Agostinelli, F. Foppiano, S. Garelli , M. Tropeano, S.Guatelli
|
||||
//
|
||||
// *******************************************
|
||||
// * *
|
||||
// * BrachyDetectorConstructionLeipzig.cc *
|
||||
// * *
|
||||
// *******************************************
|
||||
//
|
||||
//
|
||||
// $Id: BrachyDetectorConstructionLeipzig.cc,v 1.3 2002/12/12 19:16:18 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
#include "BrachyDetectorConstructionLeipzig.hh"
|
||||
#include "G4CSGSolid.hh"
|
||||
#include "G4Sphere.hh"
|
||||
#include "G4MaterialPropertyVector.hh"
|
||||
#include "G4SDManager.hh"
|
||||
#include "G4SubtractionSolid.hh"
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4MaterialPropertiesTable.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "G4Box.hh"
|
||||
#include "G4Tubs.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4PVPlacement.hh"
|
||||
#include "globals.hh"
|
||||
#include "G4MaterialTable.hh"
|
||||
#include "Randomize.hh"
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4Element.hh"
|
||||
#include "G4ElementTable.hh"
|
||||
#include "G4PVParameterised.hh"
|
||||
#include "G4Transform3D.hh"
|
||||
#include "G4RotationMatrix.hh"
|
||||
#include "G4FieldManager.hh"
|
||||
#include "G4TransportationManager.hh"
|
||||
#include "G4UnionSolid.hh"
|
||||
#include "BrachyMaterial.hh"
|
||||
#include "G4VisAttributes.hh"
|
||||
#include "G4Colour.hh"
|
||||
BrachyDetectorConstructionLeipzig::BrachyDetectorConstructionLeipzig():
|
||||
Capsule(0),CapsuleLog(0),CapsulePhys(0),
|
||||
CapsuleTip(0),CapsuleTipLog(0),CapsuleTipPhys(0),
|
||||
IridiumCore(0),IridiumCoreLog(0),IridiumCorePhys(0),
|
||||
Appl1(0),Appl1Log(0),Appl1Phys(0),
|
||||
Appl2(0),Appl2Log(0),Appl2Phys(0)
|
||||
|
||||
{
|
||||
pMat= new BrachyMaterial() ;
|
||||
|
||||
}
|
||||
|
||||
|
||||
//....
|
||||
|
||||
BrachyDetectorConstructionLeipzig::~BrachyDetectorConstructionLeipzig()
|
||||
{
|
||||
|
||||
delete pMat;
|
||||
}
|
||||
void BrachyDetectorConstructionLeipzig::ConstructLeipzig(G4VPhysicalVolume* WaterBoxPhys)
|
||||
{
|
||||
|
||||
G4Colour white (1.0, 1.0, 1.0) ;
|
||||
G4Colour grey (0.5, 0.5, 0.5) ;
|
||||
G4Colour lgrey (.75, .75, .75) ;
|
||||
G4Colour red (1.0, 0.0, 0.0) ;
|
||||
G4Colour blue (0.0, 0.0, 1.0) ;
|
||||
G4Colour cyan (0.0, 1.0, 1.0) ;
|
||||
G4Colour magenta (1.0, 0.0, 1.0) ;
|
||||
G4Colour yellow (1.0, 1.0, 0.0) ;
|
||||
G4Colour lblue (0.0, 0.0, .75);
|
||||
|
||||
G4Material* CapsuleMat=pMat->GetMat("Stainless steel");
|
||||
G4Material*IridiumMat=pMat->GetMat("Iridium");
|
||||
G4Material* matTung=pMat->GetMat("Tungsten");
|
||||
|
||||
Capsule = new G4Tubs("Capsule",0,0.55*mm,3.725*mm,0.*deg,360.*deg);
|
||||
CapsuleLog = new G4LogicalVolume(Capsule,CapsuleMat,"CapsuleLog");
|
||||
CapsulePhys = new G4PVPlacement(0,G4ThreeVector(0,0,-1.975*mm),"CapsulePhys",
|
||||
CapsuleLog,WaterBoxPhys,false,0);
|
||||
|
||||
// Capsule tip
|
||||
|
||||
CapsuleTip = new G4Sphere("CapsuleTip",
|
||||
0.*mm,0.55*mm,0.*deg,360.*deg,0.*deg,90.*deg);
|
||||
CapsuleTipLog = new G4LogicalVolume(CapsuleTip,CapsuleMat,"CapsuleTipLog");
|
||||
CapsuleTipPhys = new G4PVPlacement(0,G4ThreeVector(0.,0.,1.75*mm),"CapsuleTipPhys",
|
||||
CapsuleTipLog,WaterBoxPhys,false,0);
|
||||
|
||||
// Iridium core
|
||||
|
||||
IridiumCore = new G4Tubs("IrCore",0,0.30*mm,1.75*mm,0.*deg,360.*deg);
|
||||
IridiumCoreLog = new G4LogicalVolume(IridiumCore,IridiumMat,"IridiumCoreLog");
|
||||
IridiumCorePhys = new G4PVPlacement(0,G4ThreeVector(0.,0.,1.975*mm),"IridiumCorePhys",
|
||||
IridiumCoreLog,CapsulePhys,false,0);
|
||||
// Applicator
|
||||
|
||||
Appl1 = new G4Tubs("Appl1",5*mm,10.5*mm,12*mm,0.*deg,360.*deg);
|
||||
Appl1Log = new G4LogicalVolume(Appl1,matTung,"Appl1");
|
||||
Appl1Phys = new G4PVPlacement (0,G4ThreeVector(0,0,4.0*mm),"Appl1Phys", Appl1Log,
|
||||
WaterBoxPhys,false,0);
|
||||
|
||||
Appl2 = new G4Tubs("Appl2",0.55*mm,5.*mm,3.125*mm,0.*deg,360.*deg);
|
||||
Appl2Log = new G4LogicalVolume(Appl2,matTung,"Appl2");
|
||||
Appl2Phys = new G4PVPlacement(0,G4ThreeVector(0,0,-4.875*mm),"Appl2Phys",Appl2Log,
|
||||
WaterBoxPhys,false,0);
|
||||
|
||||
|
||||
simpleCapsuleVisAtt= new G4VisAttributes(red);
|
||||
simpleCapsuleVisAtt->SetVisibility(true);
|
||||
simpleCapsuleVisAtt->SetForceSolid(true);
|
||||
CapsuleLog->SetVisAttributes(simpleCapsuleVisAtt);
|
||||
|
||||
|
||||
//CapsuleTipLog->SetVisAttributes (G4VisAttributes::Invisible);
|
||||
simpleCapsuleTipVisAtt= new G4VisAttributes(red);
|
||||
simpleCapsuleTipVisAtt->SetVisibility(true);
|
||||
simpleCapsuleTipVisAtt->SetForceSolid(true);
|
||||
CapsuleTipLog->SetVisAttributes(simpleCapsuleTipVisAtt);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -21,8 +21,18 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: BrachyDetectorMessenger.cc,v 1.2 2002/06/18 22:30:31 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// Code developed by:
|
||||
// S.Guatelli
|
||||
//
|
||||
// *********************************
|
||||
// * *
|
||||
// * BrachyDetectorMessenger.cc *
|
||||
// * *
|
||||
// *********************************
|
||||
//
|
||||
//
|
||||
// $Id: BrachyDetectorMessenger.cc,v 1.5 2002/12/06 16:32:03 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -30,7 +40,8 @@
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "BrachyDetectorMessenger.hh"
|
||||
|
||||
#include "BrachyFactoryIr.hh"
|
||||
#include "BrachyRunAction.hh"
|
||||
#include "BrachyDetectorConstruction.hh"
|
||||
#include "G4UIdirectory.hh"
|
||||
#include "G4UIcmdWithAString.hh"
|
||||
@@ -40,8 +51,8 @@
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
BrachyDetectorMessenger::BrachyDetectorMessenger( BrachyDetectorConstruction* Det)
|
||||
:Detector(Det)
|
||||
BrachyDetectorMessenger::BrachyDetectorMessenger( BrachyDetectorConstruction* Det):
|
||||
Detector(Det)
|
||||
{
|
||||
detDir = new G4UIdirectory("/detector/");
|
||||
detDir->SetGuidance(" detector control.");
|
||||
@@ -49,9 +60,32 @@ BrachyDetectorMessenger::BrachyDetectorMessenger( BrachyDetectorConstruction* De
|
||||
AbsMaterCmd = new G4UIcmdWithAString("/detector/setMaterial",this);
|
||||
AbsMaterCmd->SetGuidance("Select Material of the detector.");
|
||||
AbsMaterCmd->SetParameterName("choice",false);
|
||||
AbsMaterCmd->AvailableForStates(Idle);
|
||||
|
||||
}
|
||||
AbsMaterCmd->AvailableForStates(G4State_Idle);
|
||||
selDetCmd = new G4UIcmdWithAString("/geom/select",this);
|
||||
|
||||
mydetDir = new G4UIdirectory("/geom/");
|
||||
mydetDir->SetGuidance("Geometry setup commands.");
|
||||
|
||||
selDetCmd->SetGuidance("Select the way detector geometry is built.");
|
||||
selDetCmd->SetGuidance(" Iodium: Iodium Source ");
|
||||
selDetCmd->SetGuidance(" Iridium: Iridium Source " );
|
||||
selDetCmd->SetGuidance(" Leipzig: Leipzig Source " );
|
||||
selDetCmd->SetParameterName("choice",true);
|
||||
selDetCmd->SetDefaultValue("Iridium");
|
||||
selDetCmd->SetCandidates("Iridium / Iodium / Leipzig");
|
||||
selDetCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
|
||||
switchCmd = new G4UIcmdWithAString("/geom/switch",this);
|
||||
switchCmd->SetGuidance("Assign the selected geometry to G4RunManager.");
|
||||
switchCmd->SetGuidance("In case the choice is present to this command,");
|
||||
switchCmd->SetGuidance("\"/geom/select\" will be invoked and then switched.");
|
||||
switchCmd->SetParameterName("choice",true);
|
||||
switchCmd->SetDefaultValue(" ");
|
||||
switchCmd->SetCandidates("Iridium Iodium Leipzig ");
|
||||
switchCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
|
||||
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -59,7 +93,7 @@ BrachyDetectorMessenger::~BrachyDetectorMessenger()
|
||||
{
|
||||
|
||||
delete AbsMaterCmd;
|
||||
delete UpdateCmd;
|
||||
delete mydetDir;
|
||||
delete detDir;
|
||||
}
|
||||
|
||||
@@ -68,11 +102,20 @@ BrachyDetectorMessenger::~BrachyDetectorMessenger()
|
||||
void BrachyDetectorMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
|
||||
{
|
||||
if( command == AbsMaterCmd )
|
||||
{ Detector->SetAbsorberMaterial(newValue);}
|
||||
|
||||
|
||||
{ Detector->SetAbsorberMaterial(newValue);}
|
||||
|
||||
|
||||
if( command == selDetCmd )
|
||||
{
|
||||
Detector->SelectDetector(newValue);
|
||||
}
|
||||
if( command == switchCmd )
|
||||
{
|
||||
if(newValue=="Iodium" || newValue=="Iridium"|| newValue=="Leipzig")
|
||||
{
|
||||
Detector->SelectDetector(newValue);
|
||||
Detector->SwitchDetector();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -20,12 +20,19 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// Code developed by:
|
||||
// S.Guatelli
|
||||
//
|
||||
// *******************************
|
||||
// * *
|
||||
// * BrachyEventAction.cc *
|
||||
// * BrachyEventAction.cc *
|
||||
// * *
|
||||
// *******************************
|
||||
|
||||
//
|
||||
// $Id: BrachyEventAction.cc,v 1.13 2002/11/27 11:11:22 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
#include "BrachyPrimaryGeneratorActionI.hh"
|
||||
#include "BrachyEventAction.hh"
|
||||
#include "BrachyPhantomHit.hh"
|
||||
#include "BrachyPhantomSD.hh"
|
||||
@@ -41,22 +48,30 @@
|
||||
#include "G4UImanager.hh"
|
||||
#include "G4ios.hh"
|
||||
#include "G4VVisManager.hh"
|
||||
|
||||
#ifdef G4ANALYSIS_USE
|
||||
#include"BrachyAnalysisManager.hh"
|
||||
#endif
|
||||
|
||||
#include "BrachyPrimaryGeneratorActionIr.hh"
|
||||
//....
|
||||
|
||||
BrachyEventAction::BrachyEventAction(G4String &SDName) :
|
||||
drawFlag("all" ),printModulo(1)
|
||||
{
|
||||
|
||||
m_HitsCollectionID = -1;
|
||||
|
||||
SDname=SDName;
|
||||
pDetector=new BrachyDetectorConstruction(SDname);
|
||||
|
||||
m_NumVoxelX=pDetector-> GetNumVoxelX();
|
||||
m_NumVoxelZ=pDetector->GetNumVoxelZ();
|
||||
VoxelWidth_Z= pDetector -> VoxelWidth_Z() ;
|
||||
VoxelWidth_X=pDetector->VoxelWidth_X();
|
||||
SDname=SDName;
|
||||
|
||||
|
||||
pDetector=new BrachyDetectorConstruction(SDname);
|
||||
|
||||
|
||||
m_NumVoxelX=pDetector-> GetNumVoxelX();
|
||||
m_NumVoxelZ=pDetector->GetNumVoxelZ();
|
||||
VoxelWidth_Z= 0.1*cm ;
|
||||
VoxelWidth_X=0.1*cm;
|
||||
|
||||
}
|
||||
|
||||
@@ -64,7 +79,7 @@ BrachyEventAction::BrachyEventAction(G4String &SDName) :
|
||||
|
||||
BrachyEventAction::~BrachyEventAction()
|
||||
{
|
||||
delete pDetector;
|
||||
delete pDetector;
|
||||
|
||||
}
|
||||
|
||||
@@ -73,80 +88,82 @@ BrachyEventAction::~BrachyEventAction()
|
||||
void BrachyEventAction::BeginOfEventAction(const G4Event* aEvent)
|
||||
{
|
||||
|
||||
G4SDManager* pSDManager = G4SDManager::GetSDMpointer();
|
||||
if(m_HitsCollectionID == -1)
|
||||
m_HitsCollectionID = pSDManager->GetCollectionID("PhantomHitsCollection");
|
||||
|
||||
G4SDManager* pSDManager = G4SDManager::GetSDMpointer();
|
||||
if(m_HitsCollectionID == -1)
|
||||
m_HitsCollectionID = pSDManager->GetCollectionID("PhantomHitsCollection");
|
||||
|
||||
}
|
||||
|
||||
//....
|
||||
|
||||
void BrachyEventAction::EndOfEventAction(const G4Event* evt)
|
||||
{
|
||||
|
||||
|
||||
G4int evno = fpEventManager->GetConstCurrentEvent()->GetEventID() ;
|
||||
|
||||
if((evno==100)||(evno==500)||(evno==1000)||(evno==2500)
|
||||
||(evno==5000)||(evno==7000)||(evno==9000)||
|
||||
(evno==9500)||(evno==29000000)||(evno==29500000))
|
||||
G4cout << evno << G4endl;
|
||||
|
||||
if(m_HitsCollectionID < 0)
|
||||
return;
|
||||
if(m_HitsCollectionID < 0)
|
||||
return;
|
||||
|
||||
G4HCofThisEvent* HCE = evt->GetHCofThisEvent();
|
||||
BrachyPhantomHitsCollection* CHC = NULL;
|
||||
G4HCofThisEvent* HCE = evt->GetHCofThisEvent();
|
||||
BrachyPhantomHitsCollection* CHC = NULL;
|
||||
|
||||
if(HCE)
|
||||
CHC = (BrachyPhantomHitsCollection*)(HCE->GetHC(m_HitsCollectionID));
|
||||
if(HCE)
|
||||
CHC = (BrachyPhantomHitsCollection*)(HCE->GetHC(m_HitsCollectionID));
|
||||
|
||||
if(CHC)
|
||||
{
|
||||
if(CHC)
|
||||
{
|
||||
|
||||
|
||||
G4int HitCount = CHC->entries();
|
||||
G4int HitCount = CHC->entries();
|
||||
|
||||
for (G4int h=0; h<HitCount; h++)
|
||||
{
|
||||
for (G4int h=0; h<HitCount; h++)
|
||||
{
|
||||
|
||||
|
||||
BrachyAnalysisManager* analysis = BrachyAnalysisManager::getInstance();
|
||||
|
||||
i=((*CHC)[h])->GetZID();
|
||||
k=((*CHC)[h])->GetXID();
|
||||
|
||||
j=i+k*m_NumVoxelX;
|
||||
#ifdef G4ANALYSIS_USE
|
||||
BrachyAnalysisManager* analysis = BrachyAnalysisManager::getInstance();
|
||||
#endif
|
||||
i=((*CHC)[h])->GetZID();
|
||||
k=((*CHC)[h])->GetXID();
|
||||
j=((*CHC)[h])->GetYID();
|
||||
|
||||
|
||||
EnergyDep=(*CHC)[h]->GetEdep();
|
||||
EnergyDep=((*CHC)[h]->GetEdep())/keV;
|
||||
|
||||
x = (-m_NumVoxelZ+1+2*k)*VoxelWidth_X/2;
|
||||
z = (- m_NumVoxelZ+1+2*i)*VoxelWidth_Z/2;
|
||||
|
||||
if(EnergyDep!=0){
|
||||
{ if( abs(x)>0.56*mm && abs(z)>3.8*mm)
|
||||
analysis->hist(x,z,EnergyDep); analysis->analyse(x,z,EnergyDep);}}}
|
||||
|
||||
}
|
||||
|
||||
// extract the trajectories and draw them
|
||||
x = (-m_NumVoxelZ+1+2*k)*VoxelWidth_X/2;
|
||||
z = (- m_NumVoxelZ+1+2*i)*VoxelWidth_Z/2;
|
||||
y=(- m_NumVoxelZ+1+2*j)*VoxelWidth_Z/2;
|
||||
#ifdef G4ANALYSIS_USE
|
||||
if(EnergyDep!=0)
|
||||
|
||||
{
|
||||
|
||||
if (y<1.*mm){if (y> -1.*mm)
|
||||
{analysis->hist(x,z,EnergyDep);}}
|
||||
|
||||
|
||||
}
|
||||
|
||||
if(EnergyDep!=0)analysis->fill_Tuple(x,y,z,EnergyDep);
|
||||
#endif
|
||||
|
||||
}
|
||||
}
|
||||
// extract the trajectories and draw them
|
||||
|
||||
if (G4VVisManager::GetConcreteInstance())
|
||||
{
|
||||
G4TrajectoryContainer * trajectoryContainer = evt->GetTrajectoryContainer();
|
||||
G4int n_trajectories = 0;
|
||||
if (trajectoryContainer) n_trajectories = trajectoryContainer->entries();
|
||||
G4TrajectoryContainer * trajectoryContainer = evt->GetTrajectoryContainer();
|
||||
G4int n_trajectories = 0;
|
||||
if (trajectoryContainer) n_trajectories = trajectoryContainer->entries();
|
||||
|
||||
for (G4int i=0; i<n_trajectories; i++)
|
||||
for (G4int i=0; i<n_trajectories; i++)
|
||||
{ G4Trajectory* trj = (G4Trajectory*)((*(evt->
|
||||
GetTrajectoryContainer()))[i]);
|
||||
|
||||
|
||||
if (drawFlag == "all") trj->DrawTrajectory(50);
|
||||
else if ((drawFlag == "charged")&&(trj->GetCharge() != 0.))
|
||||
trj->DrawTrajectory(50);
|
||||
else if ((drawFlag == "neutral")&&(trj->GetCharge() == 0.))
|
||||
trj->DrawTrajectory(50);
|
||||
if (drawFlag == "all") trj->DrawTrajectory(50);
|
||||
else if ((drawFlag == "charged")&&(trj->GetCharge() != 0.))
|
||||
trj->DrawTrajectory(50);
|
||||
else if ((drawFlag == "neutral")&&(trj->GetCharge() == 0.))
|
||||
trj->DrawTrajectory(50);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+22
-23
@@ -19,37 +19,36 @@
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PersistentHitMan.cc,v 1.6 2001/07/11 10:02:15 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
// class G4PersistentHitMan
|
||||
//
|
||||
// History:
|
||||
// 99.11.16 Y.Morita Initial version
|
||||
// Code developed by:
|
||||
// S.Guatelli
|
||||
|
||||
#include "G4PersistentHitMan.hh"
|
||||
//
|
||||
// *******************************
|
||||
// * *
|
||||
// * BrachyFactory.cc *
|
||||
// * *
|
||||
// *******************************
|
||||
//
|
||||
// $Id: BrachyFactory.cc,v 1.3 2002/12/12 19:16:18 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
#include"BrachyFactory.hh"
|
||||
|
||||
|
||||
G4PersistentHitMan* G4PersistentHitMan::f_PersistentHitMan = 0;
|
||||
|
||||
G4PersistentHitMan* G4PersistentHitMan::GetPersistentHitMan()
|
||||
BrachyFactory::BrachyFactory()
|
||||
{ ;}
|
||||
BrachyFactory::~BrachyFactory()
|
||||
{
|
||||
if(!f_PersistentHitMan)
|
||||
{
|
||||
f_PersistentHitMan = new G4PersistentHitMan;
|
||||
}
|
||||
return f_PersistentHitMan;
|
||||
;
|
||||
}
|
||||
|
||||
G4PersistentHitMan* G4PersistentHitMan::get_PersistentHitManIfExist()
|
||||
{ return f_PersistentHitMan; }
|
||||
|
||||
G4PersistentHitMan::G4PersistentHitMan()
|
||||
: f_CurrentPHCofThisEvent(0)
|
||||
G4VUserPrimaryGeneratorAction* BrachyFactory::CreatePrimaryGeneratorAction()
|
||||
{;}
|
||||
|
||||
G4PersistentHitMan::~G4PersistentHitMan()
|
||||
void BrachyFactory::CreateSource(G4VPhysicalVolume* mother)
|
||||
{;}
|
||||
void BrachyFactory::CleanSource()
|
||||
{;}
|
||||
|
||||
+48
-20
@@ -20,36 +20,64 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// Code developed by:
|
||||
// S.Guatelli
|
||||
//
|
||||
// $Id: B07PrimaryGeneratorAction.cc,v 1.4 2002/05/15 02:48:45 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// *******************************
|
||||
// * *
|
||||
// * BrachyFactoryI.cc
|
||||
// * *
|
||||
// *******************************
|
||||
//
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#include "B07PrimaryGeneratorAction.hh"
|
||||
|
||||
// $Id: BrachyFactoryI.cc,v 1.2 2002/11/18 15:18:38 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
#include "BrachyFactoryI.hh"
|
||||
#include"BrachyPrimaryGeneratorActionI.hh"
|
||||
#include"BrachyDetectorConstructionI.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "Randomize.hh"
|
||||
#include "G4Event.hh"
|
||||
#include "G4ParticleGun.hh"
|
||||
#include "G4Neutron.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4IonTable.hh"
|
||||
#include "G4RadioactiveDecay.hh"
|
||||
#include "G4UImanager.hh"
|
||||
#include "globals.hh"
|
||||
#include <math.h>
|
||||
#include "G4RunManager.hh"
|
||||
|
||||
B07PrimaryGeneratorAction::B07PrimaryGeneratorAction()
|
||||
BrachyFactoryI:: BrachyFactoryI()
|
||||
{
|
||||
G4int n_particle = 1;
|
||||
particleGun = new G4ParticleGun(n_particle);
|
||||
particleGun->SetParticleDefinition(G4Neutron::NeutronDefinition());
|
||||
particleGun->SetParticleEnergy(10.0*MeV);
|
||||
particleGun->SetParticlePosition(G4ThreeVector(0.0, 0.0, -15.0005*cm));
|
||||
particleGun->SetParticleMomentumDirection(G4ThreeVector(0.0, 0.0, 1.0));
|
||||
pIodio=new BrachyDetectorConstructionI();
|
||||
}
|
||||
|
||||
B07PrimaryGeneratorAction::~B07PrimaryGeneratorAction()
|
||||
BrachyFactoryI:: ~BrachyFactoryI()
|
||||
{
|
||||
delete particleGun;
|
||||
|
||||
delete pIodio;
|
||||
}
|
||||
|
||||
|
||||
G4VUserPrimaryGeneratorAction* BrachyFactoryI::CreatePrimaryGeneratorAction()
|
||||
|
||||
{
|
||||
|
||||
|
||||
G4VUserPrimaryGeneratorAction* pIodium =new BrachyPrimaryGeneratorActionI();
|
||||
if(pIodium) return pIodium ;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
void B07PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
|
||||
void BrachyFactoryI::CreateSource(G4VPhysicalVolume* mother)
|
||||
{
|
||||
particleGun->GeneratePrimaryVertex(anEvent);
|
||||
|
||||
pIodio -> ConstructIodium(mother);
|
||||
|
||||
}
|
||||
|
||||
void BrachyFactoryI::CleanSource()
|
||||
{;}
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// Code developed by:
|
||||
// S.Guatelli
|
||||
//
|
||||
// *******************************
|
||||
// * *
|
||||
// * BrachyFactoryIr *
|
||||
// * *
|
||||
// *******************************
|
||||
//
|
||||
// $Id: BrachyFactoryIr.cc,v 1.2 2002/11/18 15:18:38 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
#include "BrachyFactoryIr.hh"
|
||||
#include"BrachyPrimaryGeneratorActionIr.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "Randomize.hh"
|
||||
#include "G4Event.hh"
|
||||
#include "G4ParticleGun.hh"
|
||||
#include "G4IonTable.hh"
|
||||
#include "G4RadioactiveDecay.hh"
|
||||
#include "G4UImanager.hh"
|
||||
#include "globals.hh"
|
||||
#include <math.h>
|
||||
#include "G4RunManager.hh"
|
||||
#include"BrachyDetectorMessenger.hh"
|
||||
#include"BrachyDetectorConstructionIr.hh"
|
||||
BrachyFactoryIr:: BrachyFactoryIr()
|
||||
{
|
||||
pIridio=new BrachyDetectorConstructionIr();
|
||||
|
||||
}
|
||||
|
||||
BrachyFactoryIr:: ~BrachyFactoryIr()
|
||||
{
|
||||
delete pIridio;
|
||||
|
||||
}
|
||||
|
||||
|
||||
G4VUserPrimaryGeneratorAction* BrachyFactoryIr::CreatePrimaryGeneratorAction()
|
||||
|
||||
{
|
||||
|
||||
|
||||
G4VUserPrimaryGeneratorAction* pIridium =new BrachyPrimaryGeneratorActionIr();
|
||||
if(pIridium) return pIridium ;
|
||||
|
||||
|
||||
}
|
||||
|
||||
void BrachyFactoryIr::CreateSource(G4VPhysicalVolume* mother)
|
||||
{
|
||||
|
||||
pIridio -> ConstructIridium(mother);
|
||||
|
||||
}
|
||||
void BrachyFactoryIr::CleanSource()
|
||||
{
|
||||
|
||||
pIridio -> CleanIridium();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// Code developed by:
|
||||
// S.Guatelli
|
||||
//
|
||||
// *******************************
|
||||
// * *
|
||||
// * BrachyFactoryLeipzig.cc *
|
||||
// * *
|
||||
// *******************************
|
||||
//
|
||||
// $Id: BrachyFactoryLeipzig.cc,v 1.2 2002/11/18 15:18:38 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
|
||||
|
||||
#include "BrachyFactoryLeipzig.hh"
|
||||
#include"BrachyPrimaryGeneratorActionIr.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "Randomize.hh"
|
||||
#include "G4Event.hh"
|
||||
#include "G4ParticleGun.hh"
|
||||
#include "G4IonTable.hh"
|
||||
#include "G4RadioactiveDecay.hh"
|
||||
#include "G4UImanager.hh"
|
||||
#include "globals.hh"
|
||||
#include <math.h>
|
||||
#include "G4RunManager.hh"
|
||||
#include"BrachyDetectorMessenger.hh"
|
||||
#include"BrachyDetectorConstructionLeipzig.hh"
|
||||
BrachyFactoryLeipzig:: BrachyFactoryLeipzig()
|
||||
{
|
||||
pLeipzig=new BrachyDetectorConstructionLeipzig();
|
||||
|
||||
}
|
||||
|
||||
BrachyFactoryLeipzig:: ~BrachyFactoryLeipzig()
|
||||
{
|
||||
delete pLeipzig;
|
||||
|
||||
}
|
||||
|
||||
|
||||
G4VUserPrimaryGeneratorAction* BrachyFactoryLeipzig::CreatePrimaryGeneratorAction()
|
||||
|
||||
{
|
||||
|
||||
|
||||
G4VUserPrimaryGeneratorAction* pIridium =new BrachyPrimaryGeneratorActionIr();
|
||||
if(pIridium) return pIridium ;
|
||||
|
||||
|
||||
}
|
||||
|
||||
void BrachyFactoryLeipzig::CreateSource(G4VPhysicalVolume* mother)
|
||||
{
|
||||
|
||||
pLeipzig -> ConstructLeipzig(mother);
|
||||
|
||||
}
|
||||
void BrachyFactoryLeipzig::CleanSource()
|
||||
{
|
||||
|
||||
;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,262 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// Code developed by:
|
||||
// S.Guatelli
|
||||
//
|
||||
// *******************************
|
||||
// * *
|
||||
// * BrachyMaterial.cc *
|
||||
// * *
|
||||
// *******************************
|
||||
//
|
||||
// $Id: BrachyMaterial.cc,v 1.2 2002/11/18 15:18:38 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
|
||||
#include "G4MaterialPropertiesTable.hh"
|
||||
#include "G4MaterialPropertyVector.hh"
|
||||
#include "globals.hh"
|
||||
#include "G4MaterialTable.hh"
|
||||
#include "Randomize.hh"
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4Element.hh"
|
||||
#include "G4ElementTable.hh"
|
||||
#include "BrachyMaterial.hh"
|
||||
|
||||
BrachyMaterial::BrachyMaterial()
|
||||
{;}
|
||||
|
||||
BrachyMaterial::~BrachyMaterial()
|
||||
{;}
|
||||
void BrachyMaterial::DefineMaterials()
|
||||
{
|
||||
// Define required materials
|
||||
|
||||
G4double A; // atomic mass
|
||||
G4double Z; // atomic number
|
||||
G4double d; // density
|
||||
|
||||
// General elements
|
||||
|
||||
A = 1.01*g/mole;
|
||||
G4Element* elH = new G4Element ("Hydrogen","H",Z=1.,A);
|
||||
|
||||
A = 14.01*g/mole;
|
||||
G4Element* elN = new G4Element("Nitrogen","N",Z=7.,A);
|
||||
|
||||
A = 16.00*g/mole;
|
||||
|
||||
G4Element* elO = new G4Element("Oxygen","O",Z=8.,A);
|
||||
|
||||
A=26.98*g/mole;
|
||||
G4Element* elAl=new G4Element("Aluminum","Al", Z=13.,A);
|
||||
|
||||
A=12.011*g/mole;
|
||||
G4Element* elC=new G4Element("Carbon","C",Z=6.,A);
|
||||
|
||||
A=22.99*g/mole;
|
||||
G4Element* elNa=new G4Element("Sodium","Na",Z=11.,A);
|
||||
|
||||
A=24.305*g/mole;
|
||||
G4Element* elMg=new G4Element("Magnesium","Mg",Z=12.,A);
|
||||
|
||||
A=30.974*g/mole;
|
||||
G4Element* elP=new G4Element("Phosphorus","P",Z=15.,A);
|
||||
|
||||
A=32.06*g/mole;
|
||||
G4Element* elS=new G4Element("Sulfur","S",Z=16.,A);
|
||||
|
||||
A=35.453*g/mole;
|
||||
G4Element* elCl=new G4Element("Chlorine","Cl",Z=17.,A);
|
||||
|
||||
|
||||
A=39.098*g/mole;
|
||||
G4Element* elK=new G4Element("Potassium","K",Z=19.,A);
|
||||
|
||||
A=40.08*g/mole;
|
||||
G4Element* elCa=new G4Element("Calcium","Ca",Z=20.,A);
|
||||
|
||||
|
||||
|
||||
// Elements for source capsule and cable
|
||||
|
||||
|
||||
|
||||
|
||||
A=65.38*g/mole;
|
||||
G4Element* elZn=new G4Element("Zinc","Zn",Z=30.,A);
|
||||
|
||||
|
||||
|
||||
A = 54.94*g/mole;
|
||||
G4Element* elMn = new G4Element("Manganese","Mn",Z=25.,A);
|
||||
|
||||
A = 28.09*g/mole;
|
||||
G4Element* elSi = new G4Element("Silicon","Si",Z=14.,A);
|
||||
|
||||
A = 52.00*g/mole;
|
||||
G4Element* elCr = new G4Element("Chromium","Cr",Z=24.,A);
|
||||
|
||||
A = 58.70*g/mole;
|
||||
G4Element* elNi = new G4Element("Nickel","Ni",Z=28.,A);
|
||||
|
||||
A = 55.85*g/mole;
|
||||
G4Element* elFe = new G4Element("Iron","Fe",Z=26.,A);
|
||||
|
||||
// Material for Leipzig applicator and cup
|
||||
|
||||
// Tungsten
|
||||
|
||||
|
||||
A= 183.84* g/mole;
|
||||
d=19.3*g/cm3;
|
||||
G4Material* matW = new G4Material("Tungsten",Z=74.,A,d);
|
||||
|
||||
|
||||
// Perspex, plexiglass, lucite
|
||||
d= 1.19*g/cm3;
|
||||
|
||||
G4Material* matplexiglass = new G4Material("Plexiglass",d,3);
|
||||
matplexiglass->AddElement(elH,0.08);
|
||||
matplexiglass->AddElement(elC,0.60);
|
||||
matplexiglass->AddElement(elO,0.32);
|
||||
|
||||
// Lead material
|
||||
A = 207.19*g/mole;
|
||||
Z = 82;
|
||||
d = 11.35*g/cm3;
|
||||
G4Material* matPb = new G4Material("Lead",Z,A,d);
|
||||
|
||||
// Iridium (Medical Physics, Vol 25, No 10, Oct 1998)
|
||||
d = 22.42*g/cm3;
|
||||
A = 191.96260*g/mole ;
|
||||
Z = 77;
|
||||
G4Material* matir192 = new G4Material("Iridium",Z,A,d);
|
||||
|
||||
//titanium
|
||||
A=47.88*g/mole;
|
||||
d=4.50*g/cm3;
|
||||
G4Material* Titanium=new G4Material("titanium" ,Z=22.,A,d);
|
||||
|
||||
// Air material
|
||||
d = 1.290*mg/cm3;
|
||||
G4Material* matAir = new G4Material("Air",d,2);
|
||||
matAir->AddElement(elN,0.7);
|
||||
matAir->AddElement(elO,0.3);
|
||||
|
||||
|
||||
// Water
|
||||
d = 1.000*g/cm3;
|
||||
G4Material* matH2O = new G4Material("Water",d,2);
|
||||
matH2O->AddElement(elH,2);
|
||||
matH2O->AddElement(elO,1);
|
||||
|
||||
//soft tissue(NIST data)
|
||||
|
||||
d=1.0*g/cm3;
|
||||
G4Material* soft=new G4Material("tissue",d,13);
|
||||
soft->AddElement(elH,0.104472);
|
||||
soft->AddElement(elC,0.23219);
|
||||
soft->AddElement(elN,0.02488);
|
||||
soft->AddElement(elO,0.630238);
|
||||
soft->AddElement(elNa,0.00113);
|
||||
soft->AddElement(elMg,0.00013);
|
||||
soft->AddElement(elP,0.00133);
|
||||
soft->AddElement(elS,0.00199);
|
||||
soft->AddElement(elCl,0.00134);
|
||||
soft->AddElement(elK,0.00199);
|
||||
soft->AddElement(elCa,0.00023);
|
||||
soft->AddElement(elFe,0.00005);
|
||||
soft->AddElement(elZn,0.00003);
|
||||
|
||||
|
||||
|
||||
// Stainless steel (Medical Physics, Vol 25, No 10, Oct 1998)
|
||||
d = 8.02*g/cm3 ;
|
||||
G4Material* matsteel = new G4Material("Stainless steel",d,5);
|
||||
matsteel->AddElement(elMn, 0.02);
|
||||
matsteel->AddElement(elSi, 0.01);
|
||||
matsteel->AddElement(elCr, 0.19);
|
||||
matsteel->AddElement(elNi, 0.10);
|
||||
matsteel->AddElement(elFe, 0.68);
|
||||
|
||||
|
||||
//gold(chimica degli elementi N.N Greenwood,A.Earnshaw)
|
||||
A=196.97*g/mole;
|
||||
d=19.32*g/cm3;
|
||||
G4Material* gold=new G4Material("gold",Z=79.,A,d);
|
||||
|
||||
|
||||
|
||||
//IodiumCore(chimica degli elementi N.N Greenwood,A.Earnshaw)
|
||||
A=124.9*g/mole;
|
||||
d=4.862*g/cm3;
|
||||
G4Material* matI=new G4Material("Iodium",Z=53.,A,d);
|
||||
|
||||
//ceramica(Medical Physics, May 2000)
|
||||
|
||||
d=2.88*g/cm3;
|
||||
G4Material* ceramica=new G4Material("allumina",d,2);
|
||||
ceramica->AddElement(elAl,2);
|
||||
ceramica->AddElement(elO,3);
|
||||
|
||||
G4double density = universe_mean_density;
|
||||
G4double pressure = 3.e-18*pascal;
|
||||
G4double temperature = 2.73*kelvin;
|
||||
A=1.01*g/mole;
|
||||
G4Material*Vacuum = new G4Material("Galactic", Z=1., A,
|
||||
density,kStateGas,temperature,pressure);
|
||||
|
||||
|
||||
//compact bone
|
||||
|
||||
d=1.85*g/cm3;
|
||||
G4Material* bone=new G4Material("bone",d,8);
|
||||
bone->AddElement(elH,0.063984);
|
||||
bone->AddElement(elC,0.278);
|
||||
bone->AddElement(elN,0.027);
|
||||
bone->AddElement(elO,0.410016);
|
||||
bone->AddElement(elMg,0.002);
|
||||
bone->AddElement(elP,0.07);
|
||||
bone->AddElement(elS,0.002);
|
||||
bone->AddElement(elCa,0.147);
|
||||
|
||||
G4Material* muscle=new G4Material("muscle",d,9);
|
||||
muscle->AddElement(elH,0.101997);
|
||||
muscle->AddElement(elC,0.123);
|
||||
muscle->AddElement(elN,0.035);
|
||||
muscle->AddElement(elNa,0.0008);
|
||||
muscle->AddElement(elO,0.729);
|
||||
muscle->AddElement(elMg,0.0002);
|
||||
muscle->AddElement(elP,0.002);
|
||||
muscle->AddElement(elS,0.005);
|
||||
muscle->AddElement(elK,0.003);
|
||||
|
||||
|
||||
|
||||
}
|
||||
G4Material* BrachyMaterial::GetMat(G4String material)
|
||||
{
|
||||
G4Material* pttoMaterial = G4Material::GetMaterial(material);
|
||||
if (pttoMaterial) return pttoMaterial;
|
||||
}
|
||||
@@ -20,12 +20,19 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// Code developed by:
|
||||
// S. Agostinelli, F. Foppiano, S. Garelli , M. Tropeano, S.Guatelli
|
||||
//
|
||||
// ********************************
|
||||
// * *
|
||||
// * BrachyPhantomHit.cc *
|
||||
// * BrachyPhantomHit.cc *
|
||||
// * *
|
||||
// ********************************
|
||||
|
||||
//
|
||||
// $Id: BrachyPhantomHit.cc,v 1.3 2002/11/18 15:18:38 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
#include "BrachyPhantomHit.hh"
|
||||
#include "G4ios.hh"
|
||||
#include "G4VVisManager.hh"
|
||||
@@ -37,10 +44,10 @@ G4Allocator<BrachyPhantomHit> BrachyPhantomHitAllocator;
|
||||
|
||||
//....
|
||||
|
||||
BrachyPhantomHit::BrachyPhantomHit(G4LogicalVolume* logVol,G4int XID,G4int ZID)
|
||||
:m_pLogV(logVol),m_XID(XID),m_ZID(ZID)
|
||||
BrachyPhantomHit::BrachyPhantomHit(G4LogicalVolume* logVol,G4int XID,G4int YID,G4int ZID)
|
||||
:m_pLogV(logVol),m_XID(XID),m_ZID(ZID),m_YID(YID)
|
||||
{
|
||||
m_Edep=0;
|
||||
m_Edep=0;
|
||||
}
|
||||
|
||||
//....
|
||||
@@ -53,32 +60,34 @@ BrachyPhantomHit::~BrachyPhantomHit()
|
||||
|
||||
BrachyPhantomHit::BrachyPhantomHit(const BrachyPhantomHit &right)
|
||||
{
|
||||
m_XID = right.m_XID;
|
||||
m_ZID = right.m_ZID;
|
||||
m_Edep = right.m_Edep;
|
||||
m_Pos = right.m_Pos;
|
||||
m_Rot = right.m_Rot;
|
||||
m_pLogV = right.m_pLogV;
|
||||
m_XID = right.m_XID;
|
||||
m_ZID = right.m_ZID;
|
||||
m_YID = right.m_YID;
|
||||
m_Edep = right.m_Edep;
|
||||
m_Pos = right.m_Pos;
|
||||
m_Rot = right.m_Rot;
|
||||
m_pLogV = right.m_pLogV;
|
||||
}
|
||||
|
||||
//....
|
||||
|
||||
const BrachyPhantomHit& BrachyPhantomHit::operator=(const BrachyPhantomHit &right)
|
||||
{
|
||||
m_XID = right.m_XID;
|
||||
m_ZID = right.m_ZID;
|
||||
m_Edep = right.m_Edep;
|
||||
m_Pos = right.m_Pos;
|
||||
m_Rot = right.m_Rot;
|
||||
m_pLogV = right.m_pLogV;
|
||||
return *this;
|
||||
m_XID = right.m_XID;
|
||||
m_ZID = right.m_ZID;
|
||||
m_YID = right.m_YID;
|
||||
m_Edep = right.m_Edep;
|
||||
m_Pos = right.m_Pos;
|
||||
m_Rot = right.m_Rot;
|
||||
m_pLogV = right.m_pLogV;
|
||||
return *this;
|
||||
}
|
||||
|
||||
//....
|
||||
|
||||
int BrachyPhantomHit::operator==(const BrachyPhantomHit &right) const
|
||||
{
|
||||
return((m_XID==right.m_XID)&&(m_ZID==right.m_ZID));
|
||||
return((m_XID==right.m_XID)&&(m_ZID==right.m_ZID)&&(m_YID==right.m_YID));
|
||||
}
|
||||
|
||||
//....
|
||||
|
||||
@@ -20,12 +20,19 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// Code developed by:
|
||||
// S. Agostinelli, F. Foppiano, S. Garelli , M. Tropeano, S.Guatelli
|
||||
//
|
||||
// ************************************
|
||||
// * *
|
||||
// * BrachyWaterBoxROGeometry.cc *
|
||||
// * BrachyPhantomROGeometry.cc *
|
||||
// * *
|
||||
// ************************************
|
||||
|
||||
//
|
||||
// $Id: BrachyPhantomROGeometry.cc,v 1.3 2002/11/18 15:18:38 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
#include "BrachyPhantomROGeometry.hh"
|
||||
#include "BrachyDummySD.hh"
|
||||
|
||||
@@ -43,7 +50,7 @@
|
||||
//....
|
||||
|
||||
BrachyPhantomROGeometry::BrachyPhantomROGeometry(G4String aString,G4double DetDimX,G4double DetDimZ,G4int NumVoxelX,G4int NumVoxelZ)
|
||||
: G4VReadOutGeometry(aString),m_DetDimX(DetDimX),m_DetDimZ(DetDimZ),m_NumVoxelX(NumVoxelX),m_NumVoxelZ(NumVoxelZ)
|
||||
: G4VReadOutGeometry(aString),m_DetDimX(DetDimX),m_DetDimZ(DetDimZ),m_NumVoxelX(NumVoxelX),m_NumVoxelZ(NumVoxelZ)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -57,59 +64,70 @@ BrachyPhantomROGeometry::~BrachyPhantomROGeometry()
|
||||
|
||||
G4VPhysicalVolume* BrachyPhantomROGeometry::Build()
|
||||
{
|
||||
// A dummy material is used to fill the volumes of the readout geometry.
|
||||
// (It will be allowed to set a NULL pointer in volumes of such virtual
|
||||
// division in future, since this material is irrelevant for tracking.)
|
||||
|
||||
// A dummy material is used to fill the volumes of the readout geometry.
|
||||
// (It will be allowed to set a NULL pointer in volumes of such virtual
|
||||
// division in future, since this material is irrelevant for tracking.)
|
||||
|
||||
G4Material* dummyMat = new G4Material(name="dummyMat", 1., 1.*g/mole, 1.*g/cm3);
|
||||
G4Material* dummyMat = new G4Material(name="dummyMat", 1., 1.*g/mole, 1.*g/cm3);
|
||||
|
||||
// Slice thickness is the average of Voxel X and Z sizes
|
||||
G4double DetVoxel_y = (m_DetDimX/m_NumVoxelX+m_DetDimZ/m_NumVoxelZ)/2.0;
|
||||
G4double DetVoxel_y = (m_DetDimX/m_NumVoxelX+m_DetDimZ/m_NumVoxelZ)/2.0;
|
||||
|
||||
G4double ExpHall_x = 4.0*m;
|
||||
G4double ExpHall_y = 4.0*m;
|
||||
G4double ExpHall_z = 4.0*m;
|
||||
G4double ExpHall_x = 4.0*m;
|
||||
G4double ExpHall_y = 4.0*m;
|
||||
G4double ExpHall_z = 4.0*m;
|
||||
|
||||
G4double Det_x = m_DetDimX/2;
|
||||
G4double Det_y = DetVoxel_y;
|
||||
G4double Det_z = m_DetDimZ/2;
|
||||
G4double Det_x = m_DetDimX/2;
|
||||
G4double Det_y = DetVoxel_y;
|
||||
G4double Det_z = m_DetDimZ/2;
|
||||
G4double Det_y2 =m_DetDimX/2 ;
|
||||
|
||||
G4double DetVoxelX_x = Det_x/m_NumVoxelX;
|
||||
G4double DetVoxelX_y = DetVoxel_y;
|
||||
G4double DetVoxelX_z = Det_z;
|
||||
G4double DetVoxelX_dx = 2*DetVoxelX_x;
|
||||
G4double DetVoxelX_x = Det_x/m_NumVoxelX;
|
||||
G4double DetVoxelX_y = DetVoxel_y;
|
||||
G4double DetVoxelX_z = Det_z;
|
||||
G4double DetVoxelX_dx = 2*DetVoxelX_x;
|
||||
|
||||
G4double DetVoxelZ_x = Det_x;
|
||||
G4double DetVoxelZ_y = DetVoxel_y;
|
||||
G4double DetVoxelZ_z = Det_z/m_NumVoxelZ;
|
||||
G4double DetVoxelZ_dz = 2*DetVoxelZ_z;
|
||||
G4double DetVoxelZ_x = Det_x;
|
||||
G4double DetVoxelZ_y = DetVoxel_y;
|
||||
G4double DetVoxelZ_z = Det_z/m_NumVoxelZ;
|
||||
G4double DetVoxelZ_dz = 2*DetVoxelZ_z;
|
||||
|
||||
G4Box *ROExpHall = new G4Box("ROExpHall",ExpHall_x,ExpHall_y,ExpHall_z);
|
||||
G4LogicalVolume *ROExpHallLog = new G4LogicalVolume(ROExpHall,dummyMat,"ROExpHallLog",0,0,0);
|
||||
G4VPhysicalVolume *ROExpHallPhys = new G4PVPlacement(0,G4ThreeVector(),"ROExpHallPhys",ROExpHallLog,0,false,0);
|
||||
G4Box *ROExpHall = new G4Box("ROExpHall",ExpHall_x,ExpHall_y,ExpHall_z);
|
||||
G4LogicalVolume *ROExpHallLog = new G4LogicalVolume(ROExpHall,dummyMat,"ROExpHallLog",0,0,0);
|
||||
G4VPhysicalVolume *ROExpHallPhys = new G4PVPlacement(0,G4ThreeVector(),"ROExpHallPhys",ROExpHallLog,0,false,0);
|
||||
|
||||
G4Box *RODetector = new G4Box("RODetector", Det_x, Det_y, Det_z);
|
||||
G4LogicalVolume *RODetectorLog = new G4LogicalVolume(RODetector,dummyMat,"RODetectorLog",0,0,0);
|
||||
G4VPhysicalVolume *RODetectorPhys = new G4PVPlacement(0,G4ThreeVector(),"DetectorPhys",RODetectorLog,ROExpHallPhys,false,0);
|
||||
G4Box *RODetector = new G4Box("RODetector", Det_x, Det_y2, Det_z);
|
||||
G4LogicalVolume *RODetectorLog = new G4LogicalVolume(RODetector,dummyMat,"RODetectorLog",0,0,0);
|
||||
G4VPhysicalVolume *RODetectorPhys = new G4PVPlacement(0,G4ThreeVector(),"DetectorPhys",RODetectorLog,ROExpHallPhys,false,0);
|
||||
|
||||
// ReadOut Voxel division
|
||||
|
||||
// ReadOut Voxel division
|
||||
|
||||
// X division first...
|
||||
|
||||
G4Box *RODetectorXDivision = new G4Box("RODetectorXDivision",DetVoxelX_x,DetVoxelX_y,DetVoxelX_z);
|
||||
G4LogicalVolume *RODetectorXDivisionLog = new G4LogicalVolume(RODetectorXDivision,dummyMat,"RODetectorXDivisionLog",0,0,0);
|
||||
G4VPhysicalVolume *RODetectorXDivisionPhys = new G4PVReplica("RODetectorXDivisionPhys",RODetectorXDivisionLog,RODetectorPhys,kXAxis,m_NumVoxelX,DetVoxelX_dx);
|
||||
G4Box *RODetectorXDivision = new G4Box("RODetectorXDivision",DetVoxelX_x,DetVoxelX_z,DetVoxelX_z);
|
||||
G4LogicalVolume *RODetectorXDivisionLog = new G4LogicalVolume(RODetectorXDivision,dummyMat,"RODetectorXDivisionLog",0,0,0);
|
||||
G4VPhysicalVolume *RODetectorXDivisionPhys = new G4PVReplica("RODetectorXDivisionPhys",RODetectorXDivisionLog,RODetectorPhys,kXAxis,m_NumVoxelX,DetVoxelX_dx);
|
||||
|
||||
// ...then Z division
|
||||
|
||||
G4Box *RODetectorZDivision = new G4Box("RODetectorZDivision",DetVoxelZ_x,DetVoxelZ_y,DetVoxelZ_z);
|
||||
G4LogicalVolume *RODetectorZDivisionLog = new G4LogicalVolume(RODetectorZDivision,dummyMat,"RODetectorZDivisionLog",0,0,0);
|
||||
G4VPhysicalVolume *RODetectorZDivisionPhys = new G4PVReplica("RODetectorZDivisionPhys",RODetectorZDivisionLog,RODetectorXDivisionPhys,kZAxis,m_NumVoxelZ,DetVoxelZ_dz);
|
||||
|
||||
BrachyDummySD *dummySD = new BrachyDummySD;
|
||||
RODetectorZDivisionLog->SetSensitiveDetector(dummySD);
|
||||
|
||||
return ROExpHallPhys;
|
||||
// ...then Z division
|
||||
|
||||
G4Box *RODetectorZDivision = new G4Box("RODetectorZDivision",DetVoxelZ_x,DetVoxelZ_x,DetVoxelZ_z);
|
||||
G4LogicalVolume *RODetectorZDivisionLog = new G4LogicalVolume(RODetectorZDivision,dummyMat,"RODetectorZDivisionLog",0,0,0);
|
||||
G4VPhysicalVolume *RODetectorZDivisionPhys = new G4PVReplica("RODetectorZDivisionPhys",RODetectorZDivisionLog,RODetectorXDivisionPhys,kZAxis,m_NumVoxelZ,DetVoxelZ_dz);
|
||||
|
||||
// ...then Y division
|
||||
|
||||
G4Box *RODetectorYDivision = new G4Box("RODetectorYDivision",DetVoxelZ_x,DetVoxelZ_y,DetVoxelZ_x);
|
||||
G4LogicalVolume *RODetectorYDivisionLog = new G4LogicalVolume(RODetectorYDivision,dummyMat,"RODetectorYDivisionLog",0,0,0);
|
||||
|
||||
G4VPhysicalVolume *RODetectorYDivisionPhys = new G4PVReplica("RODetectorYDivisionPhys",RODetectorYDivisionLog,RODetectorZDivisionPhys,kYAxis,m_NumVoxelZ,DetVoxelZ_dz);
|
||||
|
||||
BrachyDummySD *dummySD = new BrachyDummySD;
|
||||
RODetectorYDivisionLog->SetSensitiveDetector(dummySD);
|
||||
|
||||
return ROExpHallPhys;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -20,16 +20,23 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// Code developed by:
|
||||
// S. Agostinelli, F. Foppiano, S. Garelli , M. Tropeano, S.Guatelli
|
||||
//
|
||||
// ********************************
|
||||
// * *
|
||||
// * BrachyWaterBoxSD.cc *
|
||||
// * BrachyPhantomSD.cc *
|
||||
// * *
|
||||
// ********************************
|
||||
|
||||
//
|
||||
// $Id: BrachyPhantomSD.cc,v 1.3 2002/11/18 15:18:38 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
#include "BrachyPhantomSD.hh"
|
||||
#include "BrachyPhantomHit.hh"
|
||||
#include "BrachyDetectorConstruction.hh"
|
||||
|
||||
#include "BrachyDetectorConstruction.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
@@ -42,72 +49,75 @@
|
||||
//....
|
||||
|
||||
BrachyPhantomSD::BrachyPhantomSD(G4String name, G4int NumVoxelX, G4int NumVoxelZ)
|
||||
:G4VSensitiveDetector(name),m_NumVoxelX(NumVoxelX),m_NumVoxelZ(NumVoxelZ)
|
||||
:G4VSensitiveDetector(name),m_NumVoxelX(NumVoxelX),m_NumVoxelZ(NumVoxelZ)
|
||||
{
|
||||
G4String HCname;
|
||||
collectionName.insert(HCname="PhantomHitsCollection");
|
||||
m_pVoxelID = new G4int[NumVoxelX*NumVoxelZ];
|
||||
m_pPhantomHitsCollection = NULL;
|
||||
G4String HCname;
|
||||
collectionName.insert(HCname="PhantomHitsCollection");
|
||||
m_pVoxelID = new G4int[NumVoxelX*NumVoxelZ*NumVoxelZ];
|
||||
m_pPhantomHitsCollection = NULL;
|
||||
}
|
||||
|
||||
//....
|
||||
|
||||
BrachyPhantomSD::~BrachyPhantomSD()
|
||||
{
|
||||
delete[] m_pVoxelID;
|
||||
delete[] m_pVoxelID;
|
||||
}
|
||||
|
||||
//....
|
||||
|
||||
void BrachyPhantomSD::Initialize(G4HCofThisEvent*HCE)
|
||||
{
|
||||
m_pPhantomHitsCollection = new BrachyPhantomHitsCollection(SensitiveDetectorName,collectionName[0]);
|
||||
G4int m_NumVoxelY=300;
|
||||
m_pPhantomHitsCollection = new BrachyPhantomHitsCollection(SensitiveDetectorName,collectionName[0]);
|
||||
|
||||
for(G4int k=0;k<m_NumVoxelZ;k++)
|
||||
for(G4int i=0;i<m_NumVoxelX;i++)
|
||||
for(G4int j=0;j<m_NumVoxelY;j++)
|
||||
m_pVoxelID[i+k*m_NumVoxelX+j*m_NumVoxelY*m_NumVoxelY] = -1;
|
||||
|
||||
for(G4int k=0;k<m_NumVoxelZ;k++)
|
||||
for(G4int i=0;i<m_NumVoxelX;i++)
|
||||
m_pVoxelID[i+k*m_NumVoxelX] = -1;
|
||||
}
|
||||
|
||||
//....
|
||||
|
||||
G4bool BrachyPhantomSD::ProcessHits(G4Step* aStep, G4TouchableHistory* ROhist)
|
||||
{
|
||||
if(!ROhist)
|
||||
return false;
|
||||
if(!ROhist)
|
||||
return false;
|
||||
|
||||
if(aStep->GetPreStepPoint()->GetPhysicalVolume()->GetName() != "WaterBoxPhys")
|
||||
return false;
|
||||
if(aStep->GetPreStepPoint()->GetPhysicalVolume()->GetName() != "PhantomPhys")
|
||||
return false;
|
||||
|
||||
G4double edep = aStep->GetTotalEnergyDeposit();
|
||||
if(edep==0.)
|
||||
return false;
|
||||
G4double edep = aStep->GetTotalEnergyDeposit();
|
||||
if(edep==0.)
|
||||
return false;
|
||||
|
||||
G4VPhysicalVolume* physVol = ROhist->GetVolume();
|
||||
G4VPhysicalVolume* mothVol = ROhist->GetVolume(1);
|
||||
G4VPhysicalVolume* physVol = ROhist->GetVolume();
|
||||
G4VPhysicalVolume* mothVol = ROhist->GetVolume(1);
|
||||
|
||||
// Read Voxel indexes: i is the x index, k is the z index
|
||||
G4int k = ROhist->GetReplicaNumber();
|
||||
G4int i = ROhist->GetReplicaNumber(1);
|
||||
|
||||
if(m_pVoxelID[i+k*m_NumVoxelX]==-1)
|
||||
{
|
||||
BrachyPhantomHit* PhantomHit = new BrachyPhantomHit(physVol->GetLogicalVolume(),i,k);
|
||||
// Read Voxel indexes: i is the x index, k is the z index
|
||||
G4int k = ROhist->GetReplicaNumber(1);
|
||||
G4int i = ROhist->GetReplicaNumber(2);
|
||||
G4int j= ROhist->GetReplicaNumber();
|
||||
if(m_pVoxelID[i+k*m_NumVoxelX+j*m_NumVoxelX*m_NumVoxelX]==-1)
|
||||
{
|
||||
BrachyPhantomHit* PhantomHit = new BrachyPhantomHit(physVol->GetLogicalVolume(),i,j,k);
|
||||
|
||||
G4RotationMatrix rotM;
|
||||
if(physVol->GetObjectRotation())
|
||||
rotM = *(physVol->GetObjectRotation());
|
||||
G4RotationMatrix rotM;
|
||||
if(physVol->GetObjectRotation())
|
||||
rotM = *(physVol->GetObjectRotation());
|
||||
|
||||
PhantomHit->SetEdep(edep);
|
||||
PhantomHit->SetPos(physVol->GetTranslation());
|
||||
PhantomHit->SetRot(rotM);
|
||||
PhantomHit->SetEdep(edep);
|
||||
PhantomHit->SetPos(physVol->GetTranslation());
|
||||
PhantomHit->SetRot(rotM);
|
||||
|
||||
G4int VoxelID = m_pPhantomHitsCollection->insert(PhantomHit);
|
||||
m_pVoxelID[i+k*m_NumVoxelX] = VoxelID - 1;
|
||||
}
|
||||
else
|
||||
(*m_pPhantomHitsCollection)[m_pVoxelID[i+k*m_NumVoxelX]]->AddEdep(edep);
|
||||
G4int VoxelID = m_pPhantomHitsCollection->insert(PhantomHit);
|
||||
m_pVoxelID[i+k*m_NumVoxelX+j*m_NumVoxelX*m_NumVoxelX] = VoxelID - 1;
|
||||
}
|
||||
else
|
||||
(*m_pPhantomHitsCollection)[m_pVoxelID[i+k*m_NumVoxelX+j*m_NumVoxelX*m_NumVoxelX]]->AddEdep(edep);
|
||||
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
//....
|
||||
@@ -116,9 +126,9 @@ void BrachyPhantomSD::EndOfEvent(G4HCofThisEvent*HCE)
|
||||
{
|
||||
static G4int HCID = -1;
|
||||
if(HCID<0)
|
||||
{
|
||||
HCID = GetCollectionID(0);
|
||||
}
|
||||
{
|
||||
HCID = GetCollectionID(0);
|
||||
}
|
||||
HCE->AddHitsCollection(HCID,m_pPhantomHitsCollection);
|
||||
}
|
||||
|
||||
@@ -139,3 +149,6 @@ void BrachyPhantomSD::DrawAll()
|
||||
void BrachyPhantomSD::PrintAll()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -20,12 +20,19 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// Code developed by:
|
||||
// S. Agostinelli, F. Foppiano, S. Garelli , M. Tropeano, S.Guatelli
|
||||
//
|
||||
// **********************************
|
||||
// * *
|
||||
// * BrachyPhysicsList.cc *
|
||||
// * *
|
||||
// **********************************
|
||||
|
||||
//
|
||||
// $Id: BrachyPhysicsList.cc,v 1.6 2002/11/18 15:18:38 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
#include "BrachyPhysicsList.hh"
|
||||
|
||||
#include "G4ParticleDefinition.hh"
|
||||
@@ -41,7 +48,7 @@
|
||||
|
||||
BrachyPhysicsList::BrachyPhysicsList(): G4VUserPhysicsList()
|
||||
{
|
||||
defaultCutValue = 1*mm;
|
||||
defaultCutValue = 0.1*mm;
|
||||
cutForGamma = defaultCutValue;
|
||||
cutForElectron = defaultCutValue;
|
||||
cutForPositron = defaultCutValue;
|
||||
@@ -121,12 +128,10 @@ void BrachyPhysicsList::ConstructEM()
|
||||
G4String particleName = particle->GetParticleName();
|
||||
|
||||
//processes
|
||||
lowePhot = new G4LowEnergyPhotoElectric("LowEnPhotoElec");
|
||||
loweIon = new G4LowEnergyIonisation("LowEnergyIoni");
|
||||
loweBrem = new G4LowEnergyBremsstrahlung("LowEnBrem");
|
||||
|
||||
if (particleName == "gamma") {
|
||||
//gamma
|
||||
//gamma
|
||||
lowePhot = new G4LowEnergyPhotoElectric("LowEnPhotoElec");
|
||||
pmanager->AddDiscreteProcess(new G4LowEnergyRayleigh);
|
||||
pmanager->AddDiscreteProcess(lowePhot);
|
||||
pmanager->AddDiscreteProcess(new G4LowEnergyCompton);
|
||||
@@ -134,6 +139,9 @@ void BrachyPhysicsList::ConstructEM()
|
||||
|
||||
} else if (particleName == "e-") {
|
||||
//electron
|
||||
loweIon = new G4LowEnergyIonisation("LowEnergyIoni");
|
||||
loweBrem = new G4LowEnergyBremsstrahlung("LowEnBrem");
|
||||
|
||||
pmanager->AddProcess(new G4MultipleScattering, -1, 1,1);
|
||||
pmanager->AddProcess(loweIon, -1, 2,2);
|
||||
pmanager->AddProcess(loweBrem, -1,-1,3);
|
||||
|
||||
@@ -1,9 +1,43 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
// ********************************************************************
|
||||
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
// GEANT 4 - Brachytherapy example
|
||||
// --------------------------------------------------------------
|
||||
//
|
||||
// Code developed by:
|
||||
// S.Guatelli
|
||||
//
|
||||
// ********************************************
|
||||
// * *
|
||||
// * BrachyPrimaryGeneratorAction.cc *
|
||||
// * *
|
||||
// ********************************************
|
||||
|
||||
//
|
||||
// $Id: BrachyPrimaryGeneratorAction.cc,v 1.12 2002/12/12 19:16:19 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
#include "BrachyPrimaryGeneratorAction.hh"
|
||||
#include "BrachyAnalysisManager.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
@@ -22,16 +56,8 @@
|
||||
BrachyPrimaryGeneratorAction::BrachyPrimaryGeneratorAction()
|
||||
{
|
||||
|
||||
G4int NumParticles = 1;
|
||||
|
||||
m_pParticleGun = new G4ParticleGun(NumParticles);
|
||||
|
||||
|
||||
|
||||
m_pParticleGun = new G4ParticleGun(NumParticles);
|
||||
|
||||
|
||||
|
||||
;
|
||||
|
||||
}
|
||||
|
||||
@@ -39,9 +65,8 @@ BrachyPrimaryGeneratorAction::BrachyPrimaryGeneratorAction()
|
||||
|
||||
BrachyPrimaryGeneratorAction::~BrachyPrimaryGeneratorAction()
|
||||
{
|
||||
if(m_pParticleGun)
|
||||
delete m_pParticleGun;
|
||||
|
||||
|
||||
;
|
||||
|
||||
}
|
||||
|
||||
@@ -49,60 +74,12 @@ BrachyPrimaryGeneratorAction::~BrachyPrimaryGeneratorAction()
|
||||
|
||||
void BrachyPrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
|
||||
{
|
||||
BrachyAnalysisManager* analysis = BrachyAnalysisManager::getInstance();
|
||||
|
||||
G4ParticleTable* pParticleTable = G4ParticleTable::GetParticleTable();
|
||||
G4String ParticleName = "gamma";
|
||||
G4ParticleDefinition* pParticle = pParticleTable->FindParticle(ParticleName);
|
||||
|
||||
|
||||
m_pParticleGun->SetParticleDefinition(pParticle);
|
||||
|
||||
// Random generation of gamma source point inside the Iodium core
|
||||
G4double x,y,z;
|
||||
G4double radius= 0.30*mm;
|
||||
|
||||
|
||||
do{
|
||||
x = (G4UniformRand()-0.5)*(radius)/0.5;
|
||||
y = (G4UniformRand()-0.5)*(radius)/0.5;
|
||||
}while(x*x+y*y > radius*radius);
|
||||
|
||||
z = (G4UniformRand()-0.5)*1.75*mm/0.5 ;
|
||||
|
||||
G4ThreeVector position(x,y,z);
|
||||
m_pParticleGun->SetParticlePosition(position);
|
||||
|
||||
|
||||
// Random generation of the impulse direction
|
||||
G4double a,b,c;
|
||||
G4double n;
|
||||
do{
|
||||
a = (G4UniformRand()-0.5)/0.5;
|
||||
b = (G4UniformRand()-0.5)/0.5;
|
||||
c = (G4UniformRand()-0.5)/0.5;
|
||||
n = a*a+b*b+c*c;
|
||||
}while(n > 1 || n == 0.0);
|
||||
n = sqrt(n);
|
||||
a /= n;
|
||||
b /= n;
|
||||
c /= n;
|
||||
|
||||
G4ThreeVector direction(a,b,c);
|
||||
m_pParticleGun->SetParticleMomentumDirection(direction);
|
||||
|
||||
|
||||
//Energy = 0.356*MeV;
|
||||
|
||||
Energy = 356*keV;
|
||||
m_pParticleGun->SetParticleEnergy(Energy);
|
||||
|
||||
//Check the energy
|
||||
analysis->Spectrum(Energy);
|
||||
|
||||
m_pParticleGun->GeneratePrimaryVertex(anEvent);
|
||||
|
||||
|
||||
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,165 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
// ********************************************************************
|
||||
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
// GEANT 4 - Brachytherapy example
|
||||
// --------------------------------------------------------------
|
||||
//
|
||||
// Code developed by:
|
||||
// S.Guatelli
|
||||
//
|
||||
// ********************************************
|
||||
// * *
|
||||
// * BrachyPrimaryGeneratorActionI.cc *
|
||||
// * *
|
||||
// ********************************************
|
||||
//
|
||||
// $Id: BrachyPrimaryGeneratorActionI.cc,v 1.4 2002/12/12 19:16:19 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
#include "BrachyPrimaryGeneratorActionI.hh"
|
||||
|
||||
#ifdef G4ANALYSIS_USE
|
||||
#include "BrachyAnalysisManager.hh"
|
||||
#endif
|
||||
|
||||
//#include "BrachyPrimaryGeneratorMessenger.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "Randomize.hh"
|
||||
#include "G4Event.hh"
|
||||
#include "G4ParticleGun.hh"
|
||||
#include "G4IonTable.hh"
|
||||
#include "G4RadioactiveDecay.hh"
|
||||
#include "G4UImanager.hh"
|
||||
#include "globals.hh"
|
||||
#include <math.h>
|
||||
#include "G4RunManager.hh"
|
||||
|
||||
//....
|
||||
|
||||
BrachyPrimaryGeneratorActionI::BrachyPrimaryGeneratorActionI()
|
||||
{
|
||||
|
||||
G4int NumParticles = 1;
|
||||
|
||||
m_pParticleGun = new G4ParticleGun(NumParticles);
|
||||
|
||||
//create a messenger for this class
|
||||
// gunMessenger = new BrachyPrimaryGeneratorMessenger(this);
|
||||
|
||||
vettore.push_back(0.783913);
|
||||
vettore.push_back(0.170416);
|
||||
vettore.push_back(0.045671);
|
||||
|
||||
}
|
||||
|
||||
//....
|
||||
|
||||
BrachyPrimaryGeneratorActionI::~BrachyPrimaryGeneratorActionI()
|
||||
{
|
||||
if(m_pParticleGun)
|
||||
delete m_pParticleGun;
|
||||
|
||||
//delete gunMessenger;
|
||||
}
|
||||
|
||||
//....
|
||||
|
||||
void BrachyPrimaryGeneratorActionI::GeneratePrimaries(G4Event* anEvent)
|
||||
{
|
||||
#ifdef G4ANALYSIS_USE
|
||||
BrachyAnalysisManager* analysis = BrachyAnalysisManager::getInstance();
|
||||
#endif
|
||||
|
||||
G4ParticleTable* pParticleTable = G4ParticleTable::GetParticleTable();
|
||||
G4String ParticleName = "gamma";
|
||||
G4ParticleDefinition* pParticle = pParticleTable->FindParticle(ParticleName);
|
||||
// G4cout<<"arrivo allfind particle"<<G4endl;
|
||||
|
||||
m_pParticleGun->SetParticleDefinition(pParticle);
|
||||
|
||||
// Random generation of gamma source point inside the Iodium core
|
||||
G4double x,y,z;
|
||||
G4double radiusmax = 0.30*mm;
|
||||
G4double radiusmin=0.085*mm;
|
||||
|
||||
do{
|
||||
x = (G4UniformRand()-0.5)*(radiusmax)/0.5;
|
||||
y = (G4UniformRand()-0.5)*(radiusmax)/0.5;
|
||||
}while(((x*x+y*y )> (radiusmax*radiusmax))||((x*x+y*y)<(radiusmin*radiusmin)));
|
||||
|
||||
z = (G4UniformRand()-0.5)*1.75*mm/0.5 ;
|
||||
|
||||
G4ThreeVector position(x,y,z);
|
||||
m_pParticleGun->SetParticlePosition(position);
|
||||
|
||||
|
||||
// Random generation of the impulse direction
|
||||
G4double a,b,c;
|
||||
G4double n;
|
||||
do{
|
||||
a = (G4UniformRand()-0.5)/0.5;
|
||||
b = (G4UniformRand()-0.5)/0.5;
|
||||
c = (G4UniformRand()-0.5)/0.5;
|
||||
n = a*a+b*b+c*c;
|
||||
}while(n > 1 || n == 0.0);
|
||||
n = sqrt(n);
|
||||
a /= n;
|
||||
b /= n;
|
||||
c /= n;
|
||||
|
||||
G4ThreeVector direction(a,b,c);
|
||||
m_pParticleGun->SetParticleMomentumDirection(direction);
|
||||
|
||||
|
||||
|
||||
G4double random=G4UniformRand();
|
||||
G4double sum=0;
|
||||
G4int i=0;
|
||||
while(sum<random){sum+=vettore[i];
|
||||
i++;}
|
||||
|
||||
|
||||
|
||||
if(i==1){Energy=27.4*keV;}
|
||||
else{
|
||||
if(i==2){Energy=31.4*keV;}
|
||||
else {Energy=35.5*keV;}}
|
||||
|
||||
//G4double Energy= 28.451602*keV;
|
||||
|
||||
m_pParticleGun->SetParticleEnergy(Energy);
|
||||
|
||||
#ifdef G4ANALYSIS_USE
|
||||
analysis->Spectrum(Energy);
|
||||
#endif
|
||||
|
||||
m_pParticleGun->GeneratePrimaryVertex(anEvent);
|
||||
|
||||
}
|
||||
|
||||
|
||||
G4double BrachyPrimaryGeneratorActionI::GetEnergy()
|
||||
{ return Energy;}
|
||||
|
||||
@@ -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. *
|
||||
// ********************************************************************
|
||||
// ********************************************************************
|
||||
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
// GEANT 4 - Brachytherapy example
|
||||
// --------------------------------------------------------------
|
||||
//
|
||||
// Code developed by:
|
||||
// S. Agostinelli, F. Foppiano, S. Garelli , M. Tropeano, S.Guatelli
|
||||
//
|
||||
// ********************************************
|
||||
// * *
|
||||
// * BrachyPrimaryGeneratorActionIr.cc *
|
||||
// * *
|
||||
// ********************************************
|
||||
//
|
||||
// $Id: BrachyPrimaryGeneratorActionIr.cc,v 1.4 2002/12/12 19:16:19 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
#include "BrachyPrimaryGeneratorActionIr.hh"
|
||||
|
||||
#ifdef G4ANALYSIS_USE
|
||||
#include "BrachyAnalysisManager.hh"
|
||||
#endif
|
||||
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "Randomize.hh"
|
||||
#include "G4Event.hh"
|
||||
#include "G4ParticleGun.hh"
|
||||
#include "G4IonTable.hh"
|
||||
#include "G4RadioactiveDecay.hh"
|
||||
#include "G4UImanager.hh"
|
||||
#include "globals.hh"
|
||||
#include <math.h>
|
||||
#include "G4RunManager.hh"
|
||||
|
||||
|
||||
//....
|
||||
|
||||
BrachyPrimaryGeneratorActionIr::BrachyPrimaryGeneratorActionIr()
|
||||
{
|
||||
G4int NumParticles = 1;
|
||||
|
||||
m_pParticleGun = new G4ParticleGun(NumParticles);
|
||||
|
||||
}
|
||||
|
||||
//....
|
||||
|
||||
BrachyPrimaryGeneratorActionIr::~BrachyPrimaryGeneratorActionIr()
|
||||
{
|
||||
if(m_pParticleGun)
|
||||
delete m_pParticleGun;
|
||||
}
|
||||
|
||||
//....
|
||||
|
||||
void BrachyPrimaryGeneratorActionIr::GeneratePrimaries(G4Event* anEvent)
|
||||
{
|
||||
#ifdef G4ANALYSIS_USE
|
||||
BrachyAnalysisManager* analysis = BrachyAnalysisManager::getInstance();
|
||||
#endif
|
||||
|
||||
G4ParticleTable* pParticleTable = G4ParticleTable::GetParticleTable();
|
||||
G4String ParticleName = "gamma";
|
||||
G4ParticleDefinition* pParticle = pParticleTable->FindParticle(ParticleName);
|
||||
|
||||
|
||||
m_pParticleGun->SetParticleDefinition(pParticle);
|
||||
|
||||
// Random generation of gamma source point inside the Iodium core
|
||||
G4double x,y,z;
|
||||
G4double radius= 0.30*mm;
|
||||
|
||||
|
||||
do{
|
||||
x = (G4UniformRand()-0.5)*(radius)/0.5;
|
||||
y = (G4UniformRand()-0.5)*(radius)/0.5;
|
||||
}while(x*x+y*y > radius*radius);
|
||||
|
||||
z = (G4UniformRand()-0.5)*1.75*mm/0.5 ;
|
||||
|
||||
G4ThreeVector position(x,y,z);
|
||||
m_pParticleGun->SetParticlePosition(position);
|
||||
|
||||
|
||||
// Random generation of the impulse direction
|
||||
G4double a,b,c;
|
||||
G4double n;
|
||||
do{
|
||||
a = (G4UniformRand()-0.5)/0.5;
|
||||
b = (G4UniformRand()-0.5)/0.5;
|
||||
c = (G4UniformRand()-0.5)/0.5;
|
||||
n = a*a+b*b+c*c;
|
||||
}while(n > 1 || n == 0.0);
|
||||
n = sqrt(n);
|
||||
a /= n;
|
||||
b /= n;
|
||||
c /= n;
|
||||
|
||||
G4ThreeVector direction(a,b,c);
|
||||
m_pParticleGun->SetParticleMomentumDirection(direction);
|
||||
|
||||
|
||||
//Energy = 0.356*MeV;
|
||||
|
||||
Energy = 356*keV;
|
||||
m_pParticleGun->SetParticleEnergy(Energy);
|
||||
|
||||
//Check the energy
|
||||
#ifdef G4ANALYSIS_USE
|
||||
analysis->Spectrum(Energy);
|
||||
#endif
|
||||
m_pParticleGun->GeneratePrimaryVertex(anEvent);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,52 +1,126 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
// ********************************************************************
|
||||
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
// GEANT 4 - Brachytherapy example
|
||||
// --------------------------------------------------------------
|
||||
//
|
||||
// Code developed by:
|
||||
// S.Guatelli
|
||||
//
|
||||
//
|
||||
// *******************************
|
||||
// * *
|
||||
// * BrachyRunAction.cc *
|
||||
// * *
|
||||
// *******************************
|
||||
//
|
||||
// $Id: BrachyRunAction.cc,v 1.10 2002/12/12 19:16:19 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
|
||||
#include "BrachyRunAction.hh"
|
||||
#include "BrachyEventAction.hh"
|
||||
|
||||
#ifdef G4ANALYSIS_USE
|
||||
#include "BrachyAnalysisManager.hh"
|
||||
#endif
|
||||
|
||||
#include "G4Run.hh"
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4UImanager.hh"
|
||||
#include "G4ios.hh"
|
||||
#include "BrachyDetectorConstruction.hh"
|
||||
#include "BrachyRunMessenger.hh"
|
||||
#include "G4SDManager.hh"
|
||||
#include "G4Timer.hh"
|
||||
|
||||
BrachyRunAction::BrachyRunAction()
|
||||
#include "BrachyFactoryIr.hh"
|
||||
#include "BrachyFactoryI.hh"
|
||||
#include "BrachyFactory.hh"
|
||||
#include "BrachyRunAction.hh"
|
||||
BrachyRunAction::BrachyRunAction(G4String &SDNAME)
|
||||
{
|
||||
|
||||
|
||||
|
||||
SDname=SDNAME;
|
||||
pDet=new BrachyDetectorConstruction(SDname);
|
||||
pRun= new BrachyRunMessenger(this);
|
||||
}
|
||||
|
||||
BrachyRunAction::~BrachyRunAction()
|
||||
{
|
||||
|
||||
{ delete pDet;
|
||||
delete pDetector;
|
||||
delete pRun;
|
||||
}
|
||||
void BrachyRunAction::BeginOfRunAction(const G4Run* aRun)
|
||||
{ BrachyAnalysisManager* analysis = BrachyAnalysisManager::getInstance();
|
||||
analysis->book();
|
||||
G4RunManager* pRunManager=G4RunManager::GetRunManager() ;
|
||||
{
|
||||
|
||||
#ifdef G4ANALYSIS_USE
|
||||
BrachyAnalysisManager* analysis = BrachyAnalysisManager::getInstance();
|
||||
analysis->book();
|
||||
#endif
|
||||
G4RunManager* pRunManager=G4RunManager::GetRunManager() ;
|
||||
|
||||
if(pRunManager)
|
||||
{ switch(a)
|
||||
{ case 1:
|
||||
factory=new BrachyFactoryI;
|
||||
break;
|
||||
|
||||
G4cout << "### Run " << aRun->GetRunID() << " start." << G4endl;
|
||||
|
||||
default:
|
||||
factory=new BrachyFactoryIr;
|
||||
}
|
||||
|
||||
G4VUserPrimaryGeneratorAction* irPrimary=factory->CreatePrimaryGeneratorAction();
|
||||
|
||||
|
||||
if(irPrimary)
|
||||
{ pRunManager->SetUserAction (irPrimary);}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void BrachyRunAction::SelectEnergy(G4int choice)
|
||||
{a=choice;
|
||||
if (a==1)factory=new BrachyFactoryI;
|
||||
else factory=new BrachyFactoryIr;
|
||||
|
||||
}
|
||||
|
||||
void BrachyRunAction::EndOfRunAction(const G4Run* aRun)
|
||||
{
|
||||
#ifdef G4ANALYSIS_USE
|
||||
BrachyAnalysisManager* analysis = BrachyAnalysisManager::getInstance();
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
G4cout << "number of event = " << aRun->GetNumberOfEvent() << G4endl;
|
||||
G4cout << "number of event = " << aRun->GetNumberOfEvent() << G4endl;
|
||||
|
||||
|
||||
analysis->finish();
|
||||
|
||||
#ifdef G4ANALYSIS_USE
|
||||
analysis->finish();
|
||||
#endif
|
||||
delete factory;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// Code developed by:
|
||||
// S.Guatelli
|
||||
//
|
||||
// $Id: BrachyRunMessenger.cc,v 1.3 2002/12/08 22:40:55 stesting Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
//
|
||||
//
|
||||
// *******************************
|
||||
// * *
|
||||
// * BrachyRunMessenger.cc *
|
||||
// * *
|
||||
// *******************************
|
||||
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
|
||||
|
||||
#include "BrachyRunMessenger.hh"
|
||||
#include"BrachyFactoryIr.hh"
|
||||
#include "BrachyRunAction.hh"
|
||||
#include "G4UIdirectory.hh"
|
||||
#include "G4UIcmdWithAString.hh"
|
||||
#include "G4UIcmdWithAnInteger.hh"
|
||||
#include "G4UIcmdWithADoubleAndUnit.hh"
|
||||
#include "G4UIcmdWithoutParameter.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
BrachyRunMessenger::BrachyRunMessenger( BrachyRunAction* pBrachyRun):
|
||||
pRun(pBrachyRun)
|
||||
{
|
||||
|
||||
mydetDir = new G4UIdirectory("/run/");
|
||||
mydetDir->SetGuidance("Control gamma energy.");
|
||||
selDetCmd=new G4UIcmdWithAString("/run/energy",this);
|
||||
|
||||
|
||||
|
||||
selDetCmd->SetGuidance("Select the energy of gamma emitted by the source.");
|
||||
selDetCmd->SetGuidance(" Iodium: Iodium Source ");
|
||||
selDetCmd->SetGuidance(" Iridium: Iridium Source " );
|
||||
selDetCmd->SetParameterName("choice",true);
|
||||
selDetCmd->SetDefaultValue("Iridium");
|
||||
selDetCmd->SetCandidates("Iridium / Iodium");
|
||||
selDetCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
|
||||
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
BrachyRunMessenger::~BrachyRunMessenger()
|
||||
{
|
||||
|
||||
delete selDetCmd;
|
||||
delete mydetDir;
|
||||
//delete detDir;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void BrachyRunMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
|
||||
{
|
||||
|
||||
|
||||
if( command == selDetCmd )
|
||||
{if (newValue== "Iodium") pRun->SelectEnergy(1);
|
||||
else pRun->SelectEnergy(0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user