Import Geant4 6.2.0 source tree
This commit is contained in:
+29
-1
@@ -1,4 +1,4 @@
|
||||
$Id: History,v 1.80 2004/03/25 18:10:57 gcosmo Exp $
|
||||
$Id: History,v 1.84 2004/06/23 16:15:45 gcosmo Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -17,6 +17,34 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
24th June 2004 Gabriele Cosmo (examples-V06-01-02)
|
||||
- Updated reference outputs according to reference tag geant4-06-02-ref-00.
|
||||
- Includes tags: cosmicray_charging-V06-01-02, GammaRayTel-V06-01-01,
|
||||
hadrontherapy-V06-01-01, lAr_calorimeter-V06-01-01,
|
||||
purtag-V06-01-02, radioprotection-V06-01-06, Rich-V06-01-00,
|
||||
Tiara-V06-01-03, DMX-V06-01-00, XrayFluo-V06-01-06,
|
||||
xraytel-V06-01-01, exampleA01-V06-01-01, exbiasing-V06-01-00,
|
||||
muonprocesses-V06-01-01, photonprocesses-V06-01-01,
|
||||
testem1-V06-01-03, testem2-V06-01-03, testem3-V06-01-04,
|
||||
testem3-V06-01-01, testem5-V06-01-04, testem7-V06-01-01
|
||||
testem8-V06-01-00, testem9-V06-01-00, BlineTracer-V06-01-00,
|
||||
opticalex-V06-01-00, exparallel-V06-01-00,
|
||||
exampleN03-V06-01-00, exampleN06-V06-01-01.
|
||||
|
||||
28th May 2004 Gabriele Cosmo (examples-V06-01-01)
|
||||
- Updated reference outputs according to reference tag geant4-06-01-ref-02.
|
||||
- Includes tags: brachy-V06-01-01, ccal-V06-01-01, lAr_calorimeter-V06-01-00,
|
||||
medical_linac-V06-01-03, photonprocesses-V06-01-00,
|
||||
testem2-V06-01-02, testem3-V06-01-01, testem5-V06-01-00,
|
||||
DICOM-V06-01-00.
|
||||
|
||||
30th April 2004 Gabriele Cosmo (examples-V06-01-00)
|
||||
- Updated reference outputs according to reference tag geant4-06-01-ref-01.
|
||||
- Includes tags: testem1-V06-01-02, testem2-V06-01-00, testem3-V06-01-00,
|
||||
testem4-V06-01-00, testem5-V06-01-00, testem6-V06-01-00,
|
||||
testem7-V06-01-00, exampleN02-V06-01-00, exampleN03-V06-00-00,
|
||||
exampleN06-V06-01-00.
|
||||
|
||||
25th March 2004 Gabriele Cosmo (examples-V06-00-02)
|
||||
- Updated reference outputs according to reference tag geant4-06-01-ref-00.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# $Id: GNUmakefile,v 1.4 2003/06/25 14:55:54 gcosmo Exp $
|
||||
# $Id: GNUmakefile,v 1.5 2004/06/23 16:09:48 gcosmo Exp $
|
||||
# --------------------------------------------------------------
|
||||
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
|
||||
# --------------------------------------------------------------
|
||||
@@ -9,8 +9,9 @@ endif
|
||||
|
||||
include $(G4INSTALL)/config/architecture.gmk
|
||||
|
||||
SUBDIRS = brachytherapy gammaray_telescope underground_physics
|
||||
SUBDIRS += xray_fluorescence xray_telescope
|
||||
SUBDIRS = gammaray_telescope underground_physics xray_fluorescence xray_telescope
|
||||
SUBDIRS += brachytherapy cosmicray_charging hadrontherapy
|
||||
SUBDURS += medical_linac purging_magnet radioprotection
|
||||
SUBDIRS += Tiara Rich composite_calorimeter lAr_calorimeter
|
||||
|
||||
.PHONY : all clean clean_libs
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
-------------------------------------------------------------------
|
||||
$Id: History,v 1.2 2004/03/12 16:17:29 ribon Exp $
|
||||
$Id: History,v 1.3 2004/05/28 11:19:18 ribon Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -9,6 +9,9 @@ $Id: History,v 1.2 2004/03/12 16:17:29 ribon Exp $
|
||||
Category History file
|
||||
---------------------
|
||||
|
||||
18.05.2004 - A.Ribon (Rich-V06-01-00)
|
||||
Ported to PI light. No changes of the code.
|
||||
|
||||
12.03.2004 - A.Ribon (Rich-V06-00-00)
|
||||
Fixed compilation errors and warnings for g++ 3.2 .
|
||||
|
||||
|
||||
@@ -118,21 +118,15 @@ See their definition on AnalysisManager.
|
||||
Note that histograms are disabled via the flag G4ANALYSIS_USE in GNUmakefile.
|
||||
|
||||
|
||||
7. USING THE LAST ANAPHE IMPLEMENTATION OF AIDA HISTOGRAMS
|
||||
------------------------------------------------------------
|
||||
7. Using the PI implementation of the AIDA histograms:
|
||||
------------------------------------------------------
|
||||
|
||||
In order to use the new Anaphe implementation of the AIDA interfaces
|
||||
prepare some environment variables by source-ing one of the following
|
||||
startup scripts:
|
||||
In order to setup the proper environmental variables, needed for
|
||||
running AIDA / PI , run the script:
|
||||
|
||||
(THIS EXAMPLE HAS BEEN DEVELOPED AND TESTED WITH THE gcc-2.95.5 COMPILER)
|
||||
(A.R. 12-Mar-2004 : TESTED ALSO WITH gcc-3.2 or Linux RH 7.3)
|
||||
--- For c-shell : source setupAidaPi.csh
|
||||
|
||||
o Setup the environment variable: G4ANALYSIS_USE 1
|
||||
o setenv PATH ${PATH}:/afs/cern.ch/sw/lhcxx/specific/redhat73/gcc-2.95.2/5.0.5/bin
|
||||
o source /afs/cern.ch/sw/lhcxx/share/LHCXX/5.0.5/install/sharedstart.csh
|
||||
o ln -s /afs/cern.ch/sw/lhcxx/share/LHCXX/5.0.5/scripts/* ~/bin/ (this has
|
||||
to be done only once)
|
||||
--- For bash-shell : . setupAidaPi.sh
|
||||
|
||||
After this, you will have access to the last 'aida-config' command
|
||||
which is used in the GNUmakefile.
|
||||
Notice that you need g++ 3.2 or 3.23.
|
||||
|
||||
|
||||
Executable
+11
@@ -0,0 +1,11 @@
|
||||
#------------------------------------------------------------------
|
||||
# C-shell script to be run before building/executing this example.
|
||||
#------------------------------------------------------------------
|
||||
#
|
||||
# --- Geant4 specific ---
|
||||
setenv G4ANALYSIS_USE 1
|
||||
#
|
||||
# --- Aida / PI ---
|
||||
eval `aida-config --runtime csh`
|
||||
#
|
||||
|
||||
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#------------------------------------------------------------------
|
||||
# Bash-shell script to be run before building/executing this example.
|
||||
#------------------------------------------------------------------
|
||||
#
|
||||
# --- Geant4 specific ---
|
||||
export G4ANALYSIS_USE=1
|
||||
#
|
||||
# --- Aida / PI ---
|
||||
eval `aida-config --runtime sh`
|
||||
#
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# $Id: GNUmakefile,v 1.5 2003/12/08 17:53:25 gcosmo Exp $
|
||||
# $Id: GNUmakefile,v 1.6 2004/06/09 15:04:34 daquinog Exp $
|
||||
# -------------------------------------------------------------------
|
||||
# GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
# GEANT4 tag $Name: geant4-06-02 $
|
||||
# --------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -10,17 +10,26 @@ TIARA_SRC_SWIG_DIRS = CLHEPWrapper G4KernelWrapper TiaraWrapper
|
||||
|
||||
include $(G4INSTALL)/config/architecture.gmk
|
||||
|
||||
.PHONY: Tiara tiaraClean swigClean all
|
||||
.PHONY: Tiara tiaraClean swigClean clean_all all
|
||||
all: Tiara
|
||||
|
||||
#ifdef G4ANALYSIS_USE
|
||||
# CPPFLAGS += `aida-config --include`
|
||||
# LDFLAGS += `aida-config --lib`
|
||||
# LDLIBS += `aida-config --lib`
|
||||
#endif
|
||||
|
||||
Tiara:
|
||||
@for dir in $(TIARA_SRC_DIRS); do ( cd source/$$dir && $(MAKE)); done;:
|
||||
@for dir in $(TIARA_SRC_SWIG_DIRS); do ( cd source/$$dir && $(MAKE)); done;:
|
||||
|
||||
clean_all: swigClean tiaraClean
|
||||
@rm -f source/py_modules/*.pyc
|
||||
@rm -rf run/simData
|
||||
|
||||
tiaraClean:
|
||||
@for dir in $(TIARA_SRC_DIRS); do ( cd source/$$dir && $(MAKE) tiaraClean); done;:
|
||||
@for dir in $(TIARA_SRC_SWIG_DIRS); do ( cd source/$$dir && $(MAKE) tiaraClean); done;:
|
||||
|
||||
swigClean:
|
||||
@for dir in $(TIARA_SRC_SWIG_DIRS); do ( cd source/$$dir && $(MAKE) swigClean); done;:
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# $Id: History,v 1.18 2003/12/09 08:48:33 daquinog Exp $
|
||||
# $Id: History,v 1.19 2004/06/09 15:04:34 daquinog Exp $
|
||||
# -------------------------------------------------------------------
|
||||
# GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
# GEANT4 tag $Name: geant4-06-02 $
|
||||
# -------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -18,6 +18,11 @@ committal in the CVS repository !
|
||||
----------------------------------------------------------
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
Jun 9th, 2004 G.Daquino - Tiara-V06-01-00
|
||||
- Passing from Anaphe to PI, Tiara has been partly fixed. Still problems
|
||||
are present on the compatibility between the PI and Anaphe pointers for hf.
|
||||
However, runSimNoAnalysis.py works correctly, being independent of the
|
||||
analysis tool.
|
||||
|
||||
Dec 9th, 2003 G.Daquino - Tiara-V05-02-06
|
||||
- Fixed implementation of TiaraPrimaryGeneratorAction, where copy
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# $Id: README,v 1.15 2003/12/08 17:53:25 gcosmo Exp $
|
||||
# $Id: README,v 1.18 2004/06/13 13:35:12 daquinog Exp $
|
||||
# -------------------------------------------------------------------
|
||||
# GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
# GEANT4 tag $Name: geant4-06-02 $
|
||||
# -------------------------------------------------------------------
|
||||
|
||||
Simulation of the TIARA experiment using importance sampling
|
||||
@@ -16,7 +16,7 @@ created by 43 MeV and 68 MeV protons bombarding a 7Li target are measured
|
||||
behind several shields. The simulation starts from the neutron spectra.
|
||||
In this example the interactions of the neutrons with the (concrete)
|
||||
shields are simulated and energy dependent neutron fluxes are measured
|
||||
behind the shields. Users may chose to run the simulation for different
|
||||
behind the shields. Users may choose to run the simulation for different
|
||||
shielding configuration with or without importance sampling.
|
||||
The simulated neutron fluxes are compared to the published
|
||||
experimental data. The efficiency of applying importance sampling
|
||||
@@ -28,9 +28,9 @@ For Application Developers", Chapter "Toolkit Fundamentals"
|
||||
Section "Event Biasing Techniques" and references there.
|
||||
|
||||
The example has been tested on CERN RH 7.3 with the
|
||||
gcc-3.2 and gcc-2.95.2 compilers.
|
||||
gcc-3.2.3 and gcc-2.95.2 compilers.
|
||||
|
||||
Note for system testing without analysis: see points 1, 1.3 and 3.2.
|
||||
Note for system testing without analysis: see points 1.1, 1.3 and 3.2.
|
||||
|
||||
|
||||
|
||||
@@ -41,51 +41,43 @@ Note for system testing without analysis: see points 1, 1.3 and 3.2.
|
||||
You must compile Geant4 with:
|
||||
"G4LIB_BUILD_SHARED" set to 1.
|
||||
You need to set:
|
||||
"NeutronHPCrossSections" (e.g. to ${G4INSTALL}/data/G4NDL3.7)
|
||||
"NeutronHPCrossSections" (e.g. pointing to a directory containing G4NDL3.7)
|
||||
|
||||
|
||||
Three examples are given of how to set environment variables
|
||||
in the three cases:
|
||||
|
||||
1.1) Anaphe via AFS (most simple):
|
||||
1.1) PI via AFS (most simple):
|
||||
--------------------
|
||||
You have access to afs and you want to use Anaphe for the
|
||||
You have access to afs and you want to use PI for the
|
||||
analysis:
|
||||
Set the following environment variables:
|
||||
"G4ANALYSIS_USE"
|
||||
"PI_BASE_DIR" (where PI has been installed)
|
||||
"SWIG_BASE_DIR" (where SWIG has been installed)
|
||||
|
||||
"ANAPHETOP" (e.g. /afs/cern.ch/sw/lhcxx)
|
||||
"AIDA_DIR" (e.g. /afs/cern.ch/sw/contrib/AIDA/3.0/src/cpp)
|
||||
"ANAPHE_SCRIPTS" (e.g. /afs/cern.ch/sw/lhcxx/share/LHCXX/5.0.6/scripts)
|
||||
|
||||
Finally source the script envCommon.csh from the directory
|
||||
you have Tiara installed, e.g. ${G4INSTALL}/examples/advanced/Tiara
|
||||
Finally source the script envCommon.csh from the directory where you have Tiara
|
||||
installed, e.g. ${G4INSTALL}/examples/advanced/Tiara
|
||||
|
||||
|
||||
1.2) No afs but a local Anaphe and AIDA installation:
|
||||
1.2) No afs but a local PI and SWIG installation:
|
||||
-----------------------------------------------------
|
||||
You don't use afs but you have a local installation of Anaphe and AIDA
|
||||
(e.g. from http://anaphe.web.cern.ch/anaphe/.
|
||||
You don't use afs but you have a local installation of SWIG and PI
|
||||
Set the following environment variables:
|
||||
"G4ANALYSIS_USE"
|
||||
|
||||
"ANAPHETOP" (e.g. <directory>/Anaphe/release)
|
||||
"AIDA_DIR" (e.g. <directory>/AIDA/3.0.0/3.0.0/AIDA/3.0/src/cpp)
|
||||
"ANAPHE_SCRIPTS" (e.g. ${ANAPHETOP}/share/LHCXX/5.0.6/scripts)
|
||||
"PI_BASE_DIR"
|
||||
"SWIG_BASE_DIR"
|
||||
|
||||
here <directory> is a place holder for your directory with the
|
||||
respective installations of Anaphe and AIDA
|
||||
|
||||
Finally source the script envCommon.csh from the directory
|
||||
Finally source the script envCommon.csh from the directory where
|
||||
you have Tiara installed, e.g. ${G4INSTALL}/examples/advanced/Tiara
|
||||
|
||||
|
||||
1.3) No afs, no Anaphe and no AIDA (e.g. for system testing):
|
||||
1.3) No afs, no PI and no SWIG (e.g. for system testing):
|
||||
-------------------------------------------------------------
|
||||
You don't want to use Anaphe and AIDA and you don't have afs access.
|
||||
Make sure "G4ANALYSIS_USE" is unset (e.g. unsetenv G4ANALYSIS_USE).
|
||||
|
||||
Note: python must be built against a "libc".
|
||||
You don't want to use PI and SWIG and you don't have afs access.
|
||||
Make sure "G4ANALYSIS_USE" is unset (e.g. unsetenv G4ANALYSIS_USE)
|
||||
|
||||
Note 1: python must be built against a "libc".
|
||||
You may do this by creating a shared library by a command
|
||||
similar to this
|
||||
"ld -shared -o libpython2.2.so --whole-archive libpython2.2.a /usr/lib/libc.so"
|
||||
@@ -97,16 +89,21 @@ in the three cases:
|
||||
"SWIG_BASE_DIR" (e.g. /usr)
|
||||
"CLHEP_BASE_DIR" (e.g. to /opt/local)
|
||||
|
||||
Finally source the script envCommon.csh from the directory
|
||||
Finally source the script envCommon.csh from the directory where
|
||||
you have Tiara installed, e.g. ${G4INSTALL}/examples/advanced/Tiara
|
||||
|
||||
|
||||
Note 2: Passing from a simulation WITH to another WITHOUT analysis implies
|
||||
that the G4ANALYSIS_use should be unset and that the SWIG-wrapper scripts
|
||||
in the directory TiaraWrapper should be deleted. Normally, the whole code
|
||||
should be compiled again using gmake tiaraClean and, afterwards, gmake.
|
||||
The same procedure should be followed also passing from a simulation WITHOUT
|
||||
to another WITH analysis.
|
||||
|
||||
2) Building the example
|
||||
=======================
|
||||
|
||||
Geant4 has to be compiled using G4LIB_BUILD_SHARED 1 and the one of the
|
||||
above environment settings have to be set.
|
||||
|
||||
Type "gmake".
|
||||
|
||||
|
||||
@@ -116,10 +113,7 @@ Type "gmake".
|
||||
Geant4 must be compiled into granular shared libraries.
|
||||
Therefore before compiling Geant4 set "G4LIB_BUILD_SHARED" to "1".
|
||||
|
||||
External packages used in this example are Anaphe, SWIG and Python.
|
||||
The Anaphe package comes with SWIG and Python versions used to build
|
||||
Anaphe itself. These SWIG and Python versions should also be used with
|
||||
this example if Anaphe is used.
|
||||
External packages used in this example are PI, SWIG and Python.
|
||||
|
||||
|
||||
2.2) Cleaning up
|
||||
@@ -134,10 +128,10 @@ $G4WORKDIR/tmp/$G4SYSTEM/ use "gmake tiaraClean".
|
||||
=======================
|
||||
|
||||
|
||||
3.1) Using Anaphe
|
||||
3.1) Using PI
|
||||
-----------------
|
||||
Change to the sub directory "run" and execute "runSim.py".
|
||||
"runSim.py" runs an example configuration which nay be
|
||||
"runSim.py" runs an example configuration which may be
|
||||
changed by the user. The results of the simulation are stored in
|
||||
the directory "simData".
|
||||
The script "runSim.py" periodically prints scoring information to the
|
||||
@@ -146,8 +140,8 @@ It also prints out the relative path of a ".shelve" file.
|
||||
This file can be used to access results of the simulation.
|
||||
|
||||
In case the example was build using analysis
|
||||
results may be viewed e.g. using lizard and scripts:
|
||||
1) Start python2.2 or lizard
|
||||
results may be viewed e.g. using python or ROOT:
|
||||
1) Start python2.2
|
||||
2) type: import dataAcess
|
||||
3) type: p = dataAcess.ExpMcPlot (shelveFileName,detectorposition)
|
||||
where "shelveFileName" is the name (enclosed in quotes) of the
|
||||
@@ -184,7 +178,7 @@ set the print out period to 30 minutes by setting:
|
||||
|
||||
|
||||
|
||||
3.2) Not using Anaphe (mainly for system testing)
|
||||
3.2) Not using PI (mainly for system testing)
|
||||
-------------------------------------------------
|
||||
Change to the sub directory "run" and execute
|
||||
runSimNoAnalysis.py.
|
||||
@@ -197,7 +191,7 @@ runSimNoAnalysis.py.
|
||||
============================
|
||||
|
||||
|
||||
simCommon.csh - a script to setup environment variables
|
||||
envCommon.csh - a script to setup environment variables
|
||||
in case the above one of the above environment settings have been
|
||||
done beforehand.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# $Id: envCommon.csh,v 1.8 2003/12/08 17:53:26 gcosmo Exp $
|
||||
# $Id: envCommon.csh,v 1.9 2004/06/09 15:04:34 daquinog Exp $
|
||||
# -------------------------------------------------------------------
|
||||
# GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
# GEANT4 tag $Name: geant4-06-02 $
|
||||
# -------------------------------------------------------------------
|
||||
# Before sourcing this script make sure you have set the
|
||||
# environment variables according to the description in README.
|
||||
@@ -8,44 +8,38 @@
|
||||
|
||||
# setup in case Anaphe is used --------------------------------------
|
||||
|
||||
if (${?ANAPHE_SCRIPTS} == 1 && ${?ANAPHETOP} == 1 && ${?AIDA_DIR} == 1 ) then
|
||||
if (${?PI_BASE_DIR} == 1 && ${?SWIG_BASE_DIR} == 1) then
|
||||
|
||||
if ( -f $ANAPHE_SCRIPTS/setupAnaphe.csh ) then
|
||||
source $ANAPHE_SCRIPTS/setupAnaphe.csh
|
||||
else if ( -f $ANAPHE_SCRIPTS/setup-Anaphe.csh) then
|
||||
source $ANAPHE_SCRIPTS/setup-Anaphe.csh
|
||||
else
|
||||
echo "envCommon.csh: ERROR: could not find a setup file for anaphe"
|
||||
exit
|
||||
endif
|
||||
setenv PATH ${ANAPHE_SCRIPTS}:$PATH
|
||||
setenv ANAPHESPECDIR `(cd $ANAPHE_REL_DIR/../; pwd)`
|
||||
setenv PI_VERSION 1_2_1
|
||||
setenv PI_VER 1.2.1
|
||||
setenv PI_ARCH rh73_gcc32
|
||||
setenv PATH ${PATH}:${PI_BASE_DIR}/${PI_VER}/app/releases/PI/PI_${PI_VER}/${PI_ARCH}/bin
|
||||
setenv PATH ${PI_BASE_DIR}/Linux-g++/bin:$PATH
|
||||
eval `aida-config -r csh`
|
||||
#
|
||||
# python from Anaphe
|
||||
# python from PI
|
||||
#
|
||||
setenv PYTHONVERSION 2.2
|
||||
setenv PYTHON_INCLUDE_DIR ${ANAPHESPECDIR}/PublicDomainPackages/2.0.0/include/python${PYTHONVERSION}
|
||||
setenv PYTHON_LIB_DIR ${ANAPHESPECDIR}/PublicDomainPackages/2.0.0/lib/python${PYTHONVERSION}/config
|
||||
setenv PYTHON_INCLUDE_DIR ${PI_BASE_DIR}/${PI_VER}/external/Python/2.2.2/${PI_ARCH}/include/python${PYTHONVERSION}
|
||||
setenv PYTHON_LIB_DIR ${PI_BASE_DIR}/${PI_VER}/external/Python/2.2.2/${PI_ARCH}/lib/python${PYTHONVERSION}/config
|
||||
#
|
||||
# python for PI
|
||||
if (${?PYTHONPATH} == 0) then
|
||||
setenv PYTHONPATH
|
||||
endif
|
||||
setenv PYTHONPATH ${PI_BASE_DIR}/Linux-g++/python:$PYTHONPATH
|
||||
setenv PYTHONPATH ${PI_BASE_DIR}/${PI_VER}/app/releases/SEAL/SEAL_1_3_4/rh73_gcc32/lib:$PYTHONPATH
|
||||
#
|
||||
# setup the swig command
|
||||
#
|
||||
setenv SWIG_VERSION 1.3.15
|
||||
setenv SWIG_BASE_DIR ${ANAPHESPECDIR}/PublicDomainPackages/2.0.0
|
||||
setenv SWIG_INCDIRS "-I${SWIG_BASE_DIR}/lib/swig-${SWIG_VERSION} -I${SWIG_BASE_DIR}/lib/swig-${SWIG_VERSION}/python"
|
||||
setenv SWIG ${SWIG_BASE_DIR}/bin/swig-${SWIG_VERSION}
|
||||
#
|
||||
# CLHEP from Anaphe (shared libraries are required)
|
||||
#
|
||||
setenv CLHEP_BASE_DIR ${ANAPHETOP}/specific/${PLATF}/CLHEP/1.8.0.0
|
||||
#
|
||||
# add scripts path to PATH
|
||||
#
|
||||
setenv PATH ${ANAPHETOP}/share/LHCXX/${ANAPHE_VERSION}/scripts:${PATH}
|
||||
|
||||
else # not using Anaphe
|
||||
|
||||
echo "-- WARNING: histograms are not activated !"
|
||||
echo " Either ANAPHE_SCRIPTS, ANAPHETOP or AIDA_DIR are not set."
|
||||
echo " Either PI_BASE_DIR or SWIG_BASE_DIR are not set."
|
||||
#
|
||||
if ( ${?PYTHONVERSION} == 1 && \
|
||||
${?PYTHON_BASE_DIR} == 1 && \
|
||||
@@ -75,7 +69,7 @@ else # not using Anaphe
|
||||
exit
|
||||
endif
|
||||
|
||||
endif # end settings for not using Anaphe
|
||||
endif # end settings for not using PI
|
||||
|
||||
#
|
||||
# common settings
|
||||
@@ -92,6 +86,9 @@ setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${G4WORKDIR}/tmp/${G4SYSTEM}/tiaraPhys
|
||||
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${G4WORKDIR}/tmp/${G4SYSTEM}/tiaraPhysicsLists
|
||||
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${G4WORKDIR}/lib/${G4SYSTEM}
|
||||
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${PYTHON_LIB_DIR}
|
||||
setenv LD_LIBRARY_PATH ${PI_BASE_DIR}/${PI_VER}/app/releases/SEAL/SEAL_1_3_4/rh73_gcc32/lib:$LD_LIBRARY_PATH
|
||||
setenv LD_LIBRARY_PATH /afs/cern.ch/sw/lcg/external/Python/2.2.2/rh73_gcc32/lib:$LD_LIBRARY_PATH
|
||||
setenv LD_LIBRARY_PATH ${PI_BASE_DIR}/${PI_VER}/external/Boost/1.30.2/rh73_gcc32/lib:$LD_LIBRARY_PATH
|
||||
setenv TIARA_BASE `pwd`
|
||||
setenv TIARASCRIPTS ${TIARA_BASE}/source/py_modules
|
||||
if (${?PYTHONPATH} == 0) then
|
||||
@@ -102,3 +99,4 @@ setenv PYTHONPATH ${PYTHONPATH}:${TIARA_BASE}/run:${TIARASCRIPTS}
|
||||
setenv PYTHONPATH ${PYTHONPATH}:${TIARA_BASE}/source/TiaraWrapper
|
||||
setenv PYTHONPATH ${PYTHONPATH}:${TIARA_BASE}/source/G4KernelWrapper
|
||||
setenv PYTHONPATH ${PYTHONPATH}:${TIARA_BASE}/source/CLHEPWrapper
|
||||
#
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/usr/bin/env python2.2
|
||||
#
|
||||
# $Id: runSim.py,v 1.7 2003/06/20 12:41:06 dressel Exp $
|
||||
# $Id: runSim.py,v 1.8 2004/06/09 15:04:35 daquinog Exp $
|
||||
# -------------------------------------------------------------------
|
||||
# GEANT4 tag $Name: geant4-05-02-patch-01 $
|
||||
# GEANT4 tag $Name: geant4-06-02 $
|
||||
# -------------------------------------------------------------------
|
||||
|
||||
# importing python libraries
|
||||
@@ -96,7 +96,6 @@ comment = ""
|
||||
##########################################################################
|
||||
|
||||
# this should be fine for most settings
|
||||
|
||||
experiment = tiaraSpecifications.Experiment(beamEnergy,
|
||||
particleCut["neutron"],
|
||||
particleCut,
|
||||
@@ -159,10 +158,8 @@ impScorer = G4Kernel.G4Scorer()
|
||||
##########################################################################
|
||||
|
||||
# this and the remaining part should be fine for most settings
|
||||
|
||||
tApp = tiaraApplication.TiaraApplet(tiaraSpecs,
|
||||
Tiara.TiaraSim_GetTiaraSim())
|
||||
|
||||
if totalTime == 0:
|
||||
tApp.visMode()
|
||||
else:
|
||||
@@ -173,18 +170,14 @@ tApp.specifyPhysicsList(physList, particleCut)
|
||||
|
||||
# detectors
|
||||
tApp.setScoreDetectorCreator(scoreDetectorCreator)
|
||||
|
||||
tApp.buildGeometry()
|
||||
|
||||
tiara_dir = os.environ["TIARA_BASE"]
|
||||
|
||||
primGenBuilder = tiaraGenerators.\
|
||||
TiaraDPSEnergyGenerator(tiaraSpecs,
|
||||
tiara_dir +
|
||||
"/data/expDataConverted/dpsSource.xml")
|
||||
#primGenBuilder = tiaraGenerators.TiaraPrimaryGenerator(tiaraSpecs)
|
||||
#primGenBuilder = tiaraGenerators.FixedEnergyPrimaryGenerator(tiaraSpecs)
|
||||
|
||||
tApp.setPrimaryGenerator(primGenBuilder.primGen)
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/usr/bin/env python2.2
|
||||
#
|
||||
# $Id: runSimNoAnalysis.py,v 1.3 2003/06/20 12:41:06 dressel Exp $
|
||||
# $Id: runSimNoAnalysis.py,v 1.4 2004/06/09 15:04:35 daquinog Exp $
|
||||
# -------------------------------------------------------------------
|
||||
# GEANT4 tag $Name: geant4-05-02-patch-01 $
|
||||
# GEANT4 tag $Name: geant4-06-02 $
|
||||
# -------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ impScorer = G4Kernel.G4Scorer()
|
||||
##########################################################################
|
||||
tApp = tiaraApplication.TiaraApplet(tiaraSpecs = tiaraSpecs,
|
||||
tSim = Tiara.TiaraSim_GetTiaraSim(),
|
||||
useLizard = False)
|
||||
usePI = False)
|
||||
|
||||
|
||||
#tApp.visMode()
|
||||
@@ -190,7 +190,7 @@ rc.impScorer = impScorer
|
||||
rc.totalTime = totalTime
|
||||
rc.comment = comment
|
||||
|
||||
rs = runSequence.RunSequence(runConfig=rc, useLizard = False)
|
||||
rs = runSequence.RunSequence(runConfig=rc, usePI = False)
|
||||
rs.runNevents(100)
|
||||
rs.runLoop()
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/usr/bin/env python2.2
|
||||
#
|
||||
# $Id: runVisMode.py,v 1.3 2003/06/20 12:41:06 dressel Exp $
|
||||
# $Id: runVisMode.py,v 1.4 2004/06/09 15:04:35 daquinog Exp $
|
||||
# -------------------------------------------------------------------
|
||||
# GEANT4 tag $Name: geant4-05-02-patch-01 $
|
||||
# GEANT4 tag $Name: geant4-06-02 $
|
||||
# -------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ import os
|
||||
|
||||
# importing wrapper modules (see the source/*Wrapper directories)
|
||||
# created by swig (from the source/*Wrapper/*.i files).
|
||||
import CLHEP
|
||||
import Tiara
|
||||
import G4Kernel
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# $Id: GNUmakefile,v 1.1.1.1 2003/06/12 13:08:24 dressel Exp $
|
||||
# $Id: GNUmakefile,v 1.2 2004/06/09 15:04:35 daquinog Exp $
|
||||
# --------------------------------------------------------------
|
||||
# GNUmakefile Michael Dressel
|
||||
# --------------------------------------------------------------
|
||||
@@ -46,3 +46,4 @@ LDLIBS += -lpython$(PYTHONVERSION) \
|
||||
tiaraClean:
|
||||
@echo Cleaning up $(G4WORKDIR)/tmp/$(G4SYSTEM)/$(name)
|
||||
@rm -rf $(G4WORKDIR)/tmp/$(G4SYSTEM)/$(name)
|
||||
@rm -f *.pyc
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# $Id: GNUmakefile,v 1.5 2003/12/08 17:53:26 gcosmo Exp $
|
||||
# $Id: GNUmakefile,v 1.6 2004/06/09 15:04:35 daquinog Exp $
|
||||
# --------------------------------------------------------------
|
||||
# GNUmakefile Michael Dressel
|
||||
# --------------------------------------------------------------
|
||||
@@ -43,4 +43,4 @@ LDLIBS += -lpython$(PYTHONVERSION) \
|
||||
tiaraClean:
|
||||
@echo Cleaning up $(G4WORKDIR)/tmp/$(G4SYSTEM)/$(name)
|
||||
@rm -rf $(G4WORKDIR)/tmp/$(G4SYSTEM)/$(name)
|
||||
|
||||
@rm -f *.pyc
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# $Id: GNUmakefile,v 1.6 2003/12/08 17:53:26 gcosmo Exp $
|
||||
# $Id: GNUmakefile,v 1.7 2004/06/09 15:04:35 daquinog Exp $
|
||||
# --------------------------------------------------------------
|
||||
# GNUmakefile Michael Dressel
|
||||
# --------------------------------------------------------------
|
||||
@@ -46,10 +46,10 @@ all: $(copyDeps) $(SWIGSO)
|
||||
include $(G4INSTALL)/config/binmake.gmk
|
||||
|
||||
ifdef G4ANALYSIS_USE
|
||||
CPPFLAGS += `$(ANAPHE_SCRIPTS)/aida-config -i`
|
||||
CPPFLAGS += `aida-config --include`
|
||||
# LDFLAGS += `aida-config --lib`
|
||||
endif
|
||||
|
||||
|
||||
CPPFLAGS += -I$(TIARA_BASE)/source/tiara/include\
|
||||
-I$(PYTHON_INCLUDE_DIR) \
|
||||
-I$(TIARA_BASE)/source/tiaraPhysicsPackaging/include \
|
||||
@@ -65,7 +65,7 @@ LDLIBS1 += -ltiaraPhysicsLists \
|
||||
-ltiaraPhysicsPackaging-handMade
|
||||
|
||||
ifdef G4ANALYSIS_USE
|
||||
LDLIBS += `$(ANAPHE_SCRIPTS)/aida-config -l`
|
||||
LDLIBS += `aida-config --lib`
|
||||
endif
|
||||
|
||||
LDLIBS += -lpython$(PYTHONVERSION) \
|
||||
@@ -89,4 +89,4 @@ tiaraClean:
|
||||
@echo Cleaning up $(G4WORKDIR)/tmp/$(G4SYSTEM)/$(name)
|
||||
@echo $(tiaraDeps)
|
||||
@rm -rf $(G4WORKDIR)/tmp/$(G4SYSTEM)/$(name)
|
||||
|
||||
@rm -f *.pyc
|
||||
|
||||
@@ -1,445 +0,0 @@
|
||||
# $Id: liz.py,v 1.2 2003/06/16 17:06:44 dressel Exp $
|
||||
# -------------------------------------------------------------------
|
||||
# GEANT4 tag $Name: geant4-05-02-patch-01 $
|
||||
# -------------------------------------------------------------------
|
||||
#
|
||||
|
||||
import os, sys, string
|
||||
|
||||
if ( not os.environ.has_key("ANAPHETOP") ) :
|
||||
os.environ["ANAPHETOP"] = "/afs/cern.ch/sw/lhcxx"
|
||||
|
||||
|
||||
if ( not os.environ.has_key("PLATF") ) :
|
||||
os.environ["PLATF"] = "redhat73/gcc-3.2"
|
||||
|
||||
if ( not os.environ.has_key("ANAPHE_VERSION") ) :
|
||||
if ( not os.environ.has_key("ANAPHEVERS") ) :
|
||||
os.environ["ANAPHEVERS"] = "5.0.4"
|
||||
else :
|
||||
os.environ["ANAPHEVERS"] = os.environ["ANAPHE_VERSION"]
|
||||
|
||||
if ( not os.environ.has_key("PUBDOMVERS") ) :
|
||||
os.environ["PUBDOMVERS"] = "2.0.0"
|
||||
|
||||
if ( not os.environ.has_key("ANAPHE_REL_DIR") ) :
|
||||
os.environ["ANAPHE_REL_DIR"] = os.environ["ANAPHETOP"]+"/specific/"+os.environ["PLATF"]+"/"+os.environ["ANAPHEVERS"]
|
||||
|
||||
|
||||
if ( not os.environ.has_key("OS") ) :
|
||||
os.environ["OS"] = "Linux" # for now !!!
|
||||
|
||||
# for debugging purposes this might be set differently ...
|
||||
if ( not os.environ.has_key("LIZARD_ROOT") ) :
|
||||
os.environ["LIZARD_ROOT"] = os.environ["ANAPHE_REL_DIR"] + "/python"
|
||||
|
||||
os.environ["LIZARD_LIB"] = os.environ["LIZARD_ROOT"] + "/lib"
|
||||
|
||||
#-toDo: clean up the LD_LIBRARY_PATH, PATH and PYTHONPATH variables from wrong versions
|
||||
# of Anaphe s/w
|
||||
#export LD_LIBRARY_PATH=`${LIZARD_ROOT}/bin/cleanupPath.py LD_LIBRARY_PATH`
|
||||
#export PATH=`${LIZARD_ROOT}/bin/cleanupPath.py PATH`
|
||||
#export PYTHONPATH=`${LIZARD_ROOT}/bin/cleanupPath.py PYTHONPATH`
|
||||
|
||||
# add to path in order to find xmgrace ...
|
||||
if (not os.environ.has_key("GRACE_DIR") ) :
|
||||
os.environ["GRACE_DIR"] = os.environ["ANAPHETOP"]+"/specific/"+os.environ["PLATF"]+"/PublicDomainPackages/" + os.environ["PUBDOMVERS"] + "/grace"
|
||||
|
||||
os.environ["PATH"] = os.environ["GRACE_DIR"] + "/bin:" + os.environ["PATH"]
|
||||
os.environ["LD_LIBRARY_PATH"] = os.environ["LD_LIBRARY_PATH"] + ":" + os.environ["LIZARD_LIB"] + ":" + os.environ["ANAPHE_REL_DIR"] + "/lib"
|
||||
|
||||
|
||||
# toDo:
|
||||
# if [ `uname` = "SunOS" ] ; then
|
||||
# SUN_CC_DIR=/afs/cern.ch/project/sun/solaris/opt/SUNWspro62Apr02
|
||||
# export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${SUN_CC_DIR}/lib:/usr/local/lib # /opt/SUNWspro/lib:/usr/local/lib:/opt/SUNWspro/WS6U1/lib
|
||||
# fi
|
||||
#
|
||||
# to find the proper versions of libs for python-2.0 and swig-1.3a5
|
||||
# (it should be SWIG_DIR)
|
||||
|
||||
if (not os.environ.has_key("SWIG_DIR")) :
|
||||
os.environ["SWIG_DIR"] = os.environ["ANAPHETOP"]+"/specific/"+os.environ["PLATF"]+"/PublicDomainPackages/" + os.environ["PUBDOMVERS"]
|
||||
|
||||
|
||||
os.environ["LD_LIBRARY_PATH"] = os.environ["SWIG_DIR"] + "/lib:" + os.environ["LD_LIBRARY_PATH"]
|
||||
|
||||
# need to add "." for automatic code compilation (ntuples et al)
|
||||
os.environ["LD_LIBRARY_PATH"] = os.environ["LD_LIBRARY_PATH"] + ":" + os.environ["LIZARD_ROOT"] + "/" + os.environ["PLATF"] + ":."
|
||||
|
||||
# add to PYTHONPATH
|
||||
sys.path.append(os.environ["LIZARD_LIB"])
|
||||
sys.path.append(os.environ["LIZARD_ROOT"] + "/" + os.environ["PLATF"])
|
||||
sys.path.append(os.environ["LIZARD_ROOT"] + "/src")
|
||||
sys.path.append(os.environ["HOME"])
|
||||
|
||||
sys.path.append(os.environ["LIZARD_ROOT"] + "/contrib")
|
||||
|
||||
# toDo
|
||||
#if [ -z $LIZARD_NO_PUBLIC_CONTRIB ] ; then
|
||||
# export PYTHONPATH=${PYTHONPATH}:${ANAPHETOP}/share/PythonContrib
|
||||
#fi
|
||||
|
||||
# # define location of python
|
||||
# if [ -z $PYDIR ] ; then
|
||||
# export PYDIR=${ANAPHETOP}/specific/${PLATF}/PublicDomainPackages/${PUBDOMVERS}
|
||||
# fi
|
||||
#
|
||||
# if [ -z $PYTHON ] ; then
|
||||
# export PYTHON=${PYDIR}/bin/python2.2
|
||||
# fi
|
||||
#
|
||||
|
||||
# create a local temporary file (with the PID as part of the name) to
|
||||
# speed up access from Nag fitter if starting directory is in AFS:
|
||||
if (not os.environ.has_key("LIZARD_KEEP_FITRESULT")) :
|
||||
os.system("rm -f e04ucc.r")
|
||||
os.system("ln -s /tmp/pid-$$-e04ucc.r e04ucc.r")
|
||||
|
||||
# $PYTHON -i ${LIZARD_ROOT}/bin/.Lizardrc $*
|
||||
print "executing startup from'"+os.environ["LIZARD_ROOT"] + "/bin/.Lizardrc"+"'"
|
||||
# execfile(os.environ["LIZARD_ROOT"] + "/bin/.Lizardrc")
|
||||
|
||||
|
||||
|
||||
# Settings for Lizard
|
||||
|
||||
lizardVersion = "3.0.0.5"
|
||||
lizardVersionDate = "20 Dec 2002"
|
||||
|
||||
lizardBatch = None
|
||||
lizardObjy = None
|
||||
lizardNag = None
|
||||
lizardNoGraphics = None
|
||||
|
||||
from math import *
|
||||
from time import *
|
||||
|
||||
import string
|
||||
import os
|
||||
import sys
|
||||
|
||||
import random
|
||||
import atexit
|
||||
import gc
|
||||
|
||||
# the following works only for python-2.0 (or later)
|
||||
|
||||
# for command-line completion :
|
||||
import rlcompleter
|
||||
rlcompleter.readline.parse_and_bind("tab: complete")
|
||||
|
||||
try :
|
||||
if (sys.version_info[0] == 2) :
|
||||
# for history (across-sessions)
|
||||
import readline
|
||||
# limit history file to 1000 lines
|
||||
readline.set_history_length(1000)
|
||||
# read previous file (if existing)
|
||||
histfile = os.path.join(os.environ["HOME"], ".LizHist")
|
||||
try:
|
||||
readline.read_history_file(histfile)
|
||||
except IOError:
|
||||
print "cannot read command history file ", histfile
|
||||
pass
|
||||
# register function to write history file at exit
|
||||
atexit.register(readline.write_history_file, histfile)
|
||||
del histfile
|
||||
# end history
|
||||
except :
|
||||
print "\nerror while accessing command history file"
|
||||
raise
|
||||
|
||||
# end python-2.0 specific part ...
|
||||
|
||||
|
||||
# --------------------------------------------------------------------------------
|
||||
|
||||
def usage ():
|
||||
print """
|
||||
|
||||
usage: startLizard.sh [<options>] [<file1> <file2> ...]
|
||||
|
||||
where the optional <options> can be one of the following:
|
||||
|
||||
-?, -h, --help : print this text
|
||||
-v, --version : print version info
|
||||
|
||||
-b, --batch : run in batch mode and execute the scripts passed after all options
|
||||
|
||||
--noGraphics : don't instantiate a Plotter (use this if your DISPLAY variable is not set)
|
||||
|
||||
--useNag : use minimizer engine from Nag-C library
|
||||
|
||||
--useObjy : use Objectivity/DB for persistent Histograms and (row-wise) Ntuples
|
||||
|
||||
default : use FML with Minuit minimizer engine
|
||||
|
||||
the (optional) list of files will be executed after startup
|
||||
|
||||
NOTE: the options need to be _before_ any script file
|
||||
|
||||
"""
|
||||
|
||||
|
||||
# --------------------------------------------------------------------------------
|
||||
# set some defaults: use FML, Objy, Nag-C
|
||||
# --------------------------------------------------------------------------------
|
||||
lizardFML = 1
|
||||
lizardHBook = 0
|
||||
lizardNag = 0
|
||||
# --------------------------------------------------------------------------------
|
||||
|
||||
# --------------------------------------------------------------------------------
|
||||
|
||||
def lizardVersionInfo() :
|
||||
print "\nThis is Lizard version " + lizardVersion + "\n"
|
||||
|
||||
|
||||
# --------------------------------------------------------------------------------
|
||||
# check if we got any flags:
|
||||
# --------------------------------------------------------------------------------
|
||||
|
||||
import getopt
|
||||
#optlist = []
|
||||
#args = []
|
||||
try:
|
||||
optlist, args = getopt.getopt(sys.argv[1:], ['?', 'h', 'v', 'b'],
|
||||
['help', 'version', 'batch', 'noGraphics',
|
||||
'useNag', 'useNag', 'useObjy', 'objy' ])
|
||||
|
||||
except :
|
||||
print "\nunknown option:",o,"\n"
|
||||
usage()
|
||||
sys.exit()
|
||||
|
||||
# --------------------------------------------------------------------------------
|
||||
# have a first look at options now, see if the user wants some info without
|
||||
# the need to start the system ...
|
||||
# --------------------------------------------------------------------------------
|
||||
|
||||
for o, a in optlist:
|
||||
if o in ("-?", "-h", "--help"):
|
||||
usage()
|
||||
sys.exit()
|
||||
elif o in ("-v", "--version",):
|
||||
lizardVersionInfo()
|
||||
sys.exit()
|
||||
elif o in ("", "--useObjy", "--objy",):
|
||||
lizardObjy = 1
|
||||
|
||||
|
||||
import dl
|
||||
# --------------------------------------------------------------------------------
|
||||
# check if Objectivity can be used, if requested
|
||||
# --------------------------------------------------------------------------------
|
||||
|
||||
if (lizardObjy == 1) :
|
||||
try:
|
||||
dl.open( "liboo.so" )
|
||||
except:
|
||||
print "Objectivity requested, but liboo not found in LD_LIBRARY_PATH !! Aborting !"
|
||||
sys.exit()
|
||||
|
||||
# --------------------------------------------------------------------------------
|
||||
# check if Nag_C can be used,
|
||||
# --------------------------------------------------------------------------------
|
||||
|
||||
if (lizardNag == 1 ) :
|
||||
try:
|
||||
dl.open( "libnagc.so" )
|
||||
except:
|
||||
print "Minimizer from NAG requested, but libnagc not found in LD_LIBRARY_PATH !! Aborting !"
|
||||
sys.exit()
|
||||
|
||||
# --------------------------------------------------------------------------------
|
||||
# check the other possible flags:
|
||||
# --------------------------------------------------------------------------------
|
||||
for o, a in optlist:
|
||||
if o in ("-b", "--batch",):
|
||||
lizardBatch = 1
|
||||
elif o in ("--noGraphics",):
|
||||
lizardNoGraphics = 1
|
||||
elif o in ("--nag", "--useNag"):
|
||||
lizardNag = 1
|
||||
|
||||
# --------------------------------------------------------------------------------
|
||||
|
||||
print "\n"
|
||||
|
||||
# --------------------------------------------------------------------------------
|
||||
# check now whether DISPLAY is set.
|
||||
# --------------------------------------------------------------------------------
|
||||
if (lizardNoGraphics != 1) :
|
||||
try:
|
||||
disp = os.environ["DISPLAY"]
|
||||
except:
|
||||
print "\n==========> no DISPLAY set, switching to no-graphics mode."
|
||||
lizardNoGraphics = 1
|
||||
|
||||
# prompt
|
||||
sys.ps1=":-) "
|
||||
|
||||
# --------------------------------------------------------------------------------
|
||||
|
||||
# welcome message parameters
|
||||
lizMsgWelcome = "Welcome to Lizard"
|
||||
lizMsgID = "Version "+ lizardVersion + " (" + lizardVersionDate + ")"
|
||||
lizMsgURL = "http://cern.ch/Anaphe"
|
||||
lizMsgSide = "|"
|
||||
lizMsgCorner = "+"
|
||||
lizMsgTop = "-"
|
||||
lizMsgWidth = 50
|
||||
lizMsgSideIndent = 8
|
||||
lizMsgTopIndent = 1
|
||||
|
||||
# generate welcome message
|
||||
lizMsgBar = ""
|
||||
for i in range (0,lizMsgWidth) :
|
||||
lizMsgBar = lizMsgBar + lizMsgTop
|
||||
|
||||
lizMsgPad = ""
|
||||
for i in range (0,lizMsgSideIndent) :
|
||||
lizMsgPad = lizMsgPad + " "
|
||||
|
||||
lizMsgBlank = lizMsgSide + string.center("",lizMsgWidth) + lizMsgSide
|
||||
for i in range (0, lizMsgTopIndent) :
|
||||
print ""
|
||||
|
||||
print lizMsgPad + lizMsgCorner + lizMsgBar + lizMsgCorner
|
||||
print lizMsgPad + lizMsgBlank
|
||||
print lizMsgPad + lizMsgSide + string.center(lizMsgWelcome,lizMsgWidth) + lizMsgSide
|
||||
print lizMsgPad + lizMsgBlank
|
||||
print lizMsgPad + lizMsgSide + string.center(lizMsgID,lizMsgWidth) + lizMsgSide
|
||||
print lizMsgPad + lizMsgBlank
|
||||
print lizMsgPad + lizMsgSide + string.center(lizMsgURL,lizMsgWidth) + lizMsgSide
|
||||
print lizMsgPad + lizMsgBlank
|
||||
print lizMsgPad + lizMsgCorner + lizMsgBar + lizMsgCorner
|
||||
for i in range (0, lizMsgTopIndent) :
|
||||
print ""
|
||||
|
||||
|
||||
# --------------------------------------------------------------------------------
|
||||
|
||||
print "Chosen configuration: ",
|
||||
if ( lizardObjy == 1 ) :
|
||||
print "Objectivity",
|
||||
else:
|
||||
print "HBook and XML",
|
||||
print " persistency and ",
|
||||
if ( lizardNag == 1 ) :
|
||||
print "Nag-C",
|
||||
else:
|
||||
print "Minuit",
|
||||
print "minimizer engine"
|
||||
|
||||
print "\nType help() for help\n"
|
||||
|
||||
sys.stdout.flush()
|
||||
|
||||
# --------------------------------------------------------------------------------
|
||||
# global startup files ...
|
||||
# --------------------------------------------------------------------------------
|
||||
|
||||
# remember where we started from ...
|
||||
curDir = os.getcwd()
|
||||
|
||||
# check for global StartupFiles (so far, the order doesn't matter):
|
||||
startDir = os.environ['LIZARD_ROOT']+"/startUpFiles/"
|
||||
fileList = os.listdir(startDir)
|
||||
|
||||
# change to directory containing the startup files and exec them one by one:
|
||||
os.chdir(startDir)
|
||||
try:
|
||||
for file in fileList :
|
||||
if (string.find(file,".py") == -1) :
|
||||
continue;
|
||||
if (file == "constants.py") :
|
||||
continue;
|
||||
if (os.path.isfile(file)) :
|
||||
# print "loading startUp file ", file
|
||||
execfile(file)
|
||||
else :
|
||||
print "Strange: cannot \"execfile\" startUp file ", file, " in ", startDir, " !?!?"
|
||||
except:
|
||||
raise
|
||||
|
||||
#-ap execfile("constants.py")
|
||||
# return to where we left from ...
|
||||
os.chdir(curDir)
|
||||
|
||||
LizardIsInitialized = 1
|
||||
|
||||
print "\n\nLizard initialised\n"
|
||||
|
||||
# --------------------------------------------------------------------------------
|
||||
# local/user-specific startup files ...
|
||||
# --------------------------------------------------------------------------------
|
||||
|
||||
# check for local initfiles:
|
||||
homeStart = os.environ['HOME']+"/.Lizardrc"
|
||||
if os.path.isfile(homeStart):
|
||||
execfile(homeStart)
|
||||
|
||||
# avoid reading it twice ...
|
||||
if (os.getcwd() != os.environ['HOME'] and
|
||||
os.getcwd() != os.environ['LIZARD_ROOT']+"/bin" ) :
|
||||
localStart = "./.Lizardrc"
|
||||
if os.path.isfile(localStart):
|
||||
execfile(localStart)
|
||||
|
||||
# --------------------------------------------------------------------------------
|
||||
def lizardCleanUp() :
|
||||
global af, tf, pf, pl
|
||||
# in reverse order of construction
|
||||
if (lizardNoGraphics != 1) :
|
||||
pl.thisown = 1 ; del pl
|
||||
pf.thisown = 1 ; del pf
|
||||
tf.thisown = 1 ; del tf
|
||||
af.thisown = 1 ; del af
|
||||
# print "global objects deleted ... " ; sys.stdout.flush()
|
||||
|
||||
for lib in theListOfLoadedLibraries.keys() :
|
||||
sys.stdout.flush()
|
||||
theListOfLoadedLibraries[lib].close()
|
||||
# print "\nall libs unloaded ... " ; sys.stdout.flush()
|
||||
|
||||
print "\nobjects deleted and libs unloaded, exiting python ... " ; sys.stdout.flush()
|
||||
|
||||
return
|
||||
# --------------------------------------------------------------------------------
|
||||
def exit() :
|
||||
lizardCleanUp()
|
||||
sys.exit()
|
||||
|
||||
# --------------------------------------------------------------------------------
|
||||
# execute file given at input (ignoring startup file .Lizardrc) ...
|
||||
# --------------------------------------------------------------------------------
|
||||
|
||||
if (len(args) > 0 ) :
|
||||
args[0] = os.path.abspath(args[0])
|
||||
file = args[0]
|
||||
# reset the environment ... the scripts will now look as if invoked from the shell ...
|
||||
sys.argv = args
|
||||
print "executing ", file
|
||||
if (os.path.isfile(file)) :
|
||||
try :
|
||||
execfile(file)
|
||||
except:
|
||||
# if something goes wrong in batch mode, clean up and exit ...
|
||||
if (lizardBatch == 1) :
|
||||
lizardCleanUp()
|
||||
sys.exit(2)
|
||||
else :
|
||||
raise
|
||||
else :
|
||||
print "file ", file, " not found."
|
||||
|
||||
|
||||
if (lizardBatch == 1) :
|
||||
# clean up (explicitly destroy some objects)
|
||||
lizardCleanUp()
|
||||
sys.exit()
|
||||
|
||||
|
||||
|
||||
+4
-3
@@ -1,10 +1,11 @@
|
||||
# $Id: myLiz.py,v 1.2 2003/06/16 17:06:44 dressel Exp $
|
||||
# $Id: myPI.py,v 1.1 2004/06/09 15:04:36 daquinog Exp $
|
||||
# -------------------------------------------------------------------
|
||||
# GEANT4 tag $Name: geant4-05-02-patch-01 $
|
||||
# GEANT4 tag $Name: geant4-06-02 $
|
||||
# -------------------------------------------------------------------
|
||||
#
|
||||
import sys
|
||||
|
||||
origArgv = sys.argv
|
||||
sys.argv = ["","--noGraphics"]
|
||||
from liz import *
|
||||
from PyAida import *
|
||||
sys.argv = origArgv
|
||||
@@ -1,6 +1,6 @@
|
||||
# $Id: myUtils.py,v 1.4 2003/06/20 12:41:06 dressel Exp $
|
||||
# $Id: myUtils.py,v 1.5 2004/06/09 15:04:36 daquinog Exp $
|
||||
# -------------------------------------------------------------------
|
||||
# GEANT4 tag $Name: geant4-05-02-patch-01 $
|
||||
# GEANT4 tag $Name: geant4-06-02 $
|
||||
# -------------------------------------------------------------------
|
||||
#
|
||||
import CLHEP
|
||||
@@ -13,7 +13,7 @@ import shelve
|
||||
|
||||
G4analysisUse = os.environ.has_key("G4ANALYSIS_USE")
|
||||
if G4analysisUse:
|
||||
import myLiz
|
||||
import myPI
|
||||
|
||||
|
||||
def createParallelSampler(impGeo, impScorer):
|
||||
@@ -48,7 +48,7 @@ def saveResults(tApp, path, shelveName, impScorer, impGeo):
|
||||
table.Print(tApp.cellScorerStore.GetMapGeometryCellCellScorer())
|
||||
if G4analysisUse:
|
||||
storePath = path + "/" + myShelve["xmlStoreName"]
|
||||
persistantStore = myLiz.tf.create(storePath,"xml",0,1)
|
||||
persistantStore = myPI.tf.create(storePath,"xml",0,1)
|
||||
coppyTrees(tApp.tree, persistantStore)
|
||||
persistantStore.commit()
|
||||
persistantStore.close()
|
||||
@@ -187,7 +187,7 @@ if G4analysisUse:
|
||||
def addToXML(mergedXMLStore, xmlStore):
|
||||
objNames = xmlStore.listObjectNames()
|
||||
objTypes = xmlStore.listObjectTypes()
|
||||
hf = myLiz.af.createHistogramFactory(mergedXMLStore)
|
||||
hf = myPI.af.createHistogramFactory(mergedXMLStore)
|
||||
for i in range(len(objNames)):
|
||||
oName = objNames[i]
|
||||
oType = objTypes[i]
|
||||
@@ -230,11 +230,11 @@ def addToShelve(mergedShelve, she, shelveNameToBeAdded):
|
||||
if G4analysisUse:
|
||||
def mergeData(mergedName, shelveList):
|
||||
mergedShelveName = mergedName + ".shelve"
|
||||
print "createing merged shelve: ", mergedShelveName
|
||||
print "creating merged shelve: ", mergedShelveName
|
||||
mergedShelve = shelve.open(mergedShelveName)
|
||||
mergedXMLname = mergedName + ".xml"
|
||||
print "createing merged XML store: ", mergedXMLname
|
||||
mergedXMLStore = myLiz.tf.create(mergedXMLname, "xml", 0, 1)
|
||||
print "creating merged XML store: ", mergedXMLname
|
||||
mergedXMLStore = myPI.tf.create(mergedXMLname, "xml", 0, 1)
|
||||
|
||||
|
||||
for i in range(len(shelveList)):
|
||||
@@ -243,7 +243,7 @@ if G4analysisUse:
|
||||
she = shelve.open(shelveName,"r")
|
||||
xmlStoreName = she["xmlStoreName"]
|
||||
print "opening: ", xmlStoreName
|
||||
xmlStore = myLiz.tf.create(xmlStoreName,"xml",1,0)
|
||||
xmlStore = myPI.tf.create(xmlStoreName,"xml",1,0)
|
||||
if i == 0:
|
||||
if mergedXMLStore.listObjectNames() == ():
|
||||
setUpMergedShelve(she, mergedShelve, mergedXMLname, shelveName)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# $Id: runSequence.py,v 1.3 2003/06/16 17:06:44 dressel Exp $
|
||||
# $Id: runSequence.py,v 1.4 2004/06/09 15:04:36 daquinog Exp $
|
||||
# -------------------------------------------------------------------
|
||||
# GEANT4 tag $Name: geant4-05-02-patch-01 $
|
||||
# GEANT4 tag $Name: geant4-06-02 $
|
||||
# -------------------------------------------------------------------
|
||||
#
|
||||
import Tiara
|
||||
@@ -31,9 +31,9 @@ class RunConfig(object):
|
||||
|
||||
class RunSequence(object):
|
||||
# methods to be used public
|
||||
def __init__(self, runConfig, useLizard = True):
|
||||
def __init__(self, runConfig, usePI = True):
|
||||
self.rc = runConfig
|
||||
self.useLizard = useLizard
|
||||
self.usePI = usePI
|
||||
self.runNum = -1
|
||||
self.confInfo = self.rc.getConfInfo()
|
||||
self.storeName = myUtils.getStoreName()
|
||||
@@ -74,7 +74,7 @@ class RunSequence(object):
|
||||
def report(self):
|
||||
print "\n\nRunSequence.report:"
|
||||
print self.confInfo
|
||||
if self.useLizard:
|
||||
if self.usePI:
|
||||
print "the xml store will be named: "
|
||||
print " ", self.pathXMLName
|
||||
print "the shelve name: "
|
||||
@@ -97,7 +97,7 @@ class RunSequence(object):
|
||||
rns = string.rjust(rns, 5)
|
||||
rns = string.replace(rns,' ','0')
|
||||
rId = "_run" + rns
|
||||
if self.useLizard:
|
||||
if self.usePI:
|
||||
self.xmlStore = self.storeName + rId + ".xml"
|
||||
self.pathXMLName = self.path + "/" + self.xmlStore
|
||||
|
||||
@@ -108,7 +108,7 @@ class RunSequence(object):
|
||||
|
||||
def mkShelve(self):
|
||||
myShelve = shelve.open(self.pathShelveName)
|
||||
if self.useLizard:
|
||||
if self.usePI:
|
||||
myShelve["xmlStoreName"] = self.xmlStore
|
||||
for info in self.confInfo:
|
||||
myShelve[info] = self.confInfo[info]
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
# $Id: tiaraApplication.py,v 1.3 2003/06/16 17:06:44 dressel Exp $
|
||||
# $Id: tiaraApplication.py,v 1.4 2004/06/09 15:04:36 daquinog Exp $
|
||||
# -------------------------------------------------------------------
|
||||
# GEANT4 tag $Name: geant4-05-02-patch-01 $
|
||||
# GEANT4 tag $Name: geant4-06-02 $
|
||||
# -------------------------------------------------------------------
|
||||
#
|
||||
import string
|
||||
|
||||
import CLHEP
|
||||
import G4Kernel
|
||||
import Tiara
|
||||
@@ -16,11 +15,27 @@ import tallyData
|
||||
|
||||
class TiaraApplet(object):
|
||||
tiaraSim = None
|
||||
def __init__(self, tiaraSpecs, tSim = None, useLizard = True):
|
||||
if useLizard:
|
||||
import myLiz
|
||||
self.tree = myLiz.tf.create()
|
||||
self.hf = myLiz.af.createHistogramFactory (self.tree)
|
||||
def __init__(self, tiaraSpecs, tSim = None, usePI = True):
|
||||
if usePI:
|
||||
import myPI
|
||||
self.tree = myPI.tf.create()
|
||||
self.hf = myPI.af.createHistogramFactory (self.tree)
|
||||
print self.hf
|
||||
print "hf"
|
||||
hf_ptr = str(self.hf._theObject)
|
||||
print hf_ptr
|
||||
print "hf_ptr before split"
|
||||
hf_ptr = string.split(str(self.hf._theObject))[-1]
|
||||
print hf_ptr
|
||||
print "hf_ptr after split"
|
||||
hf_ptr2 = hf_ptr.split('x')[1]
|
||||
for i in range(len(hf_ptr2),8) :
|
||||
hf_ptr2 = '0'+hf_ptr2
|
||||
|
||||
self.hf.this='_' + hf_ptr2 + '_p_AIDA__IHistogramFactory'
|
||||
self.hf.thisown = 1
|
||||
print self.hf.this
|
||||
print "hf.this after split"
|
||||
else:
|
||||
self.tree = None
|
||||
self.hf = None
|
||||
@@ -160,6 +175,7 @@ class TiaraApplet(object):
|
||||
self.tiaraSpecs.
|
||||
experiment.binEdgesBonner,
|
||||
tally)
|
||||
|
||||
else:
|
||||
self.scSrc = Tiara.\
|
||||
TiaraCellScorer("source_detector",
|
||||
@@ -220,4 +236,3 @@ class TiaraApplet(object):
|
||||
self.sampler.Configure()
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# $Id: tiaraDetectors.py,v 1.3 2003/06/20 12:41:07 dressel Exp $
|
||||
# $Id: tiaraDetectors.py,v 1.4 2004/06/09 15:04:36 daquinog Exp $
|
||||
# -------------------------------------------------------------------
|
||||
# GEANT4 tag $Name: geant4-05-02-patch-01 $
|
||||
# GEANT4 tag $Name: geant4-06-02 $
|
||||
# -------------------------------------------------------------------
|
||||
#
|
||||
import CLHEP
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# $Id: tiaraGenerators.py,v 1.2 2003/06/16 17:06:44 dressel Exp $
|
||||
# $Id: tiaraGenerators.py,v 1.3 2004/06/09 15:04:36 daquinog Exp $
|
||||
# -------------------------------------------------------------------
|
||||
# GEANT4 tag $Name: geant4-05-02-patch-01 $
|
||||
# GEANT4 tag $Name: geant4-06-02 $
|
||||
# -------------------------------------------------------------------
|
||||
#
|
||||
import string
|
||||
@@ -36,7 +36,6 @@ class TiaraPrimaryGenerator(object):
|
||||
class TiaraDPSEnergyGenerator(object):
|
||||
def __init__(self, tiaraSpecs, xmlName):
|
||||
self.Name = "dpsSource"
|
||||
|
||||
self.eSamp = Tiara.\
|
||||
TiaraDPSSampledEnergy(tiaraSpecs.
|
||||
experiment.energy,
|
||||
@@ -45,7 +44,6 @@ class TiaraDPSEnergyGenerator(object):
|
||||
xmlName,
|
||||
"")
|
||||
|
||||
|
||||
self.tally = Tiara.TiaraTally()
|
||||
|
||||
if string.find(xmlName,"other") > -1:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# $Id: GNUmakefile,v 1.5 2003/12/08 17:53:26 gcosmo Exp $
|
||||
# $Id: GNUmakefile,v 1.6 2004/06/09 15:04:37 daquinog Exp $
|
||||
# --------------------------------------------------------------
|
||||
# GNUmakefile Michael Dressel
|
||||
# --------------------------------------------------------------
|
||||
@@ -27,9 +27,11 @@ all: lib bin
|
||||
include $(G4INSTALL)/config/binmake.gmk
|
||||
|
||||
ifdef G4ANALYSIS_USE
|
||||
CPPFLAGS += `$(ANAPHE_SCRIPTS)/aida-config -i`
|
||||
CPPFLAGS += `aida-config --include`
|
||||
# LDFLAGS += `aida-config --lib`
|
||||
endif
|
||||
|
||||
|
||||
CPPFLAGS += -I$(PYTHON_INCLUDE_DIR) \
|
||||
-I$(TIARA_BASE)/source/tiaraPhysicsPackaging/include \
|
||||
-I$(TIARA_BASE)/source/tiaraPhysicsLists/include
|
||||
@@ -37,7 +39,7 @@ CPPFLAGS += -I$(PYTHON_INCLUDE_DIR) \
|
||||
LDFLAGS += -L$(PYTHON_LIB_DIR)
|
||||
|
||||
ifdef G4ANALYSIS_USE
|
||||
LDLIBS += `$(ANAPHE_SCRIPTS)/aida-config -l`
|
||||
LDLIBS += `aida-config --lib`
|
||||
endif
|
||||
|
||||
LDLIBS += -lpython$(PYTHONVERSION) \
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: TiaraDPSSampledEnergy.hh,v 1.5 2003/06/25 09:12:37 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02-patch-01 $
|
||||
// $Id: TiaraDPSSampledEnergy.hh,v 1.6 2004/06/09 15:04:37 daquinog Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
//
|
||||
@@ -61,8 +61,13 @@ private:
|
||||
|
||||
void getBounds(G4int &cL, G4int &cH, G4double v);
|
||||
|
||||
std::auto_ptr<AIDA::ITree> fTree;
|
||||
std::auto_ptr<AIDA::IDataPointSet> fSampleDPS;
|
||||
//std::auto_ptr<AIDA::ITree> fTree;
|
||||
// std::auto_ptr<AIDA::IDataPointSet> fSampleDPS;
|
||||
// /////
|
||||
AIDA::ITree* fTree;
|
||||
AIDA::IDataPointSet* fSampleDPS;
|
||||
//////
|
||||
|
||||
G4double fMinEnergyCut;
|
||||
std::map<int, double> fEnergy_Flux;
|
||||
G4double fMaxProb;
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: TiaraCellScorer.cc,v 1.3 2003/06/18 16:40:28 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02-patch-01 $
|
||||
// $Id: TiaraCellScorer.cc,v 1.4 2004/06/09 15:04:37 daquinog Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
@@ -48,22 +48,37 @@ TiaraCellScorer::TiaraCellScorer(AIDA::IHistogramFactory *hf,
|
||||
&binEdgesBonner,
|
||||
const TiaraTally &tally) :
|
||||
fBaseName(histBaseName),
|
||||
fEnergyHisto(hf->createHistogram1D(histBaseName,
|
||||
histBaseName + ": flux vs. energy",
|
||||
binEdgesScinti)),
|
||||
fEnergyFluxHisto(hf->createHistogram1D(histBaseName + "Eflux",
|
||||
histBaseName + ": energy flux vs. energy",
|
||||
binEdgesScinti)),
|
||||
// fEnergyHisto(hf->createHistogram1D(histBaseName,
|
||||
// histBaseName + ": flux vs. energy",
|
||||
// binEdgesScinti)),
|
||||
//fEnergyFluxHisto(hf->createHistogram1D(histBaseName + "Eflux",
|
||||
// histBaseName + ": energy flux vs. energy",
|
||||
// binEdgesScinti)),
|
||||
|
||||
fEnergyHistoBonner(hf->createHistogram1D(histBaseName + "Bonner",
|
||||
histBaseName + ": flux vs. energy",
|
||||
binEdgesBonner)),
|
||||
fEnergyFluxHistoBonner(hf->createHistogram1D(histBaseName + "BonnerEflux",
|
||||
histBaseName + ": energy flux vs. energy",
|
||||
binEdgesBonner)),
|
||||
//fEnergyHistoBonner(hf->createHistogram1D(histBaseName + "Bonner",
|
||||
// histBaseName + ": flux vs. energy",
|
||||
// binEdgesBonner)),
|
||||
//fEnergyFluxHistoBonner(hf->createHistogram1D(histBaseName + "BonnerEflux",
|
||||
// histBaseName + ": energy flux vs. energy",
|
||||
// binEdgesBonner)),
|
||||
|
||||
fTally(tally)
|
||||
{}
|
||||
{
|
||||
//G4cout << "porca troia" << G4endl;
|
||||
G4cout << hf << " hf in G4" << G4endl;
|
||||
fEnergyHisto = hf->createHistogram1D(histBaseName,
|
||||
histBaseName + ": flux vs. energy",
|
||||
binEdgesScinti);
|
||||
fEnergyFluxHisto = hf->createHistogram1D(histBaseName + "Eflux",
|
||||
histBaseName + ": energy flux vs. energy",
|
||||
binEdgesScinti);
|
||||
fEnergyHistoBonner = hf->createHistogram1D(histBaseName + "Bonner",
|
||||
histBaseName + ": flux vs. energy",
|
||||
binEdgesBonner);
|
||||
fEnergyFluxHistoBonner = hf->createHistogram1D(histBaseName + "BonnerEflux",
|
||||
histBaseName + ": energy flux vs. energy",
|
||||
binEdgesBonner);
|
||||
}
|
||||
#else
|
||||
TiaraCellScorer::TiaraCellScorer(const G4String &histBaseName,
|
||||
const TiaraTally &tally) :
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: TiaraDPSSampledEnergy.cc,v 1.7 2003/12/08 17:53:27 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// $Id: TiaraDPSSampledEnergy.cc,v 1.8 2004/06/09 15:04:37 daquinog Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
|
||||
#include "TiaraDPSSampledEnergy.hh"
|
||||
@@ -40,16 +40,34 @@ TiaraDPSSampledEnergy::TiaraDPSSampledEnergy(const G4String &eng,
|
||||
const G4String &sourceTree,
|
||||
const G4String &nameExt)
|
||||
:
|
||||
fTree( (checkFileIsReadable(sourceTree, "TiaraDPSSampledEnergy::TiaraDPSSampledEnergy"),
|
||||
AIDA_createAnalysisFactory()
|
||||
->createTreeFactory()
|
||||
->create(sourceTree, "xml",true,false)) ),
|
||||
fSampleDPS(dynamic_cast<AIDA::IDataPointSet *>(fTree->find(G4String("dps" + eng + nameExt)))),
|
||||
// fTree( (checkFileIsReadable(sourceTree, "TiaraDPSSampledEnergy::TiaraDPSSampledEnergy"),
|
||||
// AIDA_createAnalysisFactory()
|
||||
// ->createTreeFactory()
|
||||
// ->create(sourceTree, "xml",true,false)) ),
|
||||
//fSampleDPS(dynamic_cast<AIDA::IDataPointSet *>(fTree->find(G4String("dps" + eng + nameExt)))),
|
||||
fMinEnergyCut(minEnergyCut),
|
||||
fMaxProb(0),
|
||||
fMinE(fSampleDPS->point(0)->coordinate(0)->value()),
|
||||
fMaxE(fSampleDPS->point(fSampleDPS->size()-1)->coordinate(0)->value())
|
||||
fMaxProb(0)
|
||||
// fMinE(fSampleDPS->point(0)->coordinate(0)->value()),
|
||||
//fMaxE(fSampleDPS->point(fSampleDPS->size()-1)->coordinate(0)->value())
|
||||
{
|
||||
/////////////////////////////////////////
|
||||
|
||||
AIDA::IAnalysisFactory* aFact = AIDA_createAnalysisFactory();
|
||||
|
||||
AIDA::ITreeFactory *treeFact = aFact->createTreeFactory();
|
||||
|
||||
fTree = treeFact -> create(sourceTree, "xml",true,false);
|
||||
|
||||
AIDA::IManagedObject* object = fTree->find("dps" + eng + nameExt);
|
||||
if(object) {
|
||||
AIDA::IDataPointSet* sample = object->cast("AIDA::IDataPointSet");
|
||||
fSampleDPS = sample;
|
||||
}
|
||||
fMinE = fSampleDPS->point(0)->coordinate(0)->value();
|
||||
fMaxE = fSampleDPS->point(fSampleDPS->size()-1)->coordinate(0)->value();
|
||||
|
||||
/////////////////////////////////////////
|
||||
|
||||
for (G4int i=0; i < fSampleDPS->size(); i++) {
|
||||
AIDA::IDataPoint *p = fSampleDPS->point(i);
|
||||
G4double prob(p->coordinate(1)->value());
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: Brachy.cc
|
||||
// GEANT4 tag $Name: geant4-06-01 $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
// GEANT 4 - Brachytherapy example
|
||||
@@ -100,7 +100,7 @@ int main(int argc ,char ** argv)
|
||||
#ifdef G4ANALYSIS_USE
|
||||
G4cout << G4endl << G4endl << G4endl
|
||||
<< " User Environment " << G4endl
|
||||
<< " Using AIDA 3.0 analysis " << G4endl;
|
||||
<< " Using AIDA 3.2.1 analysis " << G4endl;
|
||||
# else
|
||||
G4cout << G4endl << G4endl << G4endl
|
||||
<< " User Environment " << G4endl
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
-------------------------------------------------------------------
|
||||
$Id: History,v 1.7 2004/03/11 15:38:41 guatelli Exp $
|
||||
$Id: History,v 1.8 2004/05/13 14:47:46 guatelli Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -8,7 +8,11 @@ $Id: History,v 1.7 2004/03/11 15:38:41 guatelli Exp $
|
||||
|
||||
Category History file
|
||||
---------------------
|
||||
11.3.2003 - Susanna Guatelli
|
||||
|
||||
13.5.2004 - Susanna Guatelli
|
||||
Migration to AIDA 3.2.1 and PI 1.2.1
|
||||
|
||||
11.3.2004 - Susanna Guatelli
|
||||
Add a histogram, maintenance of the code
|
||||
|
||||
12.11.2003 - John Allison
|
||||
|
||||
@@ -4,4 +4,4 @@
|
||||
/source/switch Iodium
|
||||
/run/energy Iodium
|
||||
/run/initialize
|
||||
/run/beamOn 1000
|
||||
/run/beamOn 5000
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
/run/verbose 0
|
||||
/event/verbose 0
|
||||
/run/initialize
|
||||
/run/beamOn 1000
|
||||
/run/beamOn 5000
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
/event/verbose 0
|
||||
/source/switch Leipzig
|
||||
/run/initialize
|
||||
/run/beamOn 1000
|
||||
/run/beamOn 5000
|
||||
|
||||
@@ -23,28 +23,23 @@ voxels (1.mm dimension) |
|
||||
-------------------------------------------------------------------------
|
||||
----> 2.SET-UP
|
||||
|
|
||||
-example enviroment with the compiler 3.2
|
||||
-example enviroment with the compiler 3.2.3
|
||||
-a standard Geant4 example GNUmakefile is provided |
|
||||
|
||||
setup with: |
|
||||
compiler = gcc-3.2
|
||||
compiler = gcc-3.2.3
|
||||
G4SYSTEM = linux-g++ |
|
||||
|
||||
The following environment variables need to be set: |
|
||||
|
||||
G4LEDATA: points to low energy data base - G4EMLOW2.2 |
|
||||
G4LEDATA: points to low energy data base - G4EMLOW2.3 |
|
||||
|
||||
setup for analysis with AIDA 3.0/Anaphe 5.0.5 for user with account |
|
||||
on lxplus:
|
||||
|
|
||||
setenv G4ANALYSIS_USE 1
|
||||
|
|
||||
source /afs/cern.ch/sw/lhcxx/share/LHCXX/5.0.5/scripts/setupAnaphe.csh
|
||||
setenv PATH ${PATH}:/afs/cern.ch/sw/lhcxx/share/LHCXX/5.0.5/scripts/ |
|
||||
setup for analysis: AIDA 3.2.1, PI 1.2.1 |
|
||||
|
||||
Please take a look to the Anaphe/Lizard web page |
|
||||
http://anaphe.web.cern.ch/anaphe
|
||||
for more info |
|
||||
Users can download the analysis tools from:
|
||||
|
|
||||
http://aida.freehep.org/
|
||||
http://www.cern.ch/PI |
|
||||
|
||||
------------------------------------------------------------------------
|
||||
----> 3.How to run the example. |
|
||||
@@ -108,4 +103,4 @@ a macro is provided ad example of visualisation: VisualisationMacro.mac|
|
||||
for comments, advices, doubts and questions: guatelli@ge.infn.it
|
||||
for more info http://www.ge.infn.it/geant4/examples/index.html
|
||||
|
||||
last modified: Susanna Guatelli 11/3/2004
|
||||
last modified: Susanna Guatelli 14/5/2004
|
||||
|
||||
@@ -29,8 +29,8 @@
|
||||
// * *
|
||||
// *******************************
|
||||
//
|
||||
// $Id: BrachyAnalysisManager.cc,v 1.13 2004/03/11 15:38:42 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-06-01 $
|
||||
// $Id: BrachyAnalysisManager.cc,v 1.14 2004/05/13 14:47:46 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
#ifdef G4ANALYSIS_USE
|
||||
#include <stdlib.h>
|
||||
|
||||
@@ -34,8 +34,8 @@
|
||||
// * *
|
||||
// ****************************************
|
||||
//
|
||||
// $Id: BrachyDetectorConstruction.cc,v 1.24 2004/03/11 16:05:02 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-06-01 $
|
||||
// $Id: BrachyDetectorConstruction.cc,v 1.25 2004/05/13 14:47:46 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
#include "BrachyPhantomROGeometry.hh"
|
||||
#include "BrachyPhantomSD.hh"
|
||||
@@ -101,7 +101,7 @@ BrachyDetectorConstruction::BrachyDetectorConstruction(G4String &SDName)
|
||||
|
||||
factory = new BrachyFactoryIr();
|
||||
|
||||
pMaterial= new BrachyMaterial();
|
||||
pMaterial = new BrachyMaterial();
|
||||
}
|
||||
|
||||
|
||||
@@ -115,9 +115,9 @@ BrachyDetectorConstruction::~BrachyDetectorConstruction()
|
||||
|
||||
G4VPhysicalVolume* BrachyDetectorConstruction::Construct()
|
||||
{
|
||||
pMaterial-> DefineMaterials();
|
||||
pMaterial -> DefineMaterials();
|
||||
ConstructPhantom();
|
||||
factory->CreateSource(PhantomPhys);
|
||||
factory -> CreateSource(PhantomPhys); //Build the source inside the phantom
|
||||
ConstructSensitiveDetector();
|
||||
|
||||
return WorldPhys;
|
||||
@@ -125,7 +125,8 @@ G4VPhysicalVolume* BrachyDetectorConstruction::Construct()
|
||||
|
||||
void BrachyDetectorConstruction::SwitchBrachytherapicSeed()
|
||||
{
|
||||
factory->CleanSource();
|
||||
factory -> CleanSource();
|
||||
|
||||
delete factory;
|
||||
switch(detectorChoice)
|
||||
{
|
||||
@@ -142,11 +143,10 @@ void BrachyDetectorConstruction::SwitchBrachytherapicSeed()
|
||||
factory = new BrachyFactoryIr();
|
||||
break;
|
||||
}
|
||||
factory->CreateSource(PhantomPhys);
|
||||
factory -> CreateSource(PhantomPhys);
|
||||
|
||||
// Notify run manager that the new geometry has been built
|
||||
|
||||
G4RunManager::GetRunManager()->DefineWorldVolume( WorldPhys );
|
||||
G4RunManager::GetRunManager() -> DefineWorldVolume( WorldPhys );
|
||||
}
|
||||
|
||||
void BrachyDetectorConstruction::SelectBrachytherapicSeed(G4String val)
|
||||
@@ -176,28 +176,32 @@ void BrachyDetectorConstruction::ConstructPhantom()
|
||||
{
|
||||
G4Colour lblue (0.0, 0.0, .75);
|
||||
|
||||
G4Material* air=pMaterial->GetMat("Air") ;
|
||||
G4Material* water=pMaterial->GetMat("Water");
|
||||
G4Material* air = pMaterial -> GetMat("Air") ;
|
||||
G4Material* water = pMaterial -> GetMat("Water");
|
||||
|
||||
ComputeDimVoxel();
|
||||
|
||||
// World volume
|
||||
World = new G4Box("World",Worldx,Worldy,Worldz);
|
||||
WorldLog = new G4LogicalVolume(World,air,"WorldLog",0,0,0);
|
||||
WorldPhys = new G4PVPlacement(0,G4ThreeVector(),"WorldPhys",WorldLog,0,false,0);
|
||||
WorldPhys = new G4PVPlacement(0,G4ThreeVector(),
|
||||
"WorldPhys",WorldLog,0,false,0);
|
||||
|
||||
// Water Box
|
||||
Phantom = new G4Box("Phantom",phantomDimensionX,phantomDimensionY,phantomDimensionZ);
|
||||
Phantom = new G4Box("Phantom",phantomDimensionX,phantomDimensionY,
|
||||
phantomDimensionZ);
|
||||
PhantomLog = new G4LogicalVolume(Phantom,water,"PhantomLog",0,0,0);
|
||||
PhantomPhys = new G4PVPlacement(0,G4ThreeVector(),"PhantomPhys",PhantomLog,WorldPhys,false,0);
|
||||
PhantomPhys = new G4PVPlacement(0,G4ThreeVector(),
|
||||
"PhantomPhys",PhantomLog,
|
||||
WorldPhys,false,0);
|
||||
|
||||
WorldLog->SetVisAttributes (G4VisAttributes::Invisible);
|
||||
WorldLog -> SetVisAttributes (G4VisAttributes::Invisible);
|
||||
|
||||
G4VisAttributes* simpleBoxVisAtt= new G4VisAttributes(lblue);
|
||||
simpleBoxVisAtt->SetVisibility(true);
|
||||
simpleBoxVisAtt->SetForceWireframe(true);
|
||||
G4VisAttributes* simpleBoxVisAtt = new G4VisAttributes(lblue);
|
||||
simpleBoxVisAtt -> SetVisibility(true);
|
||||
simpleBoxVisAtt -> SetForceWireframe(true);
|
||||
|
||||
PhantomLog->SetVisAttributes(simpleBoxVisAtt);
|
||||
PhantomLog -> SetVisAttributes(simpleBoxVisAtt);
|
||||
}
|
||||
|
||||
void BrachyDetectorConstruction::ConstructSensitiveDetector()
|
||||
@@ -209,11 +213,13 @@ void BrachyDetectorConstruction::ConstructSensitiveDetector()
|
||||
{
|
||||
phantomSD = new BrachyPhantomSD(sensitiveDetectorName);
|
||||
G4String ROGeometryName = "PhantomROGeometry";
|
||||
phantomROGeometry = new BrachyPhantomROGeometry(ROGeometryName,phantomDimensionX,phantomDimensionZ,numberOfVoxelsAlongX,numberOfVoxelsAlongZ);
|
||||
phantomROGeometry->BuildROGeometry();
|
||||
phantomSD->SetROgeometry(phantomROGeometry);
|
||||
pSDManager->AddNewDetector(phantomSD);
|
||||
PhantomLog->SetSensitiveDetector(phantomSD);
|
||||
phantomROGeometry = new BrachyPhantomROGeometry(ROGeometryName,
|
||||
phantomDimensionX,phantomDimensionZ,
|
||||
numberOfVoxelsAlongX,numberOfVoxelsAlongZ);
|
||||
phantomROGeometry -> BuildROGeometry();
|
||||
phantomSD -> SetROgeometry(phantomROGeometry);
|
||||
pSDManager -> AddNewDetector(phantomSD);
|
||||
PhantomLog -> SetSensitiveDetector(phantomSD);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -248,7 +254,7 @@ void BrachyDetectorConstruction::SetPhantomMaterial(G4String materialChoice)
|
||||
if (pttoMaterial)
|
||||
{
|
||||
phantomAbsorberMaterial = pttoMaterial;
|
||||
PhantomLog->SetMaterial(pttoMaterial);
|
||||
PhantomLog -> SetMaterial(pttoMaterial);
|
||||
PrintDetectorParameters();
|
||||
}
|
||||
else
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
// * *
|
||||
// ************************************
|
||||
//
|
||||
// $Id: BrachyPhantomROGeometry.cc,v 1.8 2004/03/11 15:38:43 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-06-01 $
|
||||
// $Id: BrachyPhantomROGeometry.cc,v 1.9 2004/05/13 14:47:46 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
#include "BrachyPhantomROGeometry.hh"
|
||||
#include "BrachyDummySD.hh"
|
||||
@@ -177,7 +177,7 @@ G4VPhysicalVolume* BrachyPhantomROGeometry::Build()
|
||||
numberOfVoxelsAlongZ,
|
||||
voxelXThickness);
|
||||
BrachyDummySD *dummySD = new BrachyDummySD;
|
||||
ROPhantomYDivisionLog->SetSensitiveDetector(dummySD);
|
||||
ROPhantomYDivisionLog -> SetSensitiveDetector(dummySD);
|
||||
|
||||
return ROWorldPhys;
|
||||
}
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
// * *
|
||||
// ********************************
|
||||
//
|
||||
// $Id: BrachyPhantomSD.cc,v 1.7 2004/03/11 16:05:03 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-06-01 $
|
||||
// $Id: BrachyPhantomSD.cc,v 1.8 2004/05/13 14:47:46 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
//
|
||||
#include "BrachyPhantomSD.hh"
|
||||
#include "BrachyPhantomHit.hh"
|
||||
@@ -72,34 +72,32 @@ G4bool BrachyPhantomSD::ProcessHits(G4Step* aStep, G4TouchableHistory* ROhist)
|
||||
G4double energyDeposit = aStep->GetTotalEnergyDeposit();
|
||||
if(energyDeposit == 0.)
|
||||
return false;
|
||||
|
||||
// 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();
|
||||
|
||||
G4int numberOfVoxelZ = 300;
|
||||
G4double voxelWidthZ = 1. *mm;
|
||||
|
||||
G4double x = (-numberOfVoxelZ+1+2*i)*voxelWidthZ/2;
|
||||
G4double y = (- numberOfVoxelZ+1+2*j)*voxelWidthZ/2;
|
||||
G4double z = (- numberOfVoxelZ+1+2*k)*voxelWidthZ/2;
|
||||
|
||||
|
||||
if(energyDeposit != 0)
|
||||
if(energyDeposit != 0)
|
||||
{
|
||||
|
||||
#ifdef G4ANALYSIS_USE
|
||||
BrachyAnalysisManager* analysis =
|
||||
BrachyAnalysisManager::getInstance();
|
||||
analysis -> FillNtupleWithEnergy(x,y,z,energyDeposit);
|
||||
if (y<0.8*mm && y> -0.8*mm)
|
||||
{
|
||||
analysis -> FillHistogramWithEnergy(x,z,energyDeposit/MeV);
|
||||
// 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();
|
||||
|
||||
G4int numberOfVoxelZ = 300;
|
||||
G4double voxelWidthZ = 1. *mm;
|
||||
G4double x = (-numberOfVoxelZ+1+2*i)*voxelWidthZ/2;
|
||||
G4double y = (- numberOfVoxelZ+1+2*j)*voxelWidthZ/2;
|
||||
G4double z = (- numberOfVoxelZ+1+2*k)*voxelWidthZ/2;
|
||||
|
||||
BrachyAnalysisManager* analysis =
|
||||
BrachyAnalysisManager::getInstance();
|
||||
analysis -> FillNtupleWithEnergy(x,y,z,energyDeposit);
|
||||
if (y<0.8*mm && y> -0.8*mm)
|
||||
{
|
||||
analysis -> FillHistogramWithEnergy(x,z,energyDeposit/MeV);
|
||||
|
||||
if (z<0.8*mm && z> -0.8*mm)
|
||||
analysis -> DoseDistribution(x,energyDeposit/MeV);
|
||||
}
|
||||
if (z<0.8*mm && z> -0.8*mm)
|
||||
analysis -> DoseDistribution(x,energyDeposit/MeV);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
-------------------------------------------------------------------
|
||||
$Id: History,v 1.21 2003/12/05 07:38:38 gcosmo Exp $
|
||||
$Id: History,v 1.23 2004/05/27 09:07:50 ribon Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -9,6 +9,13 @@ $Id: History,v 1.21 2003/12/05 07:38:38 gcosmo Exp $
|
||||
Example History file
|
||||
---------------------
|
||||
|
||||
27.05.04 - A.Ribon (ccal-V06-01-01)
|
||||
- Changed use of the ntuple. Now it is simpler and the ntuple
|
||||
is always correctly filled.
|
||||
|
||||
18.05.04 - A.Ribon (ccal-V06-01-00)
|
||||
- Ported to PI. Only the setup is changed, no changes in the code.
|
||||
|
||||
05.12.03 - G.Cosmo (ccal-V05-02-07)
|
||||
- Changed LISTS_BASE to G4LISTS_BASE for hadronic physics lists path.
|
||||
Cowork with "ghad-lists-V05-02-01".
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
-------------------------------------------------------------------
|
||||
$Id: README,v 1.10 2003/12/04 16:49:55 ribon Exp $
|
||||
$Id: README,v 1.11 2004/05/18 14:57:48 ribon Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -50,24 +50,15 @@ $Id: README,v 1.10 2003/12/04 16:49:55 ribon Exp $
|
||||
The user should first setup, as "usual", the Geant4 environmental
|
||||
variables (in particular, the variable G4ANALYSIS_USE must be set
|
||||
if you want to have the histograms and the ntuple).
|
||||
Then the specific setup for this example should be run:
|
||||
Then the specific setup for this example, including the AIDA/PI part
|
||||
used in the analysis, should be run:
|
||||
|
||||
> source envExample.csh in the case of C-shell
|
||||
or
|
||||
> . envExample.sh in the case of bash-shell
|
||||
|
||||
The analysis part is based on:
|
||||
*** AIDA version 3.0 & Anaphe version 5.0.6 ***
|
||||
|
||||
NB) Be careful that if you want to have this analysis part,
|
||||
you have not only to set the variable G4ANALYSIS_USE but
|
||||
also to edit the above script file (envExample.csh or envExample.sh)
|
||||
and remove the comments "#" on the setup of AIDA/Anaphe,
|
||||
because, by default, the analysis is not done (the reason being
|
||||
that, in some platform, such AIDA/Anaphe setup does not work).
|
||||
|
||||
Please take a look to the Anaphe/Lizard web page
|
||||
http://anaphe.web.cern.ch/anaphe
|
||||
The analysis part is based on AIDA/PI.
|
||||
Please take a look to the web page: http://www.cern.ch/PI .
|
||||
|
||||
|
||||
2. Sample run
|
||||
@@ -368,10 +359,8 @@ No Noise and Digitization
|
||||
----------------------------
|
||||
|
||||
The analysis part of CompositeCalorimeter is kept in class CCalAnalysis,
|
||||
and is based on the AIDA interfaces and their implementation in Anaphe:
|
||||
*** AIDA version 3.0 & Anaphe version 5.0.6 ***
|
||||
please look at their documentation for more details:
|
||||
http://anaphe.web.cern.ch/anaphe
|
||||
and is based on the AIDA interfaces and their implementation in PI.
|
||||
Please take a look to the web page: http://www.cern.ch/PI .
|
||||
Both the histograms and the ntuple are saved at the end of the run in the
|
||||
HBOOK file "ccal.his". You can than analyze offline the contents of such
|
||||
a file, using Lizard (or any other AIDA-compliant package) or with
|
||||
|
||||
@@ -1,16 +1,12 @@
|
||||
#------------------------------------------------------------------
|
||||
# C-shell script to be run before building/executing this example.
|
||||
# It has two parts: one for the Aida setup (for the histograms,
|
||||
# ntuples, and more in general for the data analysis); and one
|
||||
# more specific for this test-beam example.
|
||||
# Please notice that before running this script, you have to define
|
||||
# the usual Geant4 variables (in particular, the variable
|
||||
# G4ANALYSIS_USE must be set to 1).
|
||||
#------------------------------------------------------------------
|
||||
#
|
||||
# --- Aida 3.0 , Anaphe 5.0.6 ---
|
||||
#source /afs/cern.ch/sw/lhcxx/share/LHCXX/5.0.6/scripts/setupAnaphe.csh
|
||||
#setenv PATH ${PATH}:/afs/cern.ch/sw/lhcxx/share/LHCXX/5.0.6/scripts
|
||||
# --- Geant4 specific ---
|
||||
setenv G4ANALYSIS_USE 1
|
||||
#
|
||||
# --- Aida / PI ---
|
||||
eval `aida-config --runtime csh`
|
||||
#
|
||||
# --- Specific setup for this test-beam example ---
|
||||
setenv CCAL_CONFPATH ./dataconf
|
||||
|
||||
@@ -1,16 +1,12 @@
|
||||
#------------------------------------------------------------------
|
||||
# Bash-shell script to be run before building/executing this example.
|
||||
# It has two parts: one for the Aida setup (for the histograms,
|
||||
# ntuples, and more in general for the data analysis); and one
|
||||
# more specific for this test-beam example.
|
||||
# Please notice that before running this script, you have to define
|
||||
# the usual Geant4 variables (in particular, the variable
|
||||
# G4ANALYSIS_USE must be set to 1).
|
||||
#------------------------------------------------------------------
|
||||
#
|
||||
# --- Aida 3.0 , Anaphe 5.0.6 ---
|
||||
#. /afs/cern.ch/sw/lhcxx/share/LHCXX/5.0.6/scripts/setupAnaphe
|
||||
#export PATH=$PATH:/afs/cern.ch/sw/lhcxx/share/LHCXX/5.0.6/scripts
|
||||
# --- Geant4 specific ---
|
||||
export G4ANALYSIS_USE=1
|
||||
#
|
||||
# --- Aida / PI ---
|
||||
eval `aida-config --runtime sh`
|
||||
#
|
||||
# --- Specific setup for this test-beam example ---
|
||||
export CCAL_CONFPATH=./dataconf
|
||||
|
||||
@@ -34,6 +34,8 @@
|
||||
|
||||
#include <AIDA/AIDA.h>
|
||||
|
||||
#include <typeinfo>
|
||||
|
||||
//#define debug
|
||||
|
||||
CCalAnalysis* CCalAnalysis::instance = 0;
|
||||
@@ -80,8 +82,8 @@ CCalAnalysis::CCalAnalysis() :analysisFactory(0), tree(0), tuple(0), energy(0) {
|
||||
tag2 = tag + " ELAB, XPOS, YPOS, ZPOS";
|
||||
tag = tag2 + ", EDEP, EDEC, EDHC";
|
||||
|
||||
//tuple = tupleFactory->create("1","Event info", tag); // Column wise (default)
|
||||
tuple = tupleFactory->create("1","Event info", tag, "--preferRWN"); // Row wise
|
||||
tuple = tupleFactory->create("1","Event info", tag); // Column wise (default)
|
||||
//tuple = tupleFactory->create("1","Event info", tag, "--preferRWN"); // Row wise
|
||||
|
||||
assert(tuple);
|
||||
|
||||
@@ -292,25 +294,24 @@ void CCalAnalysis::setNtuple(float* hcalE, float* ecalE, float elab,
|
||||
float x, float y, float z, float edep,
|
||||
float edec, float edhc) {
|
||||
|
||||
AIDA::ITuple * ntuple = dynamic_cast<AIDA::ITuple *> ( tree->find("1") );
|
||||
if (ntuple) {
|
||||
if (tuple) {
|
||||
char tag[10];
|
||||
for (int i=0; i<28; i++) {
|
||||
sprintf (tag, "hcal%d", i);
|
||||
ntuple->fill(tuple->findColumn(tag),hcalE[i]);
|
||||
tuple->fill(tuple->findColumn(tag),hcalE[i]);
|
||||
}
|
||||
for (int i=0; i<49; i++) {
|
||||
sprintf (tag, "ecal%d", i);
|
||||
ntuple->fill(tuple->findColumn(tag),ecalE[i]);
|
||||
tuple->fill(tuple->findColumn(tag),ecalE[i]);
|
||||
}
|
||||
ntuple->fill(tuple->findColumn("ELAB"),elab);
|
||||
ntuple->fill(tuple->findColumn("XPOS"),x);
|
||||
ntuple->fill(tuple->findColumn("YPOS"),y);
|
||||
ntuple->fill(tuple->findColumn("ZPOS"),z);
|
||||
ntuple->fill(tuple->findColumn("EDEP"),edep);
|
||||
ntuple->fill(tuple->findColumn("EDEC"),edec);
|
||||
ntuple->fill(tuple->findColumn("EDHC"),edhc);
|
||||
ntuple->addRow();
|
||||
tuple->fill(tuple->findColumn("ELAB"),elab);
|
||||
tuple->fill(tuple->findColumn("XPOS"),x);
|
||||
tuple->fill(tuple->findColumn("YPOS"),y);
|
||||
tuple->fill(tuple->findColumn("ZPOS"),z);
|
||||
tuple->fill(tuple->findColumn("EDEP"),edep);
|
||||
tuple->fill(tuple->findColumn("EDEC"),edec);
|
||||
tuple->fill(tuple->findColumn("EDHC"),edhc);
|
||||
tuple->addRow();
|
||||
#ifdef debug
|
||||
G4cout << "CCalAnalysis:: Fill Ntuple " << G4endl;
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,140 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// ********************************************************************
|
||||
// * *
|
||||
// * cosmicray_charging advanced example for Geant4 *
|
||||
// * (adapted simulation of test-mass charging in the LISA mission) *
|
||||
// * *
|
||||
// * Henrique Araujo (h.araujo@imperial.ac.uk) & Peter Wass *
|
||||
// * Imperial College London *
|
||||
// * *
|
||||
// * main program class *
|
||||
// * *
|
||||
// ********************************************************************
|
||||
//
|
||||
// HISTORY
|
||||
// 22/02/2004: migrated from LISA-V04
|
||||
//
|
||||
// ********************************************************************
|
||||
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4UImanager.hh"
|
||||
#include "G4UIterminal.hh"
|
||||
#include "G4UItcsh.hh"
|
||||
|
||||
#ifdef G4UI_USE_XM
|
||||
#include "G4UIXm.hh"
|
||||
#endif
|
||||
|
||||
#include "Randomize.hh"
|
||||
|
||||
#ifdef G4VIS_USE
|
||||
#include "LISAVisManager.hh"
|
||||
#endif
|
||||
|
||||
#include "LISADetectorConstruction.hh"
|
||||
#include "LISAPhysicsList.hh"
|
||||
#include "LISAPrimaryGeneratorAction.hh"
|
||||
#include "LISARunAction.hh"
|
||||
#include "LISAEventAction.hh"
|
||||
#include "LISASteppingAction.hh"
|
||||
#include "LISAStackingAction.hh"
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
||||
int main(int argc,char** argv) {
|
||||
|
||||
// choose the Random engine
|
||||
HepRandom::setTheEngine(new RanecuEngine);
|
||||
|
||||
|
||||
// Construct the default run manager
|
||||
G4RunManager* runManager = new G4RunManager;
|
||||
|
||||
// set mandatory initialization classes
|
||||
LISADetectorConstruction* detector = new LISADetectorConstruction;
|
||||
runManager->SetUserInitialization(detector);
|
||||
runManager->SetUserInitialization(new LISAPhysicsList);
|
||||
LISAPrimaryGeneratorAction* generatorAction = new LISAPrimaryGeneratorAction;
|
||||
runManager->SetUserAction(generatorAction);
|
||||
|
||||
// set user action classes
|
||||
LISASteppingAction* steppingAction = new LISASteppingAction;
|
||||
runManager->SetUserAction(steppingAction);
|
||||
runManager->SetUserAction(new LISAStackingAction);
|
||||
runManager->SetUserAction(
|
||||
new LISAEventAction(generatorAction,steppingAction));
|
||||
runManager->SetUserAction(new LISARunAction);
|
||||
|
||||
|
||||
G4UIsession* session=0;
|
||||
if (argc==1) { // Define UI session for interactive mode.
|
||||
// G4UIterminal is a (dumb) terminal.
|
||||
#ifdef G4UI_USE_XM
|
||||
session = new G4UIXm(argc,argv);
|
||||
#else
|
||||
#ifdef G4UI_USE_TCSH
|
||||
session = new G4UIterminal(new G4UItcsh);
|
||||
#else
|
||||
session = new G4UIterminal();
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef G4VIS_USE
|
||||
// visualization manager
|
||||
G4VisManager* visManager = new LISAVisManager;
|
||||
visManager->Initialize();
|
||||
#endif
|
||||
|
||||
|
||||
//Initialize G4 kernel
|
||||
runManager->Initialize();
|
||||
|
||||
// get the pointer to the User Interface manager
|
||||
G4UImanager* UI = G4UImanager::GetUIpointer();
|
||||
|
||||
// Define UI session for interactive mode.
|
||||
if(session) {
|
||||
// G4UIterminal is a (dumb) terminal.
|
||||
UI->ApplyCommand("/control/execute init.mac");
|
||||
session->SessionStart();
|
||||
delete session;
|
||||
}
|
||||
// Batch mode
|
||||
else {
|
||||
G4String command = "/control/execute ";
|
||||
G4String fileName = argv[1];
|
||||
UI->ApplyCommand(command+fileName);
|
||||
}
|
||||
|
||||
// job termination
|
||||
#ifdef G4VIS_USE
|
||||
delete visManager;
|
||||
#endif
|
||||
delete runManager;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
# --------------------------------------------------------------
|
||||
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
|
||||
# --------------------------------------------------------------
|
||||
|
||||
name := CRCharging
|
||||
G4TARGET := $(name)
|
||||
G4EXLIB := true
|
||||
|
||||
ifndef G4INSTALL
|
||||
G4INSTALL = ../../..
|
||||
endif
|
||||
|
||||
.PHONY: all
|
||||
all: lib bin
|
||||
|
||||
include $(G4INSTALL)/config/binmake.gmk
|
||||
|
||||
ifdef G4ANALYSIS_USE
|
||||
CPPFLAGS += `aida-config --include`
|
||||
LDFLAGS += `aida-config --lib`
|
||||
LOADLIBS += `aida-config --lib`
|
||||
endif
|
||||
@@ -0,0 +1,24 @@
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
|
||||
=========================================================
|
||||
|
||||
Category History file
|
||||
---------------------
|
||||
This file should be used by G4 developers and category coordinators
|
||||
to briefly summarize all major modifications introduced in the code
|
||||
and keep track of all category-tags.
|
||||
It DOES NOT substitute the CVS log-message one should put at every
|
||||
committal in the CVS repository !
|
||||
|
||||
----------------------------------------------------------
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
07.05.2004 - Henrique Araujo, tag cosmicray_charging-V06-01-00
|
||||
First submission of cosmicray_charging example.
|
||||
|
||||
28.05.2004 - Henrique Araujo, tag cosmicray_charging-V06-01-01
|
||||
Minor changes to GNUMakeFile
|
||||
Ported to PI Light (no changes in code required)
|
||||
@@ -0,0 +1,45 @@
|
||||
========================================================================
|
||||
|
||||
cosmicray_charging advanced example
|
||||
|
||||
Henrique Araujo & Peter Wass
|
||||
Imperial College London
|
||||
|
||||
April 2004
|
||||
|
||||
========================================================================
|
||||
|
||||
This Geant4 example was derived from an application aimed at
|
||||
simulating the electrostatic charging of isolated test masses in the
|
||||
LISA mission by galactic cosmic ray protons and helium nuclei. This
|
||||
work was supported by the European Space Agency through the SEPTIMESS
|
||||
project under Contract No. 16339/02/NL/FM.
|
||||
|
||||
LISA, the Laser Interferometer Space Antenna for the detection of
|
||||
gravitational waves, is a joint ESA/NASA mission composed of three
|
||||
identical spacecraft orbiting the Sun in a triangular formation, each
|
||||
containing two cubic test masses in pure geodesic (drag free) motion.
|
||||
The interferometric measurements between different spacecraft
|
||||
are affected by the accrual of charge in the test masses caused by the
|
||||
interaction of energetic cosmic rays.
|
||||
|
||||
With this example we intend to demonstrate an application of Geant4 to
|
||||
space environment simulations, using an extensive set of physics
|
||||
models spanning from TeV energies down to a few hundred eV. This code
|
||||
retains most (but not all) of the complex spacecraft and sensor
|
||||
geometry implemented for the original purpose. In particular, some
|
||||
complex elements of the inertial sensor surrounding the test masses
|
||||
have not been included. Differential energy spectra for protons, He-4
|
||||
and He-3 nuclei at solar minimum conditions are the only input macros
|
||||
provided. The remaining application classes have been kept unchanged.
|
||||
|
||||
A Software Users' Manual suitable for Geant4 users of all levels is
|
||||
distributed with this application (/docs). The technical description
|
||||
of the original software package, including further software
|
||||
documentation, physics analysis and a similar effort for the precursor
|
||||
ESA mission LISA Pathfinder are available from the SEPTIMESS project
|
||||
website at http://reat.space.qinetiq.com/septimess/ or from
|
||||
http://astro.ic.ac.uk/~haraujo/SEPTIMESS/ .
|
||||
|
||||
Any queries regarding this example or the original work can be
|
||||
directed to h.araujo@imperial.ac.uk.
|
||||
Binary file not shown.
@@ -0,0 +1,105 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
|
||||
// ********************************************************************
|
||||
// * *
|
||||
// * cosmicray_charging advanced example for Geant4 *
|
||||
// * (adapted simulation of test-mass charging in the LISA mission) *
|
||||
// * *
|
||||
// * Henrique Araujo (h.araujo@imperial.ac.uk) & Peter Wass *
|
||||
// * Imperial College London *
|
||||
// * *
|
||||
// ********************************************************************
|
||||
|
||||
|
||||
#ifdef G4ANALYSIS_USE
|
||||
#ifndef LISAAnalysisManager_h
|
||||
#define LISAAnalysisManager_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#include <AIDA/AIDA.h>
|
||||
|
||||
namespace AIDA {
|
||||
class IAnalysisFactory;
|
||||
class ITree;
|
||||
class IHistogramFactory;
|
||||
class ITupleFactory;
|
||||
class ITuple;
|
||||
class IHistogram1D;
|
||||
class IHistogram2D;
|
||||
class IPlotter;
|
||||
class IFitter;
|
||||
class IFitResult;
|
||||
class IFitData;
|
||||
class IRangeSet;
|
||||
class IFitParameterSettings;
|
||||
class IFunctionFactory;
|
||||
class IFunction;
|
||||
class IFitFactory;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
class LISAAnalysisManager {
|
||||
|
||||
public:
|
||||
virtual ~LISAAnalysisManager();
|
||||
void Init();
|
||||
void Dispose();
|
||||
|
||||
|
||||
// Run analysis
|
||||
void bookRun(G4String);
|
||||
void FinishRun();
|
||||
void analyseRun
|
||||
(G4int evt, G4int tm, G4double energy, G4int charge,
|
||||
G4int in, G4int out, long seed1, long seed2);
|
||||
|
||||
// grab instance
|
||||
static LISAAnalysisManager* getInstance();
|
||||
|
||||
|
||||
private:
|
||||
|
||||
// private constructor for singleton
|
||||
LISAAnalysisManager();
|
||||
|
||||
static LISAAnalysisManager* instance;
|
||||
|
||||
|
||||
AIDA::IAnalysisFactory *af;
|
||||
AIDA::ITreeFactory *tf;
|
||||
AIDA::ITree *run_tree;
|
||||
AIDA::ITupleFactory *run_tpf;
|
||||
AIDA::ITuple *run_tuple;
|
||||
|
||||
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// ********************************************************************
|
||||
// * *
|
||||
// * cosmicray_charging advanced example for Geant4 *
|
||||
// * (adapted simulation of test-mass charging in the LISA mission) *
|
||||
// * *
|
||||
// * Henrique Araujo (h.araujo@imperial.ac.uk) & Peter Wass *
|
||||
// * Imperial College London *
|
||||
// * *
|
||||
// ********************************************************************
|
||||
|
||||
#ifndef LISADetectorConstruction_h
|
||||
#define LISADetectorConstruction_h 1
|
||||
|
||||
#include "G4VUserDetectorConstruction.hh"
|
||||
|
||||
#include "G4UserLimits.hh"
|
||||
|
||||
#include "G4Material.hh"
|
||||
#include "G4MaterialTable.hh"
|
||||
#include "G4MaterialPropertiesTable.hh"
|
||||
#include "G4Element.hh"
|
||||
#include "G4Isotope.hh"
|
||||
#include "G4UnitsTable.hh"
|
||||
|
||||
#include "G4Box.hh"
|
||||
#include "G4Tubs.hh"
|
||||
#include "G4Sphere.hh"
|
||||
#include "G4Cons.hh"
|
||||
#include "G4Trap.hh"
|
||||
#include "G4Torus.hh"
|
||||
#include "G4Trd.hh"
|
||||
#include "G4VSolid.hh"
|
||||
#include "G4UnionSolid.hh"
|
||||
#include "G4SubtractionSolid.hh"
|
||||
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4RotationMatrix.hh"
|
||||
#include "G4Transform3D.hh"
|
||||
|
||||
#include "G4PVPlacement.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
|
||||
#include "G4Region.hh"
|
||||
|
||||
#include "G4VisAttributes.hh"
|
||||
#include "G4Colour.hh"
|
||||
|
||||
#include "G4ios.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
#include <math.h>
|
||||
|
||||
|
||||
class LISADetectorConstruction : public G4VUserDetectorConstruction {
|
||||
|
||||
public:
|
||||
LISADetectorConstruction();
|
||||
~LISADetectorConstruction();
|
||||
|
||||
G4VPhysicalVolume* Construct();
|
||||
|
||||
private:
|
||||
void ConstructMaterials();
|
||||
G4VPhysicalVolume* ConstructDetector();
|
||||
|
||||
|
||||
private:
|
||||
// pointers to materials
|
||||
G4Material *vacuum;
|
||||
G4Material *Al6061;
|
||||
G4Material *AlHoneycomb;
|
||||
G4Material *Scell;
|
||||
G4Material *MLImat;
|
||||
G4Material *molybdenum;
|
||||
G4Material *TiAlloy;
|
||||
G4Material *gold;
|
||||
G4Material *AuPt;
|
||||
G4Material *CFRP;
|
||||
G4Material *ULEglass;
|
||||
G4Material *SHAPAL;
|
||||
G4Material *SiC;
|
||||
G4Material *foam;
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,134 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// ********************************************************************
|
||||
// * *
|
||||
// * cosmicray_charging advanced example for Geant4 *
|
||||
// * (adapted simulation of test-mass charging in the LISA mission) *
|
||||
// * *
|
||||
// * Henrique Araujo (h.araujo@imperial.ac.uk) & Peter Wass *
|
||||
// * Imperial College London *
|
||||
// * *
|
||||
// ********************************************************************
|
||||
|
||||
|
||||
void LISADetectorConstruction::ConstructMaterials(void) {
|
||||
|
||||
// Elements
|
||||
|
||||
G4Element* elementH = new G4Element("Hydrogen", "H", 1., 1.0079*g/mole);
|
||||
G4Element* elementC = new G4Element("Carbon", "C", 6., 12.011*g/mole);
|
||||
G4Element* elementN = new G4Element("Nitrogen", "N", 7., 14.007*g/mole);
|
||||
G4Element* elementO = new G4Element("Oxygen", "O", 8., 15.9994*g/mole);
|
||||
G4Element* elementMg = new G4Element("Magnesium", "Mg",12., 24.3050*g/mole);
|
||||
G4Element* elementAl = new G4Element("Aluminium", "Al",13., 26.9815*g/mole);
|
||||
G4Element* elementSi = new G4Element("Silicon", "Si",14., 28.0855*g/mole);
|
||||
G4Element* elementTi = new G4Element("Titanium", "Ti",22., 47.90*g/mole);
|
||||
G4Element* elementV = new G4Element("Vanadium", "V", 23., 50.9415*g/mole);
|
||||
G4Element* elementFe = new G4Element("Iron", "Fe",26., 55.845*g/mole);
|
||||
G4Element* elementMo = new G4Element("Molybdenum","Mo",42., 95.94*g/mole);
|
||||
G4Element* elementPt = new G4Element("Platinum", "Pt",78., 195.08*g/mole);
|
||||
G4Element* elementAu = new G4Element("Gold", "Au",79., 196.97*g/mole);
|
||||
|
||||
|
||||
// Materials
|
||||
|
||||
vacuum = new G4Material("vacuum", 1, 1.00794*g/mole,
|
||||
1.0E-25*g/cm3, kStateGas, 0.1*kelvin, 1.0E-19*pascal);
|
||||
|
||||
// Aluminium alloy 6061-T6
|
||||
Al6061 = new G4Material("Al6061", 2.70*g/cm3, 4);
|
||||
Al6061->AddElement(elementAl, 0.980);
|
||||
Al6061->AddElement(elementMg, 0.010);
|
||||
Al6061->AddElement(elementSi, 0.006);
|
||||
Al6061->AddElement(elementFe, 0.004);
|
||||
|
||||
// Aluminium Alloy honeycomb
|
||||
AlHoneycomb = new G4Material("AlHoneycomb",0.05*g/cm3, 4);
|
||||
AlHoneycomb->AddElement(elementAl, 0.980);
|
||||
AlHoneycomb->AddElement(elementMg, 0.010);
|
||||
AlHoneycomb->AddElement(elementSi, 0.006);
|
||||
AlHoneycomb->AddElement(elementFe, 0.004);
|
||||
|
||||
// Solar Cells****
|
||||
Scell = new G4Material("Scell", 7.82*g/cm3, 1);
|
||||
Scell->AddElement(elementSi, 1.00);
|
||||
|
||||
// MLI Blanket: mylar (composition from STAR Stopping Power database)
|
||||
MLImat = new G4Material("MLImat", 1.40*g/cm3, 3);
|
||||
MLImat->AddElement(elementH, 0.041959);
|
||||
MLImat->AddElement(elementC, 0.625017);
|
||||
MLImat->AddElement(elementO, 0.333025);
|
||||
|
||||
// Molybdenum
|
||||
molybdenum = new G4Material("molybdenum", 10.22*g/cm3, 1);
|
||||
molybdenum->AddElement(elementMo, 1.00);
|
||||
|
||||
// Titanium Alloy (Ti-6Al-4V)
|
||||
TiAlloy = new G4Material("TiAlloy", 4.43*g/cm3, 3);
|
||||
TiAlloy->AddElement(elementTi, 0.90);
|
||||
TiAlloy->AddElement(elementAl, 0.06);
|
||||
TiAlloy->AddElement(elementV, 0.04);
|
||||
|
||||
// Gold
|
||||
gold = new G4Material("gold", 19.32*g/cm3, 1);
|
||||
gold->AddElement(elementAu, 1.00);
|
||||
|
||||
// Gold-Platinum 70%/30%
|
||||
AuPt = new G4Material("AuPt", 19.92*g/cm3, 2);
|
||||
AuPt->AddElement(elementAu, 0.70);
|
||||
AuPt->AddElement(elementPt, 0.30);
|
||||
|
||||
// CRFP (Carbon Fiber Reinforced Polymer): M55 Quasiisotropic Layup
|
||||
CFRP = new G4Material("CFRP", 1.66*g/cm3, 1);
|
||||
CFRP->AddElement(elementC,1);
|
||||
|
||||
// Silicate glass
|
||||
G4Material* SiGlass = new G4Material("SiGlass", 2.20*g/cm3, 2);
|
||||
SiGlass->AddElement(elementO, 2);
|
||||
SiGlass->AddElement(elementSi,1);
|
||||
// Titanium glass
|
||||
G4Material* TiGlass = new G4Material("TiGlass", 4.25*g/cm3, 2);
|
||||
TiGlass->AddElement(elementO, 2);
|
||||
TiGlass->AddElement(elementTi,1);
|
||||
// Corning 7972 ULE Titanium Silicate Glass
|
||||
ULEglass = new G4Material("ULEglass", 2.21*g/cm3, 2);
|
||||
ULEglass->AddMaterial(SiGlass, 0.925);
|
||||
ULEglass->AddMaterial(TiGlass, 0.075);
|
||||
|
||||
// SHAPAL-M (AlN)
|
||||
SHAPAL = new G4Material("SHAPAL-M", 2.90*g/cm3, 2);
|
||||
SHAPAL->AddElement(elementAl,1);
|
||||
SHAPAL->AddElement(elementN, 1);
|
||||
|
||||
// Silicon carbide
|
||||
SiC = new G4Material("SiC", 3.1*g/cm3, 2);
|
||||
SiC->AddElement(elementSi,1);
|
||||
SiC->AddElement(elementC, 1);
|
||||
|
||||
// Foam: Polystyrene-based
|
||||
foam = new G4Material("foam",0.05*g/cm3, 2);
|
||||
foam->AddElement(elementC, 0.90);
|
||||
foam->AddElement(elementH, 0.10);
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// ********************************************************************
|
||||
// * *
|
||||
// * cosmicray_charging advanced example for Geant4 *
|
||||
// * (adapted simulation of test-mass charging in the LISA mission) *
|
||||
// * *
|
||||
// * Henrique Araujo (h.araujo@imperial.ac.uk) & Peter Wass *
|
||||
// * Imperial College London *
|
||||
// * *
|
||||
// ********************************************************************
|
||||
|
||||
#ifndef LISAEventAction_h
|
||||
#define LISAEventAction_h 1
|
||||
|
||||
#include "G4UserEventAction.hh"
|
||||
#include "globals.hh"
|
||||
#include "G4ios.hh"
|
||||
#include <strstream>
|
||||
|
||||
class LISAPrimaryGeneratorAction;
|
||||
class LISASteppingAction;
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
class LISAEventAction : public G4UserEventAction {
|
||||
|
||||
public:
|
||||
LISAEventAction(LISAPrimaryGeneratorAction*, LISASteppingAction*);
|
||||
virtual ~LISAEventAction();
|
||||
virtual void BeginOfEventAction(const G4Event*);
|
||||
virtual void EndOfEventAction(const G4Event*);
|
||||
|
||||
private:
|
||||
LISAPrimaryGeneratorAction* genAction;
|
||||
LISASteppingAction* stepAction;
|
||||
|
||||
public:
|
||||
inline void SetFilename(const G4String& name) {filename = name;};
|
||||
|
||||
|
||||
private:
|
||||
G4int event_id;
|
||||
G4double energy_pri;
|
||||
G4int charge_in[2];
|
||||
G4int charge_out[2];
|
||||
G4int charge_tot[2];
|
||||
const long* seeds;
|
||||
G4String filename;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// ********************************************************************
|
||||
// * *
|
||||
// * cosmicray_charging advanced example for Geant4 *
|
||||
// * (adapted simulation of test-mass charging in the LISA mission) *
|
||||
// * *
|
||||
// * Henrique Araujo (h.araujo@imperial.ac.uk) & Peter Wass *
|
||||
// * Imperial College London *
|
||||
// * *
|
||||
// ********************************************************************
|
||||
|
||||
#ifndef LISAPhysicsList_h
|
||||
#define LISAPhysicsList_h 1
|
||||
|
||||
#include "G4VUserPhysicsList.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
class LISAPhysicsList: public G4VUserPhysicsList {
|
||||
|
||||
public:
|
||||
LISAPhysicsList();
|
||||
virtual ~LISAPhysicsList();
|
||||
|
||||
public:
|
||||
virtual void SetCuts();
|
||||
|
||||
protected:
|
||||
// particles and physics
|
||||
virtual void ConstructParticle();
|
||||
virtual void ConstructProcess();
|
||||
|
||||
// physics processes
|
||||
virtual void AddTransportation();
|
||||
virtual void ElectromagneticPhysics();
|
||||
virtual void HadronicPhysics();
|
||||
virtual void ElectroNuclearPhysics();
|
||||
virtual void GeneralPhysics();
|
||||
|
||||
private:
|
||||
G4int VerboseLevel;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,63 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// ********************************************************************
|
||||
// * *
|
||||
// * cosmicray_charging advanced example for Geant4 *
|
||||
// * (adapted simulation of test-mass charging in the LISA mission) *
|
||||
// * *
|
||||
// * Henrique Araujo (h.araujo@imperial.ac.uk) & Peter Wass *
|
||||
// * Imperial College London *
|
||||
// * *
|
||||
// ********************************************************************
|
||||
|
||||
#ifndef LISAPrimaryGeneratorAction_h
|
||||
#define LISAPrimaryGeneratorAction_h 1
|
||||
|
||||
#include "G4VUserPrimaryGeneratorAction.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class G4GeneralParticleSource;
|
||||
class G4Event;
|
||||
|
||||
class LISAPrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction {
|
||||
|
||||
public:
|
||||
LISAPrimaryGeneratorAction();
|
||||
~LISAPrimaryGeneratorAction();
|
||||
void GeneratePrimaries(G4Event* anEvent);
|
||||
|
||||
private:
|
||||
G4GeneralParticleSource* particleGun;
|
||||
|
||||
private:
|
||||
long seeds[2];
|
||||
G4double energy_pri;
|
||||
|
||||
public:
|
||||
const long* GetEventSeeds() {return seeds;};
|
||||
G4double GetEnergyPrimary() {return energy_pri;};
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// ********************************************************************
|
||||
// * *
|
||||
// * cosmicray_charging advanced example for Geant4 *
|
||||
// * (adapted simulation of test-mass charging in the LISA mission) *
|
||||
// * *
|
||||
// * Henrique Araujo (h.araujo@imperial.ac.uk) & Peter Wass *
|
||||
// * Imperial College London *
|
||||
// * *
|
||||
// ********************************************************************
|
||||
|
||||
#ifndef LISARunAction_h
|
||||
#define LISARunAction_h 1
|
||||
|
||||
#include "G4UserRunAction.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class LISARunActionMessenger;
|
||||
class G4Run;
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
class LISARunAction : public G4UserRunAction {
|
||||
|
||||
public:
|
||||
LISARunAction();
|
||||
~LISARunAction();
|
||||
|
||||
public:
|
||||
void BeginOfRunAction(const G4Run*);
|
||||
void EndOfRunAction(const G4Run*);
|
||||
|
||||
|
||||
public:
|
||||
inline void SetAutoSeed (const G4bool val) {autoSeed = val;}
|
||||
|
||||
private:
|
||||
LISARunActionMessenger* runMessenger;
|
||||
|
||||
G4bool autoSeed;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// ********************************************************************
|
||||
// * *
|
||||
// * cosmicray_charging advanced example for Geant4 *
|
||||
// * (adapted simulation of test-mass charging in the LISA mission) *
|
||||
// * *
|
||||
// * Henrique Araujo (h.araujo@imperial.ac.uk) & Peter Wass *
|
||||
// * Imperial College London *
|
||||
// * *
|
||||
// ********************************************************************
|
||||
|
||||
#ifndef LISARunActionMessenger_h
|
||||
#define LISARunActionMessenger_h 1
|
||||
|
||||
#include "G4UImessenger.hh"
|
||||
#include "G4UIcommand.hh"
|
||||
#include "G4UIcmdWithABool.hh"
|
||||
#include <strstream>
|
||||
#include "globals.hh"
|
||||
|
||||
class LISARunAction;
|
||||
|
||||
class LISARunActionMessenger: public G4UImessenger {
|
||||
|
||||
public:
|
||||
LISARunActionMessenger(LISARunAction*);
|
||||
~LISARunActionMessenger();
|
||||
|
||||
void SetNewValue(G4UIcommand*, G4String);
|
||||
|
||||
private:
|
||||
LISARunAction* runAction;
|
||||
|
||||
G4UIcmdWithABool* SetAutoSeedCmd;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,65 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// ********************************************************************
|
||||
// * *
|
||||
// * cosmicray_charging advanced example for Geant4 *
|
||||
// * (adapted simulation of test-mass charging in the LISA mission) *
|
||||
// * *
|
||||
// * Henrique Araujo (h.araujo@imperial.ac.uk) & Peter Wass *
|
||||
// * Imperial College London *
|
||||
// * *
|
||||
// ********************************************************************
|
||||
|
||||
#ifndef LISAStackingAction_h
|
||||
#define LISAStackingAction_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4UserStackingAction.hh"
|
||||
|
||||
class LISAStackingActionMessenger;
|
||||
class G4Track;
|
||||
|
||||
class LISAStackingAction : public G4UserStackingAction {
|
||||
|
||||
public:
|
||||
LISAStackingAction();
|
||||
virtual ~LISAStackingAction();
|
||||
|
||||
virtual G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track* aTrack);
|
||||
virtual void NewStage();
|
||||
virtual void PrepareNewEvent();
|
||||
|
||||
public:
|
||||
inline void SetPrimarySurvey (const G4bool val) {PrimarySurveyFlag = val;}
|
||||
inline void SetParticleSurvey(const G4bool val) {ParticleSurveyFlag = val;}
|
||||
|
||||
private:
|
||||
LISAStackingActionMessenger* stackingMessenger;
|
||||
G4bool PrimarySurveyFlag;
|
||||
G4bool ParticleSurveyFlag;
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// ********************************************************************
|
||||
// * *
|
||||
// * cosmicray_charging advanced example for Geant4 *
|
||||
// * (adapted simulation of test-mass charging in the LISA mission) *
|
||||
// * *
|
||||
// * Henrique Araujo (h.araujo@imperial.ac.uk) & Peter Wass *
|
||||
// * Imperial College London *
|
||||
// * *
|
||||
// ********************************************************************
|
||||
|
||||
#ifndef LISAStackingActionMessenger_h
|
||||
#define LISAStackingActionMessenger_h 1
|
||||
|
||||
#include "G4UImessenger.hh"
|
||||
#include "G4UIcommand.hh"
|
||||
#include "G4UIcmdWithABool.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class LISAStackingAction;
|
||||
|
||||
class LISAStackingActionMessenger: public G4UImessenger {
|
||||
|
||||
public:
|
||||
LISAStackingActionMessenger(LISAStackingAction*);
|
||||
~LISAStackingActionMessenger();
|
||||
|
||||
void SetNewValue(G4UIcommand*, G4String);
|
||||
|
||||
private:
|
||||
LISAStackingAction* stackingAction;
|
||||
|
||||
G4UIcmdWithABool* SetPriSurvey;
|
||||
G4UIcmdWithABool* SetPartSurvey;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,73 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// ********************************************************************
|
||||
// * *
|
||||
// * cosmicray_charging advanced example for Geant4 *
|
||||
// * (adapted simulation of test-mass charging in the LISA mission) *
|
||||
// * *
|
||||
// * Henrique Araujo (h.araujo@imperial.ac.uk) & Peter Wass *
|
||||
// * Imperial College London *
|
||||
// * *
|
||||
// ********************************************************************
|
||||
|
||||
#ifndef LISASteppingAction_h
|
||||
#define LISASteppingAction_h 1
|
||||
|
||||
#include "G4UserSteppingAction.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class LISAEventAction;
|
||||
class LISASteppingActionMessenger;
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
class LISASteppingAction : public G4UserSteppingAction {
|
||||
|
||||
public:
|
||||
LISASteppingAction();
|
||||
virtual ~LISASteppingAction();
|
||||
|
||||
virtual void UserSteppingAction(const G4Step*);
|
||||
|
||||
public:
|
||||
inline void Discharge(void) {charge_in[0]=0; charge_out[0]=0;
|
||||
charge_in[1]=0; charge_out[1]=0;};
|
||||
|
||||
inline G4int GetChargeIn(const G4int tm) {return charge_in[tm];}
|
||||
inline G4int GetChargeOut(const G4int tm) {return charge_out[tm];}
|
||||
|
||||
|
||||
inline void SetFlagSpectrum(const G4bool val) {FlagSpectrum = val;}
|
||||
|
||||
private:
|
||||
G4int charge_in[2];
|
||||
G4int charge_out[2];
|
||||
|
||||
LISASteppingActionMessenger* steppingMessenger;
|
||||
G4bool FlagSpectrum;
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,61 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// ********************************************************************
|
||||
// * *
|
||||
// * cosmicray_charging advanced example for Geant4 *
|
||||
// * (adapted simulation of test-mass charging in the LISA mission) *
|
||||
// * *
|
||||
// * Henrique Araujo (h.araujo@imperial.ac.uk) & Peter Wass *
|
||||
// * Imperial College London *
|
||||
// * *
|
||||
// ********************************************************************
|
||||
|
||||
#ifndef LISASteppingActionMessenger_h
|
||||
#define LISASteppingActionMessenger_h 1
|
||||
|
||||
#include "G4UImessenger.hh"
|
||||
#include "G4UIcommand.hh"
|
||||
#include "G4UIcmdWithABool.hh"
|
||||
#include "G4UIdirectory.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class LISASteppingAction;
|
||||
|
||||
class LISASteppingActionMessenger: public G4UImessenger {
|
||||
|
||||
public:
|
||||
LISASteppingActionMessenger(LISASteppingAction*);
|
||||
~LISASteppingActionMessenger();
|
||||
|
||||
void SetNewValue(G4UIcommand*, G4String);
|
||||
|
||||
private:
|
||||
LISASteppingAction* steppingAction;
|
||||
|
||||
G4UIcmdWithABool* SetFlagSpectrum;
|
||||
|
||||
G4UIdirectory* newDir;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,55 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// ********************************************************************
|
||||
// * *
|
||||
// * cosmicray_charging advanced example for Geant4 *
|
||||
// * (adapted simulation of test-mass charging in the LISA mission) *
|
||||
// * *
|
||||
// * Henrique Araujo (h.araujo@imperial.ac.uk) & Peter Wass *
|
||||
// * Imperial College London *
|
||||
// * *
|
||||
// ********************************************************************
|
||||
|
||||
#ifndef LISAVisManager_h
|
||||
#define LISAVisManager_h 1
|
||||
|
||||
#ifdef G4VIS_USE
|
||||
|
||||
#include "G4VisManager.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
class LISAVisManager: public G4VisManager {
|
||||
|
||||
public:
|
||||
LISAVisManager();
|
||||
|
||||
private:
|
||||
void RegisterGraphicsSystems ();
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
#############################################################################*#
|
||||
# Initialisation macro for interactive mode #
|
||||
###############################################################################
|
||||
#
|
||||
/control/verbose 1
|
||||
/control/saveHistory
|
||||
#
|
||||
# Create empty scene
|
||||
/vis/scene/create
|
||||
#
|
||||
# Create a scene handler for a specific graphics system
|
||||
# (Edit the next line(s) to choose another graphic system)
|
||||
/vis/open OGLSX
|
||||
#/vis/open OGLIX
|
||||
#/vis/open OGLSXm
|
||||
#/vis/open OGLIXm
|
||||
#/vis/open DANWFILE
|
||||
#
|
||||
# Add detector to scene
|
||||
/vis/drawVolume
|
||||
#
|
||||
# Flush visualization
|
||||
#/vis/viewer/flush
|
||||
#
|
||||
/vis/viewer/set/lineSegmentsPerCircle 120
|
||||
@@ -0,0 +1,66 @@
|
||||
#################################################################
|
||||
# Differential energy spectrum for solar minimum HELIUM-3 at 1 AU
|
||||
#################################################################
|
||||
#
|
||||
/vis/disable
|
||||
/tracking/storeTrajectory 0
|
||||
/control/verbose 1
|
||||
/run/verbose 1
|
||||
/event/verbose 0
|
||||
#
|
||||
/control/suppressAbortion 1
|
||||
#
|
||||
# Random seeds
|
||||
/run/autoSeed 1
|
||||
#/random/resetEngineFrom seeds.rndm
|
||||
#
|
||||
# particle surveys
|
||||
#/surveys/surveyParticles 1
|
||||
#/surveys/surveyPrimaries 1
|
||||
#/surveys/surveyTestMasses 1
|
||||
#
|
||||
/gps/particle He3
|
||||
#
|
||||
# Isotropic distribution
|
||||
/gps/type Surface
|
||||
/gps/shape Sphere
|
||||
/gps/radius 1499. mm
|
||||
/gps/centre 0. 0. 0. mm
|
||||
/gps/angtype cos
|
||||
#
|
||||
# Differential energy spectrum for solar minimum
|
||||
# Helium flux (/m2/s/sr/MeV) from Vannuccini 2001
|
||||
# He-3/He-4 compiled by C. Grimani
|
||||
# EPN TAKEN FOR A=4!!!
|
||||
# INTEGRAL FLUX = 0.0591 He/cm2/s
|
||||
/gps/energytype Arb
|
||||
/gps/histname arb
|
||||
#
|
||||
/gps/histpoint 4.000E+02 2.409E+01
|
||||
/gps/histpoint 5.970E+02 2.972E+01
|
||||
/gps/histpoint 8.910E+02 3.448E+01
|
||||
/gps/histpoint 1.330E+03 3.691E+01
|
||||
/gps/histpoint 1.985E+03 3.068E+01
|
||||
/gps/histpoint 2.962E+03 2.202E+01
|
||||
/gps/histpoint 4.421E+03 1.459E+01
|
||||
/gps/histpoint 6.599E+03 9.011E+00
|
||||
/gps/histpoint 9.848E+03 4.512E+00
|
||||
/gps/histpoint 1.470E+04 2.042E+00
|
||||
/gps/histpoint 2.194E+04 8.501E-01
|
||||
/gps/histpoint 3.274E+04 3.318E-01
|
||||
/gps/histpoint 4.887E+04 1.234E-01
|
||||
/gps/histpoint 7.293E+04 4.435E-02
|
||||
/gps/histpoint 1.089E+05 1.555E-02
|
||||
/gps/histpoint 1.625E+05 5.360E-03
|
||||
/gps/histpoint 2.425E+05 1.826E-03
|
||||
#/gps/histpoint 3.619E+05 6.172E-04
|
||||
#/gps/histpoint 5.401E+05 2.075E-04
|
||||
#/gps/histpoint 8.061E+05 6.949E-05
|
||||
#/gps/histpoint 1.203E+06 2.322E-05
|
||||
#/gps/histpoint 1.796E+06 7.745E-06
|
||||
#/gps/histpoint 2.680E+06 2.581E-06
|
||||
#/gps/histpoint 4.000E+06 8.593E-07
|
||||
#
|
||||
/gps/arbint Lin
|
||||
#
|
||||
/run/beamOn 1000000
|
||||
@@ -0,0 +1,65 @@
|
||||
#################################################################
|
||||
# Differential energy spectrum for solar minimum HELIUM-4 at 1 AU
|
||||
#################################################################
|
||||
#
|
||||
/vis/disable
|
||||
/tracking/storeTrajectory 0
|
||||
/control/verbose 1
|
||||
/run/verbose 1
|
||||
/event/verbose 0
|
||||
#
|
||||
/control/suppressAbortion 1
|
||||
#
|
||||
# Random seeds
|
||||
/run/autoSeed 1
|
||||
#/random/resetEngineFrom seeds.rndm
|
||||
#
|
||||
# particle surveys
|
||||
#/surveys/surveyParticles 1
|
||||
#/surveys/surveyPrimaries 1
|
||||
#/surveys/surveyTestMasses 1
|
||||
#
|
||||
/gps/particle alpha
|
||||
#
|
||||
# Isotropic distribution
|
||||
/gps/type Surface
|
||||
/gps/shape Sphere
|
||||
/gps/radius 1499. mm
|
||||
/gps/centre 0. 0. 0. mm
|
||||
/gps/angtype cos
|
||||
#
|
||||
# Differential energy spectrum for solar minimum
|
||||
# Helium flux (/m2/s/sr/MeV) from Vannuccini 2001
|
||||
# He-3/He-4 compiled by C. Grimani
|
||||
# INTEGRAL FLUX = 0.315 He/cm2/s
|
||||
/gps/energytype Arb
|
||||
/gps/histname arb
|
||||
#
|
||||
/gps/histpoint 4.000E+02 2.666E+02
|
||||
/gps/histpoint 5.970E+02 2.619E+02
|
||||
/gps/histpoint 8.910E+02 2.419E+02
|
||||
/gps/histpoint 1.330E+03 2.062E+02
|
||||
/gps/histpoint 1.985E+03 1.641E+02
|
||||
/gps/histpoint 2.962E+03 1.177E+02
|
||||
/gps/histpoint 4.421E+03 7.428E+01
|
||||
/gps/histpoint 6.599E+03 4.096E+01
|
||||
/gps/histpoint 9.848E+03 2.051E+01
|
||||
/gps/histpoint 1.470E+04 9.280E+00
|
||||
/gps/histpoint 2.194E+04 3.864E+00
|
||||
/gps/histpoint 3.274E+04 1.508E+00
|
||||
/gps/histpoint 4.887E+04 5.611E-01
|
||||
/gps/histpoint 7.293E+04 2.016E-01
|
||||
/gps/histpoint 1.089E+05 7.068E-02
|
||||
/gps/histpoint 1.625E+05 2.436E-02
|
||||
/gps/histpoint 2.425E+05 8.300E-03
|
||||
#/gps/histpoint 3.619E+05 2.805E-03
|
||||
#/gps/histpoint 5.401E+05 9.430E-04
|
||||
#/gps/histpoint 8.061E+05 3.159E-04
|
||||
#/gps/histpoint 1.203E+06 1.055E-04
|
||||
#/gps/histpoint 1.796E+06 3.521E-05
|
||||
#/gps/histpoint 2.680E+06 1.173E-05
|
||||
#/gps/histpoint 4.000E+06 3.906E-06
|
||||
#
|
||||
/gps/arbint Lin
|
||||
#
|
||||
/run/beamOn 1000000
|
||||
@@ -0,0 +1,71 @@
|
||||
#################################################################
|
||||
# Differential energy spectrum for solar minimum PROTONS at 1 AU
|
||||
#################################################################
|
||||
#
|
||||
/vis/disable
|
||||
/tracking/storeTrajectory 0
|
||||
/control/verbose 1
|
||||
/run/verbose 1
|
||||
/event/verbose 0
|
||||
#
|
||||
/control/suppressAbortion 1
|
||||
#
|
||||
# Random seeds
|
||||
/run/autoSeed 1
|
||||
#/random/resetEngineFrom seeds.rndm
|
||||
#
|
||||
# particle surveys
|
||||
#/surveys/surveyParticles 1
|
||||
#/surveys/surveyPrimaries 1
|
||||
#/surveys/surveyTestMasses 1
|
||||
#
|
||||
/gps/particle proton
|
||||
#
|
||||
# Isotropic distribution
|
||||
/gps/type Surface
|
||||
/gps/shape Sphere
|
||||
/gps/radius 1499. mm
|
||||
/gps/centre 0. 0. 0. mm
|
||||
/gps/angtype cos
|
||||
#
|
||||
# Differential energy spectrum for solar minimum
|
||||
# proton flux (/m2/s/sr/MeV) from Vannuccini 2001
|
||||
# INTEGRAL FLUX = 4.29 p/cm2/s
|
||||
/gps/energytype Arb
|
||||
/gps/histname arb
|
||||
#
|
||||
/gps/histpoint 1.0000e+01 1.0886e+02
|
||||
/gps/histpoint 1.4874e+01 1.6753e+02
|
||||
/gps/histpoint 2.2122e+01 2.5783e+02
|
||||
/gps/histpoint 3.2903e+01 3.9680e+02
|
||||
/gps/histpoint 4.8939e+01 6.1068e+02
|
||||
/gps/histpoint 7.2790e+01 9.3985e+02
|
||||
/gps/histpoint 1.0826e+02 1.3421e+03
|
||||
/gps/histpoint 1.6103e+02 1.6191e+03
|
||||
/gps/histpoint 2.3950e+02 1.8305e+03
|
||||
/gps/histpoint 3.5622e+02 1.9002e+03
|
||||
/gps/histpoint 5.2983e+02 1.7726e+03
|
||||
/gps/histpoint 7.8805e+02 1.4572e+03
|
||||
/gps/histpoint 1.1721e+03 1.0417e+03
|
||||
/gps/histpoint 1.7433e+03 6.4545e+02
|
||||
/gps/histpoint 2.5929e+03 3.4914e+02
|
||||
/gps/histpoint 3.8566e+03 1.6753e+02
|
||||
/gps/histpoint 5.7362e+03 7.2810e+01
|
||||
/gps/histpoint 8.5317e+03 2.9280e+01
|
||||
/gps/histpoint 1.2690e+04 1.1109e+01
|
||||
/gps/histpoint 1.8874e+04 4.0399e+00
|
||||
/gps/histpoint 2.8072e+04 1.4257e+00
|
||||
/gps/histpoint 4.1753e+04 4.9270e-01
|
||||
/gps/histpoint 6.2102e+04 1.6783e-01
|
||||
/gps/histpoint 9.2367e+04 5.6602e-02
|
||||
/gps/histpoint 1.3738e+05 1.8962e-02
|
||||
/gps/histpoint 2.0434e+05 6.3234e-03
|
||||
/gps/histpoint 3.0392e+05 2.1023e-03
|
||||
/gps/histpoint 4.5204e+05 6.9745e-04
|
||||
/gps/histpoint 6.7234e+05 2.3106e-04
|
||||
/gps/histpoint 1.0000e+06 7.6479e-05
|
||||
#
|
||||
/gps/arbint Lin
|
||||
|
||||
#
|
||||
/run/beamOn 10000
|
||||
@@ -0,0 +1,2 @@
|
||||
0
|
||||
3495773572 1779568655
|
||||
@@ -0,0 +1,32 @@
|
||||
#################################################################
|
||||
# Shoots 1 GeV protons randomly from generator surface
|
||||
#################################################################
|
||||
#
|
||||
/vis/enable
|
||||
/tracking/storeTrajectory 1
|
||||
/control/verbose 1
|
||||
/run/verbose 1
|
||||
/event/verbose 0
|
||||
#
|
||||
/control/suppressAbortion 1
|
||||
#
|
||||
# Random seeds
|
||||
#/run/autoSeed 1
|
||||
/random/resetEngineFrom seeds.rndm
|
||||
#
|
||||
# particle surveys
|
||||
#/surveys/surveyParticles 1
|
||||
#/surveys/surveyPrimaries 1
|
||||
#/surveys/surveyTestMasses 1
|
||||
#
|
||||
/gps/particle proton
|
||||
/gps/energy 1 GeV
|
||||
#
|
||||
# Isotropic distribution
|
||||
/gps/type Surface
|
||||
/gps/shape Sphere
|
||||
/gps/radius 1499. mm
|
||||
/gps/centre 0. 0. 0. mm
|
||||
/gps/angtype cos
|
||||
#
|
||||
/run/beamOn 100
|
||||
@@ -0,0 +1,174 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// ********************************************************************
|
||||
// * *
|
||||
// * cosmicray_charging advanced example for Geant4 *
|
||||
// * (adapted simulation of test-mass charging in the LISA mission) *
|
||||
// * *
|
||||
// * Henrique Araujo (h.araujo@imperial.ac.uk) & Peter Wass *
|
||||
// * Imperial College London *
|
||||
// * *
|
||||
// * LISAAnalysisManager class *
|
||||
// * *
|
||||
// ********************************************************************
|
||||
//
|
||||
// HISTORY
|
||||
// 22/02/2004: migrated from LISA-V04
|
||||
//
|
||||
// ********************************************************************
|
||||
|
||||
|
||||
#ifdef G4ANALYSIS_USE
|
||||
|
||||
#include "LISAAnalysisManager.hh"
|
||||
#include <strstream>
|
||||
#include "globals.hh"
|
||||
|
||||
LISAAnalysisManager* LISAAnalysisManager::instance = 0;
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
LISAAnalysisManager::LISAAnalysisManager() :
|
||||
af(0),
|
||||
tf(0),
|
||||
run_tree(0),
|
||||
run_tpf(0),
|
||||
run_tuple(0)
|
||||
{;}
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
LISAAnalysisManager::~LISAAnalysisManager() {
|
||||
|
||||
if(af) {
|
||||
delete tf;
|
||||
G4cout << " LISAAnalysis -- deleted tree factory" << G4endl;
|
||||
delete af;
|
||||
G4cout << " LISAAnalysis -- deleted analysis factory" << G4endl;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
LISAAnalysisManager* LISAAnalysisManager::getInstance() {
|
||||
|
||||
if (!instance) instance = new LISAAnalysisManager();
|
||||
return instance;
|
||||
|
||||
}
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
void LISAAnalysisManager::Dispose() {
|
||||
|
||||
if(instance) {
|
||||
delete instance;
|
||||
instance = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
void LISAAnalysisManager::Init() {
|
||||
|
||||
G4cout << G4endl << "******* Analysis with AIDA 3.0 *********" << G4endl;
|
||||
|
||||
// create analysis factory
|
||||
if( (af = AIDA_createAnalysisFactory()) )
|
||||
G4cout << " LISAAnalysis -- created analysis factory" << G4endl;
|
||||
|
||||
// create tree factory
|
||||
if( (tf = af->createTreeFactory()) )
|
||||
G4cout << " LISAAnalysis -- created tree factory" << G4endl;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//
|
||||
// RUN ANALYSIS **************************************************************
|
||||
//
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
void LISAAnalysisManager::bookRun(G4String hbookfile) {
|
||||
|
||||
|
||||
// create RunTree
|
||||
G4bool fileExists = false;
|
||||
G4bool readOnly = false;
|
||||
run_tree = tf->create(hbookfile, "hbook", readOnly, fileExists);
|
||||
G4cout << " LISAAnalysis -- tree store: " << run_tree->storeName()<<G4endl;
|
||||
|
||||
// create TupleFactory
|
||||
run_tpf = af->createTupleFactory(*run_tree );
|
||||
G4cout << " LISAAnalysis -- created NTuple factory" << G4endl;
|
||||
|
||||
// Run Information
|
||||
run_tuple = run_tpf->create( "1", "Run Tuple",
|
||||
"float evt,tm,energy,charge,in,out,seed1,seed2");
|
||||
assert(run_tuple);
|
||||
G4cout << " LISAAnalysis -- created Run NTuple" << G4endl;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
void LISAAnalysisManager::FinishRun() {
|
||||
|
||||
// Committing transaction with the tree
|
||||
G4cout << " LISAAnalysis -- committing run_tree..." << G4endl;
|
||||
run_tree->commit();
|
||||
run_tree->close();
|
||||
|
||||
delete run_tpf;
|
||||
delete run_tree;
|
||||
}
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
void LISAAnalysisManager::analyseRun(G4int evt, G4int tm, G4double energy,
|
||||
G4int charge, G4int in, G4int out, long seed1, long seed2) {
|
||||
|
||||
AIDA::ITuple* ntuple = dynamic_cast<AIDA::ITuple *> ( run_tree->find("1") );
|
||||
|
||||
// Fill the ntuple
|
||||
ntuple->fill( ntuple->findColumn( "evt" ), (float) evt );
|
||||
ntuple->fill( ntuple->findColumn( "tm" ), (float) tm );
|
||||
ntuple->fill( ntuple->findColumn( "energy" ), (float) energy );
|
||||
ntuple->fill( ntuple->findColumn( "charge" ), (float) charge );
|
||||
ntuple->fill( ntuple->findColumn( "in" ), (float) in );
|
||||
ntuple->fill( ntuple->findColumn( "out" ), (float) out );
|
||||
ntuple->fill( ntuple->findColumn( "seed1" ), (float) seed1 );
|
||||
ntuple->fill( ntuple->findColumn( "seed2" ), (float) seed2 );
|
||||
|
||||
// Values of attributes are prepared; store them to the nTuple:
|
||||
ntuple->addRow();
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,90 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// ********************************************************************
|
||||
// * *
|
||||
// * cosmicray_charging advanced example for Geant4 *
|
||||
// * (adapted simulation of test-mass charging in the LISA mission) *
|
||||
// * *
|
||||
// * Henrique Araujo (h.araujo@imperial.ac.uk) & Peter Wass *
|
||||
// * Imperial College London *
|
||||
// * *
|
||||
// * LISADetectorConstruction class *
|
||||
// * *
|
||||
// ********************************************************************
|
||||
//
|
||||
// HISTORY
|
||||
// 22/02/2004: migrated from LISA-V04
|
||||
//
|
||||
// ********************************************************************
|
||||
|
||||
|
||||
// **************************************************************************
|
||||
// Colours and VisAttributes
|
||||
//***************************************************************************
|
||||
|
||||
|
||||
// edge colour attributes
|
||||
G4VisAttributes* white_vat = new G4VisAttributes(G4Colour(1.0, 1.0, 1.0));
|
||||
G4VisAttributes* grey_vat = new G4VisAttributes(G4Colour(0.5, 0.5, 0.5));
|
||||
G4VisAttributes* black_vat = new G4VisAttributes(G4Colour(0.0, 0.0, 0.0));
|
||||
G4VisAttributes* red_vat = new G4VisAttributes(G4Colour(1.0, 0.0, 0.0));
|
||||
G4VisAttributes* orange_vat = new G4VisAttributes(G4Colour(1.0, 0.5, 0.0));
|
||||
G4VisAttributes* yellow_vat = new G4VisAttributes(G4Colour(1.0, 1.0, 0.0));
|
||||
G4VisAttributes* gold_vat = new G4VisAttributes(G4Colour(.75, .75, 0.0));
|
||||
G4VisAttributes* green_vat = new G4VisAttributes(G4Colour(0.0, 1.0, 0.0));
|
||||
G4VisAttributes* lgreen_vat = new G4VisAttributes(G4Colour(0.0, .75, 0.0));
|
||||
G4VisAttributes* cyan_vat = new G4VisAttributes(G4Colour(0.0, 1.0, 1.0));
|
||||
G4VisAttributes* lblue_vat = new G4VisAttributes(G4Colour(0.0, 0.0, .75));
|
||||
G4VisAttributes* blue_vat = new G4VisAttributes(G4Colour(0.0, 0.0, 1.0));
|
||||
G4VisAttributes* magenta_vat = new G4VisAttributes(G4Colour(1.0, 0.0, 1.0));
|
||||
|
||||
// solid colour attributes
|
||||
G4VisAttributes* sol_white_vat = new G4VisAttributes(G4Colour(1.0,1.0,1.0));
|
||||
sol_white_vat->SetForceSolid(true);
|
||||
G4VisAttributes* sol_grey_vat = new G4VisAttributes(G4Colour(0.5,0.5,0.5));
|
||||
sol_grey_vat->SetForceSolid(true);
|
||||
G4VisAttributes* sol_dgrey_vat = new G4VisAttributes(G4Colour(.25,.25,.25));
|
||||
sol_dgrey_vat->SetForceSolid(true);
|
||||
G4VisAttributes* sol_black_vat = new G4VisAttributes(G4Colour(0.0,0.0,0.0));
|
||||
sol_black_vat->SetForceSolid(true);
|
||||
G4VisAttributes* sol_red_vat = new G4VisAttributes(G4Colour(1.0,0.0,0.0));
|
||||
sol_red_vat->SetForceSolid(true);
|
||||
G4VisAttributes* sol_green_vat = new G4VisAttributes(G4Colour(0.0,1.0,0.0));
|
||||
sol_green_vat->SetForceSolid(true);
|
||||
G4VisAttributes* sol_lgreen_vat = new G4VisAttributes(G4Colour(0.0,.75,0.0));
|
||||
sol_lgreen_vat->SetForceSolid(true);
|
||||
G4VisAttributes* sol_lblue_vat = new G4VisAttributes(G4Colour(0.0,0.0,.75));
|
||||
sol_lblue_vat->SetForceSolid(true);
|
||||
G4VisAttributes* sol_cyan_vat = new G4VisAttributes(G4Colour(0.0,1.0,1.0));
|
||||
sol_cyan_vat->SetForceSolid(true);
|
||||
G4VisAttributes* sol_blue_vat = new G4VisAttributes(G4Colour(0.0,0.0,1.0));
|
||||
sol_blue_vat->SetForceSolid(true);
|
||||
G4VisAttributes* sol_gold_vat = new G4VisAttributes(G4Colour(.75,.75,0.0));
|
||||
sol_gold_vat->SetForceSolid(true);
|
||||
G4VisAttributes* sol_yellow_vat = new G4VisAttributes(G4Colour(1.0,1.0,0.0));
|
||||
sol_yellow_vat->SetForceSolid(true);
|
||||
G4VisAttributes* sol_orange_vat = new G4VisAttributes(G4Colour(1.0,0.5,0.0));
|
||||
sol_orange_vat->SetForceSolid(true);
|
||||
|
||||
|
||||
//*****************************************************************************
|
||||
@@ -0,0 +1,229 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// ********************************************************************
|
||||
// * *
|
||||
// * cosmicray_charging advanced example for Geant4 *
|
||||
// * (adapted simulation of test-mass charging in the LISA mission) *
|
||||
// * *
|
||||
// * Henrique Araujo (h.araujo@imperial.ac.uk) & Peter Wass *
|
||||
// * Imperial College London *
|
||||
// * *
|
||||
// * LISADetectorConstruction class *
|
||||
// * *
|
||||
// ********************************************************************
|
||||
//
|
||||
// HISTORY
|
||||
// 22/02/2004: migrated from LISA-V04
|
||||
//
|
||||
// ********************************************************************
|
||||
|
||||
|
||||
|
||||
#include "LISADetectorConstruction.hh"
|
||||
#include "LISADetectorMaterials.hh"
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
LISADetectorConstruction::LISADetectorConstruction() {;}
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
LISADetectorConstruction::~LISADetectorConstruction() {;}
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
G4VPhysicalVolume* LISADetectorConstruction::Construct() {
|
||||
|
||||
|
||||
// material definitions
|
||||
ConstructMaterials();
|
||||
|
||||
|
||||
// build it
|
||||
return ConstructDetector();
|
||||
|
||||
}
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
G4VPhysicalVolume* LISADetectorConstruction::ConstructDetector() {
|
||||
|
||||
|
||||
// Edge and solid colour attributes
|
||||
#include "LISAColours.icc"
|
||||
|
||||
|
||||
|
||||
//***************************************************************************
|
||||
// world
|
||||
//***************************************************************************
|
||||
|
||||
G4double wld_len = 3000.*mm;
|
||||
|
||||
G4Tubs* truewld_sol =
|
||||
new G4Tubs("truewld_box", 0., 0.5*wld_len, 0.5*wld_len, 0., 360.*deg);
|
||||
G4LogicalVolume* truewld_log =
|
||||
new G4LogicalVolume(truewld_sol, vacuum, "truewld_log");
|
||||
G4VPhysicalVolume* truewld_phys = new G4PVPlacement(0, G4ThreeVector(),
|
||||
"truewld_phys", truewld_log, NULL, false, 0);
|
||||
truewld_log->SetVisAttributes(G4VisAttributes::Invisible);
|
||||
|
||||
// allow spacecraft rotation
|
||||
G4RotationMatrix wld_rot; wld_rot.rotateZ(0.*deg);
|
||||
G4Tubs* wld_sol =
|
||||
new G4Tubs("wld_box", 0., 0.49*wld_len, 0.5*wld_len, 0., 360.*deg);
|
||||
G4LogicalVolume* wld_log =
|
||||
new G4LogicalVolume(wld_sol, vacuum, "wld_log");
|
||||
G4VPhysicalVolume* wld_phys = new G4PVPlacement(G4Transform3D(wld_rot,
|
||||
G4ThreeVector()), "wld_phys", wld_log, truewld_phys, false, 0);
|
||||
// wld_log->SetVisAttributes(white_vat);
|
||||
wld_log->SetVisAttributes(G4VisAttributes::Invisible);
|
||||
|
||||
|
||||
// Probe volume
|
||||
// uncomment code in LISASteppingAction.cc to count hits
|
||||
// G4Sphere* probe_sol =
|
||||
// new G4Sphere("probe_sol", 0., 100.*mm, 0., 360.*deg, 0., 180.*deg);
|
||||
// G4LogicalVolume* probe_log =
|
||||
// new G4LogicalVolume(probe_sol, vacuum, "probe_log");
|
||||
// G4VPhysicalVolume* probe_phys =
|
||||
// new G4PVPlacement(0, G4ThreeVector(0*mm,0*mm,0*mm),
|
||||
// "probe_phys", probe_log, wld_phys, false, 0);
|
||||
// probe_log->SetVisAttributes(sol_white_vat);
|
||||
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// Science Module Structure (SMS)
|
||||
//**************************************************************************
|
||||
// Primary Structure
|
||||
// Lower Deck
|
||||
// Upper Deck
|
||||
// Thermal Shield
|
||||
// Solar Array
|
||||
// Optical Surface Reflectors (OSR)
|
||||
// Radiator Panels
|
||||
//**************************************************************************
|
||||
|
||||
// position of science module spacecraft in world volume
|
||||
G4ThreeVector spacecraft_pos(0.*mm,0.*mm,0.*mm);
|
||||
|
||||
#include "LISAScienceModuleStructures.icc"
|
||||
|
||||
|
||||
|
||||
//***************************************************************************
|
||||
// Interferometer Assembly
|
||||
//***************************************************************************
|
||||
// Payload Shield (Y Tube)
|
||||
// Telescope Light Shields
|
||||
// Telescope Electronics Mounting
|
||||
// Telescope Mirrors Mounting
|
||||
// Telescope Actuator Mechanism
|
||||
// Optical Bench Mounting
|
||||
// Optical Bench
|
||||
//***************************************************************************
|
||||
|
||||
|
||||
// position of payload shields in spacecraft
|
||||
G4double YTube_xoff = -800.*mm;
|
||||
|
||||
// position of interferometer in Y-tubes
|
||||
G4RotationMatrix tel_rot1; tel_rot1.rotateY(210.*deg);
|
||||
G4ThreeVector tel_pos1(+319.*mm, 0.*mm, 920.*mm);
|
||||
G4RotationMatrix tel_rot2; tel_rot2.rotateY(150.*deg);
|
||||
G4ThreeVector tel_pos2(-319.*mm, 0.*mm, 920.*mm);
|
||||
|
||||
// position of optical bench along Y-tube
|
||||
G4double OpticalBench_off = 0.0*mm;
|
||||
|
||||
#include "LISAInterferometerAssembly.icc"
|
||||
|
||||
|
||||
|
||||
//***************************************************************************
|
||||
// Sensor Vacuum Housing
|
||||
// Modified to contain LTP Inertial Sensor and Caging Mechanism
|
||||
//***************************************************************************
|
||||
|
||||
G4RotationMatrix IS_rot; IS_rot.rotateX(90.*deg); IS_rot.rotateY(90.*deg);
|
||||
|
||||
#include "LISASensorHousing.icc"
|
||||
|
||||
|
||||
|
||||
//***************************************************************************
|
||||
// LTP Caging Mechanism
|
||||
//***************************************************************************
|
||||
|
||||
//#include "LISACagingMechanism.icc"
|
||||
|
||||
|
||||
|
||||
|
||||
//***************************************************************************
|
||||
// Inertial Sensors: YZ-Injection, 46 mm Test Mass
|
||||
// Design adopted for LTP/SMART-2: Report LTP-RT-CGS-001, issue 2
|
||||
//***************************************************************************
|
||||
|
||||
#include "LISAInertialSensor.icc"
|
||||
|
||||
// Sensor Region (cuts 250 eV)
|
||||
G4Region* ISensor = new G4Region(G4String("sensor"));
|
||||
cage_o_log->SetRegion(ISensor);
|
||||
ISensor->AddRootLogicalVolume(cage_o_log);
|
||||
|
||||
|
||||
|
||||
|
||||
//***************************************************************************
|
||||
// Electronics Boxes
|
||||
//***************************************************************************
|
||||
|
||||
#include "LISAElectronicsBoxes.icc"
|
||||
|
||||
|
||||
|
||||
|
||||
//***************************************************************************
|
||||
// Support Systems
|
||||
//***************************************************************************
|
||||
// Star Trackers
|
||||
// FEEP Thrusters
|
||||
// Communications Antennas
|
||||
//***************************************************************************
|
||||
|
||||
#include "LISASupportSystems.icc"
|
||||
|
||||
|
||||
|
||||
// ......................................................................
|
||||
// attach user limits ...................................................
|
||||
|
||||
// reduce step size in electrodes
|
||||
// goldplating_log->SetUserLimits (new G4UserLimits(30.*nanometer));
|
||||
|
||||
// return
|
||||
return truewld_phys;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,462 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// ********************************************************************
|
||||
// * *
|
||||
// * cosmicray_charging advanced example for Geant4 *
|
||||
// * (adapted simulation of test-mass charging in the LISA mission) *
|
||||
// * *
|
||||
// * Henrique Araujo (h.araujo@imperial.ac.uk) & Peter Wass *
|
||||
// * Imperial College London *
|
||||
// * *
|
||||
// * LISADetectorConstruction class *
|
||||
// * *
|
||||
// ********************************************************************
|
||||
//
|
||||
// HISTORY
|
||||
// 22/02/2004: migrated from LISA-V04
|
||||
//
|
||||
// ********************************************************************
|
||||
|
||||
|
||||
//***************************************************************************
|
||||
// Electronics Boxes
|
||||
//***************************************************************************
|
||||
|
||||
|
||||
// Lower Deck electronics
|
||||
G4double EB_zoff = -230.*mm;
|
||||
G4ThreeVector EPC1_pos(-680*mm, +580*mm, EB_zoff+0.5*110.*mm);
|
||||
G4ThreeVector EPC2_pos(-680*mm, -580*mm, EB_zoff+0.5*110.*mm);
|
||||
G4ThreeVector GyroPack_pos(+150*mm, +980*mm, EB_zoff+0.5* 85.*mm);
|
||||
G4ThreeVector InstConE1_pos(+720*mm, -190*mm, EB_zoff+0.5*180.*mm);
|
||||
G4ThreeVector InstConE2_pos(+720*mm, +190*mm, EB_zoff+0.5*180.*mm);
|
||||
G4ThreeVector RFDU_pos( +30*mm,-1000*mm, EB_zoff+0.5* 80.*mm);
|
||||
G4ThreeVector StarTrack3_pos(+450*mm, -850*mm, EB_zoff+0.5* 54.*mm);
|
||||
G4ThreeVector StarTrack4_pos(+450*mm, +850*mm, EB_zoff+0.5* 54.*mm);
|
||||
G4ThreeVector STElec1_pos( +30*mm, -720*mm, EB_zoff+0.5*100.*mm);
|
||||
G4ThreeVector STElec2_pos(-280*mm, -900*mm, EB_zoff+0.5*100.*mm);
|
||||
G4ThreeVector STElec3_pos(-280*mm, +900*mm, EB_zoff+0.5*100.*mm);
|
||||
G4ThreeVector STElec4_pos( +30*mm, +720*mm, EB_zoff+0.5*100.*mm);
|
||||
G4ThreeVector TWT1_pos(-730*mm, +350*mm, EB_zoff+0.5* 36.*mm);
|
||||
G4ThreeVector TWT2_pos(-730*mm, -350*mm, EB_zoff+0.5* 36.*mm);
|
||||
G4ThreeVector UVBox1_pos(+180*mm, 0, EB_zoff+0.5* 70.*mm);
|
||||
G4ThreeVector UVBox2_pos(+480*mm, 0, EB_zoff+0.5* 70.*mm);
|
||||
|
||||
// Upper Deck electronics
|
||||
EB_zoff = 220.*mm;
|
||||
G4ThreeVector PCDU_pos(-770*mm, +600*mm, EB_zoff-0.5*300.*mm);
|
||||
G4ThreeVector CentELCPS_pos(-780*mm, -570*mm, EB_zoff-0.5*115.*mm);
|
||||
G4ThreeVector CentEL2_pos(-250*mm,-1000*mm, EB_zoff-0.5*284.*mm);
|
||||
G4ThreeVector FEEPEL1_pos(-250*mm,+1000*mm, EB_zoff-0.5*200.*mm);
|
||||
G4ThreeVector FEEPEL2_pos(+270*mm,+1020*mm, EB_zoff-0.5*200.*mm);
|
||||
G4ThreeVector HGADrive1_pos( 20*mm,-1210*mm, EB_zoff-0.5*100.*mm);
|
||||
G4ThreeVector HGADrive2_pos( 20*mm,+1210*mm, EB_zoff-0.5*100.*mm);
|
||||
G4ThreeVector InterfelEL1_pos(1030*mm, -180*mm, EB_zoff-0.5*150.*mm);
|
||||
G4ThreeVector InterfelEL2_pos(1030*mm, +180*mm, EB_zoff-0.5*150.*mm);
|
||||
G4ThreeVector LaserEL1_pos(+720*mm, -220*mm, EB_zoff-0.5*100.*mm);
|
||||
G4ThreeVector LaserEL2_pos(+720*mm, +220*mm, EB_zoff-0.5*100.*mm);
|
||||
G4ThreeVector LaserHead1_pos(1100*mm, -400*mm, EB_zoff-0.5* 5.*mm);
|
||||
G4ThreeVector LaserHead2_pos(1010*mm, -480*mm, EB_zoff-0.5* 50.*mm);
|
||||
G4ThreeVector LaserHead3_pos(1100*mm, +400*mm, EB_zoff-0.5* 50.*mm);
|
||||
G4ThreeVector LaserHead4_pos(1010*mm, +480*mm, EB_zoff-0.5* 50.*mm);
|
||||
G4ThreeVector StarTrack1_pos(+650*mm,+1050*mm, EB_zoff-0.5* 54.*mm);
|
||||
G4ThreeVector StarTrack2_pos(+650*mm,-1050*mm, EB_zoff-0.5* 54.*mm);
|
||||
G4ThreeVector Transpond2_pos(+270*mm,-1050*mm, EB_zoff-0.5*178.*mm);
|
||||
|
||||
|
||||
// rotations
|
||||
G4RotationMatrix EB_rot1; EB_rot1.rotateZ(+30.*deg);
|
||||
G4RotationMatrix EB_rot2; EB_rot2.rotateZ(-30.*deg);
|
||||
G4RotationMatrix EB_rot3; EB_rot3.rotateZ(+60.*deg);
|
||||
G4RotationMatrix EB_rot4; EB_rot4.rotateZ(-60.*deg);
|
||||
|
||||
|
||||
G4double f;
|
||||
// Each box is made from solid Al6061 from which a volume
|
||||
// f times smaller is removed to match assigned mass;
|
||||
|
||||
|
||||
// Lower Deck electronics
|
||||
|
||||
G4Box* EPC_box_o = new G4Box("EPC_box_o",
|
||||
0.5*227.*mm, 0.5*63.*mm, 0.5*110.*mm);
|
||||
G4LogicalVolume* EPC_log_o = new G4LogicalVolume
|
||||
(EPC_box_o, Al6061, "EPC_log_o");
|
||||
G4VPhysicalVolume* EPC_phys_o;
|
||||
EPC_phys_o = new G4PVPlacement(0, spacecraft_pos + EPC1_pos,
|
||||
"EPC_phys_o", EPC_log_o, wld_phys, false, 0);
|
||||
EPC_phys_o = new G4PVPlacement(0, spacecraft_pos + EPC2_pos,
|
||||
"EPC_phys_o", EPC_log_o, wld_phys, false, 1);
|
||||
f = pow(1.-1.4/(2.70*227*63*110)*1E6, 1./3.);
|
||||
// G4cout << "f: " << f << G4endl;
|
||||
G4Box* EPC_box_i = new G4Box("EPC_box_i",
|
||||
f*0.5*227.*mm, f*0.5*63.*mm, f*0.5*110.*mm);
|
||||
G4LogicalVolume* EPC_log_i = new G4LogicalVolume
|
||||
(EPC_box_i, vacuum, "EPC_log_i");
|
||||
G4VPhysicalVolume* EPC_phys_i = new G4PVPlacement
|
||||
(0, 0, "EPC_phys_i", EPC_log_i, EPC_phys_o, false, 0);
|
||||
//
|
||||
//
|
||||
G4Tubs* GyroPack_tub_o = new G4Tubs("GyroPack_tub_o",
|
||||
0., 0.5*89.*mm, 0.5*85.*mm, 0., 360.*deg);
|
||||
G4LogicalVolume* GyroPack_log_o = new G4LogicalVolume
|
||||
(GyroPack_tub_o, Al6061, "GyroPack_log_o");
|
||||
G4VPhysicalVolume* GyroPack_phys_o = new G4PVPlacement(0, spacecraft_pos
|
||||
+ GyroPack_pos, "GyroPack_phys_o", GyroPack_log_o, wld_phys, false, 0);
|
||||
f = pow(1.-1.00/(2.70*M_PI*(0.5*89.)*(0.5*89.)*85.)*1E6, 1./3.);
|
||||
// G4cout << "f: " << f << G4endl;
|
||||
G4Tubs* GyroPack_tub_i = new G4Tubs("GyroPack_tub_i",
|
||||
0., f*0.5*89.*mm, f*0.5*85.*mm, 0., 360.*deg);
|
||||
G4LogicalVolume* GyroPack_log_i = new G4LogicalVolume
|
||||
(GyroPack_tub_i, vacuum, "GyroPack_log_i");
|
||||
G4VPhysicalVolume* GyroPack_phys_i = new G4PVPlacement(0, 0,
|
||||
"GyroPack_phys_i", GyroPack_log_i, GyroPack_phys_o, false, 0);
|
||||
//
|
||||
//
|
||||
G4Box* InstConE_box_o = new G4Box("InstConE_box_o",
|
||||
0.5*250.*mm, 0.5*180.*mm, 0.5*180.*mm);
|
||||
G4LogicalVolume* InstConE_log_o = new G4LogicalVolume
|
||||
(InstConE_box_o, Al6061, "InstConE_log_o");
|
||||
G4VPhysicalVolume* InstConE_phys_o;
|
||||
InstConE_phys_o = new G4PVPlacement(G4Transform3D
|
||||
(EB_rot1, spacecraft_pos + InstConE1_pos),
|
||||
"InstConE_phys_o", InstConE_log_o, wld_phys, false, 0);
|
||||
InstConE_phys_o = new G4PVPlacement(G4Transform3D
|
||||
(EB_rot2, spacecraft_pos + InstConE2_pos),
|
||||
"InstConE_phys_o", InstConE_log_o, wld_phys, false, 1);
|
||||
f = pow(1.-4.5/(2.70*250*180*180)*1E6, 1./3.);
|
||||
G4Box* InstConE_box_i = new G4Box("InstConE_box_i",
|
||||
f*0.5*250.*mm, f*0.5*180.*mm, f*0.5*180.*mm);
|
||||
G4LogicalVolume* InstConE_log_i = new G4LogicalVolume
|
||||
(InstConE_box_i, vacuum, "InstConE_log_i");
|
||||
G4VPhysicalVolume* InstConE_phys_i = new G4PVPlacement
|
||||
(0, 0, "InstConE_phys_i", InstConE_log_i, InstConE_phys_o, false, 0);
|
||||
//
|
||||
//
|
||||
G4Box* RFDU_box_o = new G4Box("RFDU_box_o",
|
||||
0.5*160.*mm, 0.5*60.*mm, 0.5*80.*mm);
|
||||
G4LogicalVolume* RFDU_log_o = new G4LogicalVolume
|
||||
(RFDU_box_o, Al6061, "RFDU_log_o");
|
||||
G4VPhysicalVolume* RFDU_phys_o = new G4PVPlacement(0, spacecraft_pos
|
||||
+ RFDU_pos, "RFDU_phys_o", RFDU_log_o, wld_phys, false, 0);
|
||||
f = pow(1.-1.0/(2.70*160*60*80)*1E6, 1./3.);
|
||||
G4Box* RFDU_box_i = new G4Box("RFDU_box_i",
|
||||
f*0.5*160.*mm, f*0.5*60.*mm, f*0.5*80.*mm);
|
||||
G4LogicalVolume* RFDU_log_i = new G4LogicalVolume
|
||||
(RFDU_box_i, vacuum, "RFDU_log_i");
|
||||
G4VPhysicalVolume* RFDU_phys_i = new G4PVPlacement
|
||||
(0, 0, "RFDU_phys_i", RFDU_log_i, RFDU_phys_o, false, 0);
|
||||
//
|
||||
//
|
||||
G4Box* StarTrack_L_box_o = new G4Box("StarStrack_box_o",
|
||||
0.5*50.*mm, 0.5*50.*mm, 0.5*54.*mm);
|
||||
G4LogicalVolume* StarTrack_L_log_o = new G4LogicalVolume
|
||||
(StarTrack_L_box_o, Al6061, "StarTrack_log_o");
|
||||
G4VPhysicalVolume* StarTrack_L_phys_o;
|
||||
StarTrack_L_phys_o = new G4PVPlacement(0, spacecraft_pos + StarTrack3_pos,
|
||||
"STarTrack3_phys_o", StarTrack_L_log_o, wld_phys, false, 0);
|
||||
StarTrack_L_phys_o = new G4PVPlacement(0, spacecraft_pos + StarTrack4_pos,
|
||||
"STarTrack4_phys_o", StarTrack_L_log_o, wld_phys, false, 1);
|
||||
f = pow(1.-0.30/(2.70*50*50*54)*1E6, 1./3.);
|
||||
G4Box* StarTrack_L_box_i = new G4Box("StarTrack_L_box_i",
|
||||
f*0.5*50.*mm, f*0.5*50.*mm, f*0.5*54.*mm);
|
||||
G4LogicalVolume* StarTrack_L_log_i = new G4LogicalVolume
|
||||
(StarTrack_L_box_i, vacuum, "StarTrack_L_log_i");
|
||||
G4VPhysicalVolume* StarTrack_L_phys_i = new G4PVPlacement
|
||||
(0,0,"StarTrack_L_phys_i",StarTrack_L_log_i,StarTrack_L_phys_o,false,0);
|
||||
//
|
||||
//
|
||||
G4Box* STElec_box_o = new G4Box("STElec_box_o",
|
||||
0.5*100.*mm, 0.5*100.*mm, 0.5*100.*mm);
|
||||
G4LogicalVolume* STElec_log_o = new G4LogicalVolume
|
||||
(STElec_box_o, Al6061, "STElec_log_o");
|
||||
G4VPhysicalVolume* STElec_phys_o;
|
||||
STElec_phys_o = new G4PVPlacement(G4Transform3D
|
||||
(EB_rot1, spacecraft_pos + STElec1_pos),
|
||||
"STElec_phys_o", STElec_log_o, wld_phys, false, 0);
|
||||
STElec_phys_o = new G4PVPlacement(G4Transform3D
|
||||
(EB_rot1, spacecraft_pos + STElec2_pos),
|
||||
"STElec_phys_o", STElec_log_o, wld_phys, false, 1);
|
||||
STElec_phys_o = new G4PVPlacement(G4Transform3D
|
||||
(EB_rot2, spacecraft_pos + STElec3_pos),
|
||||
"STElec_phys_o", STElec_log_o, wld_phys, false, 2);
|
||||
STElec_phys_o = new G4PVPlacement(G4Transform3D
|
||||
(EB_rot2, spacecraft_pos + STElec4_pos),
|
||||
"STElec_phys_o", STElec_log_o, wld_phys, false, 3);
|
||||
f = pow(1.-2.0/(2.70*100*100*100)*1E6, 1./3.);
|
||||
G4Box* STElec_box_i = new G4Box("STElec_box_i",
|
||||
f*0.5*100.*mm, f*0.5*100.*mm, f*0.5*100.*mm);
|
||||
G4LogicalVolume* STElec_log_i = new G4LogicalVolume
|
||||
(STElec_box_i, vacuum, "STElec_log_i");
|
||||
G4VPhysicalVolume* STElec_phys_i = new G4PVPlacement
|
||||
(0, 0, "STElec_phys_i", STElec_log_i, STElec_phys_o, false, 0);
|
||||
//
|
||||
//
|
||||
G4Box* TWT_box_o = new G4Box("TWT_box_o",
|
||||
0.5*321.*mm, 0.5*58.*mm, 0.5*36.*mm);
|
||||
G4LogicalVolume* TWT_log_o = new G4LogicalVolume
|
||||
(TWT_box_o, Al6061, "TWT_log_o");
|
||||
G4VPhysicalVolume* TWT_phys_o;
|
||||
TWT_phys_o = new G4PVPlacement(0, spacecraft_pos + TWT1_pos,
|
||||
"TWT_phys_o", TWT_log_o, wld_phys, false, 0);
|
||||
TWT_phys_o = new G4PVPlacement(0, spacecraft_pos + TWT2_pos,
|
||||
"TWT_phys_o", TWT_log_o, wld_phys, false, 1);
|
||||
f = pow(1.-0.75/(2.70*321*58*36)*1E6, 1./3.);
|
||||
G4Box* TWT_box_i = new G4Box("TWT_box_i",
|
||||
f*0.5*321.*mm, f*0.5*58.*mm, f*0.5*36.*mm);
|
||||
G4LogicalVolume* TWT_log_i = new G4LogicalVolume
|
||||
(TWT_box_i, vacuum, "TWT_log_i");
|
||||
G4VPhysicalVolume* TWT_phys_i = new G4PVPlacement
|
||||
(0, 0, "TWT_phys_i", TWT_log_i, TWT_phys_o, false, 0);
|
||||
//
|
||||
//
|
||||
G4Box* UVBox_box_o = new G4Box("UVBox_box_o",
|
||||
0.5*150.*mm, 0.5*100.*mm, 0.5*70.*mm);
|
||||
G4LogicalVolume* UVBox_log_o = new G4LogicalVolume
|
||||
(UVBox_box_o, Al6061, "UVBox_log_o");
|
||||
G4VPhysicalVolume* UVBox_phys_o;
|
||||
UVBox_phys_o = new G4PVPlacement(0, spacecraft_pos + UVBox1_pos,
|
||||
"UVBox_phys_o", UVBox_log_o, wld_phys, false, 0);
|
||||
UVBox_phys_o = new G4PVPlacement(0, spacecraft_pos + UVBox2_pos,
|
||||
"UVBox_phys_o", UVBox_log_o, wld_phys, false, 1);
|
||||
f = pow(1.-0.50/(2.70*150*100*70)*1E6, 1./3.);
|
||||
G4Box* UVBox_box_i = new G4Box("UVBox_box_i",
|
||||
f*0.5*150.*mm, f*0.5*100.*mm, f*0.5*70.*mm);
|
||||
G4LogicalVolume* UVBox_log_i = new G4LogicalVolume
|
||||
(UVBox_box_i, vacuum, "UVBox_log_i");
|
||||
G4VPhysicalVolume* UVBox_phys_i = new G4PVPlacement
|
||||
(0, 0, "UVBox_phys_i", UVBox_log_i, UVBox_phys_o, false, 0);
|
||||
|
||||
|
||||
|
||||
// Upper Deck electronics
|
||||
|
||||
G4Box* PCDU_box_o = new G4Box("PCDU_box_o",
|
||||
0.5*200.*mm, 0.5*350.*mm, 0.5*300.*mm);
|
||||
G4LogicalVolume* PCDU_log_o = new G4LogicalVolume
|
||||
(PCDU_box_o, Al6061, "PCDU_log_o");
|
||||
G4VPhysicalVolume* PCDU_phys_o = new G4PVPlacement(0, spacecraft_pos
|
||||
+ PCDU_pos, "PCDU_phys_o", PCDU_log_o, wld_phys, false, 0);
|
||||
f = pow(1.-15.90/(2.70*200*350*300)*1E6, 1./3.);
|
||||
G4Box* PCDU_box_i = new G4Box("PCDU_box_i",
|
||||
f*0.5*200.*mm, f*0.5*350.*mm, f*0.5*300.*mm);
|
||||
G4LogicalVolume* PCDU_log_i = new G4LogicalVolume
|
||||
(PCDU_box_i, vacuum, "PCDU_log_i");
|
||||
G4VPhysicalVolume* PCDU_phys_i = new G4PVPlacement
|
||||
(0, 0, "PCDU_phys_i", PCDU_log_i, PCDU_phys_o, false, 0);
|
||||
//
|
||||
//
|
||||
G4Box* CentELCPS_box_o = new G4Box("CentELCPS_box_o",
|
||||
0.5*240.*mm, 0.5*356.*mm, 0.5*140.*mm);
|
||||
G4LogicalVolume* CentELCPS_log_o = new G4LogicalVolume
|
||||
(CentELCPS_box_o, Al6061, "CentELCPS_log_o");
|
||||
G4VPhysicalVolume* CentELCPS_phys_o = new G4PVPlacement(0, spacecraft_pos
|
||||
+ CentELCPS_pos, "CentELCPS_phys_o", CentELCPS_log_o, wld_phys, false, 0);
|
||||
f = pow(1.-15.90/(2.70*240*356*140)*1E6, 1./3.);
|
||||
G4Box* CentELCPS_box_i = new G4Box("CentELCPS_box_i",
|
||||
f*0.5*240.*mm, f*0.5*356.*mm, f*0.5*140.*mm);
|
||||
G4LogicalVolume* CentELCPS_log_i = new G4LogicalVolume
|
||||
(CentELCPS_box_i, vacuum, "CentELCPS_log_i");
|
||||
G4VPhysicalVolume* CentELCPS_phys_i = new G4PVPlacement
|
||||
(0, 0, "CentELCPS_phys_i", CentELCPS_log_i, CentELCPS_phys_o, false, 0);
|
||||
//
|
||||
//
|
||||
G4Box* CentEL2_box_o = new G4Box("CentEL2_box_o",
|
||||
0.5*220.*mm, 0.5*184.*mm, 0.5*284.*mm);
|
||||
G4LogicalVolume* CentEL2_log_o = new G4LogicalVolume
|
||||
(CentEL2_box_o, Al6061, "CentEL2_log_o");
|
||||
G4VPhysicalVolume* CentEL2_phys_o = new G4PVPlacement(G4Transform3D
|
||||
(EB_rot3, spacecraft_pos + CentEL2_pos),
|
||||
"CentEL2_phys_o", CentEL2_log_o, wld_phys, false, 0);
|
||||
f = pow(1.-15.90/(2.70*220*184*284)*1E6, 1./3.);
|
||||
G4Box* CentEL2_box_i = new G4Box("CentEL2_box_i",
|
||||
f*0.5*220.*mm, f*0.5*184.*mm, f*0.5*284.*mm);
|
||||
G4LogicalVolume* CentEL2_log_i = new G4LogicalVolume
|
||||
(CentEL2_box_i, vacuum, "CentEL2_log_i");
|
||||
G4VPhysicalVolume* CentEL2_phys_i = new G4PVPlacement
|
||||
(0, 0, "CentEL2_phys_i", CentEL2_log_i, CentEL2_phys_o, false, 0);
|
||||
//
|
||||
//
|
||||
G4Box* FEEPEL_box_o = new G4Box("FEEPEL_box_o",
|
||||
0.5*260.*mm, 0.5*170.*mm, 0.5*200.*mm);
|
||||
G4LogicalVolume* FEEPEL_log_o = new G4LogicalVolume
|
||||
(FEEPEL_box_o, Al6061, "FEEPEL_log_o");
|
||||
G4VPhysicalVolume* FEEPEL_phys_o;
|
||||
FEEPEL_phys_o = new G4PVPlacement(G4Transform3D
|
||||
(EB_rot4, spacecraft_pos + FEEPEL1_pos),
|
||||
"FEEPEL_phys_o", FEEPEL_log_o, wld_phys, false, 0);
|
||||
FEEPEL_phys_o = new G4PVPlacement(G4Transform3D
|
||||
(EB_rot1, spacecraft_pos + FEEPEL2_pos),
|
||||
"FEEPEL_phys_o", FEEPEL_log_o, wld_phys, false, 1);
|
||||
f = pow(1.-6.50/(2.70*260*170*200)*1E6, 1./3.);
|
||||
G4Box* FEEPEL_box_i = new G4Box("FEEPEL_box_i",
|
||||
f*0.5*260.*mm, f*0.5*170.*mm, f*0.5*200.*mm);
|
||||
G4LogicalVolume* FEEPEL_log_i = new G4LogicalVolume
|
||||
(FEEPEL_box_i, vacuum, "FEEPEL_log_i");
|
||||
G4VPhysicalVolume* FEEPEL_phys_i = new G4PVPlacement
|
||||
(0, 0, "FEEPEL_phys_i", FEEPEL_log_i, FEEPEL_phys_o, false, 0);
|
||||
//
|
||||
//
|
||||
G4Box* HGADrive_box_o = new G4Box("HGADrive_box_o",
|
||||
0.5*100.*mm, 0.5*100.*mm, 0.5*100.*mm);
|
||||
G4LogicalVolume* HGADrive_log_o = new G4LogicalVolume
|
||||
(HGADrive_box_o, Al6061, "HGADrive_log_o");
|
||||
G4VPhysicalVolume* HGADrive_phys_o;
|
||||
HGADrive_phys_o = new G4PVPlacement(0, spacecraft_pos + HGADrive1_pos,
|
||||
"HGADrive_phys_o", HGADrive_log_o, wld_phys, false, 0);
|
||||
HGADrive_phys_o = new G4PVPlacement(0, spacecraft_pos + HGADrive2_pos,
|
||||
"HGADrive_phys_o", HGADrive_log_o, wld_phys, false, 1);
|
||||
f = pow(1.-1.00/(2.70*100*100*100)*1E6, 1./3.);
|
||||
G4Box* HGADrive_box_i = new G4Box("HGADrive_box_i",
|
||||
f*0.5*100.*mm, f*0.5*100.*mm, f*0.5*100.*mm);
|
||||
G4LogicalVolume* HGADrive_log_i = new G4LogicalVolume
|
||||
(HGADrive_box_i, vacuum, "HGADrive_log_i");
|
||||
G4VPhysicalVolume* HGADrive_phys_i = new G4PVPlacement
|
||||
(0, 0, "HGADrive_phys_i", HGADrive_log_i, HGADrive_phys_o, false, 0);
|
||||
//
|
||||
//
|
||||
G4Box* InterfelEL_box_o = new G4Box("InterfelEL_box_o",
|
||||
0.5*200.*mm, 0.5*200.*mm, 0.5*150.*mm);
|
||||
G4LogicalVolume* InterfelEL_log_o = new G4LogicalVolume
|
||||
(InterfelEL_box_o, Al6061, "InterfelEL_log_o");
|
||||
G4VPhysicalVolume* InterfelEL_phys_o;
|
||||
InterfelEL_phys_o = new G4PVPlacement(0, spacecraft_pos + InterfelEL1_pos,
|
||||
"InterfelEL_phys_o", InterfelEL_log_o, wld_phys, false, 0);
|
||||
InterfelEL_phys_o = new G4PVPlacement(0, spacecraft_pos + InterfelEL2_pos,
|
||||
"InterfelEL_phys_o", InterfelEL_log_o, wld_phys, false, 1);
|
||||
f = pow(1.-3.50/(2.70*200*200*150)*1E6, 1./3.);
|
||||
G4Box* InterfelEL_box_i = new G4Box("InterfelEL_box_i",
|
||||
f*0.5*200.*mm, f*0.5*200.*mm, f*0.5*150.*mm);
|
||||
G4LogicalVolume* InterfelEL_log_i = new G4LogicalVolume
|
||||
(InterfelEL_box_i, vacuum, "InterfelEL_log_i");
|
||||
G4VPhysicalVolume* InterfelEL_phys_i = new G4PVPlacement(0, 0,
|
||||
"InterfelEL_phys_i", InterfelEL_log_i, InterfelEL_phys_o, false, 0);
|
||||
//
|
||||
//
|
||||
G4Box* LaserEL_box_o = new G4Box("LaserEL_box_o",
|
||||
0.5*200.*mm, 0.5*200.*mm, 0.5*100.*mm);
|
||||
G4LogicalVolume* LaserEL_log_o = new G4LogicalVolume
|
||||
(LaserEL_box_o, Al6061, "LaserEL_log_o");
|
||||
G4VPhysicalVolume* LaserEL_phys_o;
|
||||
LaserEL_phys_o = new G4PVPlacement(G4Transform3D
|
||||
(EB_rot1, spacecraft_pos + LaserEL1_pos),
|
||||
"LaserEL_phys_o", LaserEL_log_o, wld_phys, false, 0);
|
||||
LaserEL_phys_o = new G4PVPlacement(G4Transform3D
|
||||
(EB_rot2, spacecraft_pos + LaserEL2_pos),
|
||||
"LaserEL_phys_o", LaserEL_log_o, wld_phys, false, 1);
|
||||
f = pow(1.-3.00/(2.70*200*200*100)*1E6, 1./3.);
|
||||
G4Box* LaserEL_box_i = new G4Box("LaserEL_box_i",
|
||||
f*0.5*200.*mm, f*0.5*200.*mm, f*0.5*100.*mm);
|
||||
G4LogicalVolume* LaserEL_log_i = new G4LogicalVolume
|
||||
(LaserEL_box_i, vacuum, "LaserEL_log_i");
|
||||
G4VPhysicalVolume* LaserEL_phys_i = new G4PVPlacement
|
||||
(0, 0, "LaserEL_phys_i", LaserEL_log_i, LaserEL_phys_o, false, 0);
|
||||
//
|
||||
//
|
||||
G4Box* LaserHead_box_o = new G4Box("LaserHead_box_o",
|
||||
0.5*100.*mm, 0.5*100.*mm, 0.5*50.*mm);
|
||||
G4LogicalVolume* LaserHead_log_o = new G4LogicalVolume
|
||||
(LaserHead_box_o, Al6061, "LaserHead_log_o");
|
||||
G4VPhysicalVolume* LaserHead_phys_o;
|
||||
LaserHead_phys_o = new G4PVPlacement(G4Transform3D
|
||||
(EB_rot3, spacecraft_pos + LaserHead1_pos),
|
||||
"LaserHead_phys_o", LaserHead_log_o, wld_phys, false, 0);
|
||||
LaserHead_phys_o = new G4PVPlacement(G4Transform3D
|
||||
(EB_rot3, spacecraft_pos + LaserHead2_pos),
|
||||
"LaserHead_phys_o", LaserHead_log_o, wld_phys, false, 1);
|
||||
LaserHead_phys_o = new G4PVPlacement(G4Transform3D
|
||||
(EB_rot4, spacecraft_pos + LaserHead3_pos),
|
||||
"LaserHead_phys_o", LaserHead_log_o, wld_phys, false, 2);
|
||||
LaserHead_phys_o = new G4PVPlacement(G4Transform3D
|
||||
(EB_rot4, spacecraft_pos + LaserHead4_pos),
|
||||
"LaserHead_phys_o", LaserHead_log_o, wld_phys, false, 3);
|
||||
f = pow(1.-0.70/(2.70*100*100*50)*1E6, 1./3.);
|
||||
G4Box* LaserHead_box_i = new G4Box("LaserHead_box_i",
|
||||
f*0.5*100.*mm, f*0.5*100.*mm, f*0.5*50.*mm);
|
||||
G4LogicalVolume* LaserHead_log_i = new G4LogicalVolume
|
||||
(LaserHead_box_i, vacuum, "LaserHead_log_i");
|
||||
G4VPhysicalVolume* LaserHead_phys_i = new G4PVPlacement
|
||||
(0, 0, "LaserHead_phys_i", LaserHead_log_i, LaserHead_phys_o, false, 0);
|
||||
//
|
||||
//
|
||||
G4Box* StarTrack_U_box_o = new G4Box("StarStrack_box_o",
|
||||
0.5*50.*mm, 0.5*50.*mm, 0.5*54.*mm);
|
||||
G4LogicalVolume* StarTrack_U_log_o = new G4LogicalVolume
|
||||
(StarTrack_U_box_o, Al6061, "StarTrack_log_o");
|
||||
G4VPhysicalVolume* StarTrack_U_phys_o;
|
||||
StarTrack_U_phys_o = new G4PVPlacement(0, spacecraft_pos + StarTrack1_pos,
|
||||
"STarTrack_phys_o", StarTrack_U_log_o, wld_phys, false, 0);
|
||||
StarTrack_U_phys_o = new G4PVPlacement(0, spacecraft_pos + StarTrack2_pos,
|
||||
"STarTrack_phys_o", StarTrack_U_log_o, wld_phys, false, 1);
|
||||
f = pow(1.-0.30/(2.70*50*50*54)*1E6, 1./3.);
|
||||
G4Box* StarTrack_U_box_i = new G4Box("StarTrack_U_box_i",
|
||||
f*0.5*50.*mm, f*0.5*50.*mm, f*0.5*54.*mm);
|
||||
G4LogicalVolume* StarTrack_U_log_i = new G4LogicalVolume
|
||||
(StarTrack_U_box_i, vacuum, "StarTrack_U_log_i");
|
||||
G4VPhysicalVolume* StarTrack_U_phys_i = new G4PVPlacement(0, 0,
|
||||
"StarTrack_U_phys_i", StarTrack_U_log_i, StarTrack_U_phys_o, false, 0);
|
||||
//
|
||||
//
|
||||
G4Box* Transpond2_box_o = new G4Box("Transpond2_box_o",
|
||||
0.5*220.*mm, 0.5*184.*mm, 0.5*178.*mm);
|
||||
G4LogicalVolume* Transpond2_log_o = new G4LogicalVolume
|
||||
(Transpond2_box_o, Al6061, "Transpond2_log_o");
|
||||
G4VPhysicalVolume* Transpond2_phys_o = new G4PVPlacement(G4Transform3D
|
||||
(EB_rot2, spacecraft_pos + Transpond2_pos),
|
||||
"Transpond2_phys_o", Transpond2_log_o, wld_phys, false, 0);
|
||||
f = pow(1.-3.50/(2.70*220*184*178)*1E6, 1./3.);
|
||||
G4Box* Transpond2_box_i = new G4Box("Transpond2_box_i",
|
||||
f*0.5*220.*mm, f*0.5*184.*mm, f*0.5*178.*mm);
|
||||
G4LogicalVolume* Transpond2_log_i = new G4LogicalVolume
|
||||
(Transpond2_box_i, vacuum, "Transpond2_log_i");
|
||||
G4VPhysicalVolume* Transpond2_phys_i = new G4PVPlacement(0, 0,
|
||||
"Transpond2_phys_i", Transpond2_log_i, Transpond2_phys_o, false, 0);
|
||||
|
||||
|
||||
// vis Attributes
|
||||
|
||||
EPC_log_o->SetVisAttributes(sol_blue_vat);
|
||||
GyroPack_log_o->SetVisAttributes(sol_blue_vat);
|
||||
InstConE_log_o->SetVisAttributes(sol_blue_vat);
|
||||
RFDU_log_o->SetVisAttributes(sol_blue_vat);
|
||||
StarTrack_L_log_o->SetVisAttributes(sol_blue_vat);
|
||||
STElec_log_o->SetVisAttributes(sol_blue_vat);
|
||||
TWT_log_o->SetVisAttributes(sol_blue_vat);
|
||||
UVBox_log_o->SetVisAttributes(sol_blue_vat);
|
||||
|
||||
PCDU_log_o->SetVisAttributes(sol_lblue_vat);
|
||||
CentELCPS_log_o->SetVisAttributes(sol_lblue_vat);
|
||||
CentEL2_log_o->SetVisAttributes(sol_lblue_vat);
|
||||
FEEPEL_log_o->SetVisAttributes(sol_lblue_vat);
|
||||
HGADrive_log_o->SetVisAttributes(sol_lblue_vat);
|
||||
InterfelEL_log_o->SetVisAttributes(sol_lblue_vat);
|
||||
LaserEL_log_o->SetVisAttributes(sol_lblue_vat);
|
||||
LaserHead_log_o->SetVisAttributes(sol_lblue_vat);
|
||||
StarTrack_U_log_o->SetVisAttributes(sol_lblue_vat);
|
||||
Transpond2_log_o->SetVisAttributes(sol_lblue_vat);
|
||||
|
||||
|
||||
|
||||
// **************************************************************************
|
||||
|
||||
|
||||
@@ -0,0 +1,211 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// ********************************************************************
|
||||
// * *
|
||||
// * cosmicray_charging advanced example for Geant4 *
|
||||
// * (adapted simulation of test-mass charging in the LISA mission) *
|
||||
// * *
|
||||
// * Henrique Araujo (h.araujo@imperial.ac.uk) & Peter Wass *
|
||||
// * Imperial College London *
|
||||
// * *
|
||||
// * LISAEventAction class *
|
||||
// * *
|
||||
// ********************************************************************
|
||||
//
|
||||
// HISTORY
|
||||
// 22/02/2004: migrated from LISA-V04
|
||||
//
|
||||
// ********************************************************************
|
||||
|
||||
|
||||
#include "LISAEventAction.hh"
|
||||
|
||||
#include "LISAPrimaryGeneratorAction.hh"
|
||||
#include "LISASteppingAction.hh"
|
||||
|
||||
#ifdef G4ANALYSIS_USE
|
||||
#include "LISAAnalysisManager.hh"
|
||||
#endif
|
||||
|
||||
#include "G4Event.hh"
|
||||
#include "G4EventManager.hh"
|
||||
#include "G4TrajectoryContainer.hh"
|
||||
#include "G4Trajectory.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4VVisManager.hh"
|
||||
#include "G4UImanager.hh"
|
||||
#include "G4Polyline.hh"
|
||||
#include "G4Colour.hh"
|
||||
#include "G4VisAttributes.hh"
|
||||
#include "G4UnitsTable.hh"
|
||||
#include "G4ios.hh"
|
||||
|
||||
#include <fstream>
|
||||
#include <iomanip>
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
LISAEventAction::LISAEventAction(LISAPrimaryGeneratorAction* generatorAction,
|
||||
LISASteppingAction* steppingAction)
|
||||
: genAction(generatorAction),stepAction(steppingAction) {
|
||||
|
||||
energy_pri = 0;
|
||||
charge_in[0] = 0;
|
||||
charge_in[1] = 0;
|
||||
charge_out[0] = 0;
|
||||
charge_out[1] = 0;
|
||||
charge_tot[0] = 0;
|
||||
charge_tot[1] = 0;
|
||||
seeds = NULL;
|
||||
filename = G4String();
|
||||
|
||||
}
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
LISAEventAction::~LISAEventAction() {;}
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
void LISAEventAction::BeginOfEventAction(const G4Event* evt) {
|
||||
|
||||
// reset event charges
|
||||
stepAction->Discharge();
|
||||
|
||||
// grab event seeds
|
||||
seeds = genAction->GetEventSeeds();
|
||||
// G4cout << " 1st seed: " << *seeds << G4endl;;
|
||||
// G4cout << " 2nd seed: " << *(seeds+1) << G4endl;
|
||||
// HepRandom::showEngineStatus();
|
||||
|
||||
// grab energy of primary
|
||||
energy_pri = genAction->GetEnergyPrimary();
|
||||
|
||||
event_id = evt->GetEventID();
|
||||
if(event_id%1000==0 || (event_id%100==0 && event_id<1000))
|
||||
G4cout << "\n---> Begin of event: " << event_id << G4endl;
|
||||
|
||||
}
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
void LISAEventAction::EndOfEventAction(const G4Event* evt) {
|
||||
|
||||
|
||||
// Look at TM0 and TM1
|
||||
for(int tm=0; tm<=1; ++tm) {
|
||||
|
||||
charge_in[tm] = stepAction->GetChargeIn(tm);
|
||||
charge_out[tm] = stepAction->GetChargeOut(tm);
|
||||
charge_tot[tm] = charge_in[tm] - charge_out[tm];
|
||||
|
||||
// save if changed
|
||||
if(charge_tot[tm]) {
|
||||
|
||||
// printout
|
||||
G4cout << " *** Evt: " << event_id
|
||||
<< "\tTM: " << tm
|
||||
<< "\tE: " << energy_pri
|
||||
<< "\tQnet: " << charge_tot[tm]
|
||||
<< "\tQin: " << charge_in[tm]
|
||||
<< "\tQout: " << charge_out[tm]
|
||||
<< G4endl;
|
||||
|
||||
// append to file
|
||||
std::ofstream chargefile(filename,std::ios::app);
|
||||
chargefile << event_id << "\t"
|
||||
<< tm << "\t"
|
||||
<< energy_pri << "\t"
|
||||
<< charge_tot[tm] << "\t"
|
||||
<< charge_in[tm] << "\t"
|
||||
<< charge_out[tm] << "\t"
|
||||
<< *seeds << "\t"
|
||||
<< *(seeds+1) << "\t"
|
||||
<< G4endl;
|
||||
|
||||
// Write event information to HBOOK NTuple if using analysis
|
||||
#ifdef G4ANALYSIS_USE
|
||||
LISAAnalysisManager* analysis = LISAAnalysisManager::getInstance();
|
||||
analysis->analyseRun(event_id,
|
||||
tm,
|
||||
energy_pri,
|
||||
charge_tot[tm],
|
||||
charge_in[tm],
|
||||
charge_out[tm],
|
||||
*seeds,
|
||||
*(seeds+1));
|
||||
#endif
|
||||
|
||||
} // if(charge_tot[tm])
|
||||
|
||||
} // for(int tm=0; tm<=1; ++tm)
|
||||
|
||||
|
||||
|
||||
// draw trajectories
|
||||
// colours by particle type
|
||||
G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance();
|
||||
if(pVVisManager) {
|
||||
|
||||
G4TrajectoryContainer* trajectoryContainer = evt->GetTrajectoryContainer();
|
||||
G4int n_trajectories = 0;
|
||||
if (trajectoryContainer)
|
||||
n_trajectories = trajectoryContainer->entries();
|
||||
|
||||
for (G4int i=0; i<n_trajectories; i++) {
|
||||
G4Trajectory* trj = 0;
|
||||
trj = dynamic_cast<G4Trajectory*>((*trajectoryContainer)[i]);
|
||||
|
||||
G4String name = trj->GetParticleDefinition()->GetParticleName();
|
||||
G4Colour colour = G4Colour(1.0, 1.0, 1.0);
|
||||
G4Polyline pPolyline;
|
||||
|
||||
if (trj) {
|
||||
|
||||
for (int i=0; i<trj->GetPointEntries(); i++)
|
||||
pPolyline.push_back( trj->GetPoint(i)->GetPosition() );
|
||||
|
||||
if(name=="proton") colour=G4Colour(0.0, 0.0, 1.0);
|
||||
else if(name=="alpha") colour=G4Colour(0.0, 0.0, 0.5);
|
||||
else if(name=="He3") colour=G4Colour(1.0, 0.0, 1.0);
|
||||
else if(name=="pi+") colour=G4Colour(0.5, 0.5, 0.5);
|
||||
else if(name=="pi-") colour=G4Colour(0.5, 0.5, 0.5);
|
||||
else if(name=="e+") colour=G4Colour(0.0, 1.0, 1.0);
|
||||
else if(name=="e-") colour=G4Colour(1.0, 0.0, 0.0);
|
||||
else if(name=="gamma") colour=G4Colour(0.0, 1.0, 0.0);
|
||||
else if(name=="neutron") colour=G4Colour(1.0, 1.0, 0.0);
|
||||
else colour=G4Colour(1.0, 1.0, 1.0);
|
||||
|
||||
G4VisAttributes attribs(colour);
|
||||
pPolyline.SetVisAttributes(attribs);
|
||||
if(pVVisManager) pVVisManager->Draw(pPolyline);
|
||||
|
||||
} else
|
||||
G4cerr << "EndOfEventAction: Failed to dynamic cast to G4Trajectory!"
|
||||
<< G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,247 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// ********************************************************************
|
||||
// * *
|
||||
// * cosmicray_charging advanced example for Geant4 *
|
||||
// * (adapted simulation of test-mass charging in the LISA mission) *
|
||||
// * *
|
||||
// * Henrique Araujo (h.araujo@imperial.ac.uk) & Peter Wass *
|
||||
// * Imperial College London *
|
||||
// * *
|
||||
// * LISADetectorConstruction class *
|
||||
// * *
|
||||
// ********************************************************************
|
||||
//
|
||||
// HISTORY
|
||||
// 22/02/2004: migrated from LISA-V04
|
||||
//
|
||||
// ********************************************************************
|
||||
|
||||
|
||||
// **************************************************************************
|
||||
// Inertial Sensors: YZ-Injection, 46 mm Test Mass
|
||||
// LISA Inertial Sensor Design Report LTP-RT-CGS-001, issue 2
|
||||
//***************************************************************************
|
||||
|
||||
|
||||
// Molybdenum cage (electrode housing)
|
||||
G4double cage_o = 75.0*mm;
|
||||
G4double cage_i_x = 53.8*mm;
|
||||
G4double cage_i_y = 51.6*mm;
|
||||
G4double cage_i_z = 52.8*mm;
|
||||
|
||||
// Molybdenum disks (top and bottom)
|
||||
G4double disk_thi = 3.0*mm;
|
||||
G4double disk_id = 12.0*mm;
|
||||
G4double disk_od = 60.0*mm;
|
||||
G4double disk_off = 0.5*cage_o+0.5*disk_thi;
|
||||
|
||||
// SHAPAL electrode supports
|
||||
G4double elecsupp_x_thi = 6.5*mm;
|
||||
G4double elecsupp_y_thi = 7.6*mm;
|
||||
G4double elecsupp_yi_thi = 6.5*mm;
|
||||
G4double elecsupp_z_thi = 7.0*mm;
|
||||
G4double elecsupp_zi_thi = 6.5*mm;
|
||||
|
||||
|
||||
// gold plating thickness
|
||||
G4double elec_thi = 0.300*micrometer;
|
||||
|
||||
// electrodes (x faces)
|
||||
G4double elec_x_xoff = 0.5*cage_i_x + 0.5*elecsupp_x_thi + elec_thi;
|
||||
G4double elec_x_y = 14.5*mm, elec_x_z = 36.0*mm;
|
||||
G4double elec_x_yoff = 10.*mm;
|
||||
// electrodes (y faces)
|
||||
G4double elec_y_yoff = 0.5*cage_i_y + 0.5*elecsupp_y_thi + elec_thi;
|
||||
G4double elec_y_x = 38.2*mm, elec_y_z = 7.1*mm;
|
||||
G4double elec_y_zoff = 15.*mm;
|
||||
// electrodes (y injection)
|
||||
G4double elec_yi_yoff = 0.5*cage_i_y + 0.5*elecsupp_yi_thi + elec_thi;
|
||||
G4double elec_yi_x = 38.2*mm, elec_yi_z = 16.0*mm;
|
||||
// electrodes (z faces)
|
||||
G4double elec_z_zoff = 0.5*cage_i_z + 0.5*elecsupp_z_thi + elec_thi;
|
||||
G4double elec_z_x = 6.5*mm, elec_z_y = 37.0*mm;
|
||||
// electrodes (z injection)
|
||||
G4double elec_zi_x = 16.0*mm;
|
||||
G4double elec_zi_y = 12.0*mm;
|
||||
G4double elec_zi_zoff = 0.5*cage_i_z + 0.5*elecsupp_zi_thi + elec_thi;
|
||||
G4double elec_zi_yoff = 12.*mm;
|
||||
|
||||
// Test Mass
|
||||
G4double tmass_len = 46.0*mm;
|
||||
|
||||
|
||||
|
||||
|
||||
// Molybdenum cage **********************************************************
|
||||
G4Box* cage_o_sol = new G4Box("cage_o_sol", .5*cage_o, .5*cage_o, .5*cage_o);
|
||||
G4LogicalVolume* cage_o_log =
|
||||
new G4LogicalVolume(cage_o_sol, molybdenum, "cage_o_log");
|
||||
G4VPhysicalVolume* cage_o_phys = new G4PVPlacement(0, G4ThreeVector(),
|
||||
"cage_o_phys", cage_o_log, SensorHousing_i_phys, false, 0);
|
||||
cage_o_log->SetVisAttributes(lgreen_vat);
|
||||
// cage_o_log->SetVisAttributes(G4VisAttributes::Invisible);
|
||||
|
||||
// 0.3 um gold plating
|
||||
G4Box* goldplating_sol = new G4Box("goldplating_sol",
|
||||
0.5*cage_i_x+elec_thi, 0.5*cage_i_y+elec_thi, 0.5*cage_i_z+elec_thi);
|
||||
G4LogicalVolume* goldplating_log =
|
||||
new G4LogicalVolume(goldplating_sol, gold, "goldplating_log");
|
||||
G4VPhysicalVolume* goldplating_phys = new G4PVPlacement(0, G4ThreeVector(),
|
||||
"goldplating_phys", goldplating_log, cage_o_phys, false, 0);
|
||||
goldplating_log->SetVisAttributes(yellow_vat);
|
||||
|
||||
// Inside cage
|
||||
G4Box* cage_i_sol =
|
||||
new G4Box("cage_i_sol", .5*cage_i_x, .5*cage_i_y, .5*cage_i_z);
|
||||
G4LogicalVolume* cage_i_log =
|
||||
new G4LogicalVolume(cage_i_sol, vacuum, "cage_i_log");
|
||||
G4VPhysicalVolume* cage_i_phys = new G4PVPlacement(0, G4ThreeVector(),
|
||||
"cage_i_phys", cage_i_log, goldplating_phys, false, 0);
|
||||
cage_i_log->SetVisAttributes(white_vat);
|
||||
|
||||
|
||||
// Molybdenum disks *********************************************************
|
||||
G4Tubs* disk_sol = new G4Tubs("disk_sol", 0.5*disk_id, 0.5*disk_od,
|
||||
0.5*disk_thi, 0., 360.*deg);
|
||||
G4LogicalVolume* disk_log =
|
||||
new G4LogicalVolume(disk_sol, molybdenum, "disk_log");
|
||||
G4VPhysicalVolume* disk_phys;
|
||||
disk_phys = new G4PVPlacement(0, G4ThreeVector(0,0,+disk_off),
|
||||
"disk_phys", disk_log, SensorHousing_i_phys, false, 0);
|
||||
disk_phys = new G4PVPlacement(0, G4ThreeVector(0,0,-disk_off),
|
||||
"disk_phys", disk_log, SensorHousing_i_phys, false, 1);
|
||||
disk_log->SetVisAttributes(lgreen_vat);
|
||||
// disk_log->SetVisAttributes(G4VisAttributes::Invisible);
|
||||
|
||||
|
||||
|
||||
// electrodes (x faces) *****************************************************
|
||||
G4Box* elecsupp_x_sol =
|
||||
new G4Box("elecsupp_x_sol", 0.5*elecsupp_x_thi,0.5*elec_x_y,0.5*elec_x_z);
|
||||
G4LogicalVolume* elecsupp_x_log =
|
||||
new G4LogicalVolume(elecsupp_x_sol, SHAPAL, "elecsupp_x_log");
|
||||
G4VPhysicalVolume* elecsupp_x_phys;
|
||||
elecsupp_x_phys = new G4PVPlacement(0,
|
||||
G4ThreeVector(+elec_x_xoff,-elec_x_yoff,0),
|
||||
"elecsupp_x_phys", elecsupp_x_log, cage_o_phys, false, 0);
|
||||
elecsupp_x_phys = new G4PVPlacement(0,
|
||||
G4ThreeVector(+elec_x_xoff,+elec_x_yoff,0),
|
||||
"elecsupp_x_phys", elecsupp_x_log, cage_o_phys, false, 1);
|
||||
elecsupp_x_phys = new G4PVPlacement(0,
|
||||
G4ThreeVector(-elec_x_xoff,-elec_x_yoff,0),
|
||||
"elecsupp_x_phys", elecsupp_x_log, cage_o_phys, false, 2);
|
||||
elecsupp_x_phys = new G4PVPlacement(0,
|
||||
G4ThreeVector(-elec_x_xoff,+elec_x_yoff,0),
|
||||
"elecsupp_x_phys", elecsupp_x_log, cage_o_phys, false, 3);
|
||||
|
||||
|
||||
// electrodes (y faces) *****************************************************
|
||||
G4Box* elecsupp_y_sol =
|
||||
new G4Box("elecsupp_y_sol", 0.5*elec_y_x,0.5*elecsupp_y_thi,0.5*elec_y_z);
|
||||
G4LogicalVolume* elecsupp_y_log =
|
||||
new G4LogicalVolume(elecsupp_y_sol, SHAPAL, "elecsupp_y_log");
|
||||
G4VPhysicalVolume* elecsupp_y_phys;
|
||||
elecsupp_y_phys = new G4PVPlacement(0,
|
||||
G4ThreeVector(0,+elec_y_yoff,-elec_y_zoff),
|
||||
"elecsupp_y_phys", elecsupp_y_log, cage_o_phys, false, 0);
|
||||
elecsupp_y_phys = new G4PVPlacement(0,
|
||||
G4ThreeVector(0,+elec_y_yoff,+elec_y_zoff),
|
||||
"elecsupp_y_phys", elecsupp_y_log, cage_o_phys, false, 1);
|
||||
elecsupp_y_phys = new G4PVPlacement(0,
|
||||
G4ThreeVector(0,-elec_y_yoff,-elec_y_zoff),
|
||||
"elecsupp_y_phys", elecsupp_y_log, cage_o_phys, false, 2);
|
||||
elecsupp_y_phys = new G4PVPlacement(0,
|
||||
G4ThreeVector(0,-elec_y_yoff,+elec_y_zoff),
|
||||
"elecsupp_y_phys", elecsupp_y_log, cage_o_phys, false, 3);
|
||||
|
||||
// y injection
|
||||
G4Box* elecsupp_yi_sol =
|
||||
new G4Box("elecsupp_yi_sol",.5*elec_yi_x,.5*elecsupp_yi_thi,.5*elec_yi_z);
|
||||
G4LogicalVolume* elecsupp_yi_log =
|
||||
new G4LogicalVolume(elecsupp_yi_sol, SHAPAL, "elecsupp_yi_log");
|
||||
G4VPhysicalVolume* elecsupp_yi_phys;
|
||||
elecsupp_yi_phys = new G4PVPlacement(0, G4ThreeVector(0,+elec_yi_yoff,0),
|
||||
"elecsupp_yi_phys", elecsupp_yi_log, cage_o_phys, false, 0);
|
||||
elecsupp_yi_phys = new G4PVPlacement(0, G4ThreeVector(0,-elec_yi_yoff,0),
|
||||
"elecsupp_yi_phys", elecsupp_yi_log, cage_o_phys, false, 1);
|
||||
|
||||
|
||||
// electrodes (z faces) *****************************************************
|
||||
G4Box* elecsupp_z_sol =
|
||||
new G4Box("elecsupp_z_sol",.5*elec_z_x,.5*elec_z_y,.5*elecsupp_z_thi);
|
||||
G4LogicalVolume* elecsupp_z_log =
|
||||
new G4LogicalVolume(elecsupp_z_sol, SHAPAL, "elecsupp_z_log");
|
||||
G4VPhysicalVolume* elecsupp_z_phys;
|
||||
elecsupp_z_phys = new G4PVPlacement(0,
|
||||
G4ThreeVector(-elec_y_zoff,0,+elec_z_zoff),
|
||||
"elecsupp_y_phys", elecsupp_z_log, cage_o_phys, false, 0);
|
||||
elecsupp_z_phys = new G4PVPlacement(0,
|
||||
G4ThreeVector(+elec_y_zoff,0,+elec_z_zoff),
|
||||
"elecsupp_y_phys", elecsupp_z_log, cage_o_phys, false, 1);
|
||||
elecsupp_z_phys = new G4PVPlacement(0,
|
||||
G4ThreeVector(-elec_y_zoff,0,-elec_z_zoff),
|
||||
"elecsupp_y_phys", elecsupp_z_log, cage_o_phys, false, 2);
|
||||
elecsupp_z_phys = new G4PVPlacement(0,
|
||||
G4ThreeVector(+elec_y_zoff,0,-elec_z_zoff),
|
||||
"elecsupp_y_phys", elecsupp_z_log, cage_o_phys, false, 3);
|
||||
|
||||
// z injection
|
||||
G4Box* elecsupp_zi_sol =
|
||||
new G4Box("elecsupp_zi_sol",.5*elec_zi_x,.5*elec_zi_y,.5*elecsupp_zi_thi);
|
||||
G4LogicalVolume* elecsupp_zi_log =
|
||||
new G4LogicalVolume(elecsupp_zi_sol, SHAPAL, "elecsupp_zi_log");
|
||||
G4VPhysicalVolume* elecsupp_zi_phys;
|
||||
elecsupp_zi_phys=new G4PVPlacement(0,
|
||||
G4ThreeVector(0,-elec_zi_yoff,+elec_zi_zoff),
|
||||
"elecsupp_zi_phys", elecsupp_zi_log, cage_o_phys, false, 0);
|
||||
elecsupp_zi_phys=new G4PVPlacement(0,
|
||||
G4ThreeVector(0,+elec_zi_yoff,+elec_zi_zoff),
|
||||
"elecsupp_zi_phys", elecsupp_zi_log, cage_o_phys, false, 1);
|
||||
elecsupp_zi_phys=new G4PVPlacement(0,
|
||||
G4ThreeVector(0,-elec_zi_yoff,-elec_zi_zoff),
|
||||
"elecsupp_zi_phys", elecsupp_zi_log, cage_o_phys, false, 2);
|
||||
elecsupp_zi_phys=new G4PVPlacement(0,
|
||||
G4ThreeVector(0,+elec_zi_yoff,-elec_zi_zoff),
|
||||
"elecsupp_zi_phys", elecsupp_zi_log, cage_o_phys, false, 3);
|
||||
|
||||
// electrode vis attributes
|
||||
elecsupp_x_log ->SetVisAttributes(sol_white_vat);
|
||||
elecsupp_y_log ->SetVisAttributes(sol_white_vat);
|
||||
elecsupp_z_log ->SetVisAttributes(sol_white_vat);
|
||||
elecsupp_yi_log->SetVisAttributes(sol_orange_vat);
|
||||
elecsupp_zi_log->SetVisAttributes(sol_orange_vat);
|
||||
|
||||
|
||||
// Test Masses **************************************************************
|
||||
G4Box* tmass_sol =
|
||||
new G4Box("tmass_sol", 0.5*tmass_len, 0.5*tmass_len, 0.5*tmass_len);
|
||||
G4LogicalVolume* tmass_log =
|
||||
new G4LogicalVolume(tmass_sol, AuPt, "tmass_log");
|
||||
G4VPhysicalVolume* tmass_phys = new G4PVPlacement
|
||||
(0, G4ThreeVector(), "tmass_phys", tmass_log, cage_i_phys, false, 0);
|
||||
tmass_log->SetVisAttributes(sol_gold_vat);
|
||||
|
||||
|
||||
|
||||
//*****************************************************************************
|
||||
@@ -0,0 +1,643 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// ********************************************************************
|
||||
// * *
|
||||
// * cosmicray_charging advanced example for Geant4 *
|
||||
// * (adapted simulation of test-mass charging in the LISA mission) *
|
||||
// * *
|
||||
// * Henrique Araujo (h.araujo@imperial.ac.uk) & Peter Wass *
|
||||
// * Imperial College London *
|
||||
// * *
|
||||
// * LISADetectorConstruction class *
|
||||
// * *
|
||||
// ********************************************************************
|
||||
//
|
||||
// HISTORY
|
||||
// 22/02/2004: migrated from LISA-V04
|
||||
//
|
||||
// ********************************************************************
|
||||
|
||||
|
||||
//***************************************************************************
|
||||
// Interferometer Assembly
|
||||
//***************************************************************************
|
||||
// Payload Shield (Y Tube)
|
||||
// Telescope Light Shields
|
||||
// Telescope Electronics Mounting
|
||||
// Telescope Mirrors Mounting
|
||||
// Telescope Actuator Mechanism
|
||||
// Optical Bench Mounting
|
||||
// Optical Bench
|
||||
//***************************************************************************
|
||||
|
||||
|
||||
|
||||
//***************************************************************************
|
||||
// Payload Shield
|
||||
//***************************************************************************
|
||||
|
||||
// Y-tube
|
||||
G4double YTube_dia = 400.*mm;
|
||||
G4double YTube_thi = 5.*mm;
|
||||
G4double arm1_len = 900.*mm;
|
||||
G4double arm2_len = 900.*mm;
|
||||
G4double arm3_len = 900.*mm;
|
||||
// G4double YTube_xoff = -800.*mm;
|
||||
G4double tune_x = 800.*mm;
|
||||
G4double tune_y = 250.*mm;
|
||||
|
||||
// outer volumes
|
||||
G4Tubs* arm1_o_sol =
|
||||
new G4Tubs("arm1_o_sol", 0., 0.5*YTube_dia, 0.5*arm1_len, 0., 360.*deg);
|
||||
G4Tubs* arm2_o_sol =
|
||||
new G4Tubs("arm2_o_sol", 0., 0.5*YTube_dia, 0.5*arm2_len, 0., 360.*deg);
|
||||
G4Tubs* arm3_o_sol =
|
||||
new G4Tubs("arm3_o_sol", 0., 0.5*YTube_dia, 0.5*arm3_len, 0., 360.*deg);
|
||||
G4RotationMatrix ytube_rot1; ytube_rot1.rotateY(30.*deg);
|
||||
G4UnionSolid* uni1_o_sol = new G4UnionSolid("uni1_o_sol", arm1_o_sol,
|
||||
arm2_o_sol, G4Transform3D(ytube_rot1, G4ThreeVector(+tune_y,0,tune_x)));
|
||||
G4RotationMatrix ytube_rot2; ytube_rot2.rotateY(-30.*deg);
|
||||
G4UnionSolid* uni2_o_sol = new G4UnionSolid("uni2_o_sol", uni1_o_sol,
|
||||
arm3_o_sol, G4Transform3D(ytube_rot2, G4ThreeVector(-tune_y,0,tune_x)));
|
||||
G4LogicalVolume* arms_o_log =
|
||||
new G4LogicalVolume(uni2_o_sol, CFRP, "arms_o_log");
|
||||
G4RotationMatrix ytube_rot3;
|
||||
ytube_rot3.rotateX(90.*deg); ytube_rot3.rotateZ(90.*deg);
|
||||
G4VPhysicalVolume* arms_o_phys = new G4PVPlacement
|
||||
(G4Transform3D(ytube_rot3, spacecraft_pos + G4ThreeVector(YTube_xoff,0,0)),
|
||||
"arms_o_phys", arms_o_log, wld_phys, false, 0);
|
||||
arms_o_log->SetVisAttributes(yellow_vat);
|
||||
// inner volumes
|
||||
G4Tubs* arm1_i_sol = new G4Tubs("arm1_i_sol", 0., 0.5*YTube_dia-YTube_thi,
|
||||
0.5*arm1_len, 0.*deg, 360.*deg);
|
||||
G4Tubs* arm2_i_sol = new G4Tubs("arm2_i_sol", 0., 0.5*YTube_dia-YTube_thi,
|
||||
0.5*arm2_len, 0.*deg, 360.*deg);
|
||||
G4Tubs* arm3_i_sol = new G4Tubs("arm3_i_sol", 0., 0.5*YTube_dia-YTube_thi,
|
||||
0.5*arm3_len, 0.*deg, 360.*deg);
|
||||
G4UnionSolid* uni1_i_sol = new G4UnionSolid("uni1_i_sol", arm1_i_sol,
|
||||
arm2_i_sol, G4Transform3D(ytube_rot1, G4ThreeVector(+tune_y,0,tune_x)));
|
||||
G4UnionSolid* uni2_i_sol = new G4UnionSolid("uni2_i_sol", uni1_i_sol,
|
||||
arm3_i_sol, G4Transform3D(ytube_rot2, G4ThreeVector(-tune_y,0,tune_x)));
|
||||
G4LogicalVolume* arms_i_log =
|
||||
new G4LogicalVolume(uni2_i_sol, vacuum, "arms_i_log");
|
||||
G4VPhysicalVolume* arms_i_phys = new G4PVPlacement(0, G4ThreeVector(0,0,0),
|
||||
"arms_i_phys", arms_i_log, arms_o_phys, false, 0);
|
||||
arms_i_log->SetVisAttributes(yellow_vat);
|
||||
|
||||
|
||||
|
||||
// Telescope Light Shields: ~5.5 kg
|
||||
G4double TelShield_len = 730.*mm;
|
||||
G4double TelShield_dia = 370.*mm;
|
||||
G4double TelShield_thi = 5.*mm;
|
||||
G4double TelShield_yoff = 663.*mm;
|
||||
G4double TelShield_xoff = 1511.*mm;
|
||||
G4double TelShieldCutout_len = 2000.*mm;
|
||||
G4double TelShieldCutout_off = 1000.*mm;
|
||||
|
||||
G4Tubs* TelShield_tub = new G4Tubs("TelShield_sol", 0.5*TelShield_dia -
|
||||
TelShield_thi, 0.5*TelShield_dia, 0.5*TelShield_len, 0., 360.*deg);
|
||||
G4Box* TelShieldCutout_box = new G4Box("TelShieldCutout_box",
|
||||
0.5*TelShieldCutout_len, 0.5*TelShieldCutout_len, 0.5*TelShieldCutout_len);
|
||||
G4RotationMatrix ytube_rot4; ytube_rot4.rotateX(-30.*deg);
|
||||
G4SubtractionSolid* TelShield_sol = new G4SubtractionSolid("TelShield_sol",
|
||||
TelShield_tub, TelShieldCutout_box, G4Transform3D(ytube_rot4,
|
||||
G4ThreeVector(0,0,-0.5*TelShield_len-TelShieldCutout_off)));
|
||||
G4LogicalVolume* TelShield_log =
|
||||
new G4LogicalVolume(TelShield_sol, CFRP, "TelShield_log");
|
||||
G4VPhysicalVolume* TelShield_phys;
|
||||
G4RotationMatrix telsh_rot1; telsh_rot1.rotateY(-90.*deg);
|
||||
telsh_rot1.rotateX(90.*deg); telsh_rot1.rotateZ(-30.*deg);
|
||||
TelShield_phys = new G4PVPlacement(G4Transform3D(telsh_rot1,
|
||||
spacecraft_pos+G4ThreeVector(YTube_xoff+TelShield_xoff,-TelShield_yoff,0)),
|
||||
"TelShield_phys", TelShield_log, wld_phys, false, 0);
|
||||
G4RotationMatrix telsh_rot2; telsh_rot2.rotateY(-90.*deg);
|
||||
telsh_rot2.rotateX(90.*deg); telsh_rot2.rotateZ(+30.*deg);
|
||||
TelShield_phys = new G4PVPlacement(G4Transform3D(telsh_rot2,
|
||||
spacecraft_pos+G4ThreeVector(YTube_xoff+TelShield_xoff,+TelShield_yoff,0)),
|
||||
"TelShield_phys", TelShield_log, wld_phys, false, 1);
|
||||
TelShield_log->SetVisAttributes(green_vat);
|
||||
|
||||
|
||||
|
||||
// Telescope actuator: 1.8 kg
|
||||
// includes mass of Al arms
|
||||
G4double TelActuatorCyl_dia = 76.*mm;
|
||||
G4double TelActuatorCyl_len = 147.*mm;
|
||||
// Actuator mount: 0.45 kg
|
||||
G4double TelActuatorMount_hei = 147.*mm;
|
||||
G4double TelActuatorMount_wid = 120.*mm;
|
||||
G4double TelActuatorMount_thi = 7.5*mm;
|
||||
G4ThreeVector TelActuator_pos1(-100.*mm,0.,550.*mm);
|
||||
G4ThreeVector TelActuator_pos2( 100.*mm,0.,550.*mm);
|
||||
|
||||
// Telescope actuator 1: cylinder
|
||||
G4Tubs* TelActuatorCyl_sol = new G4Tubs("TelActuatorCyl_sol",
|
||||
0, 0.5*TelActuatorCyl_dia, 0.5*TelActuatorCyl_len, 0., 360.*deg);
|
||||
G4LogicalVolume* TelActuatorCyl_log =
|
||||
new G4LogicalVolume(TelActuatorCyl_sol, Al6061, "TelActuatorCyl_log");
|
||||
G4RotationMatrix act_rot1; act_rot1.rotateY(60.*deg);
|
||||
G4VPhysicalVolume* TelActuatorCyl_phys;
|
||||
TelActuatorCyl_phys = new G4PVPlacement(G4Transform3D(act_rot1,
|
||||
TelActuator_pos1), "TelActuatorCyl_phys", TelActuatorCyl_log,
|
||||
arms_i_phys, false, 0);
|
||||
TelActuatorCyl_log->SetVisAttributes(sol_red_vat);
|
||||
// Telescope actuator 1: mount
|
||||
G4Box* TelActuatorMount_box = new G4Box("TelActuatorMount_box",
|
||||
.5*TelActuatorMount_wid, .5*TelActuatorMount_hei, .5*TelActuatorMount_thi);
|
||||
G4SubtractionSolid* TelActuatorMount_sol = new G4SubtractionSolid
|
||||
("TelActuatorMount_sol", TelActuatorMount_box, TelActuatorCyl_sol,
|
||||
0, G4ThreeVector(0,0.5*TelActuatorMount_hei,0));
|
||||
G4LogicalVolume* TelActuatorMount_log =
|
||||
new G4LogicalVolume(TelActuatorMount_sol, TiAlloy, "TelActuatorMount_log");
|
||||
G4VPhysicalVolume* TelActuatorMount_phys;
|
||||
TelActuatorMount_phys = new G4PVPlacement(G4Transform3D(act_rot1,
|
||||
TelActuator_pos1 + G4ThreeVector(0,-0.5*TelActuatorMount_hei-2.*mm,0.)),
|
||||
"TelActuatorMount_phys", TelActuatorMount_log, arms_i_phys, false, 0);
|
||||
TelActuatorMount_log->SetVisAttributes(sol_yellow_vat);
|
||||
// Telescope actuator 2
|
||||
G4RotationMatrix act_rot2; act_rot2.rotateY(-60.*deg);
|
||||
TelActuatorCyl_phys = new G4PVPlacement(G4Transform3D
|
||||
(act_rot2, TelActuator_pos2), "TelActuatorCyl_phys",
|
||||
TelActuatorCyl_log, arms_i_phys, false, 1);
|
||||
TelActuatorMount_phys = new G4PVPlacement(G4Transform3D(act_rot2,
|
||||
TelActuator_pos2 + G4ThreeVector(0,-0.5*TelActuatorMount_hei-2.*mm,0.)),
|
||||
"TelActuatorMount_phys", TelActuatorMount_log, arms_i_phys, false, 1);
|
||||
|
||||
|
||||
|
||||
|
||||
//***************************************************************************
|
||||
// Telescope / GRS Assembly (in dummy wrapper volume)
|
||||
//***************************************************************************
|
||||
|
||||
|
||||
// Dummy (assembly) box for telescope
|
||||
G4double TelBox_len = 620.*mm;
|
||||
G4double TelBox_dia = 370.*mm;
|
||||
// Dummy (assembly) box for telescope
|
||||
G4Tubs* TelBox_sol =
|
||||
new G4Tubs("TelBox_sol", 0., 0.5*TelBox_dia, 0.5*TelBox_len, 0., 360.*deg);
|
||||
G4LogicalVolume* TelBox_log =
|
||||
new G4LogicalVolume(TelBox_sol, vacuum, "TelBox_log");
|
||||
G4VPhysicalVolume* TelBox_phys;
|
||||
TelBox_phys =
|
||||
new G4PVPlacement(G4Transform3D(tel_rot1, tel_pos1),
|
||||
"TelBox1_phys", TelBox_log, arms_i_phys, false, 0);
|
||||
TelBox_phys =
|
||||
new G4PVPlacement(G4Transform3D(tel_rot2, tel_pos2),
|
||||
"TelBox2_phys", TelBox_log, arms_i_phys, false, 1);
|
||||
// TelBox_log->SetVisAttributes(white_vat);
|
||||
TelBox_log->SetVisAttributes(G4VisAttributes::Invisible);
|
||||
|
||||
|
||||
// all z-offsets referred to TM centre
|
||||
// change OpticalBench_off to move telescope components along z-axis
|
||||
|
||||
// Optical Bench: 4.41 kg
|
||||
G4double OpticalBench_len = 350.0*mm;
|
||||
G4double OpticalBench_wid = 200.0*mm;
|
||||
G4double OpticalBench_thi = 40.0*mm;
|
||||
// Sensor Housing as in Solid Model
|
||||
// G4double OpticalBenchCutout_len = 170.0*mm + 1.*mm;
|
||||
// G4double OpticalBenchCutout_wid = 120.0*mm + 1.*mm;
|
||||
// Sensor Housing to fit LTP Sensor
|
||||
G4double OpticalBenchCutout_dia = 126.0*mm;
|
||||
G4double OpticalBenchCutout_thi = 100.0*mm;
|
||||
// G4double OpticalBench_off = 0.0*mm;
|
||||
|
||||
// Optical Bench
|
||||
G4Box* OpticalBench_box = new G4Box("OpticalBench_box",
|
||||
0.5*OpticalBench_wid, 0.5*OpticalBench_thi, 0.5*OpticalBench_len);
|
||||
// old design cutout
|
||||
// G4Box* OpticalBenchCutout_box = new G4Box("OpticalBenchCutout_box",
|
||||
// 0.5*OpticalBenchCutout_wid, 0.5*OpticalBenchCutout_thi,
|
||||
// 0.5*OpticalBenchCutout_len);
|
||||
// LTP design cutout
|
||||
G4Tubs* OpticalBenchCutout_box = new G4Tubs("OpticalBenchCutout_box",
|
||||
0., 0.5*OpticalBenchCutout_dia, 0.5*OpticalBenchCutout_thi, 0., 360.*deg);
|
||||
G4RotationMatrix cutout_rot; cutout_rot.rotateX(90.*deg);
|
||||
G4SubtractionSolid* OpticalBench_sol = new G4SubtractionSolid
|
||||
("OpticalBench_sol", OpticalBench_box, OpticalBenchCutout_box,
|
||||
G4Transform3D(cutout_rot, G4ThreeVector()));
|
||||
G4LogicalVolume* OpticalBench_log =
|
||||
new G4LogicalVolume(OpticalBench_sol, ULEglass, "OpticalBench_log");
|
||||
G4VPhysicalVolume* OpticalBench_phys=
|
||||
new G4PVPlacement(0, G4ThreeVector(0,0, OpticalBench_off),
|
||||
"OpticalBench_phys", OpticalBench_log, TelBox_phys, false, 0);
|
||||
OpticalBench_log->SetVisAttributes(sol_white_vat);
|
||||
|
||||
|
||||
// Support ring: 0.99 kg
|
||||
G4double SupportRing_od = 359.*mm;
|
||||
G4double SupportRing_dia_o = 23.*mm;
|
||||
G4double SupportRing_dia_i = 10.*mm;
|
||||
// Support yokes: 0.12 kg
|
||||
// also accounts for pivot mass
|
||||
G4double SupportYoke_thi = 5.*mm;
|
||||
G4double SupportYoke_dia = 15.*mm;
|
||||
G4double SupportYoke_len = 170.*mm;
|
||||
G4double SupportYoke_xoff = 122.*mm;
|
||||
G4double SupportYoke_yoff = 50.*mm;
|
||||
G4double SupportYoke_zoff = 90.*mm;
|
||||
|
||||
// Support ring
|
||||
G4Torus* SupportRing_sol = new G4Torus("SupportRing_sol",
|
||||
0.5*SupportRing_dia_i,0.5*SupportRing_dia_o,
|
||||
0.5*(SupportRing_od-SupportRing_dia_o), 0.,360.*deg);
|
||||
G4LogicalVolume* SupportRing_log =
|
||||
new G4LogicalVolume(SupportRing_sol, ULEglass, "SupportRing_log");
|
||||
G4VPhysicalVolume* SupportRing_phys=
|
||||
new G4PVPlacement(0, G4ThreeVector(0.,0.,OpticalBench_off),
|
||||
"SupportRing_phys", SupportRing_log, TelBox_phys, false, 0);
|
||||
SupportRing_log->SetVisAttributes(sol_red_vat);
|
||||
// Support yokes
|
||||
G4Tubs* SupportYoke_sol = new G4Tubs("SupportYoke_sol", 0.5*SupportYoke_dia
|
||||
- SupportYoke_thi, 0.5*SupportYoke_dia, 0.5*SupportYoke_len, 0., 360.*deg);
|
||||
G4LogicalVolume* SupportYoke_log =
|
||||
new G4LogicalVolume(SupportYoke_sol, TiAlloy, "SupportYoke_log");
|
||||
SupportYoke_log->SetVisAttributes(sol_red_vat);
|
||||
G4VPhysicalVolume* SupportYoke_phys;
|
||||
// upper
|
||||
G4RotationMatrix tel_rot3;
|
||||
tel_rot3.rotateX(+30.*deg); tel_rot3.rotateY(-10.*deg);
|
||||
SupportYoke_phys = new G4PVPlacement(G4Transform3D(tel_rot3,
|
||||
G4ThreeVector(+SupportYoke_xoff, +SupportYoke_yoff ,
|
||||
OpticalBench_off + SupportYoke_zoff)), "SupportYoke_phys",
|
||||
SupportYoke_log, TelBox_phys, false, 0);
|
||||
G4RotationMatrix tel_rot4;
|
||||
tel_rot4.rotateX(+30.*deg); tel_rot4.rotateY(+10.*deg);
|
||||
SupportYoke_phys = new G4PVPlacement(G4Transform3D(tel_rot4,
|
||||
G4ThreeVector(-SupportYoke_xoff, +SupportYoke_yoff ,
|
||||
OpticalBench_off + SupportYoke_zoff)), "SupportYoke_phys",
|
||||
SupportYoke_log, TelBox_phys, false, 1);
|
||||
G4RotationMatrix tel_rot5;
|
||||
tel_rot5.rotateX(-30.*deg); tel_rot5.rotateY(+10.*deg);
|
||||
SupportYoke_phys = new G4PVPlacement(G4Transform3D(tel_rot5,
|
||||
G4ThreeVector(+SupportYoke_xoff, +SupportYoke_yoff ,
|
||||
OpticalBench_off - SupportYoke_zoff)), "SupportYoke_phys",
|
||||
SupportYoke_log, TelBox_phys, false, 2);
|
||||
G4RotationMatrix tel_rot6;
|
||||
tel_rot6.rotateX(-30.*deg); tel_rot6.rotateY(-10.*deg);
|
||||
SupportYoke_phys = new G4PVPlacement(G4Transform3D(tel_rot6,
|
||||
G4ThreeVector(-SupportYoke_xoff, +SupportYoke_yoff ,
|
||||
OpticalBench_off - SupportYoke_zoff)), "SupportYoke_phys",
|
||||
SupportYoke_log, TelBox_phys, false, 3);
|
||||
// lower
|
||||
G4RotationMatrix tel_rot7;
|
||||
tel_rot7.rotateX(-30.*deg); tel_rot7.rotateY(-10.*deg);
|
||||
SupportYoke_phys = new G4PVPlacement(G4Transform3D(tel_rot7,
|
||||
G4ThreeVector(+SupportYoke_xoff, -SupportYoke_yoff ,
|
||||
OpticalBench_off + SupportYoke_zoff)), "SupportYoke_phys",
|
||||
SupportYoke_log, TelBox_phys, false, 4);
|
||||
G4RotationMatrix tel_rot8;
|
||||
tel_rot8.rotateX(-30.*deg); tel_rot8.rotateY(+10.*deg);
|
||||
SupportYoke_phys = new G4PVPlacement(G4Transform3D(tel_rot8,
|
||||
G4ThreeVector(-SupportYoke_xoff, -SupportYoke_yoff ,
|
||||
OpticalBench_off + SupportYoke_zoff)), "SupportYoke_phys",
|
||||
SupportYoke_log, TelBox_phys, false, 5);
|
||||
G4RotationMatrix tel_rot9;
|
||||
tel_rot9.rotateX(+30.*deg); tel_rot9.rotateY(+10.*deg);
|
||||
SupportYoke_phys = new G4PVPlacement(G4Transform3D(tel_rot9,
|
||||
G4ThreeVector(+SupportYoke_xoff, -SupportYoke_yoff ,
|
||||
OpticalBench_off - SupportYoke_zoff)), "SupportYoke_phys",
|
||||
SupportYoke_log, TelBox_phys, false, 6);
|
||||
G4RotationMatrix tel_rot10;
|
||||
tel_rot10.rotateX(+30.*deg); tel_rot10.rotateY(-10.*deg);
|
||||
SupportYoke_phys = new G4PVPlacement(G4Transform3D(tel_rot10,
|
||||
G4ThreeVector(-SupportYoke_xoff, -SupportYoke_yoff ,
|
||||
OpticalBench_off - SupportYoke_zoff)), "SupportYoke_phys",
|
||||
SupportYoke_log, TelBox_phys, false, 7);
|
||||
|
||||
|
||||
|
||||
// Shield tube: 3.66 kg
|
||||
G4double ShieldTube_len = 500.*mm;
|
||||
G4double ShieldTube_thi = 4.*mm;
|
||||
G4double ShieldTube_dia = 360.*mm + 2*ShieldTube_thi;
|
||||
G4double ShieldTube_off = 60.*mm;
|
||||
|
||||
// Shield tube
|
||||
G4Tubs* ShieldTube_sol = new G4Tubs("ShieldTube_sol",
|
||||
0.5*ShieldTube_dia-ShieldTube_thi, 0.5*ShieldTube_dia,
|
||||
0.5*ShieldTube_len, 0., 360.*deg);
|
||||
G4LogicalVolume* ShieldTube_log =
|
||||
new G4LogicalVolume(ShieldTube_sol, CFRP, "ShieldTube_log");
|
||||
G4VPhysicalVolume* ShieldTube_phys = new G4PVPlacement(0,
|
||||
G4ThreeVector(0,0,OpticalBench_off-ShieldTube_off),
|
||||
"ShieldTube_phys", ShieldTube_log, TelBox_phys, false, 0);
|
||||
ShieldTube_log->SetVisAttributes(G4VisAttributes::Invisible);
|
||||
|
||||
|
||||
|
||||
// Mounting rings: 0.78 kg
|
||||
G4double TelRing_dia = 360.0*mm;
|
||||
G4double TelRing_thi = 15.0*mm;
|
||||
G4double TelRing_len = 30.0*mm;
|
||||
G4double TelRing_off1 = 0.5*OpticalBench_len - 0.5*TelRing_len + 0.5*mm;
|
||||
G4double TelRing_off2 = 0.5*OpticalBench_len;
|
||||
|
||||
// Mounting rings
|
||||
G4Tubs* TelRing_sol =
|
||||
new G4Tubs("TelRing_sol", 0.5*TelRing_dia-TelRing_thi, 0.5*TelRing_dia,
|
||||
0.5*TelRing_len, 0., 360.*deg);
|
||||
G4LogicalVolume* TelRing_log =
|
||||
new G4LogicalVolume(TelRing_sol, CFRP, "TelRing_log");
|
||||
TelRing_log->SetVisAttributes(sol_white_vat);
|
||||
G4VPhysicalVolume* TelRing_phys;
|
||||
TelRing_phys = new G4PVPlacement(0, G4ThreeVector
|
||||
(0,0,OpticalBench_off - TelRing_off1),
|
||||
"TelRing_phys", TelRing_log, TelBox_phys, false, 0);
|
||||
// Electronics mounting ring
|
||||
TelRing_phys = new G4PVPlacement(0, G4ThreeVector
|
||||
(0,0,OpticalBench_off + TelRing_off2),
|
||||
"TelRing_phys", TelRing_log, TelBox_phys, false, 1);
|
||||
|
||||
|
||||
|
||||
// Shield/Mounting Plate: 1.54 kg
|
||||
G4double ShieldPlate_dia = 350.*mm;
|
||||
G4double ShieldPlate_thi = 10.*mm;
|
||||
G4double ShieldPlate_off = TelRing_off2 +
|
||||
0.5*(TelRing_len+ShieldPlate_thi) + 20.0*mm;
|
||||
// Shield/Mounting Plate
|
||||
G4Tubs* ShieldPlate_sol = new G4Tubs("ShieldPlate_sol",
|
||||
0., 0.5*ShieldPlate_dia, 0.5*ShieldPlate_thi, 0., 360.*deg);
|
||||
G4LogicalVolume* ShieldPlate_log =
|
||||
new G4LogicalVolume(ShieldPlate_sol, CFRP, "ShieldPlate_log");
|
||||
G4VPhysicalVolume* ShieldPlate_phys = new G4PVPlacement(0,
|
||||
G4ThreeVector(0,0,OpticalBench_off + ShieldPlate_off),
|
||||
"ShieldPlate_phys", ShieldPlate_log, TelBox_phys, false, 0);
|
||||
ShieldPlate_log->SetVisAttributes(sol_white_vat);
|
||||
|
||||
|
||||
|
||||
// Telescope electronics boxes: 0.36 kg
|
||||
G4double TelElecBox_wid = 100.0*mm;
|
||||
G4double TelElecBox_len = 90.0*mm;
|
||||
G4double TelElecBox_hei = 180.0*mm;
|
||||
G4double TelElecBoxes_sep = 150.0*mm;
|
||||
G4double TelElecBoxes_off = ShieldPlate_off +
|
||||
0.5*(ShieldPlate_thi + TelElecBox_len);
|
||||
|
||||
// Telescope electronics boxes
|
||||
G4Box* TelElecBox_sol = new G4Box("TelElecBox_sol", 0.5*TelElecBox_wid,
|
||||
0.5*TelElecBox_hei, 0.5*TelElecBox_len);
|
||||
G4LogicalVolume* TelElecBox_log =
|
||||
new G4LogicalVolume(TelElecBox_sol, Al6061, "TelElecBox_log");
|
||||
G4VPhysicalVolume* TelElecBox_phys;
|
||||
// Interferometer electronics
|
||||
TelElecBox_phys = new G4PVPlacement(0,
|
||||
G4ThreeVector(-0.5*TelElecBoxes_sep, 0,OpticalBench_off+TelElecBoxes_off),
|
||||
"TelElecBox_phys", TelElecBox_log, TelBox_phys, false, 0);
|
||||
TelElecBox_log->SetVisAttributes(sol_red_vat);
|
||||
// Accelerator electronics
|
||||
TelElecBox_phys = new G4PVPlacement(0,
|
||||
G4ThreeVector(0.5*TelElecBoxes_sep, 0, OpticalBench_off+TelElecBoxes_off),
|
||||
"TelElecBox_phys", TelElecBox_log, TelBox_phys, false, 1);
|
||||
// Each box is made from solid Al6061 from which a volume
|
||||
// s times smaller is removed to match assigned mass;
|
||||
G4double s = pow(1.-0.36/(2.70*TelElecBox_wid*TelElecBox_hei*TelElecBox_len)
|
||||
*1E6,1./3.);
|
||||
G4Box* TelElecBoxIn_sol = new G4Box("TelElecBoxIn_sol", s*0.5*TelElecBox_wid,
|
||||
s*0.5*TelElecBox_hei, s*0.5*TelElecBox_len);
|
||||
G4LogicalVolume* TelElecBoxIn_log =
|
||||
new G4LogicalVolume(TelElecBoxIn_sol, vacuum, "TelElecBoxIn_log");
|
||||
G4VPhysicalVolume* TelElecBoxIn_phys = new G4PVPlacement
|
||||
(0, 0, "TelElecBoxIn_i", TelElecBoxIn_log, TelElecBox_phys, false, 0);
|
||||
|
||||
|
||||
|
||||
// Front thermal shield: 0.15 kg
|
||||
G4double FrontThermalShield_dia = 350.*mm;
|
||||
G4double FrontThermalShield_thi = 1.*mm;
|
||||
G4double FrontThermalShield_hol = 25.*mm;
|
||||
G4double FrontThermalShield_roff = 30.*mm;
|
||||
G4double FrontThermalShield_off = TelRing_off1 + 0.5*TelRing_len
|
||||
+ 0.5*FrontThermalShield_thi + 20.0*mm;
|
||||
|
||||
// Front thermal shield
|
||||
G4Tubs* FrontThermalShield_tub = new G4Tubs("FrontThermalShield_tub",
|
||||
0., 0.5*FrontThermalShield_dia, 0.5*FrontThermalShield_thi, 0., 360.*deg);
|
||||
G4Tubs* FrontThermalShieldCutout_tub =
|
||||
new G4Tubs("FrontThermalShieldCutout_tub",
|
||||
0., 0.5*FrontThermalShield_hol, 2*FrontThermalShield_thi, 0., 360.*deg);
|
||||
G4SubtractionSolid* FrontThermalShield_sol =
|
||||
new G4SubtractionSolid("FrontThermalShield_sol", FrontThermalShield_tub,
|
||||
FrontThermalShieldCutout_tub, G4Transform3D(G4RotationMatrix(),
|
||||
G4ThreeVector(0,FrontThermalShield_roff,0)));
|
||||
G4LogicalVolume* FrontThermalShield_log =
|
||||
new G4LogicalVolume(FrontThermalShield_sol, CFRP,
|
||||
"FrontThermalShield_log");
|
||||
G4VPhysicalVolume* FrontThermalShield_phys = new G4PVPlacement
|
||||
(0, G4ThreeVector(0, 0, OpticalBench_off-FrontThermalShield_off),
|
||||
"FrontThermalShield_phys", FrontThermalShield_log, TelBox_phys, false, 0);
|
||||
FrontThermalShield_log->SetVisAttributes(sol_white_vat);
|
||||
|
||||
|
||||
|
||||
//***************************************************************************
|
||||
// Telescope assembly
|
||||
//***************************************************************************
|
||||
|
||||
|
||||
// Primary mirror mount: ~1.9 kg
|
||||
G4double TelPriMirMount_rad = 420.*mm;
|
||||
G4double TelPriMirMount_yoff = 220.*mm;
|
||||
G4double TelPriMirMount_thi = 13.*mm;
|
||||
G4double TelPriMirMount_off = FrontThermalShield_off +
|
||||
0.5*TelPriMirMount_thi + 20.*mm;
|
||||
G4double TelPriMirMountCutout0_dia = 350.*mm;
|
||||
G4double TelPriMirMountCutout0_yoff = 220.*mm;
|
||||
G4double TelPriMirMountCutout1_dia = 60.*mm;
|
||||
G4double TelPriMirMountCutout1_yoff = 190.*mm;
|
||||
G4double TelPriMirMountCutout2_dia = 46.*mm;
|
||||
G4double TelPriMirMountCutout2_yoff = 367.*mm;
|
||||
|
||||
// Primary mirror mount
|
||||
// full thickness assumed; material density is decreased to conserve mass
|
||||
G4Tubs* TelPriMirMount_tub = new G4Tubs("TelPriMirMount_tub",
|
||||
0, TelPriMirMount_rad, 0.5*TelPriMirMount_thi, -115.*deg, 50.*deg);
|
||||
G4Tubs* TelPriMirMountCutout0_tub = new G4Tubs
|
||||
("TelPriMirMountCutout0_tub", 0.5*TelPriMirMountCutout0_dia,
|
||||
0.8*TelPriMirMountCutout0_dia, TelPriMirMount_thi, 0., 360.*deg);
|
||||
G4SubtractionSolid* TelPriMirMount_sol0 = new G4SubtractionSolid
|
||||
("TelPriMirMount_sol1", TelPriMirMount_tub, TelPriMirMountCutout0_tub,
|
||||
G4Transform3D(G4RotationMatrix(),
|
||||
G4ThreeVector(0,-TelPriMirMountCutout0_yoff,0)));
|
||||
G4Tubs* TelPriMirMountCutout1_tub = new G4Tubs("TelPriMirMountCutout1_tub",
|
||||
0, 0.5*TelPriMirMountCutout1_dia, TelPriMirMount_thi, 0.*deg, 360.*deg);
|
||||
G4SubtractionSolid* TelPriMirMount_sol1 = new G4SubtractionSolid
|
||||
("TelPriMirMount_sol1", TelPriMirMount_sol0, TelPriMirMountCutout1_tub,
|
||||
G4Transform3D(G4RotationMatrix(),
|
||||
G4ThreeVector(0, -TelPriMirMountCutout1_yoff,0)));
|
||||
G4Tubs* TelPriMirMountCutout2_tub = new G4Tubs("TelPriMirMountCutout2_tub",
|
||||
0, 0.5*TelPriMirMountCutout2_dia, TelPriMirMount_thi, 0.*deg, 360.*deg);
|
||||
G4SubtractionSolid* TelPriMirMount_sol2 = new G4SubtractionSolid
|
||||
("TelPriMirMount_sol2", TelPriMirMount_sol1, TelPriMirMountCutout2_tub,
|
||||
G4Transform3D(G4RotationMatrix(),
|
||||
G4ThreeVector(0, -TelPriMirMountCutout2_yoff,0)));
|
||||
G4LogicalVolume* TelPriMirMount_log =
|
||||
new G4LogicalVolume(TelPriMirMount_sol2, Al6061, "TelPriMirMount_log");
|
||||
G4VPhysicalVolume* TelPriMirMount_phys = new G4PVPlacement(0,
|
||||
G4ThreeVector(0, TelPriMirMount_yoff, OpticalBench_off-TelPriMirMount_off),
|
||||
"TelPriMirMount_phys", TelPriMirMount_log, TelBox_phys, false, 0);
|
||||
TelPriMirMount_log->SetVisAttributes(sol_blue_vat);
|
||||
|
||||
|
||||
// primary mirror: 2.03 kg
|
||||
G4double TelPriMir_thi = 9.0*mm;
|
||||
G4double TelPriMir_rad = 500.0*mm;
|
||||
G4double TelPriMir_dia = 304.0*mm;
|
||||
G4double TelPriMir_yoff = 30.0*mm;
|
||||
G4double TelPriMirHol_dia = 35.0*mm;
|
||||
G4double TelPriMirHol_thi = 5.0*mm;
|
||||
G4double TelPriMirHol_len = 45.0*mm;
|
||||
G4double TelPriMir_off = TelPriMirMount_off +
|
||||
0.5*TelPriMirMount_thi +2.*mm;
|
||||
// primary mirror: cylinder
|
||||
G4Tubs* TelPriMirCyl_sol = new G4Tubs("TelPriMirCyl_sol",
|
||||
0.5*TelPriMirHol_dia, 0.5*TelPriMirHol_dia+TelPriMirHol_thi,
|
||||
0.5*TelPriMirHol_len, 0., 360.*deg);
|
||||
G4LogicalVolume* TelPriMirCyl_log =
|
||||
new G4LogicalVolume(TelPriMirCyl_sol, SiC, "TelPriMirCyl_log");
|
||||
G4VPhysicalVolume* TelPriMirCyl_phys= new G4PVPlacement(0, G4ThreeVector
|
||||
(0,TelPriMir_yoff,OpticalBench_off-TelPriMir_off+0.5*TelPriMirMount_thi),
|
||||
"TelPriMirCyl_phys", TelPriMirCyl_log, TelBox_phys, false, 0);
|
||||
TelPriMirCyl_log->SetVisAttributes(sol_green_vat);
|
||||
// primary mirror: dish
|
||||
G4Sphere* TelPriMir_sol =
|
||||
new G4Sphere("TelPriMir_sol", TelPriMir_rad - TelPriMir_thi,
|
||||
TelPriMir_rad, 0, 360.*deg,
|
||||
atan(0.5*TelPriMirHol_dia/TelPriMir_rad),
|
||||
atan(0.5*TelPriMir_dia/TelPriMir_rad) -
|
||||
atan(0.5*TelPriMirHol_dia/TelPriMir_rad));
|
||||
G4LogicalVolume* TelPriMir_log =
|
||||
new G4LogicalVolume(TelPriMir_sol, SiC, "TelPriMir_log");
|
||||
G4VPhysicalVolume* TelPriMir_phys= new G4PVPlacement(0, G4ThreeVector
|
||||
(0,TelPriMir_yoff, OpticalBench_off-TelPriMir_off-TelPriMir_rad-17.*mm),
|
||||
"TelPriMir_phys", TelPriMir_log, TelBox_phys, false, 0);
|
||||
TelPriMir_log->SetVisAttributes(sol_green_vat);
|
||||
|
||||
|
||||
|
||||
// *** NOTE ***
|
||||
// Following items are NOT in TelBox_phys but in TelShield_phys
|
||||
|
||||
G4ThreeVector offset(0,0,0.5*TelShield_len);
|
||||
|
||||
// Telescope mast: 0.41 kg
|
||||
G4double TelMast_thi = 2.0*mm;
|
||||
G4double TelMast_dia = 44.0*mm;
|
||||
G4double TelMast_len = 500.*mm;
|
||||
G4double TelMast_off = 0.5*TelMast_len;
|
||||
// Telescope mast
|
||||
G4Tubs* TelMast_sol =
|
||||
new G4Tubs("TelMast_sol", 0.5*TelMast_dia-TelMast_thi, 0.5*TelMast_dia,
|
||||
0.5*TelMast_len, 0., 360.*deg);
|
||||
G4LogicalVolume* TelMast_log =
|
||||
new G4LogicalVolume(TelMast_sol, SiC, "TelMast_log");
|
||||
G4VPhysicalVolume* TelMast_phys= new G4PVPlacement(0, offset+G4ThreeVector
|
||||
(0,-0.5*TelPriMir_dia - 0.5*TelMast_dia + TelPriMir_yoff, -TelMast_off),
|
||||
"TelMastTel_phys", TelMast_log, TelShield_phys, false, 0);
|
||||
TelMast_log->SetVisAttributes(sol_grey_vat);
|
||||
|
||||
|
||||
// secondary mirror: 0.27 kg
|
||||
G4double TelSecMir_dia = 40.0*mm;
|
||||
G4double TelSecMir_len = 70.0*mm;
|
||||
G4double TelSecMir_off = TelMast_off + 0.5*TelMast_len
|
||||
- 0.5*TelSecMir_len + 10.*mm;
|
||||
// secondary mirror
|
||||
G4Tubs* TelSecMir_sol =
|
||||
new G4Tubs("TelSecMir_sol", 0., 0.5*TelSecMir_dia,
|
||||
0.5*TelSecMir_len, 0., 360.*deg);
|
||||
G4LogicalVolume* TelSecMir_log =
|
||||
new G4LogicalVolume(TelSecMir_sol, SiC, "TelSecMir_log");
|
||||
G4VPhysicalVolume* TelSecMir_phys= new G4PVPlacement
|
||||
(0, offset+G4ThreeVector(0,TelPriMir_yoff, -TelSecMir_off),
|
||||
"TelSecMir_phys", TelSecMir_log, TelShield_phys, false, 0);
|
||||
TelSecMir_log->SetVisAttributes(sol_green_vat);
|
||||
|
||||
|
||||
|
||||
// secondary mirror holder: 0.35 kg
|
||||
G4double TelSecHol_top = 20.0*mm;
|
||||
G4double TelSecHol_bot = 60.0*mm;
|
||||
G4double TelSecHol_thi = 5.0*mm;
|
||||
G4double TelSecHolCap1_thi = 5.0*mm;
|
||||
G4double TelSecHolCap1_len = TelSecHol_bot;
|
||||
G4double TelSecHolCap2_thi = 5.0*mm;
|
||||
G4double TelSecHolCap2_len = TelSecHol_top;
|
||||
G4double TelSecHol_len = 0.5*(TelPriMir_dia-TelSecMir_dia)
|
||||
- TelSecHolCap1_thi - TelSecHolCap2_thi;
|
||||
// secondary mirror holder
|
||||
G4Trap* TelSecHol_sol = new G4Trap("TelSecHol_sol",
|
||||
TelSecHol_thi, TelSecHol_len,
|
||||
TelSecHol_bot, TelSecHol_top);
|
||||
G4RotationMatrix tel_rot11; tel_rot11.rotateZ(-90.*deg);
|
||||
tel_rot11.rotateY(-90.*deg); tel_rot11.rotateX(-90.*deg);
|
||||
G4LogicalVolume* TelSecHol_log =
|
||||
new G4LogicalVolume(TelSecHol_sol, SiC, "TelSecHol_log");
|
||||
G4VPhysicalVolume* TelSecHol_phys= new G4PVPlacement(G4Transform3D
|
||||
(tel_rot11, offset + G4ThreeVector(0,
|
||||
TelPriMir_yoff-0.5*TelSecHol_len-0.5*TelSecMir_dia-TelSecHolCap2_thi,
|
||||
-TelMast_off-0.5*TelMast_len+TelSecHol_top)),
|
||||
"TelSecHol_phys", TelSecHol_log, TelShield_phys, false, 0);
|
||||
TelSecHol_log->SetVisAttributes(sol_grey_vat);
|
||||
// cap1
|
||||
G4Tubs* TelSecHolCap1_sol =
|
||||
new G4Tubs("TelSecHolCap1_sol", 0.5*TelMast_dia,
|
||||
0.5*TelMast_dia+TelSecHolCap1_thi, 0.5*TelSecHolCap1_len, 0., 360.*deg);
|
||||
G4LogicalVolume* TelSecHolCap1_log =
|
||||
new G4LogicalVolume(TelSecHolCap1_sol, SiC, "TelSecHolCap1_log");
|
||||
G4VPhysicalVolume* TelSecHolCap1_phys= new G4PVPlacement(0,
|
||||
offset + G4ThreeVector(0,-0.5*TelPriMir_dia-0.5*TelMast_dia+TelPriMir_yoff,
|
||||
-TelMast_off-0.5*TelMast_len+0.5*TelSecHol_bot),
|
||||
"TelSecHolCap1_phys", TelSecHolCap1_log, TelShield_phys, false, 0);
|
||||
TelSecHolCap1_log->SetVisAttributes(sol_grey_vat);
|
||||
// cap2
|
||||
G4Tubs* TelSecHolCap2_sol =
|
||||
new G4Tubs("TelSecHolCap2_sol", 0.5*TelSecMir_dia,
|
||||
0.5*TelSecMir_dia+TelSecHolCap2_thi, 0.5*TelSecHolCap2_len, 0., 360.*deg);
|
||||
G4LogicalVolume* TelSecHolCap2_log =
|
||||
new G4LogicalVolume(TelSecHolCap2_sol, SiC, "TelSecHolCap2_log");
|
||||
G4VPhysicalVolume* TelSecHolCap2_phys= new G4PVPlacement(0,
|
||||
offset + G4ThreeVector(0,TelPriMir_yoff,
|
||||
-TelMast_off-0.5*TelMast_len+0.5*TelSecHol_top),
|
||||
"TelSecHolCap2_phys", TelSecHolCap2_log, TelShield_phys, false, 0);
|
||||
TelSecHolCap2_log->SetVisAttributes(sol_grey_vat);
|
||||
|
||||
|
||||
// make structure invisible
|
||||
// arms_o_log->SetVisAttributes(G4VisAttributes::Invisible);
|
||||
// arms_i_log->SetVisAttributes(G4VisAttributes::Invisible);
|
||||
// TelShield_log->SetVisAttributes(G4VisAttributes::Invisible);
|
||||
|
||||
// make structure solid
|
||||
// arms_o_log->SetVisAttributes(sol_yellow_vat);
|
||||
// arms_i_log->SetVisAttributes(yellow_vat);
|
||||
// TelShield_log->SetVisAttributes(sol_green_vat);
|
||||
|
||||
|
||||
// ****************************************************************************
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,81 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// ********************************************************************
|
||||
// * *
|
||||
// * cosmicray_charging advanced example for Geant4 *
|
||||
// * (adapted simulation of test-mass charging in the LISA mission) *
|
||||
// * *
|
||||
// * Henrique Araujo (h.araujo@imperial.ac.uk) & Peter Wass *
|
||||
// * Imperial College London *
|
||||
// * *
|
||||
// * LISAPrimaryGeneratorAction class *
|
||||
// * *
|
||||
// ********************************************************************
|
||||
//
|
||||
// HISTORY
|
||||
// 22/02/2004: migrated from LISA-V04
|
||||
//
|
||||
// ********************************************************************
|
||||
|
||||
|
||||
#include "LISAPrimaryGeneratorAction.hh"
|
||||
#include "G4GeneralParticleSource.hh"
|
||||
|
||||
#include "G4Event.hh"
|
||||
#include "Randomize.hh"
|
||||
|
||||
|
||||
LISAPrimaryGeneratorAction::LISAPrimaryGeneratorAction() {
|
||||
|
||||
particleGun = new G4GeneralParticleSource();
|
||||
|
||||
energy_pri=0;
|
||||
seeds[0]=-1;
|
||||
seeds[1]=-1;
|
||||
|
||||
}
|
||||
|
||||
|
||||
LISAPrimaryGeneratorAction::~LISAPrimaryGeneratorAction() {
|
||||
|
||||
delete particleGun;
|
||||
}
|
||||
|
||||
|
||||
void LISAPrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent) {
|
||||
|
||||
energy_pri = 0.;
|
||||
|
||||
// seeds
|
||||
seeds[0] = *HepRandom::getTheSeeds();
|
||||
seeds[1] = *(HepRandom::getTheSeeds()+1);
|
||||
// G4cout << " 1st seed: " << *seeds << G4endl;;
|
||||
// G4cout << " 2nd seed: " << *(seeds+1) << G4endl;
|
||||
// HepRandom::showEngineStatus();
|
||||
|
||||
particleGun->GeneratePrimaryVertex(anEvent);
|
||||
|
||||
energy_pri = particleGun->GetParticleEnergy();
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,167 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// ********************************************************************
|
||||
// * *
|
||||
// * cosmicray_charging advanced example for Geant4 *
|
||||
// * (adapted simulation of test-mass charging in the LISA mission) *
|
||||
// * *
|
||||
// * Henrique Araujo (h.araujo@imperial.ac.uk) & Peter Wass *
|
||||
// * Imperial College London *
|
||||
// * *
|
||||
// * LISARunAction class *
|
||||
// * *
|
||||
// ********************************************************************
|
||||
//
|
||||
// HISTORY
|
||||
// 22/02/2004: migrated from LISA-V04
|
||||
//
|
||||
// ********************************************************************
|
||||
|
||||
|
||||
#include "LISARunAction.hh"
|
||||
|
||||
#include "LISARunActionMessenger.hh"
|
||||
#include "LISAEventAction.hh"
|
||||
|
||||
#ifdef G4ANALYSIS_USE
|
||||
#include "LISAAnalysisManager.hh"
|
||||
#endif
|
||||
|
||||
#include "G4Run.hh"
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4UImanager.hh"
|
||||
#include "G4VVisManager.hh"
|
||||
#include "G4ios.hh"
|
||||
#include "globals.hh"
|
||||
#include <strstream>
|
||||
|
||||
#include "Randomize.hh"
|
||||
#include <time.h>
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
LISARunAction::LISARunAction() {
|
||||
|
||||
// defaults
|
||||
autoSeed = false;
|
||||
|
||||
// create messenger
|
||||
runMessenger = new LISARunActionMessenger(this);
|
||||
|
||||
#ifdef G4ANALYSIS_USE
|
||||
// Book histograms and ntuples
|
||||
LISAAnalysisManager* analysis = LISAAnalysisManager::getInstance();
|
||||
analysis->Init();
|
||||
#endif
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
LISARunAction::~LISARunAction() {
|
||||
|
||||
#ifdef G4ANALYSIS_USE
|
||||
// delete analysis
|
||||
LISAAnalysisManager* analysis = LISAAnalysisManager::getInstance();
|
||||
analysis->Dispose();
|
||||
#endif
|
||||
|
||||
delete runMessenger;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
void LISARunAction::BeginOfRunAction(const G4Run* aRun) {
|
||||
|
||||
// run id
|
||||
G4int run_id = aRun->GetRunID();
|
||||
G4cout << "### Run " << run_id << " start." << G4endl;
|
||||
|
||||
|
||||
char filename[100];
|
||||
std::ostrstream os(filename,100);
|
||||
|
||||
if(autoSeed) {
|
||||
// automatic (time-based) random seeds and filenames for each run
|
||||
G4cout << "*******************" << G4endl;
|
||||
G4cout << "*** AUTOSEED ON ***" << G4endl;
|
||||
G4cout << "*******************" << G4endl;
|
||||
long seeds[2];
|
||||
time_t systime = time(NULL);
|
||||
seeds[0] = (long) systime;
|
||||
seeds[1] = (long) (systime*G4UniformRand());
|
||||
// G4cout << "seed1: " << seeds[0] << "; seed2: " << seeds[1] << G4endl;
|
||||
HepRandom::setTheSeeds(seeds);
|
||||
HepRandom::showEngineStatus();
|
||||
|
||||
// form filename (eg run00_7324329387_3284798343.out)
|
||||
os << "run" << std::setw(2) << std::setfill('0') << run_id
|
||||
<< "_" << seeds[0] << "_" << seeds[1] << std::ends;
|
||||
}
|
||||
else {
|
||||
// default filename, seeds set by /random/reset
|
||||
os << "charge" << std::ends;
|
||||
}
|
||||
// G4cout << "Filename: " << G4String(filename) << G4endl;
|
||||
|
||||
|
||||
// send filename to eventAction
|
||||
LISAEventAction* eventAction = (LISAEventAction*)
|
||||
G4RunManager::GetRunManager()->GetUserEventAction();
|
||||
eventAction->SetFilename( G4String(filename)+G4String(".out") );
|
||||
|
||||
|
||||
#ifdef G4ANALYSIS_USE
|
||||
// Book histograms and ntuples
|
||||
LISAAnalysisManager* analysis = LISAAnalysisManager::getInstance();
|
||||
analysis->bookRun( G4String(filename)+G4String(".hbook") );
|
||||
#endif
|
||||
|
||||
|
||||
// if (G4VVisManager::GetConcreteInstance()) {
|
||||
// G4UImanager* UI = G4UImanager::GetUIpointer();
|
||||
// UI->ApplyCommand("/vis/scene/notifyHandlers");
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
void LISARunAction::EndOfRunAction(const G4Run* aRun) {
|
||||
|
||||
#ifdef G4ANALYSIS_USE
|
||||
LISAAnalysisManager* analysis = LISAAnalysisManager::getInstance();
|
||||
analysis->FinishRun();
|
||||
#endif
|
||||
|
||||
// if (G4VVisManager::GetConcreteInstance()) {
|
||||
// G4UImanager::GetUIpointer()->ApplyCommand("/vis/viewer/update");
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
@@ -0,0 +1,78 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// ********************************************************************
|
||||
// * *
|
||||
// * cosmicray_charging advanced example for Geant4 *
|
||||
// * (adapted simulation of test-mass charging in the LISA mission) *
|
||||
// * *
|
||||
// * Henrique Araujo (h.araujo@imperial.ac.uk) & Peter Wass *
|
||||
// * Imperial College London *
|
||||
// * *
|
||||
// * LISARunActionMessenger class *
|
||||
// * *
|
||||
// ********************************************************************
|
||||
//
|
||||
// HISTORY
|
||||
// 22/02/2004: migrated from LISA-V04
|
||||
//
|
||||
// ********************************************************************
|
||||
|
||||
|
||||
#include "LISARunActionMessenger.hh"
|
||||
|
||||
#include "LISARunAction.hh"
|
||||
|
||||
|
||||
LISARunActionMessenger::LISARunActionMessenger
|
||||
(LISARunAction* runAct) : runAction(runAct){
|
||||
|
||||
SetAutoSeedCmd = new G4UIcmdWithABool("/run/autoSeed",this);
|
||||
SetAutoSeedCmd->SetGuidance("Switch on/off time-based random seeds");
|
||||
SetAutoSeedCmd->SetGuidance(" true: run seeds determined by system time");
|
||||
SetAutoSeedCmd->SetGuidance("false: use command 'random/resetEngineFrom'");
|
||||
SetAutoSeedCmd->SetGuidance("Default = false");
|
||||
SetAutoSeedCmd->SetParameterName("autoSeed", false);
|
||||
SetAutoSeedCmd->AvailableForStates(G4State_Idle);
|
||||
|
||||
}
|
||||
|
||||
|
||||
LISARunActionMessenger::~LISARunActionMessenger() {
|
||||
|
||||
delete SetAutoSeedCmd;
|
||||
}
|
||||
|
||||
|
||||
void LISARunActionMessenger::SetNewValue
|
||||
(G4UIcommand* command, G4String newValue) {
|
||||
|
||||
if(command == SetAutoSeedCmd) {
|
||||
G4int vl;
|
||||
const char* t = newValue;
|
||||
std::istrstream is((char*)t);
|
||||
is >> vl;
|
||||
runAction->SetAutoSeed(vl!=0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,500 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// ********************************************************************
|
||||
// * *
|
||||
// * cosmicray_charging advanced example for Geant4 *
|
||||
// * (adapted simulation of test-mass charging in the LISA mission) *
|
||||
// * *
|
||||
// * Henrique Araujo (h.araujo@imperial.ac.uk) & Peter Wass *
|
||||
// * Imperial College London *
|
||||
// * *
|
||||
// * LISADetectorConstruction class *
|
||||
// * *
|
||||
// ********************************************************************
|
||||
//
|
||||
// HISTORY
|
||||
// 22/02/2004: migrated from LISA-V04
|
||||
//
|
||||
// ********************************************************************
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// Science Module Structure (SMS)
|
||||
//**************************************************************************
|
||||
// Primary Structure
|
||||
// Lower Deck
|
||||
// Upper Deck
|
||||
// Thermal Shield
|
||||
// Solar Array
|
||||
// Optical Solar Reflectors (OSR)
|
||||
// Radiator Panels
|
||||
//**************************************************************************
|
||||
|
||||
|
||||
// Structure Tubes
|
||||
G4double StructTube_dia = 100.*mm;
|
||||
G4double StructTube_thi = 11.*mm;
|
||||
G4double StructTube_hei = 490.*mm;
|
||||
G4double StructTube_sep = 1480.*mm;
|
||||
G4double StructTubeSpacer_dia = 200.*mm;
|
||||
G4double StructTubeSpacer_thi = 50.*mm;
|
||||
G4double StructTubeSpacer_hei = 16.*mm;
|
||||
|
||||
// Diagonal Panels
|
||||
G4double DiagPanelSkin_thi = 0.5*mm;
|
||||
G4double DiagPanelSkin_len = 1420.*mm;
|
||||
G4double DiagPanelSkin_hei = 490.*mm;
|
||||
G4double DiagPanelCore_thi = 19.*mm;
|
||||
G4double DiagPanelCore_len = DiagPanelSkin_len;
|
||||
G4double DiagPanelCore_hei = DiagPanelSkin_hei;
|
||||
G4double DiagPanelCutout_dia = 466.*mm;
|
||||
G4double DiagPanelCutout_off = 50.*mm;
|
||||
|
||||
// Radial Panels
|
||||
G4double RadialPanelSkin_thi = 0.5*mm;
|
||||
G4double RadialPanelSkin_hei = 490.*mm;
|
||||
G4double RadialPanelSkin_top = 424.*mm;
|
||||
G4double RadialPanelSkin_bot = 159.*mm;
|
||||
G4double RadialPanelCore_thi = 19.*mm;
|
||||
G4double RadialPanel_roff = 910.*mm;
|
||||
|
||||
// Upper and Lower Decks
|
||||
G4double UpperDeck_dia = 2700.*mm;
|
||||
G4double UpperDeckCore_thi = 29.0*mm;
|
||||
G4double LowerDeckCore_thi = 29.0*mm;
|
||||
G4double UpperDeck_zoff = 0.5*mm;
|
||||
G4double UpperDeckSkin_thi = 0.5*mm;
|
||||
G4double LowerDeck_dia = 2174.*mm;
|
||||
G4double LowerDeckSkin_thi = 0.5*mm;
|
||||
G4double LowerDeck_zoff = 0.5*mm;
|
||||
G4double MLIBlanket_dia = LowerDeck_dia;
|
||||
G4double MLIBlanket_thi = 1.0*mm;
|
||||
|
||||
// Thermal Shield
|
||||
G4double ThermalShieldFacesheet_thi = 0.6*mm;
|
||||
G4double ThermalShieldCore_thi = 20.*mm;
|
||||
G4double ThermalShieldFoam_thi = 20.*mm;
|
||||
G4double ThermalShield_zoff = StructTubeSpacer_hei;
|
||||
G4double ThermalShield_thi = 3*ThermalShieldFacesheet_thi +
|
||||
ThermalShieldCore_thi +
|
||||
ThermalShieldFoam_thi;
|
||||
// Solar Array and OSR Assy
|
||||
G4double SolarArray_i = 0.5*1683*mm;
|
||||
G4double SolarArray_o = 0.5*UpperDeck_dia;
|
||||
G4double SolarArray_thi = 0.5*mm;
|
||||
G4double OSRAssy_o = SolarArray_i;
|
||||
G4double OSRAssy_thi = 0.5*mm;
|
||||
|
||||
// Radiator Panels
|
||||
G4double RadPanel_top = UpperDeck_dia+12.*mm;
|
||||
G4double RadPanel_bot = LowerDeck_dia+12.*mm;
|
||||
G4double RadPanel_len = 510.*mm;
|
||||
G4double RadPanel_thi = 1.25*mm;
|
||||
G4double RadPanel_zoff = 20*mm;
|
||||
G4double RadPanelCutout_roff = 0.5*(RadPanel_top+RadPanel_bot)/2.;
|
||||
G4double RadPanelCutout1_dia = 466.*mm;
|
||||
G4double RadPanelCutout1_len = 200.*mm;
|
||||
G4double RadPanelCutout2_hei = 500.*mm;
|
||||
G4double RadPanelCutout2_wid = 400.*mm;
|
||||
G4double RadPanelCutout2_len = 400.*mm;
|
||||
G4double RadPanelCutout2_zoff = 330.*mm;
|
||||
|
||||
|
||||
|
||||
|
||||
// Structure Tubes **********************************************************
|
||||
|
||||
// Struct Tube: 2.16 kg
|
||||
// (ID adjusted to make up for mass of missing top part of tube)
|
||||
G4Tubs* StructTube_sol = new G4Tubs("StructTube_sol",
|
||||
0.5*StructTube_dia-StructTube_thi, 0.5*StructTube_dia,
|
||||
0.5*StructTube_hei, 0., 360.*deg);
|
||||
G4LogicalVolume* StructTube_log = new G4LogicalVolume
|
||||
(StructTube_sol, Al6061, "StructTube_log");
|
||||
G4VPhysicalVolume* StructTube_phys;
|
||||
StructTube_phys = new G4PVPlacement(0, spacecraft_pos +
|
||||
G4ThreeVector(+0.5*StructTube_sep/cos(30.*deg),0,0),
|
||||
"StructTube_phys", StructTube_log, wld_phys, false, 0);
|
||||
StructTube_phys = new G4PVPlacement(0, spacecraft_pos +
|
||||
G4ThreeVector(-0.5*StructTube_sep*tan(30.*deg),+0.5*StructTube_sep,0),
|
||||
"StructTube_phys", StructTube_log, wld_phys, false, 1);
|
||||
StructTube_phys = new G4PVPlacement(0, spacecraft_pos +
|
||||
G4ThreeVector(-0.5*StructTube_sep*tan(30.*deg),-0.5*StructTube_sep,0),
|
||||
"StructTube_phys", StructTube_log, wld_phys, false, 2);
|
||||
StructTube_log->SetVisAttributes(sol_white_vat);
|
||||
|
||||
// Struct Tube Spacer: 1.0 kg
|
||||
// (ID adjusted to include mass of missing TopCap)
|
||||
G4Tubs* StructTubeSpacer_sol = new G4Tubs("StructTubeSpacer_sol",
|
||||
0.5*StructTubeSpacer_dia-StructTubeSpacer_thi,
|
||||
0.5*StructTubeSpacer_dia, 0.5*StructTubeSpacer_hei, 0., 360.*deg);
|
||||
G4LogicalVolume* StructTubeSpacer_log = new G4LogicalVolume
|
||||
(StructTubeSpacer_sol, Al6061, "StructTubeSpacer_log");
|
||||
G4VPhysicalVolume* StructTubeSpacer_phys;
|
||||
StructTubeSpacer_phys = new G4PVPlacement
|
||||
(0, spacecraft_pos + G4ThreeVector(+0.5*StructTube_sep/cos(30.*deg),0,
|
||||
+0.5*StructTube_hei+UpperDeckCore_thi+2*UpperDeckSkin_thi
|
||||
+0.5*StructTubeSpacer_hei+UpperDeck_zoff),
|
||||
"StructTubeSpacer_phys", StructTubeSpacer_log, wld_phys, false, 0);
|
||||
StructTubeSpacer_phys = new G4PVPlacement
|
||||
(0, spacecraft_pos + G4ThreeVector(-0.5*StructTube_sep*tan(30.*deg),
|
||||
+0.5*StructTube_sep, +0.5*StructTube_hei+UpperDeckCore_thi
|
||||
+2*UpperDeckSkin_thi+0.5*StructTubeSpacer_hei+UpperDeck_zoff),
|
||||
"StructTubeSpacer_phys", StructTubeSpacer_log, wld_phys, false, 1);
|
||||
StructTubeSpacer_phys = new G4PVPlacement
|
||||
(0, spacecraft_pos + G4ThreeVector(-0.5*StructTube_sep*tan(30.*deg),
|
||||
-0.5*StructTube_sep,+0.5*StructTube_hei+UpperDeckCore_thi
|
||||
+2*UpperDeckSkin_thi+0.5*StructTubeSpacer_hei+UpperDeck_zoff),
|
||||
"StructTubeSpacer_phys", StructTubeSpacer_log, wld_phys, false, 2);
|
||||
StructTubeSpacer_log->SetVisAttributes(sol_grey_vat);
|
||||
|
||||
|
||||
// Diagonal Panels **********************************************************
|
||||
|
||||
// Diagonal Panel: core (x3)
|
||||
// Honeycomb core is represented by Al6061 at 0.05 g/cm3
|
||||
G4Box* DiagPanelCore_box = new G4Box("DiagPanelCore_box",
|
||||
0.5*DiagPanelCore_len-2.*cm, 0.5*DiagPanelCore_thi, 0.5*DiagPanelCore_hei);
|
||||
G4Tubs* DiagPanelCutout_tub = new G4Tubs("DiagPanelCutout_tub", 0.,
|
||||
0.5*DiagPanelCutout_dia, 2*DiagPanelCore_thi, 0., 360.*deg);
|
||||
G4UnionSolid* DiagPanelCutout_sol = new G4UnionSolid("DiagPanelCutout_sol",
|
||||
DiagPanelCutout_tub, DiagPanelCutout_tub,
|
||||
G4Transform3D(G4RotationMatrix(), G4ThreeVector(DiagPanelCutout_off,0,0)));
|
||||
G4RotationMatrix SMS_rot1; SMS_rot1.rotateX(90.*deg);
|
||||
G4SubtractionSolid* DiagPanelCore_sol =
|
||||
new G4SubtractionSolid("DiagPanelCore_sol", DiagPanelCore_box,
|
||||
DiagPanelCutout_sol, G4Transform3D(SMS_rot1,
|
||||
G4ThreeVector(-0.5*DiagPanelCutout_off,0,0)));
|
||||
G4LogicalVolume* DiagPanelCore_log = new G4LogicalVolume
|
||||
(DiagPanelCore_sol, AlHoneycomb, "DiagPanelCore_log");
|
||||
G4VPhysicalVolume* DiagPanelCore_phys;
|
||||
G4RotationMatrix SMS_rot2; SMS_rot2.rotateZ(90.*deg);
|
||||
DiagPanelCore_phys = new G4PVPlacement(G4Transform3D(SMS_rot2,
|
||||
spacecraft_pos + G4ThreeVector(-0.5*DiagPanelCore_len*tan(30.*deg),0,0)),
|
||||
"DiagPanelCore_phys", DiagPanelCore_log, wld_phys, false, 0);
|
||||
G4RotationMatrix SMS_rot3; SMS_rot3.rotateZ(-30.*deg);
|
||||
DiagPanelCore_phys = new G4PVPlacement(G4Transform3D(SMS_rot3,
|
||||
spacecraft_pos + G4ThreeVector
|
||||
(.5*DiagPanelCore_len*sin(30.*deg)*tan(30.*deg),
|
||||
0.5*DiagPanelCore_len*sin(30.*deg),0)), "DiagPanelCore_phys",
|
||||
DiagPanelCore_log, wld_phys, false, 1);
|
||||
G4RotationMatrix SMS_rot4; SMS_rot4.rotateZ(+30.*deg);
|
||||
DiagPanelCore_phys = new G4PVPlacement(G4Transform3D(SMS_rot4,
|
||||
spacecraft_pos + G4ThreeVector
|
||||
(0.5*DiagPanelCore_len*sin(30*deg)*tan(30*deg),
|
||||
-0.5*DiagPanelCore_len*sin(30.*deg),0)),
|
||||
"DiagPanelCore_phys", DiagPanelCore_log, wld_phys, false, 2);
|
||||
DiagPanelCore_log->SetVisAttributes(sol_white_vat);
|
||||
|
||||
// Diagonal Panel: skins (x6)
|
||||
G4Box* DiagPanelSkin_box = new G4Box("DiagPanelSkin_box",
|
||||
0.5*DiagPanelSkin_len-2.*cm, 0.5*DiagPanelSkin_thi, 0.5*DiagPanelSkin_hei);
|
||||
G4SubtractionSolid* DiagPanelSkin_sol =
|
||||
new G4SubtractionSolid("DiagPanelSkin_sol", DiagPanelSkin_box,
|
||||
DiagPanelCutout_sol, G4Transform3D(SMS_rot1,
|
||||
G4ThreeVector(-0.5*DiagPanelCutout_off,0,0)));
|
||||
G4LogicalVolume* DiagPanelSkin_log = new G4LogicalVolume
|
||||
(DiagPanelSkin_sol, CFRP, "DiagPanelSkin_log");
|
||||
G4VPhysicalVolume* DiagPanelSkin_phys;
|
||||
DiagPanelSkin_phys = new G4PVPlacement(G4Transform3D(SMS_rot2,
|
||||
spacecraft_pos + G4ThreeVector(-0.5*DiagPanelCore_len*tan(30.*deg) +
|
||||
0.5*(DiagPanelCore_thi+DiagPanelSkin_thi),0,0)),
|
||||
"DiagPanelSkin_phys", DiagPanelSkin_log, wld_phys, false, 0);
|
||||
DiagPanelSkin_phys = new G4PVPlacement(G4Transform3D(SMS_rot2,
|
||||
spacecraft_pos + G4ThreeVector(-0.5*DiagPanelCore_len*tan(30.*deg) -
|
||||
0.5*(DiagPanelCore_thi+DiagPanelSkin_thi),0,0)),
|
||||
"DiagPanelSkin_phys", DiagPanelSkin_log, wld_phys, false, 1);
|
||||
DiagPanelSkin_phys = new G4PVPlacement(G4Transform3D(SMS_rot3,
|
||||
spacecraft_pos + G4ThreeVector
|
||||
(0.5*DiagPanelCore_len*sin(30*deg)*tan(30*deg),
|
||||
0.5*DiagPanelCore_len*sin(30.*deg),0) +
|
||||
G4ThreeVector(0.5*(DiagPanelCore_thi+DiagPanelSkin_thi)*sin(30.*deg),
|
||||
0.5*(DiagPanelCore_thi+DiagPanelSkin_thi)*cos(30.*deg),0)),
|
||||
"DiagPanelSkin_phys", DiagPanelSkin_log, wld_phys, false, 2);
|
||||
DiagPanelSkin_phys = new G4PVPlacement(G4Transform3D(SMS_rot3,
|
||||
spacecraft_pos + G4ThreeVector
|
||||
(0.5*DiagPanelCore_len*sin(30*deg)*tan(30*deg),
|
||||
0.5*DiagPanelCore_len*sin(30.*deg),0) +
|
||||
G4ThreeVector(-0.5*(DiagPanelCore_thi+DiagPanelSkin_thi)*sin(30.*deg),
|
||||
-0.5*(DiagPanelCore_thi+DiagPanelSkin_thi)*cos(30.*deg),0)),
|
||||
"DiagPanelSkin_phys", DiagPanelSkin_log, wld_phys, false, 3);
|
||||
DiagPanelSkin_phys = new G4PVPlacement(G4Transform3D(SMS_rot4,
|
||||
spacecraft_pos + G4ThreeVector
|
||||
(0.5*DiagPanelCore_len*sin(30*deg)*tan(30*deg),
|
||||
-0.5*DiagPanelCore_len*sin(30.*deg),0) +
|
||||
G4ThreeVector(0.5*(DiagPanelCore_thi+DiagPanelSkin_thi)*sin(30.*deg),
|
||||
-0.5*(DiagPanelCore_thi+DiagPanelSkin_thi)*cos(30.*deg),0)),
|
||||
"DiagPanelSkin_phys", DiagPanelSkin_log, wld_phys, false, 3);
|
||||
DiagPanelSkin_phys = new G4PVPlacement(G4Transform3D(SMS_rot4,
|
||||
spacecraft_pos + G4ThreeVector
|
||||
(0.5*DiagPanelCore_len*sin(30*deg)*tan(30*deg),
|
||||
-0.5*DiagPanelCore_len*sin(30.*deg),0) +
|
||||
G4ThreeVector(-0.5*(DiagPanelCore_thi+DiagPanelSkin_thi)*sin(30.*deg),
|
||||
+0.5*(DiagPanelCore_thi+DiagPanelSkin_thi)*cos(30.*deg),0)),
|
||||
"DiagPanelSkin_phys", DiagPanelSkin_log, wld_phys, false, 4);
|
||||
DiagPanelSkin_log->SetVisAttributes(sol_white_vat);
|
||||
|
||||
|
||||
|
||||
// Radial Panels ************************************************************
|
||||
|
||||
// Radial Panels: skins (x3)
|
||||
G4Trap* RadialPanelSkin_sol = new G4Trap("RadialPanelSkin_sol",
|
||||
2*RadialPanelSkin_thi+RadialPanelCore_thi, RadialPanelSkin_hei,
|
||||
RadialPanelSkin_top, RadialPanelSkin_bot);
|
||||
G4LogicalVolume* RadialPanelSkin_log = new G4LogicalVolume
|
||||
(RadialPanelSkin_sol, CFRP, "RadialPanelSkin_log");
|
||||
G4VPhysicalVolume* RadialPanelSkin_phys;
|
||||
G4RotationMatrix SMS_rot5; SMS_rot5.rotateX(-90.*deg);
|
||||
RadialPanelSkin_phys = new G4PVPlacement
|
||||
(G4Transform3D(SMS_rot5, spacecraft_pos +
|
||||
G4ThreeVector(+RadialPanel_roff/cos(30.*deg),0,0)),
|
||||
"RadialPanelSkin_phys", RadialPanelSkin_log, wld_phys, false, 0);
|
||||
G4RotationMatrix SMS_rot6;
|
||||
SMS_rot6.rotateX(-90.*deg); SMS_rot6.rotateZ(120.*deg);
|
||||
RadialPanelSkin_phys = new G4PVPlacement
|
||||
(G4Transform3D(SMS_rot6, spacecraft_pos +
|
||||
G4ThreeVector(-RadialPanel_roff*tan(30.*deg),+RadialPanel_roff,0)),
|
||||
"RadialPanelSkin_phys", RadialPanelSkin_log, wld_phys, false, 1);
|
||||
G4RotationMatrix SMS_rot7;
|
||||
SMS_rot7.rotateX(-90.*deg); SMS_rot7.rotateZ(-120.*deg);
|
||||
RadialPanelSkin_phys = new G4PVPlacement
|
||||
(G4Transform3D(SMS_rot7, spacecraft_pos +
|
||||
G4ThreeVector(-RadialPanel_roff*tan(30.*deg),-RadialPanel_roff,0)),
|
||||
"RadialPanelSkin_phys", RadialPanelSkin_log, wld_phys, false, 2);
|
||||
RadialPanelSkin_log->SetVisAttributes(sol_white_vat);
|
||||
// Radial Panels: core
|
||||
// Honeycomb core is represented by Al6061 at 0.05 g/cm3
|
||||
G4Trap* RadialPanelCore_sol = new G4Trap("RadialPanelCore_sol",
|
||||
RadialPanelCore_thi, RadialPanelSkin_hei,
|
||||
RadialPanelSkin_top, RadialPanelSkin_bot);
|
||||
G4LogicalVolume* RadialPanelCore_log = new G4LogicalVolume
|
||||
(RadialPanelCore_sol, AlHoneycomb, "RadialPanelCore_log");
|
||||
G4VPhysicalVolume* RadialPanelCore_phys = new G4PVPlacement
|
||||
(0, G4ThreeVector(0,0,0), "RadialPanelCore_phys",
|
||||
RadialPanelCore_log, RadialPanelSkin_phys, false, 0);
|
||||
RadialPanelCore_log->SetVisAttributes(sol_white_vat);
|
||||
|
||||
|
||||
|
||||
// Upper and Lower Decks ****************************************************
|
||||
|
||||
|
||||
// Upper Deck - skin: 2*4.56 kg
|
||||
G4Tubs* UpperDeckSkin_sol = new G4Tubs
|
||||
("UpperDeckSkin_sol", 0., 0.5*UpperDeck_dia,
|
||||
0.5*UpperDeckCore_thi + UpperDeckSkin_thi, 0., 360.*deg);
|
||||
G4LogicalVolume* UpperDeckSkin_log = new G4LogicalVolume
|
||||
(UpperDeckSkin_sol, CFRP, "UpperDeckSkin_log");
|
||||
G4VPhysicalVolume* UpperDeckSkin_phys = new G4PVPlacement
|
||||
(0, spacecraft_pos + G4ThreeVector(0,0,+0.5*StructTube_hei
|
||||
+0.5*UpperDeckCore_thi+UpperDeckSkin_thi+UpperDeck_zoff),
|
||||
"UpperDeckSkin_phys", UpperDeckSkin_log, wld_phys, false, 0);
|
||||
UpperDeckSkin_log->SetVisAttributes(white_vat);
|
||||
// upper deck - core: 8.3 kg
|
||||
// Honeycomb core is represented by Al6061 at 0.05 g/cm3
|
||||
G4Tubs* UpperDeckCore_sol = new G4Tubs
|
||||
("UpperDeckCore_sol",0.,.5*UpperDeck_dia,.5*UpperDeckCore_thi,0.,360.*deg);
|
||||
G4LogicalVolume* UpperDeckCore_log = new G4LogicalVolume
|
||||
(UpperDeckCore_sol, AlHoneycomb, "UpperDeckCore_log");
|
||||
G4VPhysicalVolume* UpperDeckCore_phys = new G4PVPlacement(0,G4ThreeVector(),
|
||||
"UpperDeckCore_phys", UpperDeckCore_log, UpperDeckSkin_phys, false, 0);
|
||||
UpperDeckCore_log->SetVisAttributes(white_vat);
|
||||
|
||||
// Lower Deck - skin: 2*2.95 kg
|
||||
G4Tubs* LowerDeckSkin_sol = new G4Tubs
|
||||
("LowerDeckSkin_sol", 0., 0.5*LowerDeck_dia,
|
||||
0.5*LowerDeckCore_thi + LowerDeckSkin_thi, 0., 360.*deg);
|
||||
G4LogicalVolume* LowerDeckSkin_log = new G4LogicalVolume
|
||||
(LowerDeckSkin_sol, CFRP, "LowerDeckSkin_log");
|
||||
G4VPhysicalVolume* LowerDeckSkin_phys = new G4PVPlacement
|
||||
(0, spacecraft_pos + G4ThreeVector(0,0,-0.5*StructTube_hei
|
||||
-0.5*LowerDeckCore_thi-LowerDeckSkin_thi-LowerDeck_zoff),
|
||||
"LowerDeckSkin_phys", LowerDeckSkin_log, wld_phys, false, 0);
|
||||
LowerDeckSkin_log->SetVisAttributes(sol_dgrey_vat);
|
||||
// lower deck - core: 5.38 kg
|
||||
// Honeycomb core is represented by Al6061 at 0.05 g/cm3
|
||||
G4Tubs* LowerDeckCore_sol = new G4Tubs
|
||||
("LowerDeckCore_sol",0.,.5*LowerDeck_dia,.5*LowerDeckCore_thi,0.,360.*deg);
|
||||
G4LogicalVolume* LowerDeckCore_log = new G4LogicalVolume
|
||||
(LowerDeckCore_sol, AlHoneycomb, "LowerDeckCore_log");
|
||||
G4VPhysicalVolume* LowerDeckCore_phys = new G4PVPlacement(0,G4ThreeVector(),
|
||||
"LowerDeckCore_phys", LowerDeckCore_log, LowerDeckSkin_phys, false, 0);
|
||||
LowerDeckCore_log->SetVisAttributes(sol_dgrey_vat);
|
||||
|
||||
// Lower Deck MLI Blanket: 5.3 kg
|
||||
G4Tubs* MLIBlanket_sol = new G4Tubs("MLIBlanket_sol",
|
||||
0., 0.5*MLIBlanket_dia, 0.5*MLIBlanket_thi, 0., 360.*deg);
|
||||
G4LogicalVolume* MLIBlanket_log = new G4LogicalVolume
|
||||
(MLIBlanket_sol, MLImat, "MLIBlanket_log");
|
||||
G4VPhysicalVolume* MLIBlanket_phys = new G4PVPlacement
|
||||
(0, spacecraft_pos + G4ThreeVector(0,0,-0.5*StructTube_hei
|
||||
-LowerDeckCore_thi-2*LowerDeckSkin_thi-LowerDeck_zoff-.5*MLIBlanket_thi),
|
||||
"MLIBlanket_phys", MLIBlanket_log, wld_phys, false, 0);
|
||||
MLIBlanket_log->SetVisAttributes(sol_orange_vat);
|
||||
|
||||
|
||||
// Thermal Shield ***********************************************************
|
||||
|
||||
// Thermal Shield (Facesheet+HoneycombCore+Facesheet+Foam+Facesheet)
|
||||
// Thermal Shield - facesheet: 3*5.47 kg
|
||||
G4Tubs* ThermalShieldFacesheet_sol = new G4Tubs("ThermalShieldFacesheet_sol",
|
||||
0., 0.5*UpperDeck_dia, 0.5*ThermalShield_thi, 0., 360.*deg);
|
||||
G4LogicalVolume* ThermalShieldFacesheet_log = new G4LogicalVolume
|
||||
(ThermalShieldFacesheet_sol, CFRP, "ThermalShieldFacesheet_log");
|
||||
G4VPhysicalVolume* ThermalShieldFacesheet_phys = new G4PVPlacement(0,
|
||||
spacecraft_pos + G4ThreeVector
|
||||
(0,0,+.5*StructTube_hei+UpperDeckCore_thi+2*UpperDeckSkin_thi+
|
||||
UpperDeck_zoff+0.5*ThermalShield_thi+ThermalShield_zoff),
|
||||
"ThermalShieldFacesheet_phys",ThermalShieldFacesheet_log,wld_phys,false,0);
|
||||
ThermalShieldFacesheet_log->SetVisAttributes(red_vat);
|
||||
// Thermal Shield: core
|
||||
// Honeycomb core is represented by Al6061 at 0.05 g/cm3
|
||||
G4Tubs* ThermalShieldCore_sol = new G4Tubs("ThermalShieldCore_sol",
|
||||
0., 0.5*UpperDeck_dia, 0.5*ThermalShieldCore_thi, 0., 360.*deg);
|
||||
G4LogicalVolume* ThermalShieldCore_log = new G4LogicalVolume
|
||||
(ThermalShieldCore_sol, AlHoneycomb, "ThermalShieldCore_log");
|
||||
G4VPhysicalVolume* ThermalShieldCore_phys = new G4PVPlacement(0,
|
||||
G4ThreeVector(0,0,.5*ThermalShieldFacesheet_thi+.5*ThermalShieldCore_thi),
|
||||
"ThermalShieldCore_phys", ThermalShieldCore_log,
|
||||
ThermalShieldFacesheet_phys, false, 0);
|
||||
ThermalShieldCore_log->SetVisAttributes(red_vat);
|
||||
// Thermal Shield: foam
|
||||
G4Tubs* ThermalShieldFoam_sol = new G4Tubs("ThermalShieldFoam_sol",
|
||||
0., 0.5*UpperDeck_dia, 0.5*ThermalShieldFoam_thi, 0., 360.*deg);
|
||||
G4LogicalVolume* ThermalShieldFoam_log = new G4LogicalVolume
|
||||
(ThermalShieldFoam_sol, foam, "ThermalShieldFoam_log");
|
||||
G4VPhysicalVolume* ThermalShieldFoam_phys = new G4PVPlacement(0,
|
||||
G4ThreeVector(0,0,-.5*ThermalShieldFacesheet_thi-.5*ThermalShieldFoam_thi),
|
||||
"ThermalShieldFoam_phys", ThermalShieldFoam_log,
|
||||
ThermalShieldFacesheet_phys, false, 0);
|
||||
ThermalShieldFoam_log->SetVisAttributes(red_vat);
|
||||
|
||||
|
||||
|
||||
// Solar Array and OSR Assy *************************************************
|
||||
|
||||
// Solar Array: 13.5 kg
|
||||
// Thickness for correct mass
|
||||
G4Tubs* SolarArray_sol = new G4Tubs("SolarArray_sol",
|
||||
SolarArray_i, SolarArray_o, 0.5*SolarArray_thi, 0., 360.*deg);
|
||||
G4LogicalVolume* SolarArray_log = new G4LogicalVolume
|
||||
(SolarArray_sol, Scell, "SolarArray_log");
|
||||
G4VPhysicalVolume* SolarArray_phys = new G4PVPlacement(0, spacecraft_pos +
|
||||
G4ThreeVector(0,0,+.5*StructTube_hei+UpperDeckCore_thi+2*UpperDeckSkin_thi+
|
||||
UpperDeck_zoff+ThermalShield_thi+ThermalShield_zoff+0.5*SolarArray_thi),
|
||||
"SolarArray_phys",SolarArray_log, wld_phys, false, 0);
|
||||
SolarArray_log->SetVisAttributes(lblue_vat);
|
||||
// Optical Solar Reflector: NO MASS
|
||||
G4Tubs* OSRAssy_sol = new G4Tubs("OSRAssy_sol",
|
||||
0., OSRAssy_o, 0.5*OSRAssy_thi, 0., 360.*deg);
|
||||
G4LogicalVolume* OSRAssy_log = new G4LogicalVolume
|
||||
(OSRAssy_sol, vacuum, "OSRAssy_log");
|
||||
G4VPhysicalVolume* OSRAssy_phys = new G4PVPlacement(0, spacecraft_pos +
|
||||
G4ThreeVector(0,0,+.5*StructTube_hei+UpperDeckCore_thi+2*UpperDeckSkin_thi+
|
||||
UpperDeck_zoff+ThermalShield_thi+ThermalShield_zoff+0.5*OSRAssy_thi),
|
||||
"OSRAssy_phys",OSRAssy_log, wld_phys, false, 0);
|
||||
OSRAssy_log->SetVisAttributes(lblue_vat);
|
||||
|
||||
|
||||
|
||||
// Radiator Panels **********************************************************
|
||||
|
||||
// Radiator Panels: 3*3.87 kg
|
||||
// Thickess adjusted for correct mass of FS+Core+FS
|
||||
G4Cons* RadPanel_con = new G4Cons("RadPanel_con",
|
||||
0.5*RadPanel_bot-RadPanel_thi, 0.5*RadPanel_bot,
|
||||
0.5*RadPanel_top-RadPanel_thi, 0.5*RadPanel_top,
|
||||
0.5*RadPanel_len, 0.*deg, 360.*deg);
|
||||
// window cutouts
|
||||
G4Tubs* RadPanelCutout_tub = new G4Tubs("RadPanelCutout_tub", 0.,
|
||||
0.5*RadPanelCutout1_dia, 2*RadPanelCutout1_len, 0., 360.*deg);
|
||||
G4RotationMatrix SMS_rot8; SMS_rot8.rotateY(90.*deg);
|
||||
G4SubtractionSolid* RadPanel1_sol =
|
||||
new G4SubtractionSolid("RadPanel1_sol", RadPanel_con,
|
||||
RadPanelCutout_tub, G4Transform3D(SMS_rot8,
|
||||
G4ThreeVector(-RadPanelCutout_roff,0,0)));
|
||||
G4RotationMatrix SMS_rot9;
|
||||
SMS_rot9.rotateY(90.*deg); SMS_rot9.rotateZ(49.*deg);
|
||||
G4SubtractionSolid* RadPanel2_sol =
|
||||
new G4SubtractionSolid("RadPanel2_sol", RadPanel1_sol,
|
||||
RadPanelCutout_tub, G4Transform3D(SMS_rot9, G4ThreeVector
|
||||
(RadPanelCutout_roff*sin(49.*deg),RadPanelCutout_roff*cos(49.*deg),0)));
|
||||
G4RotationMatrix SMS_rot10;
|
||||
SMS_rot10.rotateY(90.*deg); SMS_rot10.rotateZ(131.*deg);
|
||||
G4SubtractionSolid* RadPanel3_sol =
|
||||
new G4SubtractionSolid("RadPanel3_sol", RadPanel2_sol,
|
||||
RadPanelCutout_tub, G4Transform3D(SMS_rot10, G4ThreeVector
|
||||
(RadPanelCutout_roff*sin(131.*deg),RadPanelCutout_roff*cos(131.*deg),0)));
|
||||
// box cutouts
|
||||
G4Box* RadPanelCutout_box = new G4Box("RadPanelCutout_box",
|
||||
0.5*RadPanelCutout2_len, 0.5*RadPanelCutout2_wid, 0.5*RadPanelCutout2_hei);
|
||||
G4SubtractionSolid* RadPanel4_sol =
|
||||
new G4SubtractionSolid("RadPanel4_sol", RadPanel3_sol,
|
||||
RadPanelCutout_box, G4Transform3D(G4RotationMatrix(), G4ThreeVector
|
||||
(RadPanelCutout_roff,0,RadPanelCutout2_zoff)));
|
||||
G4RotationMatrix SMS_rot11; SMS_rot11.rotateZ(+120.*deg);
|
||||
G4SubtractionSolid* RadPanel5_sol =
|
||||
new G4SubtractionSolid("RadPanel5_sol", RadPanel4_sol,
|
||||
RadPanelCutout_box, G4Transform3D(SMS_rot11,
|
||||
G4ThreeVector(RadPanelCutout_roff*cos(120.*deg),
|
||||
RadPanelCutout_roff*sin(120.*deg), RadPanelCutout2_zoff)));
|
||||
G4RotationMatrix SMS_rot12; SMS_rot12.rotateZ(-120.*deg);
|
||||
G4SubtractionSolid* RadPanel6_sol =
|
||||
new G4SubtractionSolid("RadPanel6_sol", RadPanel5_sol,
|
||||
RadPanelCutout_box, G4Transform3D(SMS_rot12,
|
||||
G4ThreeVector(RadPanelCutout_roff*cos(-120.*deg),
|
||||
RadPanelCutout_roff*sin(-120.*deg), RadPanelCutout2_zoff)));
|
||||
G4LogicalVolume* RadPanel_log =
|
||||
new G4LogicalVolume(RadPanel6_sol, Al6061, "RadPanel_log");
|
||||
G4VPhysicalVolume* RadPanel_phys =
|
||||
new G4PVPlacement(0, spacecraft_pos + G4ThreeVector(0,0,0),
|
||||
"RadPanel_phys", RadPanel_log, wld_phys, false, 0);
|
||||
RadPanel_log->SetVisAttributes(sol_white_vat);
|
||||
|
||||
//*****************************************************************************
|
||||
|
||||
|
||||
// invisible spacecraft top
|
||||
if(0) {
|
||||
UpperDeckSkin_log->SetVisAttributes(G4VisAttributes::Invisible);
|
||||
UpperDeckCore_log->SetVisAttributes(G4VisAttributes::Invisible);
|
||||
ThermalShieldFacesheet_log->SetVisAttributes(G4VisAttributes::Invisible);
|
||||
ThermalShieldCore_log->SetVisAttributes(G4VisAttributes::Invisible);
|
||||
ThermalShieldFoam_log->SetVisAttributes(G4VisAttributes::Invisible);
|
||||
// SolarArray_log->SetVisAttributes(G4VisAttributes::Invisible);
|
||||
OSRAssy_log->SetVisAttributes(G4VisAttributes::Invisible);
|
||||
}
|
||||
|
||||
// solid spacecraft top
|
||||
if(0) {
|
||||
UpperDeckSkin_log->SetVisAttributes(sol_white_vat);
|
||||
UpperDeckCore_log->SetVisAttributes(sol_white_vat);
|
||||
ThermalShieldFacesheet_log->SetVisAttributes(sol_red_vat);
|
||||
ThermalShieldCore_log->SetVisAttributes(sol_red_vat);
|
||||
ThermalShieldFoam_log->SetVisAttributes(sol_red_vat);
|
||||
SolarArray_log->SetVisAttributes(sol_lblue_vat);
|
||||
OSRAssy_log->SetVisAttributes(sol_lgreen_vat);
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
@@ -0,0 +1,101 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// ********************************************************************
|
||||
// * *
|
||||
// * cosmicray_charging advanced example for Geant4 *
|
||||
// * (adapted simulation of test-mass charging in the LISA mission) *
|
||||
// * *
|
||||
// * Henrique Araujo (h.araujo@imperial.ac.uk) & Peter Wass *
|
||||
// * Imperial College London *
|
||||
// * *
|
||||
// * LISADetectorConstruction class *
|
||||
// * *
|
||||
// ********************************************************************
|
||||
//
|
||||
// HISTORY
|
||||
// 22/02/2004: migrated from LISA-V04
|
||||
//
|
||||
// ********************************************************************
|
||||
|
||||
|
||||
//*************************************************************************
|
||||
// Sensor Vacuum Housing (TiAlloy)
|
||||
// Modified to contain LTP Inertial Sensor and Caging Mechanism
|
||||
//*************************************************************************
|
||||
|
||||
|
||||
// Sensor housing
|
||||
G4double SensorHousing_thi = 5.0*mm;
|
||||
G4double SensorHousing_yoff = +30.0*mm;
|
||||
// original dimentions
|
||||
// G4double SensorHousing_len = 170.0*mm;
|
||||
// G4double SensorHousing_wid = 120.0*mm;
|
||||
// G4double SensorHousing_hei = 120.0*mm;
|
||||
G4double SensorHousing_dia = 125.0*mm;
|
||||
G4double SensorHousing_hei = 224.0*mm;
|
||||
|
||||
|
||||
// Sensor vacuum housing ****************************************************
|
||||
|
||||
// // Outer dimensions as shown in Solid Model Document
|
||||
// G4Box* SensorHousing_o_sol = new G4Box("SensorHousing_o_sol",
|
||||
// 0.5*SensorHousing_len, 0.5*SensorHousing_hei, 0.5*SensorHousing_wid);
|
||||
// G4LogicalVolume* SensorHousing_o_log =
|
||||
// new G4LogicalVolume(SensorHousing_o_sol, TiAlloy,"SensorHousing_o_log");
|
||||
// G4VPhysicalVolume* SensorHousing_o_phys = new G4PVPlacement(G4Transform3D
|
||||
// (IS_rot, G4ThreeVector(0,SensorHousing_yoff,OpticalBench_off)),
|
||||
// "SensorHousing_o_phys", SensorHousing_o_log, wld_phys, false, 0);
|
||||
// G4Box* SensorHousing_i_sol = new G4Box("SensorHousing_i_sol",
|
||||
// 0.5*SensorHousing_len-SensorHousing_thi,
|
||||
// 0.5*SensorHousing_hei-SensorHousing_thi,
|
||||
// 0.5*SensorHousing_wid-SensorHousing_thi);
|
||||
// G4LogicalVolume* SensorHousing_i_log =
|
||||
// new G4LogicalVolume(SensorHousing_i_sol, vacuum, "SensorHousing_i_log");
|
||||
// G4VPhysicalVolume* SensorHousing_i_phys = new G4PVPlacement
|
||||
// (0, G4ThreeVector(0,0,0), "SensorHousing_i_phys",
|
||||
// SensorHousing_i_log, SensorHousing_o_phys, false, 0);
|
||||
// SensorHousing_o_log->SetVisAttributes(blue_vat);
|
||||
// SensorHousing_i_log->SetVisAttributes(blue_vat);
|
||||
|
||||
|
||||
// Modified to contain LTP Inertial Sensor and Caging Mechanism
|
||||
G4Tubs* SensorHousing_o_sol = new G4Tubs("SensorHousing_o_sol",
|
||||
0., 0.5*SensorHousing_dia, 0.5*SensorHousing_hei, 0., 360.*deg);
|
||||
G4LogicalVolume* SensorHousing_o_log =
|
||||
new G4LogicalVolume(SensorHousing_o_sol, TiAlloy, "SensorHousing_o_log");
|
||||
G4VPhysicalVolume* SensorHousing_o_phys = new G4PVPlacement(G4Transform3D
|
||||
(IS_rot, G4ThreeVector(0,SensorHousing_yoff,OpticalBench_off)),
|
||||
"SensorHousing_o_phys", SensorHousing_o_log, TelBox_phys, false, 0);
|
||||
G4Tubs* SensorHousing_i_sol = new G4Tubs("SensorHousing_i_sol",
|
||||
0., 0.5*SensorHousing_dia - SensorHousing_thi, 0.5*SensorHousing_hei
|
||||
- SensorHousing_thi, 0., 360.*deg);
|
||||
G4LogicalVolume* SensorHousing_i_log =
|
||||
new G4LogicalVolume(SensorHousing_i_sol, vacuum, "SensorHousing_i_log");
|
||||
G4VPhysicalVolume* SensorHousing_i_phys = new G4PVPlacement
|
||||
(0, G4ThreeVector(0,0,0), "SensorHousing_i_phys",
|
||||
SensorHousing_i_log, SensorHousing_o_phys, false, 0);
|
||||
SensorHousing_o_log->SetVisAttributes(blue_vat);
|
||||
SensorHousing_i_log->SetVisAttributes(blue_vat);
|
||||
|
||||
|
||||
//*****************************************************************************
|
||||
@@ -0,0 +1,164 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// ********************************************************************
|
||||
// * *
|
||||
// * cosmicray_charging advanced example for Geant4 *
|
||||
// * (adapted simulation of test-mass charging in the LISA mission) *
|
||||
// * *
|
||||
// * Henrique Araujo (h.araujo@imperial.ac.uk) & Peter Wass *
|
||||
// * Imperial College London *
|
||||
// * *
|
||||
// * LISAStackingAction class *
|
||||
// * *
|
||||
// ********************************************************************
|
||||
//
|
||||
// HISTORY
|
||||
// 22/02/2004: migrated from LISA-V04
|
||||
//
|
||||
// ********************************************************************
|
||||
|
||||
|
||||
#include "LISAStackingAction.hh"
|
||||
|
||||
#include "LISAStackingActionMessenger.hh"
|
||||
|
||||
#include "G4Track.hh"
|
||||
#include "G4TrackStatus.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4ParticleTypes.hh"
|
||||
#include <fstream>
|
||||
|
||||
LISAStackingAction::LISAStackingAction() {
|
||||
|
||||
// messenger defaults
|
||||
PrimarySurveyFlag = false;
|
||||
ParticleSurveyFlag = false;
|
||||
|
||||
// create messenger
|
||||
stackingMessenger = new LISAStackingActionMessenger(this);
|
||||
|
||||
}
|
||||
|
||||
|
||||
LISAStackingAction::~LISAStackingAction() {
|
||||
|
||||
delete stackingMessenger;
|
||||
|
||||
}
|
||||
|
||||
|
||||
G4ClassificationOfNewTrack LISAStackingAction::ClassifyNewTrack
|
||||
(const G4Track* aTrack) {
|
||||
|
||||
|
||||
// write primary spectrum to file
|
||||
if(PrimarySurveyFlag) {
|
||||
if(!aTrack->GetParentID()) {
|
||||
G4double energy = aTrack->GetKineticEnergy();
|
||||
std::ofstream primaries("primaries.out",std::ios::app);
|
||||
primaries << energy/MeV << G4endl;
|
||||
return (G4ClassificationOfNewTrack) fKill;
|
||||
}
|
||||
}
|
||||
|
||||
// Particle Survey
|
||||
if(ParticleSurveyFlag) {
|
||||
G4String particle = aTrack->GetDefinition()->GetParticleName();
|
||||
G4double energy = aTrack->GetKineticEnergy();
|
||||
//
|
||||
// gammas above 1 MeV
|
||||
if(particle=="gamma" && energy>1*MeV) {
|
||||
std::ofstream gammas("gammas.out",std::ios::app);
|
||||
gammas << energy/MeV << G4endl;
|
||||
}
|
||||
// electrons and positrons above 1 MeV
|
||||
else if((particle=="e-" || particle=="e+") && energy>1.*MeV) {
|
||||
std::ofstream electrons("electrons.out",std::ios::app);
|
||||
electrons << energy/MeV << G4endl;
|
||||
}
|
||||
// delta electrons
|
||||
// else if(particle=="e-" && aTrack->GetParentID()>0) {
|
||||
// std::ofstream deltas("deltas.out",std::ios::app);
|
||||
// deltas << energy/eV << G4endl;
|
||||
// return (G4ClassificationOfNewTrack) fKill;
|
||||
// }
|
||||
//
|
||||
// neutrons
|
||||
else if(particle=="neutron") {
|
||||
std::ofstream neutrons("neutrons.out",std::ios::app);
|
||||
neutrons << energy/MeV << G4endl;
|
||||
}
|
||||
// pions
|
||||
else if(particle=="pi+" || particle=="pi-" || particle=="pi0") {
|
||||
std::ofstream pions("pions.out",std::ios::app);
|
||||
pions << energy/MeV << G4endl;
|
||||
}
|
||||
// fragments (energy per nucleon)
|
||||
else if(particle=="deuteron" || particle=="triton" ||
|
||||
particle=="He3" || particle=="alpha") {
|
||||
G4int A = aTrack->GetDefinition()->GetBaryonNumber();
|
||||
std::ofstream fragments("fragments.out",std::ios::app);
|
||||
fragments << energy/A/MeV << G4endl;
|
||||
}
|
||||
// muons
|
||||
else if(particle=="mu+" || particle=="mu-") {
|
||||
std::ofstream muons("muons.out",std::ios::app);
|
||||
muons << energy/MeV << G4endl;
|
||||
}
|
||||
// kaons
|
||||
else if(particle=="kaon+" || particle=="kaon-" ||
|
||||
particle=="kaon0S" || particle=="kaon0L" ) {
|
||||
std::ofstream kaons("kaons.out",std::ios::app);
|
||||
kaons << energy/MeV << G4endl;
|
||||
}
|
||||
// nuclei (energy per nucleon)
|
||||
else if(aTrack->GetDefinition()->GetParticleType()=="nucleus") {
|
||||
G4int A = aTrack->GetDefinition()->GetBaryonNumber();
|
||||
std::ofstream nuclei("nuclei.out",std::ios::app);
|
||||
nuclei << energy/A/MeV << "\t" << particle << G4endl;
|
||||
}
|
||||
// others
|
||||
else if(particle!="proton" && energy>1.*MeV) {
|
||||
std::ofstream others("others.out",std::ios::app);
|
||||
others << energy/MeV << "\t" << particle << G4endl;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
return (G4ClassificationOfNewTrack) fWaiting;
|
||||
|
||||
}
|
||||
|
||||
|
||||
void LISAStackingAction::NewStage() {;}
|
||||
|
||||
|
||||
void LISAStackingAction::PrepareNewEvent() {;}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// ********************************************************************
|
||||
// * *
|
||||
// * cosmicray_charging advanced example for Geant4 *
|
||||
// * (adapted simulation of test-mass charging in the LISA mission) *
|
||||
// * *
|
||||
// * Henrique Araujo (h.araujo@imperial.ac.uk) & Peter Wass *
|
||||
// * Imperial College London *
|
||||
// * *
|
||||
// * LISAStackingActionMessenger class *
|
||||
// * *
|
||||
// ********************************************************************
|
||||
//
|
||||
// HISTORY
|
||||
// 22/02/2004: migrated from LISA-V04
|
||||
//
|
||||
// ********************************************************************
|
||||
|
||||
|
||||
#include "LISAStackingActionMessenger.hh"
|
||||
|
||||
#include "LISAStackingAction.hh"
|
||||
|
||||
|
||||
LISAStackingActionMessenger::LISAStackingActionMessenger
|
||||
(LISAStackingAction* stackAct) : stackingAction(stackAct){
|
||||
|
||||
// set flag for primaries survey
|
||||
SetPriSurvey = new G4UIcmdWithABool("/surveys/surveyPrimaries",this);
|
||||
SetPriSurvey->SetGuidance
|
||||
("Dump primary energies (MeV) to file 'primaries.out'");
|
||||
SetPriSurvey->SetGuidance("Default = false");
|
||||
SetPriSurvey->SetParameterName("SurveyPrimariesFlag", false);
|
||||
SetPriSurvey->AvailableForStates(G4State_Idle);
|
||||
|
||||
// set flag for particle survey
|
||||
SetPartSurvey = new G4UIcmdWithABool("/surveys/surveyParticles",this);
|
||||
SetPartSurvey->SetGuidance("Dump particle energies to different files");
|
||||
SetPartSurvey->SetGuidance("Fragments and nuclei in MeV/nucleon, other in MeV.");
|
||||
SetPartSurvey->SetGuidance("'gammas.out': gammas above 1 MeV");
|
||||
SetPartSurvey->SetGuidance("'electrons.out': e- and e+ above 1 MeV");
|
||||
SetPartSurvey->SetGuidance("'neutrons.out': all neutrons");
|
||||
SetPartSurvey->SetGuidance("'pions.out': all pions");
|
||||
SetPartSurvey->SetGuidance("'muons.out': all muons");
|
||||
SetPartSurvey->SetGuidance("'kaons.out': all kaons");
|
||||
SetPartSurvey->SetGuidance("'fragments.out': 2H, 3H, He3, alphas");
|
||||
SetPartSurvey->SetGuidance("'nuclei.out': all nuclei");
|
||||
SetPartSurvey->SetGuidance("'others.out': others above 1 MeV");
|
||||
SetPartSurvey->SetGuidance("Default = false");
|
||||
SetPartSurvey->SetParameterName("SurveyParticlesFlag", false);
|
||||
SetPartSurvey->AvailableForStates(G4State_Idle);
|
||||
|
||||
}
|
||||
|
||||
|
||||
LISAStackingActionMessenger::~LISAStackingActionMessenger() {
|
||||
|
||||
delete SetPriSurvey;
|
||||
delete SetPartSurvey;
|
||||
|
||||
}
|
||||
|
||||
|
||||
void LISAStackingActionMessenger::SetNewValue
|
||||
(G4UIcommand* command, G4String newValue) {
|
||||
|
||||
if(command == SetPriSurvey) {
|
||||
G4int vl;
|
||||
const char* t = newValue;
|
||||
std::istrstream is((char*)t);
|
||||
is >> vl;
|
||||
stackingAction->SetPrimarySurvey(vl!=0);
|
||||
}
|
||||
|
||||
else if(command == SetPartSurvey) {
|
||||
G4int vl;
|
||||
const char* t = newValue;
|
||||
std::istrstream is((char*)t);
|
||||
is >> vl;
|
||||
stackingAction->SetParticleSurvey(vl!=0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,178 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// ********************************************************************
|
||||
// * *
|
||||
// * cosmicray_charging advanced example for Geant4 *
|
||||
// * (adapted simulation of test-mass charging in the LISA mission) *
|
||||
// * *
|
||||
// * Henrique Araujo (h.araujo@imperial.ac.uk) & Peter Wass *
|
||||
// * Imperial College London *
|
||||
// * *
|
||||
// * LISASteppingAction class *
|
||||
// * *
|
||||
// ********************************************************************
|
||||
//
|
||||
// HISTORY
|
||||
// 22/02/2004: migrated from LISA-V04
|
||||
//
|
||||
// ********************************************************************
|
||||
|
||||
|
||||
#include "LISASteppingAction.hh"
|
||||
|
||||
#include "LISASteppingActionMessenger.hh"
|
||||
|
||||
#include "G4Step.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4TrackStatus.hh"
|
||||
#include "G4StepPoint.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4DynamicParticle.hh"
|
||||
#include "G4ParticleTypes.hh"
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
#include "G4VTouchable.hh"
|
||||
#include "G4TouchableHistory.hh"
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4ios.hh"
|
||||
#include <fstream>
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
LISASteppingAction::LISASteppingAction() {
|
||||
|
||||
charge_in[0] = 0;
|
||||
charge_in[1] = 0;
|
||||
charge_out[0] = 0;
|
||||
charge_out[1] = 0;
|
||||
|
||||
// defaults
|
||||
FlagSpectrum = false;
|
||||
|
||||
// create messenger
|
||||
steppingMessenger = new LISASteppingActionMessenger(this);
|
||||
|
||||
}
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
LISASteppingAction::~LISASteppingAction() {
|
||||
|
||||
delete steppingMessenger;
|
||||
|
||||
}
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
void LISASteppingAction::UserSteppingAction(const G4Step* fStep) {
|
||||
|
||||
if(fStep->GetTrack()->GetNextVolume()) {
|
||||
|
||||
// step points
|
||||
G4TouchableHistory* thePreTouchable =
|
||||
(G4TouchableHistory*)(fStep->GetPreStepPoint()->GetTouchable());
|
||||
G4TouchableHistory* thePostTouchable =
|
||||
(G4TouchableHistory*)(fStep->GetPostStepPoint()->GetTouchable());
|
||||
G4String PreVol = thePreTouchable->GetVolume()->GetName();
|
||||
G4String PosVol = thePostTouchable->GetVolume()->GetName();
|
||||
|
||||
// particle
|
||||
G4double charge = fStep->GetTrack()->GetDefinition()->GetPDGCharge();
|
||||
G4String pName = fStep->GetTrack()->GetDefinition()->GetParticleName();
|
||||
G4double energy = fStep->GetTrack()->GetKineticEnergy();
|
||||
|
||||
G4int tm = -1;
|
||||
|
||||
|
||||
// *** entering a test mass ***
|
||||
if(PreVol!="tmass_phys" && PosVol=="tmass_phys") {
|
||||
|
||||
tm = thePostTouchable->GetReplicaNumber(6);
|
||||
|
||||
charge_in[tm] += (int)charge;
|
||||
|
||||
// energy spectra at test-mass boundary
|
||||
if(FlagSpectrum) {
|
||||
// electrons entering test mass
|
||||
if(pName=="e-") {
|
||||
std::ofstream electrons_in("electrons_in.out",std::ios::app);
|
||||
electrons_in << energy/eV << G4endl;
|
||||
}
|
||||
// hadrons entering test mass
|
||||
else if(pName=="proton" ||
|
||||
pName=="pi+" || pName=="pi-" ||
|
||||
pName=="deuteron" || pName=="He3" ||
|
||||
pName=="alpha" || pName=="triton") {
|
||||
std::ofstream hadrons_in("hadrons_in.out",std::ios::app);
|
||||
hadrons_in << energy/eV << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
} // *** entering a test mass ***
|
||||
|
||||
|
||||
// *** leaving a test mass ***
|
||||
else if(PreVol!=PosVol && PreVol=="tmass_phys") {
|
||||
|
||||
tm = thePreTouchable->GetReplicaNumber(6);
|
||||
|
||||
charge_out[tm] += (int)charge;
|
||||
|
||||
// energy spectra at test-mass boundary
|
||||
if(FlagSpectrum) {
|
||||
// electrons leaving test mass
|
||||
if(pName=="e-") {
|
||||
std::ofstream electrons_out("electrons_out.out",std::ios::app);
|
||||
electrons_out << energy/eV << G4endl;
|
||||
}
|
||||
// hadrons leaving test mass
|
||||
else if(pName=="proton" ||
|
||||
pName=="pi+" || pName=="pi-" ||
|
||||
pName=="deuteron" || pName=="He3" ||
|
||||
pName=="alpha" || pName=="triton") {
|
||||
std::ofstream hadrons_out("hadrons_out.out",std::ios::app);
|
||||
hadrons_out << energy/eV << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
} // *** leaving a test mass ***
|
||||
|
||||
|
||||
} // if(next volume)
|
||||
|
||||
|
||||
// count particles hitting probe volume
|
||||
// if(fStep->GetTrack()->GetNextVolume()) {
|
||||
// static int i=0;
|
||||
// G4String PosVol=fStep->GetPostStepPoint()
|
||||
// ->GetPhysicalVolume()->GetName();
|
||||
// if(PosVol=="probe_phys") {
|
||||
// fStep->GetTrack()->SetTrackStatus(fStopAndKill);
|
||||
// G4cout << i++ << G4endl;
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// ********************************************************************
|
||||
// * *
|
||||
// * cosmicray_charging advanced example for Geant4 *
|
||||
// * (adapted simulation of test-mass charging in the LISA mission) *
|
||||
// * *
|
||||
// * Henrique Araujo (h.araujo@imperial.ac.uk) & Peter Wass *
|
||||
// * Imperial College London *
|
||||
// * *
|
||||
// * LISASteppingActionMessenger class *
|
||||
// * *
|
||||
// ********************************************************************
|
||||
//
|
||||
// HISTORY
|
||||
// 22/02/2004: migrated from LISA-V04
|
||||
//
|
||||
// ********************************************************************
|
||||
|
||||
#include "LISASteppingActionMessenger.hh"
|
||||
|
||||
#include "LISASteppingAction.hh"
|
||||
|
||||
|
||||
LISASteppingActionMessenger::LISASteppingActionMessenger
|
||||
(LISASteppingAction* stepAct) : steppingAction(stepAct){
|
||||
|
||||
|
||||
newDir = new G4UIdirectory("/surveys/");
|
||||
newDir->SetGuidance("Particle survey control commands.");
|
||||
|
||||
// set flag for spectrum saving
|
||||
SetFlagSpectrum = new G4UIcmdWithABool("/surveys/surveyTestMasses",this);
|
||||
SetFlagSpectrum->SetGuidance("Dump energies (eV) for e- and hadrons");
|
||||
SetFlagSpectrum->SetGuidance("entering and leaving the test masses.");
|
||||
SetFlagSpectrum->SetGuidance("'electrons_in.out' : e- entering TM");
|
||||
SetFlagSpectrum->SetGuidance("'electrons_out.out': e- leaving TM");
|
||||
SetFlagSpectrum->SetGuidance("'hadrons_in.out' : hadrons entering TM");
|
||||
SetFlagSpectrum->SetGuidance("'hadrons_out.out' : hadrons leaving TM");
|
||||
SetFlagSpectrum->SetGuidance("Default = false");
|
||||
SetFlagSpectrum->SetParameterName("FlagSpectrum", false);
|
||||
SetFlagSpectrum->AvailableForStates(G4State_Idle);
|
||||
|
||||
}
|
||||
|
||||
|
||||
LISASteppingActionMessenger::~LISASteppingActionMessenger() {
|
||||
|
||||
delete SetFlagSpectrum;
|
||||
delete newDir;
|
||||
|
||||
}
|
||||
|
||||
|
||||
void LISASteppingActionMessenger::SetNewValue
|
||||
(G4UIcommand* command, G4String newValue) {
|
||||
|
||||
if(command == SetFlagSpectrum) {
|
||||
G4int vl;
|
||||
const char* t = newValue;
|
||||
std::istrstream is((char*)t);
|
||||
is >> vl;
|
||||
steppingAction->SetFlagSpectrum(vl!=0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,206 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// ********************************************************************
|
||||
// * *
|
||||
// * cosmicray_charging advanced example for Geant4 *
|
||||
// * (adapted simulation of test-mass charging in the LISA mission) *
|
||||
// * *
|
||||
// * Henrique Araujo (h.araujo@imperial.ac.uk) & Peter Wass *
|
||||
// * Imperial College London *
|
||||
// * *
|
||||
// * LISADetectorConstruction class *
|
||||
// * *
|
||||
// ********************************************************************
|
||||
//
|
||||
// HISTORY
|
||||
// 22/02/2004: migrated from LISA-V04
|
||||
//
|
||||
// ********************************************************************
|
||||
|
||||
|
||||
//***************************************************************************
|
||||
// Support systems
|
||||
//***************************************************************************
|
||||
// Star Trackers
|
||||
// FEEP Thrusters
|
||||
// Communications Antennas
|
||||
//***************************************************************************
|
||||
|
||||
|
||||
// Star Trackers ************************************************************
|
||||
|
||||
G4double ST_rad = 0.5*2270*mm;
|
||||
G4RotationMatrix ST_rot1; ST_rot1.rotateZ(+30.*deg);
|
||||
G4ThreeVector ST_pos1(ST_rad*cos(56*deg),+ST_rad*sin(56*deg),180.*mm);
|
||||
G4RotationMatrix ST_rot2; ST_rot2.rotateZ(-30.*deg);
|
||||
G4ThreeVector ST_pos2(ST_rad*cos(56*deg),-ST_rad*sin(56*deg),180.*mm);
|
||||
G4RotationMatrix ST_rot3; ST_rot3.rotateY(90.*deg);
|
||||
|
||||
// Star Tracker: 2 kg
|
||||
G4double StarTracker_dia_o = 100.*mm;
|
||||
G4double StarTracker_dia_i = 40.*mm;
|
||||
G4double StarTracker_len = 120.*mm;
|
||||
// Bracket: 0.25 kg
|
||||
G4double StarTrackerBracket_wid = 120.*mm;
|
||||
G4double StarTrackerBracket_hei = 104.*mm;
|
||||
G4double StarTrackerBracket_thi = 7.5*mm;
|
||||
|
||||
G4Tubs* StarTracker_tub = new G4Tubs("StarTracker_tub",0.5*StarTracker_dia_i,
|
||||
0.5*StarTracker_dia_o, 0.5*StarTracker_len, 0., 360.*deg);
|
||||
G4Box* StarTrackerBracket_box = new G4Box("StarTrackerBracket_box",
|
||||
0.5*StarTrackerBracket_thi, 0.5*StarTrackerBracket_wid,
|
||||
0.5*StarTrackerBracket_hei);
|
||||
G4UnionSolid* StarTracker_sol = new G4UnionSolid("StarTracker_sol",
|
||||
StarTrackerBracket_box, StarTracker_tub, G4Transform3D(ST_rot3,
|
||||
G4ThreeVector(0.5*(StarTracker_len + StarTrackerBracket_thi),0,0)));
|
||||
G4LogicalVolume* StarTracker_log =
|
||||
new G4LogicalVolume(StarTracker_sol, Al6061, "StarTracker_log");
|
||||
G4VPhysicalVolume* StarTracker_phys;
|
||||
StarTracker_phys = new G4PVPlacement(G4Transform3D(ST_rot1, spacecraft_pos
|
||||
+ ST_pos1), "StarTracker_phys", StarTracker_log, wld_phys, false, 0);
|
||||
StarTracker_phys = new G4PVPlacement(G4Transform3D(ST_rot2, spacecraft_pos
|
||||
+ ST_pos2), "StarTracker_phys", StarTracker_log, wld_phys, false, 1);
|
||||
StarTracker_log->SetVisAttributes(sol_cyan_vat);
|
||||
|
||||
|
||||
|
||||
// FEEP Thrusters ***********************************************************
|
||||
|
||||
G4double FEEP_rad = 0.5*2520*mm;
|
||||
G4RotationMatrix FEEP_rot1;
|
||||
FEEP_rot1.rotateZ(-90.*deg); FEEP_rot1.rotateX(180.*deg);
|
||||
G4ThreeVector FEEP_pos1(FEEP_rad,0,170.*mm);
|
||||
G4RotationMatrix FEEP_rot2;
|
||||
FEEP_rot2.rotateZ(+30.*deg); FEEP_rot2.rotateX(180.*deg);
|
||||
G4ThreeVector FEEP_pos2(-FEEP_rad*cos(60*deg),-FEEP_rad*sin(60*deg),170.*mm);
|
||||
G4RotationMatrix FEEP_rot3;
|
||||
FEEP_rot3.rotateZ(150.*deg); FEEP_rot3.rotateX(180.*deg);
|
||||
G4ThreeVector FEEP_pos3(-FEEP_rad*cos(60*deg),+FEEP_rad*sin(60*deg),170.*mm);
|
||||
|
||||
// 1 support + 2 FEEPs: ~11 kg
|
||||
G4double FEEP_dia_o = 140.*mm;
|
||||
G4double FEEP_dia_i = 130.*mm;
|
||||
G4double FEEP_len = 105.*mm;
|
||||
G4double FEEP_xoff = 110.*mm;
|
||||
G4double FEEP_yoff = 70.*mm;
|
||||
G4double FEEP_zoff = 15.*mm;
|
||||
G4double FEEPSup_len = 245.*mm;
|
||||
G4double FEEPSup_wid = 276.*mm;
|
||||
G4double FEEPSup_hei = 146.*mm;
|
||||
G4double FEEPCut1_wid = 31.*mm;
|
||||
G4double FEEPCut1_yoff = 50.*mm;
|
||||
G4double FEEPCut2_len = 70.*mm;
|
||||
G4double FEEPCut2_zoff = 10.*mm;
|
||||
G4double FEEPCut3_xoff = 140.*mm;
|
||||
|
||||
G4RotationMatrix FEEP_rot4;
|
||||
FEEP_rot4.rotateY((90.+15.)*deg); FEEP_rot4.rotateZ(-25.*deg);
|
||||
G4RotationMatrix FEEP_rot5;
|
||||
FEEP_rot5.rotateY((90.-15.)*deg); FEEP_rot5.rotateZ(+25.*deg);
|
||||
|
||||
// Mounting bracket
|
||||
G4Box* FEEP_sol1 = new G4Box("FEEP_sol1",
|
||||
0.5*FEEPSup_wid, 0.5*FEEPSup_len, 0.5*FEEPSup_hei);
|
||||
G4Box* FEEPSupCutout1 = new G4Box("FEEPSupCutout1",
|
||||
0.5*FEEPCut1_wid, 0.5*FEEPSup_len, 0.6*FEEPSup_hei);
|
||||
G4SubtractionSolid* FEEP_sol2 = new G4SubtractionSolid("FEEP_sol2",
|
||||
FEEP_sol1, FEEPSupCutout1, G4Transform3D(G4RotationMatrix(),
|
||||
G4ThreeVector(0, -FEEPCut1_yoff, 0.)));
|
||||
G4Box* FEEPSupCutout2 = new G4Box("FEEPSupCutout2",
|
||||
0.6*FEEPSup_wid, 0.5*FEEPCut2_len, 0.51*FEEPSup_hei);
|
||||
G4SubtractionSolid* FEEP_sol3 = new G4SubtractionSolid("FEEP_sol3",
|
||||
FEEP_sol2, FEEPSupCutout2, G4Transform3D(G4RotationMatrix(),
|
||||
G4ThreeVector(0,-0.5*FEEPSup_len+0.5*FEEPCut2_len-.5*mm, FEEPCut2_zoff)));
|
||||
G4Box* FEEPSupCutout3 = new G4Box("FEEPSupCutout3",
|
||||
FEEPSup_wid, FEEPSup_hei, FEEPCut2_len);
|
||||
G4SubtractionSolid* FEEP_sol4 = new G4SubtractionSolid("FEEP_sol4",
|
||||
FEEP_sol3, FEEPSupCutout3, G4Transform3D(FEEP_rot4,
|
||||
G4ThreeVector(-FEEPCut3_xoff,FEEPCut2_len,0)));
|
||||
G4SubtractionSolid* FEEP_sol5 = new G4SubtractionSolid("FEEP_sol5",
|
||||
FEEP_sol4, FEEPSupCutout3, G4Transform3D(FEEP_rot5,
|
||||
G4ThreeVector(+FEEPCut3_xoff,FEEPCut2_len,0)));
|
||||
// FEEPs
|
||||
G4Tubs* FEEP_tub = new G4Tubs("FEEP_tub", 0.5*FEEP_dia_i, 0.5*FEEP_dia_o,
|
||||
0.5*FEEP_len, 0., 360.*deg);
|
||||
G4UnionSolid* FEEP_sol6 = new G4UnionSolid("FEEP_sol",
|
||||
FEEP_sol5, FEEP_tub, G4Transform3D(FEEP_rot4,
|
||||
G4ThreeVector(-FEEP_xoff,FEEP_yoff,FEEP_zoff)));
|
||||
G4UnionSolid* FEEP_sol7 = new G4UnionSolid("FEEP_sol",
|
||||
FEEP_sol6, FEEP_tub, G4Transform3D(FEEP_rot5,
|
||||
G4ThreeVector(+FEEP_xoff,FEEP_yoff,FEEP_zoff)));
|
||||
G4LogicalVolume* FEEP_log =
|
||||
new G4LogicalVolume(FEEP_sol7, Al6061, "FEEP_log");
|
||||
G4VPhysicalVolume* FEEP_phys;
|
||||
FEEP_phys = new G4PVPlacement(G4Transform3D(FEEP_rot1,
|
||||
spacecraft_pos+FEEP_pos1), "FEEP_phys", FEEP_log, wld_phys, false, 0);
|
||||
FEEP_phys = new G4PVPlacement(G4Transform3D(FEEP_rot2,
|
||||
spacecraft_pos+FEEP_pos2), "FEEP_phys", FEEP_log, wld_phys, false, 1);
|
||||
FEEP_phys = new G4PVPlacement(G4Transform3D(FEEP_rot3,
|
||||
spacecraft_pos+FEEP_pos3), "FEEP_phys", FEEP_log, wld_phys, false, 2);
|
||||
FEEP_log->SetVisAttributes(sol_cyan_vat);
|
||||
|
||||
|
||||
// Communications Antennas **************************************************
|
||||
|
||||
|
||||
// Antenna dish: ~1.4 kg
|
||||
G4double Antenna_dia = 295.*mm;
|
||||
G4double Antenna_thi = 7.*mm;
|
||||
G4double Antenna_rad = 300.*mm;
|
||||
// Antenna mount: 1 kg cylindrical shell
|
||||
G4double AntennaMount_dia_o = 90.*mm;
|
||||
G4double AntennaMount_dia_i = 77.*mm;
|
||||
G4double AntennaMount_len = 220.*mm;
|
||||
|
||||
G4ThreeVector ant_pos1(Antenna_rad+0*mm,+1250*mm,+550.*mm);
|
||||
G4ThreeVector ant_pos2(Antenna_rad-0*mm,-1250*mm,+550.*mm);
|
||||
G4RotationMatrix ant_rot3; ant_rot3.rotateY(-90.*deg);
|
||||
|
||||
// Dish
|
||||
G4Sphere* Antenna_sol = new G4Sphere("Antenna_sol", Antenna_rad-Antenna_thi,
|
||||
Antenna_rad, 0., 360.*deg, 0, asin(0.5*Antenna_dia/Antenna_rad));
|
||||
G4LogicalVolume* Antenna_log = new G4LogicalVolume
|
||||
(Antenna_sol, Al6061, "Antenna_log");
|
||||
G4VPhysicalVolume* Antenna_phys;
|
||||
Antenna_phys = new G4PVPlacement(G4Transform3D(ant_rot3, spacecraft_pos
|
||||
+ ant_pos1), "Antenna_phys", Antenna_log, wld_phys, false, 0);
|
||||
Antenna_phys = new G4PVPlacement(G4Transform3D(ant_rot3, spacecraft_pos
|
||||
+ ant_pos2), "Antenna_phys", Antenna_log, wld_phys, false, 1);
|
||||
Antenna_log->SetVisAttributes(sol_cyan_vat);
|
||||
|
||||
// Mount
|
||||
G4Tubs* AntennaMount_tub = new G4Tubs("AntennaMount_sol",
|
||||
0.5*AntennaMount_dia_i, 0.5*AntennaMount_dia_o, 0.5*AntennaMount_len,
|
||||
0., 360.*deg);
|
||||
G4LogicalVolume* AntennaMount_log = new G4LogicalVolume
|
||||
(AntennaMount_tub, Al6061, "AntennaMount_log");
|
||||
G4VPhysicalVolume* AntennaMount_phys;
|
||||
AntennaMount_phys = new G4PVPlacement(0, spacecraft_pos+ant_pos1+
|
||||
G4ThreeVector(-Antenna_rad-60.*mm,0,-80.*mm),
|
||||
"AntennaMount_phys", AntennaMount_log, wld_phys, false, 0);
|
||||
AntennaMount_phys = new G4PVPlacement(0, spacecraft_pos+ant_pos2+
|
||||
G4ThreeVector(-Antenna_rad-60.*mm,0,-80.*mm),
|
||||
"AntennaMount_phys", AntennaMount_log, wld_phys, false, 1);
|
||||
AntennaMount_log->SetVisAttributes(sol_cyan_vat);
|
||||
|
||||
//*****************************************************************************
|
||||
@@ -0,0 +1,160 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// ********************************************************************
|
||||
// * *
|
||||
// * cosmicray_charging advanced example for Geant4 *
|
||||
// * (adapted simulation of test-mass charging in the LISA mission) *
|
||||
// * *
|
||||
// * Henrique Araujo (h.araujo@imperial.ac.uk) & Peter Wass *
|
||||
// * Imperial College London *
|
||||
// * *
|
||||
// * LISAVisManager class *
|
||||
// * *
|
||||
// ********************************************************************
|
||||
//
|
||||
// HISTORY
|
||||
// 22/02/2004: migrated from LISA-V04
|
||||
//
|
||||
// ********************************************************************
|
||||
|
||||
#ifdef G4VIS_USE
|
||||
|
||||
#include "LISAVisManager.hh"
|
||||
|
||||
// Supported drivers...
|
||||
|
||||
// Not needing external packages or libraries...
|
||||
#include "G4ASCIITree.hh"
|
||||
#include "G4DAWNFILE.hh"
|
||||
#include "G4GAGTree.hh"
|
||||
#include "G4HepRepFile.hh"
|
||||
#include "G4RayTracer.hh"
|
||||
#include "G4VRML1File.hh"
|
||||
#include "G4VRML2File.hh"
|
||||
|
||||
// Needing external packages or libraries...
|
||||
|
||||
#ifdef G4VIS_USE_DAWN
|
||||
#include "G4FukuiRenderer.hh"
|
||||
#endif
|
||||
|
||||
#ifdef G4VIS_USE_OPACS
|
||||
#include "G4Wo.hh"
|
||||
#include "G4Xo.hh"
|
||||
#endif
|
||||
|
||||
#ifdef G4VIS_USE_OPENGLX
|
||||
#include "G4OpenGLImmediateX.hh"
|
||||
#include "G4OpenGLStoredX.hh"
|
||||
#endif
|
||||
|
||||
#ifdef G4VIS_USE_OPENGLWIN32
|
||||
#include "G4OpenGLImmediateWin32.hh"
|
||||
#include "G4OpenGLStoredWin32.hh"
|
||||
#endif
|
||||
|
||||
#ifdef G4VIS_USE_OPENGLXM
|
||||
#include "G4OpenGLImmediateXm.hh"
|
||||
#include "G4OpenGLStoredXm.hh"
|
||||
#endif
|
||||
|
||||
#ifdef G4VIS_USE_OIX
|
||||
#include "G4OpenInventorX.hh"
|
||||
#endif
|
||||
|
||||
#ifdef G4VIS_USE_OIWIN32
|
||||
#include "G4OpenInventorWin32.hh"
|
||||
#endif
|
||||
|
||||
#ifdef G4VIS_USE_VRML
|
||||
#include "G4VRML1.hh"
|
||||
#include "G4VRML2.hh"
|
||||
#endif
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
LISAVisManager::LISAVisManager () {}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
void LISAVisManager::RegisterGraphicsSystems () {
|
||||
|
||||
// Graphics Systems not needing external packages or libraries...
|
||||
RegisterGraphicsSystem (new G4ASCIITree);
|
||||
RegisterGraphicsSystem (new G4DAWNFILE);
|
||||
RegisterGraphicsSystem (new G4GAGTree);
|
||||
RegisterGraphicsSystem (new G4HepRepFile);
|
||||
RegisterGraphicsSystem (new G4RayTracer);
|
||||
RegisterGraphicsSystem (new G4VRML1File);
|
||||
RegisterGraphicsSystem (new G4VRML2File);
|
||||
|
||||
// Graphics systems needing external packages or libraries...
|
||||
|
||||
#ifdef G4VIS_USE_DAWN
|
||||
RegisterGraphicsSystem (new G4FukuiRenderer);
|
||||
#endif
|
||||
|
||||
#ifdef G4VIS_USE_OPACS
|
||||
RegisterGraphicsSystem (new G4Wo);
|
||||
RegisterGraphicsSystem (new G4Xo);
|
||||
#endif
|
||||
|
||||
#ifdef G4VIS_USE_OPENGLX
|
||||
RegisterGraphicsSystem (new G4OpenGLImmediateX);
|
||||
RegisterGraphicsSystem (new G4OpenGLStoredX);
|
||||
#endif
|
||||
|
||||
#ifdef G4VIS_USE_OPENGLWIN32
|
||||
RegisterGraphicsSystem (new G4OpenGLImmediateWin32);
|
||||
RegisterGraphicsSystem (new G4OpenGLStoredWin32);
|
||||
#endif
|
||||
|
||||
#ifdef G4VIS_USE_OPENGLXM
|
||||
RegisterGraphicsSystem (new G4OpenGLImmediateXm);
|
||||
RegisterGraphicsSystem (new G4OpenGLStoredXm);
|
||||
#endif
|
||||
|
||||
#ifdef G4VIS_USE_OIX
|
||||
RegisterGraphicsSystem (new G4OpenInventorX);
|
||||
#endif
|
||||
|
||||
#ifdef G4VIS_USE_OIWIN32
|
||||
RegisterGraphicsSystem (new G4OpenInventorWin32);
|
||||
#endif
|
||||
|
||||
#ifdef G4VIS_USE_VRML
|
||||
RegisterGraphicsSystem (new G4VRML1);
|
||||
RegisterGraphicsSystem (new G4VRML2);
|
||||
#endif
|
||||
|
||||
if (fVerbose > 0) {
|
||||
G4cout <<
|
||||
"\nYou have successfully chosen to use the following graphics systems."
|
||||
<< G4endl;
|
||||
PrintAvailableGraphicsSystems ();
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
@@ -0,0 +1,13 @@
|
||||
-------------------------------------------------------------------
|
||||
$Id: History,v 1.1 2004/06/01 06:59:38 guatelli Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
Geant4 - gammaray_telescope
|
||||
=========================================================
|
||||
|
||||
Category History file
|
||||
---------------------
|
||||
|
||||
1.06.2004 - Susanna Guatelli
|
||||
Migration to AIDA 3.2.1 and PI 1.2.1
|
||||
@@ -1,4 +1,4 @@
|
||||
$Id: README,v 1.19 2003/05/29 13:32:52 flongo Exp $
|
||||
$Id: README,v 1.20 2004/06/01 06:59:38 guatelli Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -75,22 +75,18 @@ The main features of this example are
|
||||
|
||||
- Setup for Xmotif user interface
|
||||
|
||||
setenv G4UI_USE_XM 1
|
||||
setenv G4UI_USE_XM 1
|
||||
|
||||
- Set up for analysis using AIDA
|
||||
- Set up for analysis using AIDA3.2.1 and PI1.2.1
|
||||
|
||||
To compile the GammaRayTel example with the analysis tools activated,
|
||||
set the following variables
|
||||
|
||||
setenv G4ANALYSIS_USE 1 # Use the analysis tools
|
||||
|
||||
and be sure to have the right path to the Anaphe library (or to another AIDA
|
||||
compliant implementation), inserting this on the .tcshrc:
|
||||
|
||||
(on a CERN machine with the gcc-2.95.2 or gcc-3.2 compiler)
|
||||
|
||||
source /afs/cern.ch/sw/lhcxx/share/LHCXX/5.0.5/scripts/setupAnaphe.csh
|
||||
setenv PATH ${PATH}:/afs/cern.ch/sw/lhcxx/share/LHCXX/5.0.5/scripts/
|
||||
Users can download the analysis tools from:
|
||||
> http://aida.freehep.org/
|
||||
> http://www.cern.ch/PI
|
||||
|
||||
2. Sample run
|
||||
-------------
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
//
|
||||
#ifdef G4ANALYSIS_USE
|
||||
//
|
||||
// $Id: GammaRayTelAnalysis.hh,v 1.16 2003/06/25 10:18:27 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02-patch-01 $
|
||||
// $Id: GammaRayTelAnalysis.hh,v 1.17 2004/06/01 06:59:38 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
// CERN Geneva Switzerland
|
||||
@@ -61,13 +61,10 @@ class AIDA::IAnalysisFactory;
|
||||
class AIDA::ITree;
|
||||
class AIDA::IHistogramFactory;
|
||||
class AIDA::ITupleFactory;
|
||||
class AIDA::IPlotter;
|
||||
//class AIDA::IPlotter;
|
||||
class AIDA::IHistogram1D;
|
||||
class AIDA::IHistogram2D;
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
class GammaRayTelAnalysis {
|
||||
public:
|
||||
virtual ~GammaRayTelAnalysis();
|
||||
@@ -116,7 +113,7 @@ private:
|
||||
|
||||
IAnalysisFactory* analysisFactory;
|
||||
ITree* tree;
|
||||
IPlotter* plotter;
|
||||
//IPlotter* plotter;
|
||||
ITuple* tuple;
|
||||
|
||||
IHistogram1D* energy;
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: GammaRayTelDetectorConstruction.hh,v 1.6 2001/07/11 09:56:56 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02-patch-01 $
|
||||
// $Id: GammaRayTelDetectorConstruction.hh,v 1.7 2004/06/02 15:21:29 flongo Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
// CERN Geneva Switzerland
|
||||
@@ -44,6 +44,7 @@ class G4LogicalVolume;
|
||||
class G4VPhysicalVolume;
|
||||
class G4Material;
|
||||
class G4UniformMagField;
|
||||
class G4Region;
|
||||
class GammaRayTelDetectorMessenger;
|
||||
class GammaRayTelTrackerSD;
|
||||
class GammaRayTelAnticoincidenceSD;
|
||||
@@ -264,6 +265,8 @@ private:
|
||||
GammaRayTelCalorimeterSD* calorimeterSD; //pointer to the sensitive detector
|
||||
GammaRayTelAnticoincidenceSD* anticoincidenceSD; //pointer to the sensitive detector
|
||||
|
||||
G4Region* aTKRRegion; // TKR cut region
|
||||
G4Region* aCALRegion; // CAL cut region
|
||||
|
||||
private:
|
||||
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
//
|
||||
#ifdef G4ANALYSIS_USE
|
||||
//
|
||||
// $Id: GammaRayTelAnalysis.cc,v 1.19 2003/06/25 10:18:28 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02-patch-01 $
|
||||
// $Id: GammaRayTelAnalysis.cc,v 1.20 2004/06/01 06:59:39 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
// CERN Geneva Switzerland
|
||||
@@ -62,7 +62,8 @@ GammaRayTelAnalysis* GammaRayTelAnalysis::instance = 0;
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
GammaRayTelAnalysis::GammaRayTelAnalysis()
|
||||
:GammaRayTelDetector(0),analysisFactory(0), tree(0), plotter(0), tuple(0)
|
||||
:GammaRayTelDetector(0),analysisFactory(0), tree(0)//, plotter(0),
|
||||
,tuple(0)
|
||||
,energy(0), hits(0), posXZ(0), posYZ(0)
|
||||
,histo1DDraw("enable"),histo1DSave("enable"),histo2DDraw("enable")
|
||||
,histo2DSave("enable"),histo2DMode("strip")
|
||||
@@ -74,13 +75,11 @@ GammaRayTelAnalysis::GammaRayTelAnalysis()
|
||||
#ifdef G4ANALYSIS_USE
|
||||
// Define the messenger and the analysis system
|
||||
|
||||
analysisMessenger = new GammaRayTelAnalysisMessenger(this);
|
||||
analysisMessenger = new GammaRayTelAnalysisMessenger(this);
|
||||
|
||||
analysisFactory = AIDA_createAnalysisFactory(); // create the Analysis Factory
|
||||
|
||||
if(analysisFactory) {
|
||||
|
||||
ITreeFactory* treeFactory = analysisFactory->createTreeFactory();
|
||||
|
||||
AIDA::ITreeFactory* treeFactory = analysisFactory->createTreeFactory();
|
||||
// create Tree Factory
|
||||
|
||||
if(treeFactory) {
|
||||
@@ -89,12 +88,9 @@ GammaRayTelAnalysis::GammaRayTelAnalysis()
|
||||
|
||||
// tree = treeFactory->create("gammaraytel.hbook", "hbook", false, false);
|
||||
// (hbook implementation)
|
||||
|
||||
tree = treeFactory->create("gammaraytel.aida","xml",false,true,"compress=yes");
|
||||
|
||||
tree = treeFactory->create("gammaraytel.aida","xml",false,true,"uncompress");
|
||||
if(tree) {
|
||||
// Get a tuple factory :
|
||||
|
||||
ITupleFactory* tupleFactory = analysisFactory->createTupleFactory(*tree);
|
||||
if(tupleFactory) {
|
||||
// Create a tuple :
|
||||
@@ -124,18 +120,19 @@ GammaRayTelAnalysis::GammaRayTelAnalysis()
|
||||
// 1D histogram that store the hits distribution along the TKR X-planes
|
||||
|
||||
hits = histoFactory->createHistogram1D("20","Hits dist in TKR X planes",Nplane, 0, Nplane-1);
|
||||
|
||||
// 2D histogram that store the position (mm) of the hits (XZ projection)
|
||||
|
||||
if (histo2DMode == "strip")
|
||||
if (histo2DMode == "strip"){
|
||||
posXZ = histoFactory->createHistogram2D("30","Tracker Hits XZ (strip,plane)",
|
||||
N, 0, N-1,
|
||||
2*Nplane, 0, Nplane-1);
|
||||
2*Nplane, 0, Nplane-1);
|
||||
}
|
||||
else
|
||||
{
|
||||
posXZ = histoFactory->createHistogram2D("30","Tracker Hits XZ (x,z) in mm",
|
||||
int(sizexy/5), -sizexy/2, sizexy/2,
|
||||
int(sizez/5), -sizez/2, sizez/2);
|
||||
|
||||
}
|
||||
// 2D histogram that store the position (mm) of the hits (YZ projection)
|
||||
|
||||
if(histo2DMode=="strip")
|
||||
@@ -151,33 +148,30 @@ GammaRayTelAnalysis::GammaRayTelAnalysis()
|
||||
}
|
||||
|
||||
}
|
||||
delete treeFactory; // Will not delete the ITree.
|
||||
}
|
||||
delete treeFactory; // Will not delete the ITree.
|
||||
|
||||
}
|
||||
|
||||
IPlotterFactory* plotterFactory = analysisFactory->createPlotterFactory(0,0);
|
||||
if(plotterFactory) {
|
||||
plotter = plotterFactory->create();
|
||||
if(plotter) {
|
||||
plotter->show();
|
||||
plotter->setParameter("pageTitle","Gamma Ray Tel");
|
||||
}
|
||||
delete plotterFactory;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// IPlotterFactory* plotterFactory = analysisFactory->createPlotterFactory(0,0);
|
||||
// if(plotterFactory) {
|
||||
// plotter = plotterFactory->create();
|
||||
// if(plotter) {
|
||||
// plotter->show();
|
||||
// plotter->setParameter("pageTitle","Gamma Ray Tel");
|
||||
|
||||
// }
|
||||
// delete plotterFactory;
|
||||
// }
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
GammaRayTelAnalysis::~GammaRayTelAnalysis() {
|
||||
Finish();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
void GammaRayTelAnalysis::Init()
|
||||
{
|
||||
@@ -187,7 +181,7 @@ void GammaRayTelAnalysis::Finish()
|
||||
{
|
||||
#ifdef G4ANALYSIS_USE
|
||||
delete tree;
|
||||
delete plotter;
|
||||
//delete plotter;
|
||||
// delete analysisFactory; // Will delete tree and histos.
|
||||
delete analysisMessenger;
|
||||
|
||||
@@ -201,9 +195,6 @@ GammaRayTelAnalysis* GammaRayTelAnalysis::getInstance()
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
// This function fill the 2d histogram of the XZ positions
|
||||
void GammaRayTelAnalysis::InsertPositionXZ(double x, double z)
|
||||
{
|
||||
@@ -212,8 +203,6 @@ void GammaRayTelAnalysis::InsertPositionXZ(double x, double z)
|
||||
#endif
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
// This function fill the 2d histogram of the YZ positions
|
||||
void GammaRayTelAnalysis::InsertPositionYZ(double y, double z)
|
||||
{
|
||||
@@ -222,8 +211,6 @@ void GammaRayTelAnalysis::InsertPositionYZ(double y, double z)
|
||||
#endif
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
// This function fill the 1d histogram of the energy released in the last Si plane
|
||||
void GammaRayTelAnalysis::InsertEnergy(double en)
|
||||
{
|
||||
@@ -232,8 +219,6 @@ void GammaRayTelAnalysis::InsertEnergy(double en)
|
||||
#endif
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
// This function fill the 1d histogram of the hits distribution along the TKR planes
|
||||
void GammaRayTelAnalysis::InsertHits(int nplane)
|
||||
{
|
||||
@@ -279,7 +264,7 @@ void GammaRayTelAnalysis::BeginOfRun()
|
||||
/*
|
||||
This member is called at the end of each run
|
||||
*/
|
||||
void GammaRayTelAnalysis::EndOfRun(G4int n)
|
||||
void GammaRayTelAnalysis::EndOfRun(G4int)
|
||||
{
|
||||
#ifdef G4ANALYSIS_USE
|
||||
if(tree) {
|
||||
@@ -287,53 +272,46 @@ void GammaRayTelAnalysis::EndOfRun(G4int n)
|
||||
tree->close();
|
||||
}
|
||||
|
||||
if(plotter) {
|
||||
// if(plotter) {
|
||||
|
||||
// We set one single region for the plotter
|
||||
// We now print the histograms, each one in a separate file
|
||||
// // We set one single region for the plotter
|
||||
// // We now print the histograms, each one in a separate file
|
||||
|
||||
if(histo2DSave == "enable") {
|
||||
char name[15];
|
||||
plotter->createRegions(1,1);
|
||||
sprintf(name,"posxz_%d.ps", n);
|
||||
plotter->currentRegion().plot(*posXZ);
|
||||
plotter->refresh();
|
||||
// plotter->write(name,"ps"); // temporary unavailable
|
||||
// if(histo2DSave == "enable") {
|
||||
// char name[15];
|
||||
// plotter->createRegions(1,1);
|
||||
// sprintf(name,"posxz_%d.ps", n);
|
||||
// plotter->currentRegion().plot(*posXZ);
|
||||
// plotter->refresh();
|
||||
// // plotter->write(name,"ps"); // temporary unavailable
|
||||
|
||||
plotter->createRegions(1,1);
|
||||
sprintf(name,"posyz_%d.ps", n);
|
||||
plotter->currentRegion().plot(*posYZ);
|
||||
plotter->next().plot(*posYZ);
|
||||
plotter->refresh();
|
||||
// plotter->write(name,"ps"); // temporary unavailable
|
||||
}
|
||||
|
||||
if(histo1DSave == "enable") {
|
||||
plotter->createRegions(1,1);
|
||||
char name[15];
|
||||
sprintf(name,"energy_%d.ps", n);
|
||||
plotter->currentRegion().plot(*energy);
|
||||
plotter->refresh();
|
||||
// plotter->write(name,"ps"); // temporary unavailable
|
||||
plotter->createRegions(1,1);
|
||||
sprintf(name,"hits_%d.ps", n);
|
||||
plotter->currentRegion().plot(*hits);
|
||||
plotter->refresh();
|
||||
// plotter->write(name,"ps"); // temporary unavailable
|
||||
plotter->createRegions(1,2);
|
||||
plotter->currentRegion().plot(*energy);
|
||||
plotter->next().plot(*hits);
|
||||
plotter->refresh();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
// plotter->createRegions(1,1);
|
||||
// sprintf(name,"posyz_%d.ps", n);
|
||||
// plotter->currentRegion().plot(*posYZ);
|
||||
// plotter->next().plot(*posYZ);
|
||||
// plotter->refresh();
|
||||
// // plotter->write(name,"ps"); // temporary unavailable
|
||||
// }
|
||||
|
||||
// if(histo1DSave == "enable") {
|
||||
// plotter->createRegions(1,1);
|
||||
// char name[15];
|
||||
// sprintf(name,"energy_%d.ps", n);
|
||||
// plotter->currentRegion().plot(*energy);
|
||||
// plotter->refresh();
|
||||
// // plotter->write(name,"ps"); // temporary unavailable
|
||||
// plotter->createRegions(1,1);
|
||||
// sprintf(name,"hits_%d.ps", n);
|
||||
// plotter->currentRegion().plot(*hits);
|
||||
// plotter->refresh();
|
||||
// // plotter->write(name,"ps"); // temporary unavailable
|
||||
// plotter->createRegions(1,2);
|
||||
// plotter->currentRegion().plot(*energy);
|
||||
// plotter->next().plot(*hits);
|
||||
// plotter->refresh();
|
||||
// }
|
||||
#endif
|
||||
}
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
/* This member is called at the end of every event */
|
||||
void GammaRayTelAnalysis::EndOfEvent(G4int flag)
|
||||
@@ -346,30 +324,30 @@ void GammaRayTelAnalysis::EndOfEvent(G4int flag)
|
||||
// to plot for each region.
|
||||
// It is done here, since then EndOfRun set regions
|
||||
// for paper output.
|
||||
if(plotter) {
|
||||
if((histo2DDraw == "enable") && (histo1DDraw == "enable")) {
|
||||
plotter->createRegions(1,2);
|
||||
//plotter->currentRegion().plot(*posXZ); //temporary unavailable
|
||||
plotter->currentRegion().plot(*hits);
|
||||
// plotter->next().plot(*posYZ); //temporary unavailable
|
||||
plotter->next().plot(*energy);
|
||||
//plotter->next().plot(*energy);
|
||||
// plotter->currentRegion().plot(*hits);
|
||||
//plotter->next().plot(*hits);
|
||||
} else if((histo1DDraw == "enable") && (histo2DDraw != "enable")) {
|
||||
plotter->createRegions(1,2);
|
||||
plotter->currentRegion().plot(*energy);
|
||||
plotter->next().plot(*hits);
|
||||
} else if((histo1DDraw != "enable") && (histo2DDraw == "enable")) {
|
||||
/* plotter->createRegions(1,2);
|
||||
plotter->currentRegion().plot(*posXZ);
|
||||
plotter->next().plot(*posYZ);*/
|
||||
G4cout << "Temporary Unavailable " << G4endl;
|
||||
} else { // Nothing to plot.
|
||||
plotter->createRegions(1,1);
|
||||
}
|
||||
plotter->refresh();
|
||||
}
|
||||
// if(plotter) {
|
||||
// if((histo2DDraw == "enable") && (histo1DDraw == "enable")) {
|
||||
// plotter->createRegions(1,2);
|
||||
// //plotter->currentRegion().plot(*posXZ); //temporary unavailable
|
||||
// plotter->currentRegion().plot(*hits);
|
||||
// // plotter->next().plot(*posYZ); //temporary unavailable
|
||||
// plotter->next().plot(*energy);
|
||||
// //plotter->next().plot(*energy);
|
||||
// // plotter->currentRegion().plot(*hits);
|
||||
// //plotter->next().plot(*hits);
|
||||
// } else if((histo1DDraw == "enable") && (histo2DDraw != "enable")) {
|
||||
// plotter->createRegions(1,2);
|
||||
// plotter->currentRegion().plot(*energy);
|
||||
// plotter->next().plot(*hits);
|
||||
// } else if((histo1DDraw != "enable") && (histo2DDraw == "enable")) {
|
||||
// /* plotter->createRegions(1,2);
|
||||
// plotter->currentRegion().plot(*posXZ);
|
||||
// plotter->next().plot(*posYZ);*/
|
||||
// G4cout << "Temporary Unavailable " << G4endl;
|
||||
// } else { // Nothing to plot.
|
||||
// plotter->createRegions(1,1);
|
||||
// }
|
||||
// plotter->refresh();
|
||||
// }
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: GammaRayTelDetectorConstruction.cc,v 1.10 2003/05/28 13:56:33 flongo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02-patch-01 $
|
||||
// $Id: GammaRayTelDetectorConstruction.cc,v 1.11 2004/06/02 15:20:46 flongo Exp $
|
||||
// GEANT4 tag $Name: geant4-06-02 $
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
// CERN Geneva Switzerland
|
||||
@@ -77,7 +77,8 @@ GammaRayTelDetectorConstruction::GammaRayTelDetectorConstruction()
|
||||
solidCALDetectorX(0),logicCALDetectorX(0),physiCALDetectorX(0),
|
||||
solidCALDetectorY(0),logicCALDetectorY(0),physiCALDetectorY(0),
|
||||
solidPlane(0),logicPlane(0),physiPlane(0),
|
||||
solidConverter(0),logicConverter(0),physiConverter(0)
|
||||
solidConverter(0),logicConverter(0),physiConverter(0),
|
||||
aTKRRegion(0), aCALRegion(0)
|
||||
{
|
||||
// default parameter values of the payload
|
||||
|
||||
@@ -281,7 +282,7 @@ G4VPhysicalVolume* GammaRayTelDetectorConstruction::ConstructPayload()
|
||||
solidCALDetectorX=0;logicCALDetectorX=0;physiCALDetectorX=0;
|
||||
solidCALDetectorY=0;logicCALDetectorY=0;physiCALDetectorY=0;
|
||||
solidPlane=0;logicPlane=0;physiPlane=0;
|
||||
|
||||
aCALRegion=0; aTKRRegion=0;
|
||||
//
|
||||
// Payload
|
||||
//
|
||||
@@ -680,17 +681,19 @@ G4VPhysicalVolume* GammaRayTelDetectorConstruction::ConstructPayload()
|
||||
|
||||
|
||||
G4String regName[] = {"Calorimeter","Tracker"};
|
||||
|
||||
G4Region* aCALRegion = new G4Region(regName[0]);
|
||||
G4Region* aTKRRegion = new G4Region(regName[1]);
|
||||
|
||||
|
||||
logicCAL->SetRegion(aCALRegion);
|
||||
logicTKR->SetRegion(aTKRRegion);
|
||||
aCALRegion->AddRootLogicalVolume(logicCAL);
|
||||
aTKRRegion->AddRootLogicalVolume(logicTKR);
|
||||
|
||||
// Sensitive Detector Manager
|
||||
if (!aCALRegion)
|
||||
{
|
||||
aCALRegion = new G4Region(regName[0]);
|
||||
logicCAL->SetRegion(aCALRegion);
|
||||
aCALRegion->AddRootLogicalVolume(logicCAL);
|
||||
}
|
||||
if (!aTKRRegion)
|
||||
{
|
||||
aTKRRegion = new G4Region(regName[1]);
|
||||
logicTKR->SetRegion(aTKRRegion);
|
||||
aTKRRegion->AddRootLogicalVolume(logicTKR);
|
||||
}
|
||||
//Sensitive Detector Manager
|
||||
|
||||
G4SDManager* SDman = G4SDManager::GetSDMpointer();
|
||||
|
||||
|
||||
Executable
+17
@@ -0,0 +1,17 @@
|
||||
# $Id: GNUmakefile,v 1.1 2004/04/13 12:10:02 cirrone Exp $
|
||||
# --------------------------------------------------------------
|
||||
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
|
||||
# --------------------------------------------------------------
|
||||
|
||||
name := Hadrontherapy
|
||||
G4TARGET := $(name)
|
||||
G4EXLIB := true
|
||||
|
||||
ifndef G4INSTALL
|
||||
G4INSTALL = ../../..
|
||||
endif
|
||||
|
||||
.PHONY: all
|
||||
all: lib bin
|
||||
|
||||
include $(G4INSTALL)/config/binmake.gmk
|
||||
+184
@@ -0,0 +1,184 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: Hadrontherapy.cc
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
// GEANT 4 - Hadrontherapy example
|
||||
// --------------------------------------------------------------
|
||||
// Code developed by:
|
||||
// G.A.P. Cirrone, G. Russo
|
||||
// Laboratori Nazionali del Sud - INFN, Catania, Italy
|
||||
//
|
||||
//
|
||||
// **************** Hadrontherapy ****************************************
|
||||
// Hadrontherapy simulates a general transport beam line dedicated to the
|
||||
// irradiation of toumors with hadron beams.
|
||||
// All the elements of a typical hadron beam line (collimator,
|
||||
// scattering system, range shifter, etc.) are simulated.
|
||||
// Positions, dimensions and materials of such element can be changed by the users.
|
||||
// Actually only proton beams can be simulated.
|
||||
// All the characteristics of the incident beam can be changed.
|
||||
// Two typical detectors commonly used in the hadrontherapy
|
||||
// field are simulated: the Markus ionization chamber for the
|
||||
// reconstruction of the depth dose distributions,
|
||||
// and a gafchromic film for the reconstruction of the
|
||||
// lateral dose distributions.
|
||||
// **************************************************************************
|
||||
|
||||
#include <fstream>
|
||||
#include <iomanip>
|
||||
#include <iostream>
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4UImanager.hh"
|
||||
#include "G4UIterminal.hh"
|
||||
#include "G4UItcsh.hh"
|
||||
|
||||
#ifdef G4VIS_USE
|
||||
#include "HadrontherapyVisManager.hh"
|
||||
#endif
|
||||
|
||||
#include "HadrontherapyDetectorConstruction.hh"
|
||||
#include "HadrontherapyPhysicsList.hh"
|
||||
#include "HadrontherapyPrimaryGeneratorAction.hh"
|
||||
#include "HadrontherapyRunAction.hh"
|
||||
#include "HadrontherapyEventAction.hh"
|
||||
#include "HadrontherapySteppingAction.hh"
|
||||
// -----------------------------------------------------------------------
|
||||
int main(int argc,char** argv) {
|
||||
|
||||
//***************************
|
||||
// choose the Random engine
|
||||
//***************************
|
||||
|
||||
HepRandom::setTheEngine(new RanecuEngine);
|
||||
G4int seed = time(NULL);
|
||||
HepRandom::setTheSeed(seed);
|
||||
|
||||
//***********************************
|
||||
// Construct the default run manager
|
||||
//***********************************
|
||||
|
||||
G4RunManager * runManager = new G4RunManager;
|
||||
|
||||
//***************************************
|
||||
// set mandatory initialization classes
|
||||
//***************************************
|
||||
|
||||
HadrontherapyDetectorConstruction* detector;
|
||||
detector = new HadrontherapyDetectorConstruction;
|
||||
runManager -> SetUserInitialization(detector);
|
||||
runManager -> SetUserInitialization(new HadrontherapyPhysicsList(detector));
|
||||
|
||||
//***********************************************
|
||||
// Set the visualization if you chose to have it!
|
||||
//***********************************************
|
||||
|
||||
#ifdef G4VIS_USE
|
||||
G4VisManager* visManager = new HadrontherapyVisManager;
|
||||
visManager -> Initialize();
|
||||
#endif
|
||||
|
||||
//**********************************
|
||||
// set mandatory user action class
|
||||
//********************************
|
||||
|
||||
runManager -> SetUserAction(new HadrontherapyPrimaryGeneratorAction( detector ));
|
||||
|
||||
//****************************************
|
||||
// set the optional user action classes
|
||||
//***************************************
|
||||
|
||||
HadrontherapyRunAction* runaction = new HadrontherapyRunAction;
|
||||
runManager -> SetUserAction(runaction);
|
||||
|
||||
HadrontherapyEventAction* eventaction = new HadrontherapyEventAction( runaction );
|
||||
runManager -> SetUserAction(eventaction);
|
||||
|
||||
HadrontherapySteppingAction* steppingaction = new HadrontherapySteppingAction( eventaction );
|
||||
runManager -> SetUserAction(steppingaction);
|
||||
|
||||
//*********************
|
||||
// Initialize G4 kernel
|
||||
//*********************
|
||||
|
||||
runManager -> Initialize();
|
||||
|
||||
//***********************************************
|
||||
// get the pointer to the User Interface manager
|
||||
//***********************************************
|
||||
|
||||
G4UImanager* UI = G4UImanager::GetUIpointer();
|
||||
|
||||
//*******************************************************************
|
||||
//Define UI terminal for interactive mode (wait command from keyboard
|
||||
//or for batch mode but reading a macro file
|
||||
//********************************************************************
|
||||
|
||||
G4UIsession* session = 0;
|
||||
|
||||
if (argc==1) // Define UI session for interactive mode.
|
||||
{
|
||||
|
||||
#ifdef G4UI_USE_XM
|
||||
session = new G4UIXm(argc,argv);
|
||||
#else
|
||||
|
||||
#ifdef G4UI_USE_TCSH
|
||||
session = new G4UIterminal(new G4UItcsh);
|
||||
#else
|
||||
session = new G4UIterminal();
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
if (session) // Define UI session for interactive mode.
|
||||
{
|
||||
|
||||
UI->ApplyCommand("/control/execute defaultMacro.mac");
|
||||
session -> SessionStart();
|
||||
delete session;
|
||||
}
|
||||
|
||||
else // Batch mode
|
||||
|
||||
{
|
||||
G4String command = "/control/execute ";
|
||||
G4String fileName = argv[1];
|
||||
UI->ApplyCommand(command+fileName);
|
||||
}
|
||||
|
||||
//*******************
|
||||
// job termination
|
||||
//*******************
|
||||
|
||||
#ifdef G4VIS_USE
|
||||
delete visManager;
|
||||
#endif
|
||||
|
||||
delete runManager;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
-----------------------------------------------------------
|
||||
$Id: History, v 1.6 2004/02/27 G.A.P. Cirrone
|
||||
-----------------------------------------------------------
|
||||
|
||||
====================================================
|
||||
Geant4 - Hadrontherapy
|
||||
====================================================
|
||||
|
||||
Category History file
|
||||
---------------------
|
||||
28.05.2005 - S. Guatelli
|
||||
Update of the README, code review for public release.
|
||||
|
||||
27.02.2004 - G.A.P. Cirrone
|
||||
Created, first version.
|
||||
|
||||
13.03.2004 - G.A.P. Cirrone
|
||||
Redefinition of the design.
|
||||
|
||||
14.03.2004 - G.A.P. Cirrone
|
||||
Attempt to insert AIDA class for .xml file creation.
|
||||
|
||||
29.03.2004 - G. Russo
|
||||
Redefinition of the physics list with hadronic model.
|
||||
Executable
+211
@@ -0,0 +1,211 @@
|
||||
|
||||
=========================================================
|
||||
Geant4 - Hadrontherapy example
|
||||
=========================================================
|
||||
|
||||
README
|
||||
---------------------
|
||||
|
||||
This example is developed by G.A.Pablo Cirrone, Giorgio Russo and
|
||||
Francesco Di Rosa of the Laboratori Nazionali del Sud - Istituto Nazionale
|
||||
di Fisica Nucleare, Via S. Sofia, 44 Catania, Sicily, Italy (www.lns.infn.it)
|
||||
|
||||
The authors are supported by Laboratori Nazionali del Sud, Catania and by the
|
||||
Dipartimento di Fisica of Catania University, Catania.
|
||||
|
||||
The authors wish to thank Susanna Guatelli and Maria Grazia Pia for
|
||||
their support in the realization of the sensitive detector and
|
||||
Harald Paganetti (from NPTC, Massachussets (US)) for the
|
||||
help in the realization of the movement of the modulator wheel.
|
||||
------------------------------------------------------------------------
|
||||
----> INTRODUCTION.
|
||||
|
||||
The hadrontherapy example simulates a hadron therapy beam line.
|
||||
In particular the example models the specific proton therapy beam line
|
||||
installed at Laboratori Nazionali del Sud (INFN) in Catania, Sicily (Italy).
|
||||
For more information on the proton therapy center of Catania
|
||||
or/and proton/hadron therapy in general, please visit the
|
||||
pages:
|
||||
> www.lns.infn.it/~catana
|
||||
|
||||
----> GEOMETRY SET-UP.
|
||||
|
||||
The elements simulated are:
|
||||
|
||||
1. A scattering system, to spread geometrically the beam;
|
||||
|
||||
2. A system of collimators, to avoid the scattering radiation;
|
||||
|
||||
3. A modulation system that spreads the beam in energy and
|
||||
produces the so-called spread out bragg peak;
|
||||
It is constituted by a rotating wheel of different thichnesses.
|
||||
The wheel rotates around is axis (parallel to the proton
|
||||
beam axis) and its movement can be obtained by means of a
|
||||
messenger between runs.
|
||||
|
||||
4. A set of monitor chambers (special transmission ionisation
|
||||
chambers used to control hadron flux during the irradiation);
|
||||
|
||||
5. A "nozzle" and a final collimator defining the final shape
|
||||
of the beam before reaching the patient.
|
||||
|
||||
6. A water phantom: it is a box of water inside of which the
|
||||
dosimeter is placed; the dosimeter performs the measurements of
|
||||
dose distributions.
|
||||
The use of the water phantom is required by the international protocol
|
||||
on the measure of dose in the case of proton and ion beams (IAEA 398, 2000).
|
||||
|
||||
7. A "Markus" ionisation chamber, to reconstruct the depth dose distribution
|
||||
(Bragg curve).
|
||||
|
||||
8. A radiographic film, to evaluate the beam lateral dose
|
||||
distribution, registering the spatial distribution of the
|
||||
primary particles
|
||||
|
||||
------------------------------------------------------------------------
|
||||
----> 1.EXPERIMENTAL SET-UP.
|
||||
|
||||
The application fully simulates the proton therapy beam line
|
||||
installed at Laboratori Nazionali del Sud. Inside the water
|
||||
phantom (placed at the end of the proton beam line) the Markus ionisation
|
||||
chamber and a radiographic film are located; these elements permit the
|
||||
reconstruction of the Bragg curve (registered on the file BraggPeak.out)
|
||||
and of the lateral and energy distribution of the particles (registered
|
||||
on the files energyDistribution.out and angularDistribution.out). Please
|
||||
see later for the description of the produced files.
|
||||
The Markus chamber is realized by means of a water cylinder (placed inside
|
||||
the water phantom) with its main axis coincident with proton beam axis.
|
||||
The cylinder is divided in slices and the energy deposit in each slide is
|
||||
collected at the end of each run. The default thickness of the slices
|
||||
is 2 micron.
|
||||
The radiographic film is simulated by a plane. It is located, by default,
|
||||
at the entrance window of the water phantom (the isocenter point) and
|
||||
its thickness is 1. mm.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
----> 2.SET-UP
|
||||
|
||||
- a standard Geant4 example GNUmakefile is provided
|
||||
|
||||
setup with:
|
||||
compiler = gcc-3.2.3
|
||||
G4SYSTEM = linux-g++
|
||||
|
||||
The following section reports the necessary environment variables
|
||||
necessary for the run of Hadrontherapy.
|
||||
|
||||
----> 2.1 ENVIROMENT VARIABLES
|
||||
|
||||
- G4SYSTEM = Linux-g++
|
||||
|
||||
- G4INSTALL points to the installation directory of GEANT4;
|
||||
|
||||
- G4LIB point to the compiled libraries of GEANT4;
|
||||
|
||||
- G4WORKDIR points to the work directory;
|
||||
|
||||
- CLHEP_BASE_DIR points to the installation directory of CHLEP;
|
||||
|
||||
- G4LEVELGAMMADATA points to the photoevaporation library;
|
||||
|
||||
- NeutronHPCrossSections points to the neutron data files;
|
||||
|
||||
- G4RADIOACTIVEDATA points to the libraries for radio-active decay
|
||||
hadronic processes;
|
||||
|
||||
- G4LEDATA points to the low energy electromagnetic libraries
|
||||
|
||||
- LD_LIBRARY_PATH = $CLHEP_BASE_DIR/lib
|
||||
|
||||
----> 2.2 VISUALISATION
|
||||
|
||||
The user can visualise the experimental set-up with OpenGL, DAWN and vrml
|
||||
|
||||
------------------------------------------------------------------------
|
||||
----> 3. HOW TO RUN THE EXAMPLE.
|
||||
|
||||
In interactive mode:
|
||||
> $G4WORDIR/bin/Linux-g++/Hadrontherapy
|
||||
The defaultMacro.mac is executed
|
||||
|
||||
The primary particle beam parameter are:
|
||||
Radiation: proton beam;
|
||||
Energy distribution: gaussian;
|
||||
Mean energy: 63.4 MeV;
|
||||
Energy spread: 300 keV;
|
||||
Beam spot size: 1 mm;
|
||||
Beam angular spread: 0.057 deg;
|
||||
|
||||
|
||||
Cut per region feature permits to set different cut in different regions.
|
||||
In this example it is sufficient to set a small cut inside the dosemeter
|
||||
(where the information of dose distribution is collected).
|
||||
|
||||
Default values are:
|
||||
cut = 10 mm along the beam line;
|
||||
cut = 0.2 mm inside the dosemeter;
|
||||
|
||||
The modulator wheel can be rotated via the messenger:
|
||||
|
||||
Idle>/modulator/angle/modAngle xx deg
|
||||
|
||||
It is sufficient to rotate the modulator from 0 deg (default position)
|
||||
to 45 deg using 1 deg steps to obtain a Spread Out Bragg Peak (SOBP).
|
||||
|
||||
Modulator wheel can be omitted setting its material air.
|
||||
|
||||
run $G4WORKDIR/bin/Linux-g++/Hadrontherapy visualisation.mac
|
||||
to visualise the experimental set-up with OpenGL
|
||||
-----------------------------------------------------------------------
|
||||
----> 4. PHYSICS
|
||||
|
||||
Electromagnetic and hadronic processes are modeled.
|
||||
|
||||
The LowEnergy package is used to model the electromagnetic processes
|
||||
of all the particles involved in the experimental set-up.
|
||||
|
||||
------------------------------------------------------------------------
|
||||
----> 5. SIMULATION OUTPUT
|
||||
|
||||
The output is in ASCII file format:
|
||||
|
||||
1.) BraggPeak.out: a two columns file.
|
||||
The first column represent depth in water (mm), the second contains the energy
|
||||
deposit (MeV).
|
||||
|
||||
2.) energyDistribution.out: a two columns file.
|
||||
The first column contains the energy deposit (in MeV) by primary particles
|
||||
in the plane (radiographic film) positioned at isocenter.
|
||||
The second column indicates the number of the primary particle
|
||||
responsible for the energy deposit.
|
||||
|
||||
3.) angularDistribution.out: a three columns file.
|
||||
It contains the coordinates in millimeters (x, y, z) of a primary
|
||||
particle interacting with the plane representing the radiographic film.
|
||||
x direction is along the beam direction,
|
||||
y and z directions are orthogonal to the beam direction.
|
||||
|
||||
------------------------------------------------------------------------
|
||||
----> 6. FUTURE PLANS
|
||||
|
||||
Next planned improvements will be:
|
||||
|
||||
** Use of AIDA and PI analysis tools to store the results of the
|
||||
simulation in .xml/.hbk files
|
||||
|
||||
** Addition of messengers to interactively change position, dimension
|
||||
and composition of all the beam line elements and of the
|
||||
simulated dosimetric systems and to change cut values;
|
||||
|
||||
** Addition of messenger to change energy, energy spread,
|
||||
beam spot size and angular divergence of the proton beam;
|
||||
|
||||
** Realization of the read-out-geometry: this will permit to collect
|
||||
the energy deposit inside a voxelized three dimensional volume.
|
||||
--------------------------------------------------------------------------
|
||||
|
||||
for comments, advices, doubts and questions please contact:
|
||||
cirrone@lns.infn.it, giorgiorusso@lns.infn.it
|
||||
|
||||
last modified: Susanna Guatelli, 28/5/2004
|
||||
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
|
||||
#********************************
|
||||
# defaultMacro.mac
|
||||
#
|
||||
#********************************
|
||||
|
||||
/process/activate Transportation all
|
||||
/hits/activate
|
||||
/hits/verbose 0
|
||||
|
||||
/gun/particle proton
|
||||
|
||||
/tracking/verbose 0
|
||||
/run/initialize
|
||||
|
||||
/run/beamOn 1000
|
||||
|
||||
|
||||
@@ -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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: HadrontherapyCalorHit.hh,v 1.0
|
||||
// --------------------------------------------------------------
|
||||
// GEANT 4 - Hadrontherapy example
|
||||
// --------------------------------------------------------------
|
||||
// Code developed by:
|
||||
//
|
||||
// G.A.P. Cirrone, G. Russo
|
||||
// Laboratori Nazionali del Sud - INFN, Catania, Italy
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
#ifndef HadrontherapyCalorHit_h
|
||||
#define HadrontherapyCalorHit_h 1
|
||||
|
||||
#include "G4VHit.hh"
|
||||
#include "G4THitsCollection.hh"
|
||||
#include "G4Allocator.hh"
|
||||
|
||||
// --------------------------------------------------------------
|
||||
class HadrontherapyCalorHit : public G4VHit
|
||||
{
|
||||
public:
|
||||
HadrontherapyCalorHit();
|
||||
~HadrontherapyCalorHit();
|
||||
HadrontherapyCalorHit(const HadrontherapyCalorHit&);
|
||||
const HadrontherapyCalorHit& operator=(const HadrontherapyCalorHit&);
|
||||
|
||||
inline void* operator new(size_t);
|
||||
inline void operator delete(void*);
|
||||
void Print();
|
||||
|
||||
public:
|
||||
void AddAbs(G4double de, G4double dl) {EdepAbs += de; TrackLengthAbs += dl;};
|
||||
void AddGap(G4double de, G4double dl) {EdepGap += de; TrackLengthGap += dl;};
|
||||
G4double GetEdepAbs() {return EdepAbs;};
|
||||
G4double GetTrakAbs() {return TrackLengthAbs;};
|
||||
G4double GetEdepGap() {return EdepGap; };
|
||||
G4double GetTrakGap() {return TrackLengthGap;};
|
||||
private:
|
||||
G4double EdepAbs, TrackLengthAbs;
|
||||
G4double EdepGap, TrackLengthGap;
|
||||
};
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
typedef G4THitsCollection<HadrontherapyCalorHit> HadrontherapyCalorHitsCollection;
|
||||
extern G4Allocator<HadrontherapyCalorHit> HadrontherapyCalorHitAllocator;
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
inline void* HadrontherapyCalorHit::operator new(size_t)
|
||||
{
|
||||
void* aHit;
|
||||
aHit = (void*) HadrontherapyCalorHitAllocator.MallocSingle();
|
||||
return aHit;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
inline void HadrontherapyCalorHit::operator delete(void* aHit)
|
||||
{
|
||||
HadrontherapyCalorHitAllocator.FreeSingle((HadrontherapyCalorHit*) aHit);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: HadrontherapyCalorimeterSD.cc,v 1.0
|
||||
// --------------------------------------------------------------
|
||||
// GEANT 4 - Hadrontherapy example
|
||||
// --------------------------------------------------------------
|
||||
// Code developed by:
|
||||
//
|
||||
// G.A.P. Cirrone, G. Russo
|
||||
// Laboratori Nazionali del Sud - INFN, Catania, Italy
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
#ifndef HadrontherapyCalorimeterSD_h
|
||||
#define HadrontherapyCalorimeterSD_h 1
|
||||
|
||||
#include "G4VSensitiveDetector.hh"
|
||||
#include "globals.hh"
|
||||
#include "G4ios.hh"
|
||||
#include "HadrontherapyHit.hh"
|
||||
class HadrontherapyDetectorConstruction;
|
||||
class G4HCofThisEvent;
|
||||
class G4Step;
|
||||
class HadrontherapyRunAction;
|
||||
class HadrontherapyHit;
|
||||
|
||||
// -------------------------------------------------------------
|
||||
class HadrontherapyCalorimeterSD : public G4VSensitiveDetector
|
||||
{
|
||||
public:
|
||||
|
||||
HadrontherapyCalorimeterSD(G4String, HadrontherapyDetectorConstruction*);
|
||||
~HadrontherapyCalorimeterSD();
|
||||
|
||||
void Initialize(G4HCofThisEvent*);
|
||||
G4bool ProcessHits(G4Step*,G4TouchableHistory*);
|
||||
void EndOfEvent(G4HCofThisEvent*);
|
||||
void clear();
|
||||
void PrintAll();
|
||||
|
||||
private:
|
||||
G4String filename;
|
||||
G4int sliceID[50000];
|
||||
G4double energy[50000];
|
||||
G4double depth;
|
||||
|
||||
HadrontherapyDetectorConstruction* Detector;
|
||||
|
||||
G4double backEnergy;
|
||||
G4double leakEnergy;
|
||||
G4double delta;
|
||||
G4double depthMax;
|
||||
G4double tkinold;
|
||||
G4bool part_is_out;
|
||||
G4int evno;
|
||||
G4int evnOld;
|
||||
G4int trIDold;
|
||||
G4int NbOfLayer;
|
||||
HadrontherapyRunAction* p_Run;
|
||||
HadrontherapyHitsCollection* CalCollection;
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+364
@@ -0,0 +1,364 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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: HadrontherapyDetectorConstruction.hh
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
// GEANT 4 - Hadrontherapy example
|
||||
// --------------------------------------------------------------
|
||||
// Code developed by:
|
||||
//
|
||||
// G.A.P. Cirrone, G. Russo
|
||||
// Laboratori Nazionali del Sud - INFN, Catania, Italy
|
||||
//
|
||||
//
|
||||
//
|
||||
#ifndef HadrontherapyDetectorConstruction_h
|
||||
#define HadrontherapyDetectorConstruction_h 1
|
||||
|
||||
#include "G4VUserDetectorConstruction.hh"
|
||||
#include "globals.hh"
|
||||
#include "G4UnitsTable.hh"
|
||||
#include "G4ios.hh"
|
||||
#include "G4Region.hh"
|
||||
#include "G4RegionStore.hh"
|
||||
|
||||
class G4Text;
|
||||
class G4Box;
|
||||
class G4Tubs;
|
||||
class G4LogicalVolume;
|
||||
class G4VPhysicalVolume;
|
||||
class G4Material;
|
||||
class HadrontherapyDetectorMessenger;
|
||||
class HadrontherapyCalorimeterSD;
|
||||
|
||||
class HadrontherapyDetectorConstruction : public G4VUserDetectorConstruction
|
||||
{
|
||||
|
||||
public:
|
||||
HadrontherapyDetectorConstruction();
|
||||
~HadrontherapyDetectorConstruction();
|
||||
|
||||
public:
|
||||
void SetModulatorAngle (G4double);
|
||||
void SetDosemeterMaterial (G4String);
|
||||
G4VPhysicalVolume* Construct();
|
||||
|
||||
public:
|
||||
G4double GetModulatorAngle() {return ModulatorAngle;};
|
||||
G4double ModulatorAngle;
|
||||
G4int NbOfLayer;
|
||||
G4double hightDosemeter;
|
||||
G4double DosemeterPosition_x;
|
||||
G4Material* GetDosemeterMaterial() {return DosemeterMaterial;};
|
||||
G4Material* GetWorldMaterial() {return WorldMaterial;};
|
||||
|
||||
const G4VPhysicalVolume* GetTreatmentRoom() {return physiTreatmentRoom;};
|
||||
const G4VPhysicalVolume* GetDosemeter() {return physiDosemeter;};
|
||||
|
||||
private:
|
||||
G4Material* DosemeterMaterial;
|
||||
G4Material* WorldMaterial;
|
||||
|
||||
// TREATMENT ROOM
|
||||
|
||||
G4Box* solidTreatmentRoom;
|
||||
G4LogicalVolume* logicTreatmentRoom;
|
||||
G4VPhysicalVolume* physiTreatmentRoom;
|
||||
|
||||
// BEAM LINE SUPPORT
|
||||
|
||||
G4Box* solidBeamLineSupport;
|
||||
G4LogicalVolume* logicBeamLineSupport;
|
||||
G4VPhysicalVolume* physiBeamLineSupport;
|
||||
|
||||
// BEAM LINE COVER 1 (left panel)
|
||||
|
||||
G4Box* solidBeamLineCover;
|
||||
G4LogicalVolume* logicBeamLineCover;
|
||||
G4VPhysicalVolume* physiBeamLineCover;
|
||||
|
||||
// BEAM LINE COVER 2 (rigth panel)
|
||||
|
||||
G4Box* solidBeamLineCover2;
|
||||
G4LogicalVolume* logicBeamLineCover2;
|
||||
G4VPhysicalVolume* physiBeamLineCover2;
|
||||
|
||||
|
||||
// VACUUM ZONE
|
||||
|
||||
G4Box* solidVacuumZone;
|
||||
G4LogicalVolume* logicVacuumZone;
|
||||
G4VPhysicalVolume* physiVacuumZone;
|
||||
|
||||
// FIRST SCATTERING FOIL
|
||||
|
||||
G4Box* solidFirstScatteringFoil;
|
||||
G4LogicalVolume* logicFirstScatteringFoil;
|
||||
G4VPhysicalVolume* physiFirstScatteringFoil;
|
||||
|
||||
// KAPTON WINDOW
|
||||
|
||||
G4Box* solidKaptonWindow;
|
||||
G4LogicalVolume* logicKaptonWindow;
|
||||
G4VPhysicalVolume* physiKaptonWindow;
|
||||
|
||||
// BEAM STOPPER
|
||||
|
||||
G4Tubs* solidStopper;
|
||||
G4LogicalVolume* logicStopper;
|
||||
G4VPhysicalVolume* physiStopper;
|
||||
|
||||
// SECOND SCATTERING FOIL
|
||||
|
||||
G4Box* solidSecondScatteringFoil;
|
||||
G4LogicalVolume* logicSecondScatteringFoil;
|
||||
G4VPhysicalVolume* physiSecondScatteringFoil;
|
||||
|
||||
// FIRST COLLIMATOR
|
||||
|
||||
G4Box* solidFirstCollimator;
|
||||
G4LogicalVolume* logicFirstCollimator;
|
||||
G4VPhysicalVolume* physiFirstCollimator;
|
||||
|
||||
G4Tubs* solidHoleFirstCollimator;
|
||||
G4LogicalVolume* logicHoleFirstCollimator;
|
||||
G4VPhysicalVolume* physiHoleFirstCollimator;
|
||||
|
||||
|
||||
//FIRST MODULATOR COLLIMATOR
|
||||
|
||||
G4Box* solidFirstCollimatorModulatorBox;
|
||||
G4LogicalVolume* logicFirstCollimatorModulatorBox;
|
||||
G4VPhysicalVolume* physiFirstCollimatorModulatorBox;
|
||||
|
||||
G4Tubs* solidHoleFirstCollimatorModulatorBox;
|
||||
G4LogicalVolume* logicHoleFirstCollimatorModulatorBox;
|
||||
G4VPhysicalVolume* physiHoleFirstCollimatorModulatorBox;
|
||||
|
||||
|
||||
|
||||
G4Box* solidMotherMod; // pointer to the solid
|
||||
G4LogicalVolume* logicMotherMod; // pointer to the logical Target
|
||||
G4VPhysicalVolume* physiMotherMod;
|
||||
|
||||
G4Material* MotherModMater;
|
||||
G4Material* Mod0Mater;
|
||||
G4Material* ModMater;
|
||||
|
||||
|
||||
G4Tubs* solidMod0; // pointer to the
|
||||
G4LogicalVolume* logicMod0; // pointer to the
|
||||
G4VPhysicalVolume* physiMod0;
|
||||
|
||||
|
||||
G4Tubs* solidMod1; // pointer to the
|
||||
G4LogicalVolume* logicMod1; // pointer to the
|
||||
G4VPhysicalVolume* physiMod1;
|
||||
|
||||
G4Tubs* solidMod2; // pointer to the
|
||||
G4LogicalVolume* logicMod2; // pointer to the
|
||||
G4VPhysicalVolume* physiMod2;
|
||||
|
||||
G4Tubs* solidMod3; // pointer to the
|
||||
G4LogicalVolume* logicMod3; // pointer to the
|
||||
G4VPhysicalVolume* physiMod3;
|
||||
|
||||
G4Tubs* solidMod4; // pointer to the
|
||||
G4LogicalVolume* logicMod4; // pointer to the
|
||||
G4VPhysicalVolume* physiMod4;
|
||||
|
||||
G4Tubs* solidMod5; // pointer to the
|
||||
G4LogicalVolume* logicMod5; // pointer to the
|
||||
G4VPhysicalVolume* physiMod5;
|
||||
|
||||
G4Tubs* solidMod6; // pointer to the
|
||||
G4LogicalVolume* logicMod6; // pointer to the
|
||||
G4VPhysicalVolume* physiMod6;
|
||||
|
||||
G4Tubs* solidMod7; // pointer to the
|
||||
G4LogicalVolume* logicMod7; // pointer to the
|
||||
G4VPhysicalVolume* physiMod7;
|
||||
|
||||
G4Tubs* solidMod8; // pointer to the
|
||||
G4LogicalVolume* logicMod8; // pointer to the
|
||||
G4VPhysicalVolume* physiMod8;
|
||||
|
||||
G4Tubs* solidMod9; // pointer to the
|
||||
G4LogicalVolume* logicMod9; // pointer to the
|
||||
G4VPhysicalVolume* physiMod9;
|
||||
|
||||
G4Tubs* solidMod10; // pointer to the
|
||||
G4LogicalVolume* logicMod10; // pointer to the
|
||||
G4VPhysicalVolume* physiMod10;
|
||||
|
||||
G4Tubs* solidMod11; // pointer to the
|
||||
G4LogicalVolume* logicMod11; // pointer to the
|
||||
G4VPhysicalVolume* physiMod11;
|
||||
|
||||
G4Tubs* solidMod12; // pointer to the
|
||||
G4LogicalVolume* logicMod12; // pointer to the
|
||||
G4VPhysicalVolume* physiMod12;
|
||||
|
||||
G4Tubs* solidMod13; // pointer to the
|
||||
G4LogicalVolume* logicMod13; // pointer to the
|
||||
G4VPhysicalVolume* physiMod13;
|
||||
|
||||
G4Tubs* solidMod14; // pointer to the
|
||||
G4LogicalVolume* logicMod14; // pointer to the
|
||||
G4VPhysicalVolume* physiMod14;
|
||||
|
||||
G4Tubs* solidMod15; // pointer to the
|
||||
G4LogicalVolume* logicMod15; // pointer to the
|
||||
G4VPhysicalVolume* physiMod15;
|
||||
|
||||
G4Tubs* solidMod16; // pointer to the
|
||||
G4LogicalVolume* logicMod16; // pointer to the
|
||||
G4VPhysicalVolume* physiMod16;
|
||||
|
||||
G4Tubs* solidMod17; // pointer to the
|
||||
G4LogicalVolume* logicMod17; // pointer to the
|
||||
G4VPhysicalVolume* physiMod17;
|
||||
|
||||
G4Tubs* solidMod18; // pointer to the
|
||||
G4LogicalVolume* logicMod18; // pointer to the
|
||||
G4VPhysicalVolume* physiMod18;
|
||||
|
||||
G4Tubs* solidMod20; // pointer to the
|
||||
G4LogicalVolume* logicMod20; // pointer to the
|
||||
G4VPhysicalVolume* physiMod20;
|
||||
|
||||
//SECOND MODULATOR COLLIMATOR
|
||||
|
||||
G4Box* solidSecondCollimatorModulatorBox;
|
||||
G4LogicalVolume* logicSecondCollimatorModulatorBox;
|
||||
G4VPhysicalVolume* physiSecondCollimatorModulatorBox;
|
||||
|
||||
G4Tubs* solidHoleSecondCollimatorModulatorBox;
|
||||
G4LogicalVolume* logicHoleSecondCollimatorModulatorBox;
|
||||
G4VPhysicalVolume* physiHoleSecondCollimatorModulatorBox;
|
||||
|
||||
//SECOND COLLIMATOR
|
||||
|
||||
G4Box* solidSecondCollimator;
|
||||
G4LogicalVolume* logicSecondCollimator;
|
||||
G4VPhysicalVolume* physiSecondCollimator;
|
||||
|
||||
G4Tubs* solidHoleSecondCollimator;
|
||||
G4LogicalVolume* logicHoleSecondCollimator;
|
||||
G4VPhysicalVolume* physiHoleSecondCollimator;
|
||||
|
||||
// FIRST MONITOR CHAMBER
|
||||
|
||||
G4Box* solidFirstMonitorLayer1;
|
||||
G4LogicalVolume* logicFirstMonitorLayer1;
|
||||
G4VPhysicalVolume* physiFirstMonitorLayer1;
|
||||
|
||||
G4Box* solidFirstMonitorLayer2;
|
||||
G4LogicalVolume* logicFirstMonitorLayer2;
|
||||
G4VPhysicalVolume* physiFirstMonitorLayer2;
|
||||
|
||||
G4Box* solidFirstMonitorLayer3;
|
||||
G4LogicalVolume* logicFirstMonitorLayer3;
|
||||
G4VPhysicalVolume* physiFirstMonitorLayer3;
|
||||
|
||||
G4Box* solidFirstMonitorLayer4;
|
||||
G4LogicalVolume* logicFirstMonitorLayer4;
|
||||
G4VPhysicalVolume* physiFirstMonitorLayer4;
|
||||
|
||||
//SECODN MONITOR CHAMBER
|
||||
|
||||
G4Box* solidSecondMonitorLayer1;
|
||||
G4LogicalVolume* logicSecondMonitorLayer1;
|
||||
G4VPhysicalVolume* physiSecondMonitorLayer1;
|
||||
|
||||
G4Box* solidSecondMonitorLayer2;
|
||||
G4LogicalVolume* logicSecondMonitorLayer2;
|
||||
G4VPhysicalVolume* physiSecondMonitorLayer2;
|
||||
|
||||
G4Box* solidSecondMonitorLayer3;
|
||||
G4LogicalVolume* logicSecondMonitorLayer3;
|
||||
G4VPhysicalVolume* physiSecondMonitorLayer3;
|
||||
|
||||
G4Box* solidSecondMonitorLayer4;
|
||||
G4LogicalVolume* logicSecondMonitorLayer4;
|
||||
G4VPhysicalVolume* physiSecondMonitorLayer4;
|
||||
|
||||
// THIRD MONITOR CHAMBER
|
||||
|
||||
G4Box* solidThirdMonitorLayer1;
|
||||
G4LogicalVolume* logicThirdMonitorLayer1;
|
||||
G4VPhysicalVolume* physiThirdMonitorLayer1;
|
||||
|
||||
G4Box* solidThirdMonitorLayer2;
|
||||
G4LogicalVolume* logicThirdMonitorLayer2;
|
||||
G4VPhysicalVolume* physiThirdMonitorLayer2;
|
||||
|
||||
|
||||
G4Box* solidThirdMonitorLayer3;
|
||||
G4LogicalVolume* logicThirdMonitorLayer3;
|
||||
G4VPhysicalVolume* physiThirdMonitorLayer3;
|
||||
|
||||
G4Box* solidThirdMonitorLayer4;
|
||||
G4LogicalVolume* logicThirdMonitorLayer4;
|
||||
G4VPhysicalVolume* physiThirdMonitorLayer4;
|
||||
|
||||
//NOZZLE
|
||||
|
||||
G4Box* solidNozzleSupport;
|
||||
G4LogicalVolume* logicNozzleSupport;
|
||||
G4VPhysicalVolume* physiNozzleSupport;
|
||||
|
||||
G4Tubs* solidHoleNozzleSupport;
|
||||
G4LogicalVolume* logicHoleNozzleSupport;
|
||||
G4VPhysicalVolume* physiHoleNozzleSupport;
|
||||
|
||||
G4Tubs* solidSecondHoleNozzleSupport;
|
||||
G4LogicalVolume* logicSecondHoleNozzleSupport;
|
||||
G4VPhysicalVolume* physiSecondHoleNozzleSupport;
|
||||
|
||||
//FINAL COLLIMATOR
|
||||
|
||||
G4Tubs* solidFinalCollimator;
|
||||
G4LogicalVolume* logicFinalCollimator;
|
||||
G4VPhysicalVolume* physiFinalCollimator;
|
||||
|
||||
// WATER PHANTOM
|
||||
|
||||
G4Box* solidWaterPhantom;
|
||||
G4LogicalVolume* logicWaterPhantom;
|
||||
G4VPhysicalVolume* physiWaterPhantom;
|
||||
|
||||
//DOSEMETER (sensitive detector)
|
||||
|
||||
G4Tubs* solidDosemeter;
|
||||
G4LogicalVolume* logicDosemeter;
|
||||
G4VPhysicalVolume* physiDosemeter;
|
||||
HadrontherapyDetectorMessenger* detectorMessenger;
|
||||
|
||||
HadrontherapyCalorimeterSD* calorimeterSD; //pointer to the sensitive detector
|
||||
|
||||
private:
|
||||
G4VPhysicalVolume* ConstructCalorimeter();
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: HadrontherapyDetectorMessenger.hh,v 1.0
|
||||
// --------------------------------------------------------------
|
||||
// GEANT 4 - Hadrontherapy example
|
||||
// --------------------------------------------------------------
|
||||
// Code developed by:
|
||||
//
|
||||
// G.A.P. Cirrone, G. Russo
|
||||
// Laboratori Nazionali del Sud - INFN, Catania, Italy
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
|
||||
#ifndef HadrontherapyDetectorMessenger_h
|
||||
#define HadrontherapyDetectorMessenger_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4UImessenger.hh"
|
||||
|
||||
class HadrontherapyDetectorConstruction;
|
||||
class G4UIdirectory;
|
||||
class G4UIcmdWithAString;
|
||||
class G4UIcmdWithAnInteger;
|
||||
class G4UIcmdWithADoubleAndUnit;
|
||||
class G4UIcmdWithoutParameter;
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
class HadrontherapyDetectorMessenger: public G4UImessenger
|
||||
{
|
||||
public:
|
||||
HadrontherapyDetectorMessenger(HadrontherapyDetectorConstruction* );
|
||||
~HadrontherapyDetectorMessenger();
|
||||
|
||||
void SetNewValue(G4UIcommand*, G4String);
|
||||
|
||||
private:
|
||||
HadrontherapyDetectorConstruction* HadrontherapyDetector;
|
||||
|
||||
G4UIdirectory* HadronDir;
|
||||
G4UIdirectory* detDir;
|
||||
G4UIcmdWithADoubleAndUnit* ModulatorAngleCmd;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
#endif
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user