Import Geant4 9.3.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 16:15:05 +02:00
parent b79225fb37
commit 74cad5e589
3877 changed files with 234205 additions and 167127 deletions
+4 -4
View File
@@ -1,4 +1,4 @@
# $Id: GNUmakefile,v 1.6 2008/06/23 09:26:07 gcosmo Exp $
# $Id: GNUmakefile,v 1.7 2009/11/20 16:17:52 gcosmo Exp $
# --------------------------------------------------------------
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
# --------------------------------------------------------------
@@ -10,10 +10,10 @@ endif
include $(G4INSTALL)/config/architecture.gmk
SUBDIRS = gammaray_telescope underground_physics xray_fluorescence xray_telescope
SUBDIRS += brachytherapy cosmicray_charging hadrontherapy
SUBDIRS += medical_linac purging_magnet radioprotection human_phantom
SUBDIRS += brachytherapy hadrontherapy medical_linac
SUBDIRS += purging_magnet radioprotection human_phantom
SUBDIRS += air_shower microbeam microdosimetry nanobeam
SUBDIRS += Tiara Rich composite_calorimeter lAr_calorimeter
SUBDIRS += Rich composite_calorimeter lAr_calorimeter
.PHONY : all clean clean_libs
+1 -5
View File
@@ -1,4 +1,4 @@
# $Id: GNUmakefile,v 1.1 2003/05/26 13:02:50 pmendez Exp $
# $Id: GNUmakefile,v 1.2 2009/03/06 09:39:58 gbarrand Exp $
# --------------------------------------------------------------
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
# --------------------------------------------------------------
@@ -18,10 +18,6 @@ endif
include $(G4INSTALL)/config/architecture.gmk
ifdef G4ANALYSIS_USE
CPPFLAGS += `aida-config --include`
LDFLAGS += `aida-config --lib`
endif
#
.PHONY: all
all: lib bin
+15 -1
View File
@@ -1,5 +1,5 @@
-------------------------------------------------------------------
$Id: History,v 1.13 2008/11/24 14:34:11 cirrone Exp $
$Id: History,v 1.16 2009/11/12 13:09:56 ribon Exp $
-------------------------------------------------------------------
=========================================================
@@ -9,6 +9,20 @@ $Id: History,v 1.13 2008/11/24 14:34:11 cirrone Exp $
Category History file
---------------------
12.11.2009 - A.Ribon (Rich-V09-02-01)
Added the possibility to use QGSP_BIC_EMY as
Physics List. However, by default, the example's
Physics List is used.
08.04.2009 - G.A.P.Cirrone; Tag: Rich-V09-02-00
Tag for the next release
06.03.2009 - Guy Barrand (in agreement with G.Cosmo)
GNUmakefile : remove the G4ANALYSIS_USE logic found in this file
since it is handled already in the config/analysis.gmk.
This avoids a duplication in the compilation and link commands
of the aida-config options.
23.11.2008 - G.A.P.Cirrone; Tag: Rich-V09-01-01
Fixed compilation errors on the file RichTbEventAction
+18 -10
View File
@@ -43,10 +43,14 @@
#include "RichTbIOData.hh"
#include "G4UImanager.hh"
#include "G4UIterminal.hh"
#include "QGSP_BIC_EMY.hh"
#ifdef G4UI_USE_XM
#include "G4UIXm.hh"
#endif
#include "Randomize.hh"
#ifdef G4VIS_USE
#include "G4VisExecutive.hh"
#endif
@@ -76,15 +80,15 @@ int main(int argc,char** argv) {
runManager->SetUserInitialization(RichTbDet);
RichTbPhysicsList* RichTbPhy
=new RichTbPhysicsList(rConfig);
runManager-> SetUserInitialization(RichTbPhy);
//***LOOKHERE*** : Choose the Physics List
RichTbPhysicsList* RichTbPhy =new RichTbPhysicsList(rConfig);
runManager->SetUserInitialization(RichTbPhy); // Use example's Physics List
//runManager->SetUserInitialization(new QGSP_BIC_EMY); // Use QGSP_BIC_EMY
// UserAction classes - optional
#ifdef G4VIS_USE
G4VisManager* visManager = new G4VisExecutive();
visManager->SetVerboseLevel(0);
visManager->Initialize();
@@ -92,6 +96,7 @@ int main(int argc,char** argv) {
G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance();
G4cout<<" PVVisManager "<<pVVisManager<<G4endl;
G4cout<<"VisManager "<<visManager<<G4endl;
#endif
runManager->SetUserAction(new RichTbRunAction);
@@ -100,9 +105,13 @@ int main(int argc,char** argv) {
runManager->SetUserAction( PrimaryGenAction );
RichTbEventAction* eventAction=
new RichTbEventAction(rConfig,visManager,
rIOData);
#ifdef G4VIS_USE
RichTbEventAction* eventAction=new RichTbEventAction(rConfig,visManager,rIOData);
#endif
#ifndef G4VIS_USE
RichTbEventAction* eventAction=new RichTbEventAction(rConfig,0,rIOData);
#endif
runManager->SetUserAction(eventAction);
@@ -145,9 +154,8 @@ int main(int argc,char** argv) {
}
#ifdef G4VIS_USE
delete visManager;
#endif
G4cout << "\nVisManager deleted..\n" <<G4endl;
#endif
delete runManager;
-35
View File
@@ -1,35 +0,0 @@
# $Id: GNUmakefile,v 1.7 2004/12/08 15:37:13 daquinog Exp $
# -------------------------------------------------------------------
# GEANT4 tag $Name: geant4-09-02 $
# --------------------------------------------------------------
TIARA_SRC_DIRS = tiara
TIARA_SRC_SWIG_DIRS = CLHEPWrapper G4KernelWrapper TiaraWrapper
include $(G4INSTALL)/config/architecture.gmk
.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;:
-120
View File
@@ -1,120 +0,0 @@
# $Id: History,v 1.32 2008/06/14 16:56:59 cirrone Exp $
# -------------------------------------------------------------------
# GEANT4 tag $Name: geant4-09-02 $
# -------------------------------------------------------------------
=========================================================
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 *
----------------------------------------------------------
June 14th, 2006, G.A.P.Cirrone (Tiara-V09-01-00)
- fixed compilation errors
November 20th, 2006, A. Howard
- removed hadronic_list.gmk from GNUmakefile to accommodate new reference
physicslist location
June 26th, 2006 A. Howard
- fixed configuration script, GNUmakefiles and python scripts to work for
runSimNoAnalysis.py and also corrected Vis scripts for non-static particles
December 15th, 2005 A.Howard
- Migration to CLHEP namespace - requires cloning of class in python
- Migrated to non-static particles
November 15th, 2005 G.Cosmo - Tiara-V07-01-00
- Migration to <sstream> from deprecated <strstream>.
May 3rd, 2005 J.Allison
- Replaced vis manager with G4VisExecutive.
March 17th, 2005 G.Daquino - Tiara-V07-00-00
- Migration of Tiara (working with PI) from rh73 to slc3
Dec 14th, 2004 G.Daquino - Tiara-V06-02-02
- Update of GNUmakefiles to the new phys_lists structure
Dec 13th, 2004 G.Cosmo - Tiara-V06-02-01
- Use new phys-lists structure.
Dec 8th, 2004 G.Daquino - Tiara-V06-02-00
- Corrected link to the centralized hadronic physics lists. Eliminated all the old
links to the tiara-dedicated shared libraries for the Packaging and the physics lists
SWIG wraps based on the templated physics list classes
Migration to the <cmath> completed
runSim.py still needs to be modified in order to obtain the plotting through PI
Jun 18th, 2004 G.Daquino - Tiara-V06-01-03
- Corrected some errors in the README and in the script envCommon.csh. Besides, the file
hadronic_list.gmk in the subdirectory source was not correct.
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
constructor and operator=() definitions were commented out by mistake
by V.Ivantchenko.
Dec 8th, 2003 G.Cosmo - Tiara-V05-02-05
- Restored some classes in physics_lists package and fixed setup
configuration.
Dec 5th, 2003 G.Cosmo - Tiara-V05-02-04
- Changed LISTS_BASE to G4LISTS_BASE for hadronic physics lists path.
Cowork with "ghad-lists-V05-02-01".
Dec 4th, 2003 G.Cosmo - Tiara-V05-02-03
- Fixed build setup. Added references to new physics-lists structure.
- Corrected setup for SWIG to point to default installation under /usr.
Dec 3rd, 2003 H.P.Wellisch
- Removed hadronics physics-lists. Now using default setup provided
in $G4INSTALL/hadronic_lists.
Nov 20th, 2003 V.Ivanchenko - Tiara-V05-02-02
- Decays for all particles
Nov 13th, 2003 John Allison
- Removed OPACS from Vis Manager.
Nov 07th, 2003 V.Ivanchenko - Tiara-V05-02-01
- Remove STD from physics
- Cleanup GNUmakefiles and warnings
Aug 08th, 2003 M.Dressel - Tiara-V05-02-00
- important update of README
Jul 08th, 2003 M.Dressel - Tiara-B05-01-05
- this together with geant4-05-02-ref-00 is used for the check for
large deviations in 68c100 simulation
Jun 20th, 2003 M.Dressel - Tiara-V05-01-04
- using CLHEP units replacing G4Dimensions.hh
Jun 18th, 2003 M.Dressel - Tiara-V05-01-03
- change environment configuration for swig
Jun 17th, 2003 M.Dressel - Tiara-V05-01-02
- changes for rh73 with gcc-2.95.2 and rh73 with gcc-3.2
Jun 16th, 2003 M.Dressel - Tiara-V05-01-01
- building with gmake supported, cvs meta info added
Jun 12th, 2003 M.Dressel - Tiara-V05-01-00
- Created
-270
View File
@@ -1,270 +0,0 @@
# $Id: README,v 1.21 2005/03/17 19:48:27 daquinog Exp $
# -------------------------------------------------------------------
# GEANT4 tag $Name: geant4-09-02 $
# -------------------------------------------------------------------
Simulation of the TIARA experiment using importance sampling
============================================================
This example is a simulation of the neutron shielding experiment TIARA
see http://idsun1.kek.jp/nakao/research/tiara/tiara.htm.
The example is meant to provide a realistic example for
applying geometrical importance sampling (geometrical splitting and
Russian roulette).
In the TIARA experiment neutrons of two different energy distributions
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 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
depends strongly on the shield thickness and importance configuration.
The efficiency of the simulations may be obtained as FOM values.
See also "Geant4 User's Guide
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.3 and gcc-2.95.2 compilers.
Note for system testing without analysis: see points 1.1, 1.3 and 3.2.
1) Setting the environment
==========================
You must compile Geant4 with:
"G4LIB_BUILD_SHARED" set to 1.
You need to set:
"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) PI via AFS (most simple):
--------------------
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)
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 PI and SWIG installation:
-----------------------------------------------------
You don't use afs but you have a local installation of SWIG and PI
Set the following environment variables:
"G4ANALYSIS_USE"
"PI_BASE_DIR"
"SWIG_BASE_DIR"
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 PI and no SWIG (e.g. for system testing):
-------------------------------------------------------------
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 or setenv G4ANALYSIS_USE 0)
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.3.so --whole-archive libpython2.3.a /usr/lib/libc.so"
Set the following environment variables:
"PYTHONVERSION" (2.3 or higher)
"PYTHON_BASE_DIR" (e.g. to /usr)
"SWIG_VERSION" (e.g. 1.3 or higher)
"SWIG_BASE_DIR" (e.g. /usr)
"CLHEP_BASE_DIR" (e.g. to /opt/local)
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 clean_all 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".
2.1) In more detail
-------------------
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 PI, SWIG and Python.
2.2) Cleaning up
----------------
To remove the files created by swig ( *_wrap.cc, the corresponding
.py files) use "gmake swigClean".
To remove the directories of compiled code related to this example under
$G4WORKDIR/tmp/$G4SYSTEM/ use "gmake tiaraClean".
To remove all the files created during the previous compilation, use
"gmake clean_all".
3) Running the example:
=======================
3.1) Using PI
-----------------
Change to the sub directory "run" and execute "runSim.py".
"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
screen.
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 python or ROOT:
1) Start python
2) type: import dataAcess
3) type: p = dataAcess.ExpMcPlot (shelveFileName,detectorposition)
where "shelveFileName" is the name (enclosed in quotes) of the
shelve file created during the execution of runSim.py.
The name is printed on the screen during execution of runSim.py.
"detectorposition" may be "00, "20" or "40" and stand for the
detectors 00, 20, 40 cm off beam axis respectively.
4) type: p.display ()
5) type: import extractShelve
6) type: extractShelve.getFluxes (p.she)
p.she is the shelve object containing simulation results.
This prints the FOM values for the used detectors
for two energy regions below and in the peak region.
The FOM should be compared to unbiased simulations. To run
an unbiased simulation set the importance values to one (see
runSim.py)
Note: the output files written after every run are incremental! Meaning
the file with the highest run number contains the data from
all the runs!
The modules (dataAcess, extractShelve) imported in the above steps are
placed in source/py_modules in files named after the module ending with
".py".
Since the simulation time used by "runSim.py" is only 5 minutes the
calculated results have large errors. If you want to see a better result
do the following changes in "runSim.py".
Extend the total run time to e,g, 2 hours by setting:
"totalTime = 2 * myUtils.hour",
set the print out period to 30 minutes by setting:
"timeForOneRun = 30 * myUtils.min".
3.2) Not using PI (mainly for system testing)
-------------------------------------------------
Change to the sub directory "run" and execute
runSimNoAnalysis.py.
4) Content of the directory:
============================
envCommon.csh - a script to setup environment variables
in case the above one of the above environment settings have been
done beforehand.
GNUmakefile - for building the example
data / - directory containing experimental data
expDataOrig - experimental data taken from
http://idsun1.kek.jp/nakao/research/tiara/tiara.htm
expDataConverted - some of the experimental data and the source
spectra converted into Anaphes DataPointSet
and stored in Anaphes xml format
source / - directory containing the source code
tiara - C++ source code
CLHEPWrapper - wrapper classes for usage in python
\include\CLHEP.i - specification file for swig
\src\CLHEP_wrap.cc - wrapper created with swig
G4KernelWrapper - wrapper classes for usage in python
TiaraWrapper - wrapper classes for usage in python
py_modules - python modules for running and analysing
swig.gmk - makefile rules for using swig
run / - directory for running the example
runSim.py - executable example script
runSimNoAnalysis.py - executable script for running without
analysis
5) Technicalities about this example
===================================
This example is composed out of a layer of classes written in C++
(source/tiara/include, source/tiara/src), a layer of python
shadow classes created by swig (source/CLHEPWrapper,
source/G4KernelWrapper, source/TiaraWrapper) and a layer of
python modules (source/py_modules).
The C++ layer under source/tiara provides lower level classes closely
related to the Geant4 kernel.
The shadow classes in the source/*Wrapper directories provide classes
that may be instantiated in a python script or session. This way the
lower level C++ code can be used directly for scripting in python. The
shadow classes are declared in the files with extensions ".i" in the
source/*Wrapper/include directories. Swig is used to create C++ code for
a library that can be loaded into python and python modules (files with
extensions .py in the source/*Wrapper directories). When the python
modules created by swig are imported into python (in a session or a
script) the corresponding C++ library is automatically loaded as well.
The python modules in source/py_modules provide classes and functions
that may be changed or customized more frequently than the C++ classes
in source/tiara. These classes complete the construction of geometries,
take care of the procedure of setting up the simulation, the run sequence
and the analysis after the simulation has been ran.
The script runSim.py is an commented example of using the python modules
to run a simulation.
6) Note about how to call the hadronic physics lists in runSim.py and runSimNoAnalysis.py
=========================================================================================
It is only necessary to change the physList value in runSim.py or runSimNoAnalysis.py. In the example, there are 4 available physics lists, but of course the user can use whatever physics lists he/she likes and present in the Geant4-7.0 repository. In such a case, the user should also modify the
/source/TiaraWrapper/include/Tiara.i file in order to create an instantiation of the
physics list class. In particular, just follow the same lines already used for the six
available physics lists.
@@ -1,55 +0,0 @@
Experimental neutron spectra measured by BC501A at TIARA1992/10 [43c100-00]
Proton Energy : 43 MeV
Shielding Material :100.0cm thick Concrete
Iron collimator (10.9cm diam.) : 0cm thick
Distance from Li target to the shield surface(0cm thickness) = 403 cm
Number of monoenergetic peak neutrons of p-7Li neutron source
(case-a) =3.15E+09 [sr/micro-Coulomb]
1.94E+04 [cm^2/micro-Coulomb] at 403 cm
Measured position : beam line
Reference :Nucl. Sci. Eng. 124(1996)p228 , JAERI-Data/Code97-020(1997)
Graph
Neutron Energy [eV]
Neutron Flux [n/cm^2/micro-Coulomb/lethargy]
Absolute Error [n/cm^2/micro-Coulomb/lethargy]
4.350E+07 7.982E+00 5.061E-01
4.250E+07 1.658E+01 6.119E-01
4.150E+07 2.741E+01 5.229E-01
4.050E+07 3.590E+01 3.551E-01
3.950E+07 3.730E+01 8.271E-01
3.850E+07 3.104E+01 1.231E+00
3.750E+07 2.133E+01 1.067E+00
3.650E+07 1.310E+01 4.923E-01
3.550E+07 8.372E+00 1.973E-01
3.450E+07 6.416E+00 3.824E-01
3.350E+07 5.779E+00 3.854E-01
3.250E+07 5.528E+00 3.429E-01
3.150E+07 5.311E+00 3.288E-01
3.050E+07 5.061E+00 3.218E-01
2.950E+07 4.796E+00 3.132E-01
2.850E+07 4.537E+00 3.387E-01
2.750E+07 4.291E+00 4.334E-01
2.650E+07 4.037E+00 5.823E-01
2.550E+07 3.746E+00 7.262E-01
2.449E+07 3.404E+00 7.922E-01
2.349E+07 3.033E+00 7.398E-01
2.249E+07 2.676E+00 5.752E-01
2.149E+07 2.381E+00 3.341E-01
2.049E+07 2.166E+00 8.100E-02
1.949E+07 2.025E+00 2.460E-01
1.849E+07 1.931E+00 4.035E-01
1.749E+07 1.847E+00 3.831E-01
1.649E+07 1.751E+00 2.060E-01
1.549E+07 1.645E+00 5.948E-02
1.449E+07 1.545E+00 8.809E-02
1.349E+07 1.463E+00 3.949E-02
1.249E+07 1.394E+00 1.751E-01
1.149E+07 1.333E+00 2.621E-01
1.049E+07 1.297E+00 2.578E-01
9.487E+06 1.314E+00 2.050E-01
8.485E+06 1.378E+00 9.701E-02
7.483E+06 1.441E+00 1.518E-01
6.481E+06 1.522E+00 3.396E-01
5.477E+06 1.655E+00 2.592E-01
4.472E+06 1.570E+00 4.268E-01
@@ -1,54 +0,0 @@
Experimental neutron spectra measured by BC501A at TIARA1992/10 [43c150-00]
Proton Energy : 43 MeV
Shielding Material :150.0cm thick Concrete
Iron collimator (10.9cm diam.) : 0cm thick
Distance from Li target to the shield surface(0cm thickness) = 403 cm
Number of monoenergetic peak neutrons of p-7Li neutron source
(case-a) =3.15E+09 [sr/micro-Coulomb]
1.94E+04 [cm^2/micro-Coulomb] at 403 cm
Measured position : beam line
Reference :Nucl. Sci. Eng. 124(1996)p228 , JAERI-Data/Code97-020(1997)
Graph
Neutron Energy [eV]
Neutron Flux [n/cm^2/micro-Coulomb/lethargy]
Absolute Error [n/cm^2/micro-Coulomb/lethargy]
4.350E+07 2.026E-01 2.202E-02
4.250E+07 3.907E-01 3.008E-02
4.150E+07 6.249E-01 3.566E-02
4.050E+07 8.164E-01 3.072E-02
3.950E+07 8.651E-01 1.940E-02
3.850E+07 7.466E-01 5.153E-02
3.750E+07 5.400E-01 8.088E-02
3.650E+07 3.566E-01 7.398E-02
3.550E+07 2.514E-01 3.792E-02
3.450E+07 2.110E-01 1.171E-02
3.350E+07 1.996E-01 2.589E-02
3.250E+07 1.934E-01 3.038E-02
3.150E+07 1.847E-01 2.773E-02
3.050E+07 1.737E-01 2.382E-02
2.950E+07 1.626E-01 2.135E-02
2.850E+07 1.532E-01 2.124E-02
2.750E+07 1.462E-01 2.321E-02
2.650E+07 1.410E-01 2.611E-02
2.550E+07 1.358E-01 2.840E-02
2.449E+07 1.288E-01 2.859E-02
2.349E+07 1.184E-01 2.576E-02
2.249E+07 1.046E-01 1.975E-02
2.149E+07 8.811E-02 1.143E-02
2.049E+07 7.128E-02 3.505E-03
1.949E+07 5.705E-02 6.866E-03
1.849E+07 4.810E-02 1.058E-02
1.749E+07 4.529E-02 9.983E-03
1.649E+07 4.671E-02 6.501E-03
1.549E+07 4.872E-02 3.379E-03
1.449E+07 4.830E-02 2.474E-03
1.349E+07 4.499E-02 3.959E-03
1.249E+07 4.057E-02 7.091E-03
1.149E+07 3.714E-02 9.308E-03
1.049E+07 3.589E-02 9.567E-03
9.487E+06 3.780E-02 7.504E-03
8.485E+06 4.511E-02 1.241E-03
7.483E+06 5.828E-02 1.303E-02
6.481E+06 6.872E-02 2.887E-02
5.477E+06 6.311E-02 3.449E-02
@@ -1,55 +0,0 @@
Experimental neutron spectra measured by BC501A at TIARA1992/10 [43c25-00a]
Proton Energy : 43 MeV
Shielding Material : 25.0cm thick Concrete
Iron collimator (10.9cm diam.) : 40cm thick
Distance from Li target to the shield surface(0cm thickness) = 443 cm
Number of monoenergetic peak neutrons of p-7Li neutron source
(case-b) =3.45E+09 [sr/micro-Coulomb]
1.76E+04 [cm^2/micro-Coulomb] at 443 cm
Measured position : beam line
Reference :Nucl. Sci. Eng. 124(1996)p228 , JAERI-Data/Code97-020(1997)
Graph
Neutron Energy [eV]
Neutron Flux [n/cm^2/micro-Coulomb/lethargy]
Absolute Error [n/cm^2/micro-Coulomb/lethargy]
4.350E+07 6.744E+03 6.263E+02
4.250E+07 1.317E+04 5.875E+02
4.150E+07 1.965E+04 2.960E+02
4.050E+07 2.265E+04 3.991E+02
3.950E+07 2.023E+04 6.325E+02
3.850E+07 1.396E+04 5.659E+02
3.750E+07 7.428E+03 3.056E+02
3.650E+07 3.133E+03 1.181E+02
3.550E+07 1.325E+03 1.603E+02
3.450E+07 1.019E+03 1.766E+02
3.350E+07 1.274E+03 1.672E+02
3.250E+07 1.611E+03 1.699E+02
3.150E+07 1.878E+03 1.768E+02
3.050E+07 2.054E+03 1.720E+02
2.950E+07 2.147E+03 1.632E+02
2.850E+07 2.168E+03 1.734E+02
2.750E+07 2.130E+03 2.189E+02
2.650E+07 2.043E+03 2.937E+02
2.550E+07 1.930E+03 3.658E+02
2.449E+07 1.818E+03 3.990E+02
2.349E+07 1.725E+03 3.741E+02
2.249E+07 1.665E+03 2.899E+02
2.149E+07 1.640E+03 1.681E+02
2.049E+07 1.642E+03 3.660E+01
1.949E+07 1.649E+03 1.259E+02
1.849E+07 1.630E+03 2.058E+02
1.749E+07 1.551E+03 1.964E+02
1.649E+07 1.417E+03 1.066E+02
1.549E+07 1.267E+03 2.618E+01
1.449E+07 1.157E+03 4.025E+01
1.349E+07 1.108E+03 1.904E+01
1.249E+07 1.089E+03 8.798E+01
1.149E+07 1.054E+03 1.310E+02
1.049E+07 9.850E+02 1.281E+02
9.487E+06 9.110E+02 1.015E+02
8.485E+06 8.461E+02 4.836E+01
7.483E+06 7.555E+02 7.453E+01
6.481E+06 6.756E+02 1.505E+02
5.477E+06 6.938E+02 3.724E+01
4.472E+06 6.344E+02 2.723E+02
@@ -1,53 +0,0 @@
Experimental neutron spectra measured by BC501A at TIARA1995/2 [43c25-20a]
Proton Energy : 43 MeV
Shielding Material : 25.0cm thick Concrete
Iron collimator (10.9cm diam.) : 40cm thick
Distance from Li target to the shield surface(0cm thickness) = 443 cm
Number of monoenergetic peak neutrons of p-7Li neutron source
(case-b) =3.45E+09 [sr/micro-Coulomb]
1.76E+04 [cm^2/micro-Coulomb] at 443 cm
Measured position : 20cm from beam line
Reference :Nucl. Sci. Eng. 124(1996)p228 , JAERI-Data/Code97-020(1997)
Graph
Neutron Energy [eV]
Neutron Flux [n/cm^2/micro-Coulomb/lethargy]
Absolute Error [n/cm^2/micro-Coulomb/lethargy]
4.350E+07 1.029E+02 5.729E+01
4.250E+07 1.864E+02 1.201E+02
4.150E+07 3.223E+02 1.284E+02
4.050E+07 4.607E+02 5.482E+01
3.950E+07 5.036E+02 5.250E+01
3.850E+07 4.150E+02 9.947E+01
3.750E+07 2.740E+02 8.055E+01
3.650E+07 1.732E+02 3.748E+01
3.550E+07 1.304E+02 1.279E+01
3.450E+07 1.189E+02 1.230E+01
3.350E+07 1.165E+02 1.132E+01
3.250E+07 1.156E+02 9.308E+00
3.150E+07 1.144E+02 8.170E+00
3.050E+07 1.127E+02 8.258E+00
2.950E+07 1.105E+02 9.341E+00
2.850E+07 1.078E+02 1.121E+01
2.750E+07 1.048E+02 1.364E+01
2.650E+07 1.018E+02 1.615E+01
2.550E+07 9.920E+01 1.795E+01
2.449E+07 9.722E+01 1.825E+01
2.349E+07 9.574E+01 1.653E+01
2.249E+07 9.453E+01 1.271E+01
2.149E+07 9.336E+01 7.264E+00
2.049E+07 9.201E+01 1.853E+00
1.949E+07 9.031E+01 4.591E+00
1.849E+07 8.799E+01 7.237E+00
1.749E+07 8.493E+01 6.927E+00
1.649E+07 8.127E+01 4.560E+00
1.549E+07 7.751E+01 2.286E+00
1.449E+07 7.421E+01 1.610E+00
1.349E+07 7.164E+01 2.670E+00
1.249E+07 6.964E+01 4.689E+00
1.149E+07 6.788E+01 6.075E+00
1.049E+07 6.627E+01 6.198E+00
9.487E+06 6.503E+01 4.849E+00
8.485E+06 6.352E+01 7.540E-01
7.483E+06 5.906E+01 8.406E+00
6.481E+06 4.854E+01 1.869E+01
@@ -1,53 +0,0 @@
Experimental neutron spectra measured by BC501A at TIARA1995/2 [43c25-40a]
Proton Energy : 43 MeV
Shielding Material : 25.0cm thick Concrete
Iron collimator (10.9cm diam.) : 40cm thick
Distance from Li target to the shield surface(0cm thickness) = 443 cm
Number of monoenergetic peak neutrons of p-7Li neutron source
(case-b) =3.45E+09 [sr/micro-Coulomb]
1.76E+04 [cm^2/micro-Coulomb] at 443 cm
Measured position : 40cm from beam line
Reference :Nucl. Sci. Eng. 124(1996)p228 , JAERI-Data/Code97-020(1997)
Graph
Neutron Energy [eV]
Neutron Flux [n/cm^2/micro-Coulomb/lethargy]
Absolute Error [n/cm^2/micro-Coulomb/lethargy]
4.350E+07 1.240E+01 2.475E+00
4.250E+07 2.332E+01 5.019E+00
4.150E+07 3.197E+01 5.360E+00
4.050E+07 3.461E+01 2.346E+00
3.950E+07 3.263E+01 2.697E+00
3.850E+07 2.852E+01 4.865E+00
3.750E+07 2.322E+01 3.978E+00
3.650E+07 1.833E+01 1.766E+00
3.550E+07 1.551E+01 6.330E-01
3.450E+07 1.463E+01 8.040E-01
3.350E+07 1.454E+01 7.655E-01
3.250E+07 1.452E+01 6.638E-01
3.150E+07 1.438E+01 6.204E-01
3.050E+07 1.416E+01 6.446E-01
2.950E+07 1.391E+01 7.280E-01
2.850E+07 1.365E+01 8.705E-01
2.750E+07 1.342E+01 1.058E+00
2.650E+07 1.324E+01 1.258E+00
2.550E+07 1.310E+01 1.401E+00
2.449E+07 1.302E+01 1.425E+00
2.349E+07 1.299E+01 1.291E+00
2.249E+07 1.301E+01 9.958E-01
2.149E+07 1.306E+01 5.761E-01
2.049E+07 1.309E+01 1.641E-01
1.949E+07 1.304E+01 3.370E-01
1.849E+07 1.286E+01 5.304E-01
1.749E+07 1.253E+01 5.027E-01
1.649E+07 1.210E+01 3.256E-01
1.549E+07 1.166E+01 1.650E-01
1.449E+07 1.132E+01 1.218E-01
1.349E+07 1.112E+01 2.006E-01
1.249E+07 1.103E+01 3.591E-01
1.149E+07 1.100E+01 4.709E-01
1.049E+07 1.102E+01 4.840E-01
9.487E+06 1.114E+01 3.799E-01
8.485E+06 1.130E+01 6.600E-02
7.483E+06 1.109E+01 6.604E-01
6.481E+06 9.770E+00 1.462E+00
@@ -1,55 +0,0 @@
Experimental neutron spectra measured by BC501A at TIARA1992/10 [43c50-00a]
Proton Energy : 43 MeV
Shielding Material : 50.0cm thick Concrete
Iron collimator (10.9cm diam.) : 40cm thick
Distance from Li target to the shield surface(0cm thickness) = 443 cm
Number of monoenergetic peak neutrons of p-7Li neutron source
(case-b) =3.45E+09 [sr/micro-Coulomb]
1.76E+04 [cm^2/micro-Coulomb] at 443 cm
Measured position : beam line
Reference :Nucl. Sci. Eng. 124(1996)p228 , JAERI-Data/Code97-020(1997)
Graph
Neutron Energy [eV]
Neutron Flux [n/cm^2/micro-Coulomb/lethargy]
Absolute Error [n/cm^2/micro-Coulomb/lethargy]
4.350E+07 9.291E+02 9.291E+01
4.250E+07 1.609E+03 7.717E+01
4.150E+07 2.215E+03 3.532E+01
4.050E+07 2.429E+03 4.096E+01
3.950E+07 2.112E+03 5.964E+01
3.850E+07 1.451E+03 5.239E+01
3.750E+07 7.942E+02 2.636E+01
3.650E+07 3.710E+02 1.163E+01
3.550E+07 1.905E+02 2.092E+01
3.450E+07 1.515E+02 2.113E+01
3.350E+07 1.635E+02 1.827E+01
3.250E+07 1.829E+02 1.789E+01
3.150E+07 1.973E+02 1.909E+01
3.050E+07 2.052E+02 1.913E+01
2.950E+07 2.071E+02 1.841E+01
2.850E+07 2.028E+02 1.944E+01
2.750E+07 1.919E+02 2.413E+01
2.650E+07 1.756E+02 3.208E+01
2.550E+07 1.578E+02 3.968E+01
2.449E+07 1.425E+02 4.333E+01
2.349E+07 1.330E+02 4.046E+01
2.249E+07 1.295E+02 3.158E+01
2.149E+07 1.302E+02 1.828E+01
2.049E+07 1.324E+02 4.021E+00
1.949E+07 1.333E+02 1.368E+01
1.849E+07 1.297E+02 2.277E+01
1.749E+07 1.192E+02 2.189E+01
1.649E+07 1.033E+02 1.205E+01
1.549E+07 8.752E+01 2.788E+00
1.449E+07 7.839E+01 4.361E+00
1.349E+07 7.748E+01 2.085E+00
1.249E+07 8.043E+01 9.733E+00
1.149E+07 8.144E+01 1.441E+01
1.049E+07 7.837E+01 1.404E+01
9.487E+06 7.365E+01 1.110E+01
8.485E+06 6.797E+01 5.263E+00
7.483E+06 5.690E+01 8.178E+00
6.481E+06 4.823E+01 1.841E+01
5.477E+06 5.012E+01 1.414E+01
4.472E+06 3.196E+01 2.353E+01
@@ -1,53 +0,0 @@
Experimental neutron spectra measured by BC501A at TIARA1995/2 [43c50-20a]
Proton Energy : 43 MeV
Shielding Material : 50.0cm thick Concrete
Iron collimator (10.9cm diam.) : 40cm thick
Distance from Li target to the shield surface(0cm thickness) = 443 cm
Number of monoenergetic peak neutrons of p-7Li neutron source
(case-b) =3.45E+09 [sr/micro-Coulomb]
1.76E+04 [cm^2/micro-Coulomb] at 443 cm
Measured position : 20cm from beam line
Reference :Nucl. Sci. Eng. 124(1996)p228 , JAERI-Data/Code97-020(1997)
Graph
Neutron Energy [eV]
Neutron Flux [n/cm^2/micro-Coulomb/lethargy]
Absolute Error [n/cm^2/micro-Coulomb/lethargy]
4.350E+07 7.643E+01 2.326E+01
4.250E+07 1.393E+02 4.860E+01
4.150E+07 2.224E+02 5.188E+01
4.050E+07 2.958E+02 2.187E+01
3.950E+07 3.163E+02 2.127E+01
3.850E+07 2.661E+02 4.021E+01
3.750E+07 1.792E+02 3.244E+01
3.650E+07 1.072E+02 1.513E+01
3.550E+07 7.055E+01 5.007E+00
3.450E+07 5.836E+01 4.528E+00
3.350E+07 5.551E+01 4.164E+00
3.250E+07 5.460E+01 3.473E+00
3.150E+07 5.362E+01 3.213E+00
3.050E+07 5.230E+01 3.443E+00
2.950E+07 5.074E+01 4.002E+00
2.850E+07 4.911E+01 4.864E+00
2.750E+07 4.751E+01 5.939E+00
2.650E+07 4.597E+01 7.031E+00
2.550E+07 4.440E+01 7.822E+00
2.449E+07 4.265E+01 7.948E+00
2.349E+07 4.063E+01 7.203E+00
2.249E+07 3.830E+01 5.544E+00
2.149E+07 3.575E+01 3.172E+00
2.049E+07 3.312E+01 7.357E-01
1.949E+07 3.061E+01 1.993E+00
1.849E+07 2.843E+01 3.164E+00
1.749E+07 2.669E+01 3.030E+00
1.649E+07 2.535E+01 1.973E+00
1.549E+07 2.424E+01 9.422E-01
1.449E+07 2.314E+01 6.386E-01
1.349E+07 2.198E+01 1.144E+00
1.249E+07 2.085E+01 2.038E+00
1.149E+07 1.988E+01 2.644E+00
1.049E+07 1.921E+01 2.695E+00
9.487E+06 1.899E+01 2.106E+00
8.485E+06 1.943E+01 2.844E-01
7.483E+06 2.016E+01 3.657E+00
6.481E+06 1.947E+01 8.138E+00
@@ -1,52 +0,0 @@
Experimental neutron spectra measured by BC501A at TIARA1995/2 [43c50-40a]
Proton Energy : 43 MeV
Shielding Material : 50.0cm thick Concrete
Iron collimator (10.9cm diam.) : 40cm thick
Distance from Li target to the shield surface(0cm thickness) = 443 cm
Number of monoenergetic peak neutrons of p-7Li neutron source
(case-b) =3.45E+09 [sr/micro-Coulomb]
1.76E+04 [cm^2/micro-Coulomb] at 443 cm
Measured position : 40cm from beam line
Reference :Nucl. Sci. Eng. 124(1996)p228 , JAERI-Data/Code97-020(1997)
Graph
Neutron Energy [eV]
Neutron Flux [n/cm^2/micro-Coulomb/lethargy]
Absolute Error [n/cm^2/micro-Coulomb/lethargy]
4.350E+07 1.148E+01 2.295E+00
4.250E+07 2.235E+01 4.648E+00
4.150E+07 3.336E+01 4.966E+00
4.050E+07 4.007E+01 2.185E+00
3.950E+07 4.012E+01 2.536E+00
3.850E+07 3.390E+01 4.569E+00
3.750E+07 2.466E+01 3.745E+00
3.650E+07 1.692E+01 1.653E+00
3.550E+07 1.283E+01 5.953E-01
3.450E+07 1.140E+01 7.710E-01
3.350E+07 1.095E+01 7.247E-01
3.250E+07 1.064E+01 6.112E-01
3.150E+07 1.027E+01 5.526E-01
3.050E+07 9.846E+00 5.641E-01
2.950E+07 9.362E+00 6.351E-01
2.850E+07 8.812E+00 7.602E-01
2.750E+07 8.207E+00 9.271E-01
2.650E+07 7.606E+00 1.101E+00
2.550E+07 7.097E+00 1.227E+00
2.449E+07 6.766E+00 1.249E+00
2.349E+07 6.657E+00 1.131E+00
2.249E+07 6.765E+00 8.699E-01
2.149E+07 7.027E+00 5.021E-01
2.049E+07 7.326E+00 1.347E-01
1.949E+07 7.502E+00 2.975E-01
1.849E+07 7.403E+00 4.675E-01
1.749E+07 6.978E+00 4.435E-01
1.649E+07 6.344E+00 2.858E-01
1.549E+07 5.747E+00 1.404E-01
1.449E+07 5.398E+00 1.006E-01
1.349E+07 5.338E+00 1.737E-01
1.249E+07 5.433E+00 3.142E-01
1.149E+07 5.513E+00 4.122E-01
1.049E+07 5.508E+00 4.231E-01
9.487E+06 5.412E+00 3.316E-01
8.485E+06 5.059E+00 5.120E-02
7.483E+06 4.087E+00 5.762E-01
@@ -1,66 +0,0 @@
Experimental neutron spectra measured by BC501A at TIARA1992/12 [68c100-00]
Proton Energy : 68 MeV
Shielding Material :100.0cm thick Concrete
Iron collimator (10.9cm diam.) : 0cm thick
Distance from Li target to the shield surface(0cm thickness) = 403 cm
Number of monoenergetic peak neutrons of p-7Li neutron source
(case-a) =4.00E+09 [sr/micro-Coulomb]
2.46E+04 [cm^2/micro-Coulomb] at 403 cm
Measured position : beam line
Reference :Nucl. Sci. Eng. 124(1996)p228 , JAERI-Data/Code97-020(1997)
Graph
Neutron Energy [eV]
Neutron Flux [n/cm^2/micro-Coulomb/lethargy]
Absolute Error [n/cm^2/micro-Coulomb/lethargy]
6.899E+07 1.414E+02 4.815E+00
6.699E+07 2.831E+02 7.960E+00
6.499E+07 3.986E+02 6.056E+00
6.299E+07 4.097E+02 4.991E+00
6.099E+07 3.137E+02 8.514E+00
5.899E+07 1.820E+02 7.124E+00
5.699E+07 8.636E+01 2.849E+00
5.499E+07 4.693E+01 3.020E+00
5.299E+07 4.307E+01 3.444E+00
5.099E+07 4.971E+01 2.929E+00
4.899E+07 5.391E+01 2.609E+00
4.699E+07 5.237E+01 2.450E+00
4.499E+07 4.658E+01 2.242E+00
4.350E+07 4.145E+01 2.170E+00
4.250E+07 3.843E+01 2.205E+00
4.150E+07 3.602E+01 2.321E+00
4.050E+07 3.424E+01 2.510E+00
3.950E+07 3.298E+01 2.766E+00
3.850E+07 3.201E+01 2.947E+00
3.750E+07 3.104E+01 3.030E+00
3.650E+07 2.982E+01 3.020E+00
3.550E+07 2.819E+01 2.944E+00
3.450E+07 2.616E+01 2.837E+00
3.350E+07 2.392E+01 2.724E+00
3.250E+07 2.180E+01 2.608E+00
3.150E+07 2.019E+01 2.482E+00
3.050E+07 1.930E+01 2.351E+00
2.950E+07 1.909E+01 2.257E+00
2.850E+07 1.926E+01 2.246E+00
2.750E+07 1.933E+01 2.336E+00
2.650E+07 1.895E+01 2.494E+00
2.550E+07 1.798E+01 2.629E+00
2.449E+07 1.655E+01 2.624E+00
2.349E+07 1.490E+01 2.392E+00
2.249E+07 1.321E+01 1.913E+00
2.149E+07 1.158E+01 1.289E+00
2.049E+07 9.976E+00 7.099E-01
1.949E+07 8.437E+00 1.187E+00
1.849E+07 7.065E+00 1.580E+00
1.749E+07 6.038E+00 1.588E+00
1.649E+07 5.496E+00 1.272E+00
1.549E+07 5.423E+00 8.433E-01
1.449E+07 5.626E+00 5.475E-01
1.349E+07 5.872E+00 5.197E-01
1.249E+07 6.052E+00 7.146E-01
1.149E+07 6.199E+00 8.919E-01
1.049E+07 6.401E+00 9.085E-01
9.487E+06 6.731E+00 7.199E-01
8.485E+06 7.120E+00 2.334E-01
7.483E+06 7.186E+00 1.163E+00
6.481E+06 6.380E+00 2.414E+00
@@ -1,66 +0,0 @@
Experimental neutron spectra measured by BC501A at TIARA1992/12 [68c150-00]
Proton Energy : 68 MeV
Shielding Material :150.0cm thick Concrete
Iron collimator (10.9cm diam.) : 0cm thick
Distance from Li target to the shield surface(0cm thickness) = 403 cm
Number of monoenergetic peak neutrons of p-7Li neutron source
(case-a) =4.00E+09 [sr/micro-Coulomb]
2.46E+04 [cm^2/micro-Coulomb] at 403 cm
Measured position : beam line
Reference :Nucl. Sci. Eng. 124(1996)p228 , JAERI-Data/Code97-020(1997)
Graph
Neutron Energy [eV]
Neutron Flux [n/cm^2/micro-Coulomb/lethargy]
Absolute Error [n/cm^2/micro-Coulomb/lethargy]
6.899E+07 4.219E+00 2.187E-01
6.699E+07 9.864E+00 3.778E-01
6.499E+07 1.682E+01 3.018E-01
6.299E+07 2.072E+01 2.816E-01
6.099E+07 1.844E+01 4.484E-01
5.899E+07 1.210E+01 3.656E-01
5.699E+07 6.539E+00 1.538E-01
5.499E+07 4.037E+00 1.936E-01
5.299E+07 3.649E+00 1.979E-01
5.099E+07 3.848E+00 1.726E-01
4.899E+07 3.880E+00 1.799E-01
4.699E+07 3.553E+00 1.907E-01
4.499E+07 2.958E+00 1.819E-01
4.350E+07 2.507E+00 1.727E-01
4.250E+07 2.286E+00 1.705E-01
4.150E+07 2.154E+00 1.764E-01
4.050E+07 2.107E+00 1.935E-01
3.950E+07 2.116E+00 2.169E-01
3.850E+07 2.143E+00 2.333E-01
3.750E+07 2.153E+00 2.380E-01
3.650E+07 2.118E+00 2.304E-01
3.550E+07 2.030E+00 2.146E-01
3.450E+07 1.893E+00 1.976E-01
3.350E+07 1.724E+00 1.856E-01
3.250E+07 1.554E+00 1.802E-01
3.150E+07 1.417E+00 1.761E-01
3.050E+07 1.344E+00 1.664E-01
2.950E+07 1.338E+00 1.520E-01
2.850E+07 1.372E+00 1.435E-01
2.750E+07 1.396E+00 1.490E-01
2.650E+07 1.375E+00 1.684E-01
2.550E+07 1.305E+00 1.905E-01
2.449E+07 1.206E+00 2.017E-01
2.349E+07 1.104E+00 1.891E-01
2.249E+07 1.008E+00 1.521E-01
2.149E+07 9.192E-01 1.000E-01
2.049E+07 8.301E-01 5.036E-02
1.949E+07 7.348E-01 9.630E-02
1.849E+07 6.316E-01 1.371E-01
1.749E+07 5.323E-01 1.413E-01
1.649E+07 4.606E-01 1.072E-01
1.549E+07 4.339E-01 5.644E-02
1.449E+07 4.465E-01 4.556E-02
1.349E+07 4.733E-01 2.382E-02
1.249E+07 4.922E-01 5.187E-02
1.149E+07 4.984E-01 6.799E-02
1.049E+07 5.006E-01 6.646E-02
9.487E+06 5.143E-01 5.413E-02
8.485E+06 5.508E-01 3.059E-02
7.483E+06 5.917E-01 5.520E-02
6.481E+06 5.733E-01 1.587E-01
@@ -1,66 +0,0 @@
Experimental neutron spectra measured by BC501A at TIARA1992/12 [68c200-00]
Proton Energy : 68 MeV
Shielding Material :200.0cm thick Concrete
Iron collimator (10.9cm diam.) : 0cm thick
Distance from Li target to the shield surface(0cm thickness) = 403 cm
Number of monoenergetic peak neutrons of p-7Li neutron source
(case-a) =4.00E+09 [sr/micro-Coulomb]
2.46E+04 [cm^2/micro-Coulomb] at 403 cm
Measured position : beam line
Reference :Nucl. Sci. Eng. 124(1996)p228 , JAERI-Data/Code97-020(1997)
Graph
Neutron Energy [eV]
Neutron Flux [n/cm^2/micro-Coulomb/lethargy]
Absolute Error [n/cm^2/micro-Coulomb/lethargy]
6.899E+07 5.347E-01 4.621E-02
6.699E+07 1.240E+00 7.555E-02
6.499E+07 2.100E+00 6.124E-02
6.299E+07 2.617E+00 6.205E-02
6.099E+07 2.422E+00 1.006E-01
5.899E+07 1.714E+00 8.274E-02
5.699E+07 1.036E+00 3.380E-02
5.499E+07 6.847E-01 4.307E-02
5.299E+07 5.882E-01 4.369E-02
5.099E+07 5.836E-01 3.780E-02
4.899E+07 5.824E-01 3.986E-02
4.699E+07 5.545E-01 4.276E-02
4.499E+07 4.990E-01 4.096E-02
4.350E+07 4.542E-01 3.875E-02
4.250E+07 4.324E-01 3.839E-02
4.150E+07 4.210E-01 4.013E-02
4.050E+07 4.200E-01 4.445E-02
3.950E+07 4.258E-01 4.992E-02
3.850E+07 4.324E-01 5.379E-02
3.750E+07 4.335E-01 5.493E-02
3.650E+07 4.247E-01 5.308E-02
3.550E+07 4.044E-01 4.902E-02
3.450E+07 3.740E-01 4.433E-02
3.350E+07 3.381E-01 4.046E-02
3.250E+07 3.024E-01 3.813E-02
3.150E+07 2.722E-01 3.647E-02
3.050E+07 2.502E-01 3.396E-02
2.950E+07 2.355E-01 3.054E-02
2.850E+07 2.245E-01 2.805E-02
2.750E+07 2.132E-01 2.807E-02
2.650E+07 2.004E-01 3.029E-02
2.550E+07 1.874E-01 3.317E-02
2.449E+07 1.756E-01 3.449E-02
2.349E+07 1.651E-01 3.227E-02
2.249E+07 1.543E-01 2.629E-02
2.149E+07 1.424E-01 1.820E-02
2.049E+07 1.303E-01 1.101E-02
1.949E+07 1.192E-01 1.916E-02
1.849E+07 1.099E-01 2.653E-02
1.749E+07 1.023E-01 2.790E-02
1.649E+07 9.634E-02 2.253E-02
1.549E+07 9.137E-02 1.341E-02
1.449E+07 8.724E-02 9.807E-03
1.349E+07 8.511E-02 5.466E-03
1.249E+07 8.613E-02 9.634E-03
1.149E+07 8.881E-02 1.189E-02
1.049E+07 9.013E-02 1.171E-02
9.487E+06 9.109E-02 9.624E-03
8.485E+06 9.619E-02 5.636E-03
7.483E+06 1.040E-01 7.985E-03
6.481E+06 1.098E-01 1.223E-02
@@ -1,66 +0,0 @@
Experimental neutron spectra measured by BC501A at TIARA1992/12 [68c25-00a]
Proton Energy : 68 MeV
Shielding Material : 25.0cm thick Concrete
Iron collimator (10.9cm diam.) : 80cm thick
Distance from Li target to the shield surface(0cm thickness) = 483 cm
Number of monoenergetic peak neutrons of p-7Li neutron source
(case-b) =4.77E+09 [sr/micro-Coulomb]
2.04E+04 [cm^2/micro-Coulomb] at 483 cm
Measured position : beam line
Reference :Nucl. Sci. Eng. 124(1996)p228 , JAERI-Data/Code97-020(1997)
Graph
Neutron Energy [eV]
Neutron Flux [n/cm^2/micro-Coulomb/lethargy]
Absolute Error [n/cm^2/micro-Coulomb/lethargy]
6.899E+07 1.600E+04 3.408E+02
6.699E+07 3.239E+04 5.661E+02
6.499E+07 4.576E+04 4.326E+02
6.299E+07 4.658E+04 3.534E+02
6.099E+07 3.478E+04 5.994E+02
5.899E+07 1.947E+04 5.009E+02
5.699E+07 9.141E+03 2.031E+02
5.499E+07 5.437E+03 2.195E+02
5.299E+07 5.548E+03 2.515E+02
5.099E+07 6.558E+03 2.183E+02
4.899E+07 7.050E+03 1.987E+02
4.699E+07 6.736E+03 1.889E+02
4.499E+07 5.920E+03 1.724E+02
4.350E+07 5.279E+03 1.642E+02
4.250E+07 4.937E+03 1.632E+02
4.150E+07 4.688E+03 1.679E+02
4.050E+07 4.526E+03 1.801E+02
3.950E+07 4.424E+03 2.020E+02
3.850E+07 4.351E+03 2.198E+02
3.750E+07 4.273E+03 2.296E+02
3.650E+07 4.166E+03 2.349E+02
3.550E+07 4.017E+03 2.366E+02
3.450E+07 3.830E+03 2.372E+02
3.350E+07 3.627E+03 2.370E+02
3.250E+07 3.441E+03 2.356E+02
3.150E+07 3.305E+03 2.322E+02
3.050E+07 3.238E+03 2.282E+02
2.950E+07 3.230E+03 2.299E+02
2.850E+07 3.238E+03 2.436E+02
2.750E+07 3.210E+03 2.714E+02
2.650E+07 3.102E+03 3.068E+02
2.550E+07 2.900E+03 3.343E+02
2.449E+07 2.626E+03 3.381E+02
2.349E+07 2.314E+03 3.075E+02
2.249E+07 1.996E+03 2.402E+02
2.149E+07 1.690E+03 1.468E+02
2.049E+07 1.401E+03 5.814E+01
1.949E+07 1.140E+03 1.143E+02
1.849E+07 9.224E+02 1.604E+02
1.749E+07 7.642E+02 1.567E+02
1.649E+07 6.718E+02 1.158E+02
1.549E+07 6.321E+02 6.894E+01
1.449E+07 6.167E+02 4.468E+01
1.349E+07 5.992E+02 5.408E+01
1.249E+07 5.708E+02 8.711E+01
1.149E+07 5.408E+02 1.115E+02
1.049E+07 5.224E+02 1.134E+02
9.487E+06 5.211E+02 8.868E+01
8.485E+06 5.353E+02 1.933E+01
7.483E+06 5.494E+02 1.528E+02
6.481E+06 5.213E+02 3.332E+02
@@ -1,65 +0,0 @@
Experimental neutron spectra measured by BC501A at TIARA1995/2 [68c25-20a]
Proton Energy : 68 MeV
Shielding Material : 25.0cm thick Concrete
Iron collimator (10.9cm diam.) : 80cm thick
Distance from Li target to the shield surface(0cm thickness) = 483 cm
Number of monoenergetic peak neutrons of p-7Li neutron source
(case-b) =4.77E+09 [sr/micro-Coulomb]
2.04E+04 [cm^2/micro-Coulomb] at 483 cm
Measured position : 20cm from beam line
Reference :Nucl. Sci. Eng. 124(1996)p228 , JAERI-Data/Code97-020(1997)
Graph
Neutron Energy [eV]
Neutron Flux [n/cm^2/micro-Coulomb/lethargy]
Absolute Error [n/cm^2/micro-Coulomb/lethargy]
6.899E+07 1.075E+02 1.161E+01
6.699E+07 2.578E+02 3.584E+01
6.499E+07 4.950E+02 5.163E+01
6.299E+07 5.337E+02 5.786E+01
6.099E+07 3.761E+02 5.715E+01
5.899E+07 1.767E+02 2.683E+01
5.699E+07 1.227E+02 1.586E+01
5.499E+07 1.511E+02 1.293E+01
5.299E+07 1.752E+02 7.720E+00
5.099E+07 1.886E+02 6.939E+00
4.899E+07 2.004E+02 7.982E+00
4.699E+07 2.139E+02 9.695E+00
4.499E+07 2.236E+02 9.849E+00
4.350E+07 2.260E+02 9.252E+00
4.250E+07 2.257E+02 8.648E+00
4.150E+07 2.251E+02 8.233E+00
4.050E+07 2.246E+02 9.058E+00
3.950E+07 2.247E+02 1.055E+01
3.850E+07 2.254E+02 1.168E+01
3.750E+07 2.266E+02 1.202E+01
3.650E+07 2.281E+02 1.145E+01
3.550E+07 2.297E+02 1.029E+01
3.450E+07 2.308E+02 9.231E+00
3.350E+07 2.304E+02 9.033E+00
3.250E+07 2.279E+02 9.938E+00
3.150E+07 2.229E+02 1.136E+01
3.050E+07 2.159E+02 1.159E+01
2.950E+07 2.081E+02 9.616E+00
2.850E+07 2.007E+02 7.213E+00
2.750E+07 1.938E+02 7.256E+00
2.650E+07 1.867E+02 1.026E+01
2.550E+07 1.787E+02 1.458E+01
2.449E+07 1.697E+02 1.716E+01
2.349E+07 1.599E+02 1.598E+01
2.249E+07 1.500E+02 1.211E+01
2.149E+07 1.406E+02 7.582E+00
2.049E+07 1.321E+02 3.391E+00
1.949E+07 1.239E+02 6.874E+00
1.849E+07 1.153E+02 1.162E+01
1.749E+07 1.064E+02 1.269E+01
1.649E+07 9.818E+01 8.522E+00
1.549E+07 9.107E+01 4.777E+00
1.449E+07 8.510E+01 6.005E+00
1.349E+07 8.112E+01 2.627E+00
1.249E+07 7.975E+01 4.568E+00
1.149E+07 7.988E+01 6.147E+00
1.049E+07 8.000E+01 5.095E+00
9.487E+06 7.939E+01 3.646E+00
8.485E+06 7.886E+01 2.627E+00
7.483E+06 8.070E+01 1.763E+00
@@ -1,65 +0,0 @@
Experimental neutron spectra measured by BC501A at TIARA1995/2 [68c25-40a]
Proton Energy : 68 MeV
Shielding Material : 25.0cm thick Concrete
Iron collimator (10.9cm diam.) : 80cm thick
Distance from Li target to the shield surface(0cm thickness) = 483 cm
Number of monoenergetic peak neutrons of p-7Li neutron source
(case-b) =4.77E+09 [sr/micro-Coulomb]
2.04E+04 [cm^2/micro-Coulomb] at 483 cm
Measured position : 40cm from beam line
Reference :Nucl. Sci. Eng. 124(1996)p228 , JAERI-Data/Code97-020(1997)
Graph
Neutron Energy [eV]
Neutron Flux [n/cm^2/micro-Coulomb/lethargy]
Absolute Error [n/cm^2/micro-Coulomb/lethargy]
6.899E+07 5.036E+00 6.597E-01
6.699E+07 9.936E+00 2.103E+00
6.499E+07 2.360E+01 3.078E+00
6.299E+07 3.368E+01 3.594E+00
6.099E+07 2.137E+01 3.929E+00
5.899E+07 1.346E+01 1.802E+00
5.699E+07 1.407E+01 1.112E+00
5.499E+07 1.517E+01 9.061E-01
5.299E+07 1.580E+01 5.613E-01
5.099E+07 1.669E+01 5.294E-01
4.899E+07 1.857E+01 6.233E-01
4.699E+07 2.082E+01 7.906E-01
4.499E+07 2.203E+01 8.311E-01
4.350E+07 2.221E+01 7.548E-01
4.250E+07 2.226E+01 6.694E-01
4.150E+07 2.244E+01 6.097E-01
4.050E+07 2.285E+01 6.978E-01
3.950E+07 2.349E+01 8.529E-01
3.850E+07 2.432E+01 9.626E-01
3.750E+07 2.531E+01 9.946E-01
3.650E+07 2.638E+01 9.480E-01
3.550E+07 2.743E+01 8.611E-01
3.450E+07 2.829E+01 8.054E-01
3.350E+07 2.875E+01 8.581E-01
3.250E+07 2.868E+01 1.048E+00
3.150E+07 2.810E+01 1.251E+00
3.050E+07 2.720E+01 1.241E+00
2.950E+07 2.632E+01 9.555E-01
2.850E+07 2.567E+01 6.602E-01
2.750E+07 2.533E+01 6.997E-01
2.650E+07 2.519E+01 1.192E+00
2.550E+07 2.507E+01 1.900E+00
2.449E+07 2.478E+01 2.302E+00
2.349E+07 2.418E+01 2.154E+00
2.249E+07 2.323E+01 1.616E+00
2.149E+07 2.195E+01 9.498E-01
2.049E+07 2.040E+01 3.315E-01
1.949E+07 1.877E+01 7.951E-01
1.849E+07 1.743E+01 1.465E+00
1.749E+07 1.660E+01 1.602E+00
1.649E+07 1.619E+01 9.539E-01
1.549E+07 1.590E+01 4.526E-01
1.449E+07 1.545E+01 7.515E-01
1.349E+07 1.485E+01 2.838E-01
1.249E+07 1.439E+01 5.722E-01
1.149E+07 1.438E+01 8.423E-01
1.049E+07 1.462E+01 6.867E-01
9.487E+06 1.468E+01 4.628E-01
8.485E+06 1.481E+01 3.424E-01
7.483E+06 1.542E+01 1.937E-01
@@ -1,66 +0,0 @@
Experimental neutron spectra measured by BC501A at TIARA1992/12 [68c50-00a]
Proton Energy : 68 MeV
Shielding Material : 50.0cm thick Concrete
Iron collimator (10.9cm diam.) : 80cm thick
Distance from Li target to the shield surface(0cm thickness) = 483 cm
Number of monoenergetic peak neutrons of p-7Li neutron source
(case-b) =4.77E+09 [sr/micro-Coulomb]
2.04E+04 [cm^2/micro-Coulomb] at 483 cm
Measured position : beam line
Reference :Nucl. Sci. Eng. 124(1996)p228 , JAERI-Data/Code97-020(1997)
Graph
Neutron Energy [eV]
Neutron Flux [n/cm^2/micro-Coulomb/lethargy]
Absolute Error [n/cm^2/micro-Coulomb/lethargy]
6.899E+07 3.117E+03 7.820E+01
6.699E+07 6.407E+03 1.225E+02
6.499E+07 9.058E+03 9.158E+01
6.299E+07 9.240E+03 7.787E+01
6.099E+07 6.949E+03 1.328E+02
5.899E+07 3.924E+03 1.132E+02
5.699E+07 1.790E+03 4.630E+01
5.499E+07 9.298E+02 4.262E+01
5.299E+07 8.462E+02 5.280E+01
5.099E+07 9.845E+02 4.554E+01
4.899E+07 1.073E+03 3.703E+01
4.699E+07 1.053E+03 3.152E+01
4.499E+07 9.530E+02 2.784E+01
4.350E+07 8.570E+02 2.708E+01
4.250E+07 7.926E+02 2.732E+01
4.150E+07 7.340E+02 2.847E+01
4.050E+07 6.823E+02 3.080E+01
3.950E+07 6.375E+02 3.397E+01
3.850E+07 5.984E+02 3.685E+01
3.750E+07 5.634E+02 3.900E+01
3.650E+07 5.307E+02 4.038E+01
3.550E+07 4.997E+02 4.114E+01
3.450E+07 4.710E+02 4.123E+01
3.350E+07 4.461E+02 4.109E+01
3.250E+07 4.273E+02 4.043E+01
3.150E+07 4.162E+02 3.993E+01
3.050E+07 4.123E+02 3.979E+01
2.950E+07 4.130E+02 4.054E+01
2.850E+07 4.140E+02 4.237E+01
2.750E+07 4.105E+02 4.513E+01
2.650E+07 3.989E+02 4.774E+01
2.550E+07 3.777E+02 4.884E+01
2.449E+07 3.478E+02 4.691E+01
2.349E+07 3.110E+02 4.110E+01
2.249E+07 2.698E+02 3.160E+01
2.149E+07 2.266E+02 2.034E+01
2.049E+07 1.846E+02 1.077E+01
1.949E+07 1.466E+02 1.411E+01
1.849E+07 1.160E+02 1.909E+01
1.749E+07 9.447E+01 1.954E+01
1.649E+07 8.218E+01 1.672E+01
1.549E+07 7.687E+01 1.317E+01
1.449E+07 7.567E+01 1.111E+01
1.349E+07 7.639E+01 1.157E+01
1.249E+07 7.824E+01 1.403E+01
1.149E+07 8.126E+01 1.614E+01
1.049E+07 8.545E+01 1.564E+01
9.487E+06 9.058E+01 1.012E+01
8.485E+06 9.563E+01 6.890E+00
7.483E+06 9.737E+01 2.881E+01
6.481E+06 9.009E+01 4.976E+01
@@ -1,65 +0,0 @@
Experimental neutron spectra measured by BC501A at TIARA1995/2 [68c50-20a]
Proton Energy : 68 MeV
Shielding Material : 25.0cm thick Concrete
Iron collimator (10.9cm diam.) : 80cm thick
Distance from Li target to the shield surface(0cm thickness) = 483 cm
Number of monoenergetic peak neutrons of p-7Li neutron source
(case-b) =4.77E+09 [sr/micro-Coulomb]
2.04E+04 [cm^2/micro-Coulomb] at 483 cm
Measured position : 20cm from beam line
Reference :Nucl. Sci. Eng. 124(1996)p228 , JAERI-Data/Code97-020(1997)
Graph
Neutron Energy [eV]
Neutron Flux [n/cm^2/micro-Coulomb/lethargy]
Absolute Error [n/cm^2/micro-Coulomb/lethargy]
6.899E+07 1.766E+02 8.249E+00
6.699E+07 4.777E+02 4.283E+01
6.499E+07 7.983E+02 4.415E+01
6.299E+07 7.486E+02 3.923E+01
6.099E+07 4.569E+02 5.239E+01
5.899E+07 2.162E+02 3.237E+01
5.699E+07 1.275E+02 1.073E+01
5.499E+07 1.322E+02 1.482E+01
5.299E+07 1.528E+02 9.732E+00
5.099E+07 1.667E+02 7.347E+00
4.899E+07 1.735E+02 7.634E+00
4.699E+07 1.754E+02 8.007E+00
4.499E+07 1.733E+02 7.531E+00
4.350E+07 1.696E+02 7.158E+00
4.250E+07 1.663E+02 7.187E+00
4.150E+07 1.628E+02 7.550E+00
4.050E+07 1.593E+02 8.346E+00
3.950E+07 1.557E+02 9.339E+00
3.850E+07 1.520E+02 1.004E+01
3.750E+07 1.482E+02 1.023E+01
3.650E+07 1.441E+02 9.894E+00
3.550E+07 1.394E+02 9.205E+00
3.450E+07 1.340E+02 8.436E+00
3.350E+07 1.278E+02 7.854E+00
3.250E+07 1.209E+02 7.538E+00
3.150E+07 1.137E+02 7.309E+00
3.050E+07 1.068E+02 6.900E+00
2.950E+07 1.008E+02 6.270E+00
2.850E+07 9.587E+01 5.795E+00
2.750E+07 9.165E+01 5.831E+00
2.650E+07 8.759E+01 6.360E+00
2.550E+07 8.326E+01 7.030E+00
2.449E+07 7.859E+01 7.340E+00
2.349E+07 7.373E+01 6.861E+00
2.249E+07 6.890E+01 5.547E+00
2.149E+07 6.428E+01 3.752E+00
2.049E+07 6.002E+01 2.077E+00
1.949E+07 5.612E+01 3.820E+00
1.849E+07 5.240E+01 5.359E+00
1.749E+07 4.851E+01 5.584E+00
1.649E+07 4.439E+01 4.400E+00
1.549E+07 4.049E+01 2.493E+00
1.449E+07 3.753E+01 1.935E+00
1.349E+07 3.571E+01 1.055E+00
1.249E+07 3.449E+01 2.030E+00
1.149E+07 3.340E+01 2.567E+00
1.049E+07 3.267E+01 2.516E+00
9.487E+06 3.281E+01 2.056E+00
8.485E+06 3.377E+01 1.171E+00
7.483E+06 3.222E+01 1.671E+00
@@ -1,65 +0,0 @@
Experimental neutron spectra measured by BC501A at TIARA1995/2 [68c50-40a]
Proton Energy : 68 MeV
Shielding Material : 25.0cm thick Concrete
Iron collimator (10.9cm diam.) : 80cm thick
Distance from Li target to the shield surface(0cm thickness) = 483 cm
Number of monoenergetic peak neutrons of p-7Li neutron source
(case-b) =4.77E+09 [sr/micro-Coulomb]
2.04E+04 [cm^2/micro-Coulomb] at 483 cm
Measured position : 40cm from beam line
Reference :Nucl. Sci. Eng. 124(1996)p228 , JAERI-Data/Code97-020(1997)
Graph
Neutron Energy [eV]
Neutron Flux [n/cm^2/micro-Coulomb/lethargy]
Absolute Error [n/cm^2/micro-Coulomb/lethargy]
6.899E+07 8.311E+00 7.593E-01
6.699E+07 2.991E+01 3.887E+00
6.499E+07 5.900E+01 4.051E+00
6.299E+07 6.739E+01 3.832E+00
6.099E+07 5.139E+01 5.569E+00
5.899E+07 3.004E+01 3.502E+00
5.699E+07 2.068E+01 1.169E+00
5.499E+07 2.097E+01 1.642E+00
5.299E+07 2.280E+01 1.094E+00
5.099E+07 2.404E+01 8.512E-01
4.899E+07 2.485E+01 9.248E-01
4.699E+07 2.544E+01 1.010E+00
4.499E+07 2.583E+01 9.558E-01
4.350E+07 2.610E+01 8.742E-01
4.250E+07 2.634E+01 8.460E-01
4.150E+07 2.667E+01 8.726E-01
4.050E+07 2.708E+01 9.835E-01
3.950E+07 2.752E+01 1.141E+00
3.850E+07 2.789E+01 1.255E+00
3.750E+07 2.810E+01 1.301E+00
3.650E+07 2.807E+01 1.284E+00
3.550E+07 2.775E+01 1.227E+00
3.450E+07 2.716E+01 1.170E+00
3.350E+07 2.636E+01 1.142E+00
3.250E+07 2.545E+01 1.141E+00
3.150E+07 2.448E+01 1.127E+00
3.050E+07 2.349E+01 1.062E+00
2.950E+07 2.247E+01 9.674E-01
2.850E+07 2.142E+01 9.311E-01
2.750E+07 2.038E+01 1.021E+00
2.650E+07 1.938E+01 1.229E+00
2.550E+07 1.842E+01 1.457E+00
2.449E+07 1.747E+01 1.567E+00
2.349E+07 1.649E+01 1.472E+00
2.249E+07 1.550E+01 1.170E+00
2.149E+07 1.452E+01 7.356E-01
2.049E+07 1.359E+01 3.107E-01
1.949E+07 1.270E+01 6.628E-01
1.849E+07 1.185E+01 9.814E-01
1.749E+07 1.104E+01 9.911E-01
1.649E+07 1.031E+01 6.990E-01
1.549E+07 9.646E+00 3.228E-01
1.449E+07 9.051E+00 2.986E-01
1.349E+07 8.566E+00 1.575E-01
1.249E+07 8.261E+00 3.903E-01
1.149E+07 8.132E+00 5.315E-01
1.049E+07 8.111E+00 5.157E-01
9.487E+06 8.217E+00 4.181E-01
8.485E+06 8.547E+00 2.284E-01
7.483E+06 8.878E+00 4.239E-01
@@ -1,55 +0,0 @@
Energy spectrum of 43-MeV p-7Li source neutrons for shielding experiment.
The flux at monoenergetic peak (36.3-45.5 MeV) is normalized to unity.
(Ratio of the peak flux to the total flux above 6.5 MeV is 1:2.17.)
All values should be multiplied by
the corresponding value of "Peak Flux of Source Neutron" in
the table of "Numerical Data for Experimental Geometry and Source Neutrons"
---------------------------------
Upper Neutron Error
Energy Flux
[MeV] [n/MeV] [n/MeV]
---------------------------------
0 4.41E-02 1.51E-03
6.5 4.41E-02 1.51E-03
7.5 4.42E-02 1.52E-03
8.5 4.48E-02 1.54E-03
9.5 4.50E-02 1.54E-03
10.5 4.39E-02 1.51E-03
11.5 4.50E-02 1.51E-03
12.5 4.63E-02 1.57E-03
13.5 4.93E-02 1.65E-03
14.5 4.90E-02 1.65E-03
15.5 4.89E-02 1.62E-03
16.5 4.75E-02 1.57E-03
17.5 4.98E-02 1.63E-03
18.5 4.61E-02 1.51E-03
19.5 4.71E-02 1.56E-03
20.5 4.75E-02 2.05E-03
21.5 4.69E-02 2.02E-03
22.5 4.65E-02 2.01E-03
23.5 4.49E-02 1.91E-03
24.5 4.36E-02 1.88E-03
25.5 4.10E-02 1.77E-03
26.5 3.96E-02 1.70E-03
27.5 3.47E-02 1.50E-03
28.5 3.49E-02 1.51E-03
29.5 3.08E-02 1.34E-03
30.5 2.64E-02 1.16E-03
31.5 2.10E-02 9.43E-04
32.5 1.88E-02 1.19E-03
33.5 1.49E-02 9.60E-04
34.5 1.29E-02 8.40E-04
35.5 1.08E-02 7.11E-04
36.5 7.23E-03 4.91E-04
37.5 1.34E-02 8.53E-04
38.5 1.38E-01 8.31E-03
39.5 3.63E-01 2.18E-02
40.5 3.68E-01 2.21E-02
41.5 1.14E-01 6.86E-03
42.5 5.06E-03 3.54E-04
43.5 6.36E-04 7.29E-05
44.5 1.63E-04 3.31E-05
45.5
---------------------------------
@@ -1,81 +0,0 @@
Energy spectrum of 68-MeV p-7Li source neutrons for shielding experiment.
The flux at monoenergetic peak (60.8-72.5 MeV) is normalized to unity.
The absolute peak flux for each experiment can be obtained from Table 1.
(Ratio of the peak flux to the total flux above 6.5 MeV is 1:2.61.)
All values should be multiplied by
the corresponding value of "Peak Flux of Source Neutron" in
the table of "Numerical Data for Experimental Geometry and Source Neutrons"
---------------------------------
Upper Neutron Error
Energy Flux
[MeV] [n/MeV] [n/MeV]
---------------------------------
0 2.37E-02 8.50E-04
6.5 2.37E-02 8.50E-04
7.5 2.40E-02 8.55E-04
8.5 2.44E-02 8.67E-04
9.5 2.51E-02 8.86E-04
10.5 2.57E-02 9.07E-04
11.5 2.53E-02 8.98E-04
12.5 2.59E-02 9.21E-04
13.5 2.68E-02 9.46E-04
14.5 2.71E-02 9.60E-04
15.5 2.79E-02 9.83E-04
16.5 2.80E-02 9.89E-04
17.5 2.86E-02 1.01E-03
18.5 2.95E-02 1.04E-03
19.5 3.10E-02 1.09E-03
20.5 3.15E-02 1.10E-03
21.5 3.33E-02 1.45E-03
22.5 3.38E-02 1.46E-03
23.5 3.53E-02 1.52E-03
24.5 3.62E-02 1.56E-03
25.5 3.67E-02 1.57E-03
26.5 3.84E-02 1.64E-03
27.5 3.81E-02 1.62E-03
28.5 3.93E-02 1.67E-03
29.5 3.85E-02 1.64E-03
30.5 3.88E-02 1.65E-03
31.5 3.86E-02 1.64E-03
32.5 3.88E-02 2.39E-03
33.5 3.76E-02 2.33E-03
34.5 3.70E-02 2.28E-03
35.5 3.72E-02 2.30E-03
36.5 3.66E-02 2.26E-03
37.5 3.62E-02 2.23E-03
38.5 3.40E-02 2.10E-03
39.5 3.35E-02 2.07E-03
40.5 3.32E-02 2.05E-03
41.5 3.34E-02 2.07E-03
42.5 3.14E-02 1.94E-03
43.5 3.21E-02 1.98E-03
44.5 3.10E-02 1.92E-03
45.5 3.10E-02 1.92E-03
46.5 3.16E-02 1.95E-03
47.5 3.09E-02 1.90E-03
48.5 3.00E-02 1.85E-03
49.5 2.86E-02 1.77E-03
50.5 2.80E-02 1.73E-03
51.5 2.66E-02 1.64E-03
52.5 2.51E-02 1.56E-03
53.5 2.39E-02 1.48E-03
54.5 2.18E-02 1.36E-03
55.5 1.96E-02 1.22E-03
56.5 1.60E-02 1.01E-03
57.5 1.28E-02 8.38E-04
58.5 1.09E-02 7.42E-04
59.5 9.01E-03 6.27E-04
60.5 7.43E-03 5.27E-04
61.5 8.10E-03 5.62E-04
62.5 4.70E-02 2.90E-03
63.5 2.10E-01 1.27E-02
64.5 3.61E-01 2.18E-02
65.5 2.77E-01 1.67E-02
66.5 8.20E-02 4.99E-03
67.5 8.90E-03 6.05E-04
68.5 1.07E-03 1.12E-04
69.5 4.01E-04 6.17E-05
70.5 4.97E-04 6.87E-05
71.5 1.32E-04 3.24E-05
72.5
---------------------------------
-101
View File
@@ -1,101 +0,0 @@
# $Id: envCommon.csh,v 1.13 2005/03/17 19:48:27 daquinog Exp $
# -------------------------------------------------------------------
# GEANT4 tag $Name: geant4-09-02 $
# -------------------------------------------------------------------
# Before sourcing this script make sure you have set the
# environment variables according to the description in README.
# -------------------------------------------------------------------
# setup in case PI is used --------------------------------------
if (${?PI_BASE_DIR} == 1 && ${?SWIG_BASE_DIR} == 1) then
setenv PI_VERSION 1_3_0
setenv PI_VER 1.3.0
setenv PI_ARCH slc3_ia32_gcc323
setenv PYTHONVERSION 2.3
setenv PI_DIR ${PI_BASE_DIR}/${PI_VER}/app/releases/PI/PI_${PI_VERSION}/${PI_ARCH}
setenv PATH ${PATH}:${PI_DIR}/bin
setenv PATH ${PI_BASE_DIR}/${PI_VER}/external/Python/${PYTHONVERSION}.4/${PI_ARCH}/bin:$PATH
eval `aida-config -r csh`
#
# python from PI
#
setenv PYTHON_INCLUDE_DIR ${PI_BASE_DIR}/${PI_VER}/external/Python/${PYTHONVERSION}.4/${PI_ARCH}/include/python${PYTHONVERSION}
setenv PYTHON_LIB_DIR ${PI_BASE_DIR}/${PI_VER}/external/Python/${PYTHONVERSION}.4/${PI_ARCH}/lib/python${PYTHONVERSION}/config
#
# python for PI
if (${?PYTHONPATH} == 0) then
setenv PYTHONPATH
endif
setenv PYTHONPATH ${PI_DIR}/python:$PYTHONPATH
setenv PYTHONPATH ${PI_BASE_DIR}/${PI_VER}/app/releases/SEAL/SEAL_1_6_0/${PI_ARCH}/python:$PYTHONPATH
#
# setup the swig command
#
setenv SWIG_VERSION 1.3.15
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}
else # not using PI
echo "-- WARNING: histograms are not activated !"
echo " Either PI_BASE_DIR or SWIG_BASE_DIR are not set."
#
if ( ${?PYTHONVERSION} == 1 && \
${?PYTHON_BASE_DIR} == 1 && \
${?SWIG_BASE_DIR} == 1 && \
${?SWIG_VERSION} == 1 && \
${?CLHEP_BASE_DIR} == 1) then # settings without PI
setenv PYTHON_LIB_DIR ${PYTHON_BASE_DIR}/lib/python${PYTHONVERSION}/config
setenv PYTHON_INCLUDE_DIR ${PYTHON_BASE_DIR}/include/python${PYTHONVERSION}
#
if ( ! -d $PYTHON_LIB_DIR ) then
echo -- ERROR: no pyhton lib/config directory: $PYTHON_LIB_DIR
endif
if ( ! -d $PYTHON_INCLUDE_DIR ) then
echo -- ERROR: no pyhton include directory: $PYTHON_INCLUDE_DIR
endif
#
setenv SWIG_INCDIRS "-I${SWIG_BASE_DIR}/lib/swig-${SWIG_VERSION} -I${SWIG_BASE_DIR}/lib/swig-${SWIG_VERSION}/python"
if ( -x ${SWIG_BASE_DIR}/bin/swig-${SWIG_VERSION} ) then
setenv SWIG ${SWIG_BASE_DIR}/bin/swig-${SWIG_VERSION}
else if ( -x ${SWIG_BASE_DIR}/bin/swig ) then
setenv SWIG ${SWIG_BASE_DIR}/bin/swig
else
echo -- ERROR: could not find swig executable !
endif
else # environment not completed in case no PI is used
echo "-- ERROR: PYTHONVERSION or PYTHON_BASE_DIR or SWIG_BASE_DIR or SWIG_VERSION or CLHEP_BASE_DIR not set!"
exit
endif
endif # end settings for not using PI
#
# common settings
#
if (${?LD_LIBRARY_PATH} == 0) then
setenv LD_LIBRARY_PATH
endif
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${G4WORKDIR}/tmp/${G4SYSTEM}/TiaraWrapper
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${G4WORKDIR}/tmp/${G4SYSTEM}/G4KernelWrapper
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${G4WORKDIR}/tmp/${G4SYSTEM}/CLHEPWrapper
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${G4WORKDIR}/tmp/${G4SYSTEM}/tiara
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 ${PI_BASE_DIR}/${PI_VER}/external/Python/${PYTHONVERSION}.4/${PI_ARCH}/lib:${LD_LIBRARY_PATH}
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${PI_BASE_DIR}/${PI_VER}/external/Boost/1.31.0/${PI_ARCH}/lib
setenv TIARA_BASE `pwd`
setenv TIARASCRIPTS ${TIARA_BASE}/source/py_modules
if (${?PYTHONPATH} == 0) then
setenv PYTHONPATH
endif
setenv PYTHONPATH ${PYTHONPATH}:${LD_LIBRARY_PATH}
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
#
-49
View File
@@ -1,49 +0,0 @@
#!/bin/bash
echo have to set PI_DIR and PYTHON_LIB_DIR and SWIG_BASE_DIR
if [ -n $SWIG_BASE_DIR ]; then
echo SWIG_BASE_DIR default is /usr/local
export SWIG_BASE_DIR=/usr/local
else
echo SWIG_BASE_DIR is $SWIG_BASE_DIR
fi
if [ -n $PYTHON_INCLUDE_DIR ]; then
export PYTHON_INCLUDE_DIR=/usr/include/python2.3
echo PYTHON_INCLUDE_DIR default is $PYTHON_INCLUDE_DIR
else
echo PYTHON_INCLUDE_DIR is $PYTHON_INCLUDE_DIR
fi
if [ -n $PYTHON_LIB_DIR ]; then
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${PYTHON_LIB_DIR}
else
echo Please set PYTHON_LIB_DIR
fi
export PYTHONVERSION=2.3
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${G4WORKDIR}/tmp/${G4SYSTEM}/TiaraWrapper:${G4WORKDIR}/tmp/${G4SYSTEM}/G4KernelWrapper:${G4WORKDIR}/tmp/${G4SYSTEM}/CLHEPWrapper
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${G4WORKDIR}/tmp/${G4SYSTEM}/tiara
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${G4WORKDIR}/lib/${G4SYSTEM}
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${PYTHON_LIB_DIR}
export TIARA_BASE=`pwd`
export TIARASCRIPTS=${TIARA_BASE}/source/py_modules
export PYTHONPATH=${PYTHONPATH}:${LD_LIBRARY_PATH}
export PYTHONPATH=${PYTHONPATH}:${TIARA_BASE}/run:${TIARASCRIPTS}
export PYTHONPATH=${PYTHONPATH}:${TIARA_BASE}/source/TiaraWrapper
export PYTHONPATH=${PYTHONPATH}:${TIARA_BASE}/source/G4KernelWrapper
export PYTHONPATH=${PYTHONPATH}:${TIARA_BASE}/source/CLHEPWrapper
if [ -n $SWIG_VERSION ]; then
export SWIG_VERSION=1.3.15
echo setting SWIG_VERSION to default $SWIG_VERSION
else
echo SWIG_VERSION is $SWIG_VERSION
fi
export SWIG_INCDIRS="-I${SWIG_BASE_DIR}/lib/swig_lib -I${SWIG_BASE_DIR}/lib/swig_lib/python"
if [ -n $SWIG ]; then
export SWIG=${SWIG_BASE_DIR}/bin/swig
echo setting SWIG executable to $SWIG
else
echo SWIG executable is $SWIG
fi
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${G4WORKDIR}/tmp/${G4SYSTEM}/CLHEPWrapper
export PYTHONPATH=${PYTHONPATH}:${TIARA_BASE}/source/CLHEPWrapper
echo if python2.3 is not picked up then execute following command
echo "'cp $PI_DIR/lib/libpython2.3.so $G4LIB/$G4SYSTEM/.'"
echo finished envCommon.sh
-213
View File
@@ -1,213 +0,0 @@
#!/usr/bin/env python
#
# $Id: runSim.py,v 1.12 2005/12/15 16:23:11 ahoward Exp $
# -------------------------------------------------------------------
# GEANT4 tag $Name: geant4-09-02 $
# -------------------------------------------------------------------
# importing python libraries
import os
# importing wrapper modules (see the source/*Wrapper directories)
# created by swig (from the source/*Wrapper/*.i files).
import CLHEP
import G4Kernel
import Tiara
# importing python modules specific to this example
# (see source/py_modules)
import tiaraApplication
import tiaraGenerators
import tiaraDetectors
import tiaraSpecifications
import myUtils
import variableGeometry
import slabGeometry
import runSequence
##########################################################################
# random number initialization
##########################################################################
Tiara.setRandomSeed(891011);
#Tiara.setRandomStatus("dTest/tiara-2003_5_27_20_5_39_pcgeant2/randomNumberFile_run00003");
##########################################################################
# experiment and simulation specific data
##########################################################################
# create a list of particles and give a lower energy cut
particleCut = {"neutron" : 3 * CLHEP.MeV,
"gamma" : 1 * CLHEP.MeV,
"proton" : 1 * CLHEP.MeV,
"deuteron": 1 * CLHEP.MeV,
"triton" : 1 * CLHEP.MeV,
"alpha" : 1 * CLHEP.MeV}
# specify if the source neutrons shoul be form the 43 or 68 MeV protons
beamEnergy = 68 * CLHEP.MeV
# specify the shieldwidth [25, 50, 100, 150, (200 for 68 MeV case only)]
shieldWidth = 100 * CLHEP.cm
# set the total running time and the time for one run
# followed by a printout
# if the total running time, giving 0 will start a visualization
# and timeForOneRun has no meaning
totalTime = 5 * myUtils.min
timeForOneRun = 2 * myUtils.min
# if running the visualization mode by setting totalTime = 0,
# a Geant4 session will be started. Start the visualization
# by e.g.:
# Idle> control/execute vis.mac
# Idle> /run/beamOn 10
# available physics lists: LHEP_LEAD, LHEP_PRECO_HP
# LHEP_BIC LHEP_BIC_HP LHEP_PRECO LHEP
#3physList = Tiara.LHEP()
##physList = Tiara.LHEP_PRECO()
##physList = Tiara.LHEP_PRECO_HP()
physList = Tiara.LHEP_LEAD()
# specify the detectors
scoreDetectorCreator = tiaraDetectors.ThreeZylindricDetectors()
#scoreDetectorCreator = tiaraDetectors.DetectorSlab()
comment = ""
##########################################################################
# Create a Specification object of the configuaration data
##########################################################################
# this should be fine for most settings
experiment = tiaraSpecifications.Experiment(beamEnergy,
particleCut["neutron"],
particleCut,
shieldWidth,
"concrete")
tiaraSpecs = tiaraSpecifications.Specifications(Tiara.TiaraDimensions(),
experiment,
Tiara.TiaraMaterials())
##########################################################################
# definition of the importance geometry importance values and a scorer
##########################################################################
# create a parallel geometry.
impGeo = variableGeometry.VariableImpSlabGeometry(tiaraSpecs)
# introduce "importance cells" into the shielding region
# In this case the width of all the shields in the shielding region
# are equal and the importance staring from one doubles
# from cell to cell in the beam direction.
impGeo.addCellImportance(width=20.0 * CLHEP.cm, faktor=1)
for i in range(4):
# to run unbiased set: faktor=1 in the next line
impGeo.addCellImportance(width=20.0 * CLHEP.cm, faktor=2)
impGeo.construct()
# Make sure the widths given in the above way add up to the
# shield widths e.g. 25, 50, ... cm.
# The importance geometries take care to give the importance value 1
# to the volume before the shield and to assign the same importance
# as the last cell in the shield region to the volume behind the shield.
# an alternative
#impGeo = slabGeometry.SlabedImportanceGeometry(tiaraSpecs,
# 10.0 * CLHEP.cm,
# 1.5)
impScorer = G4Kernel.G4Scorer()
##########################################################################
# Creation of a TiaraApplet to define the run mode, physics list,
# detector type and the primary generator
##########################################################################
# this and the remaining part should be fine for most settings
tApp = tiaraApplication.TiaraApplet(tiaraSpecs,
Tiara.TiaraSim_GetTiaraSim())
if totalTime == 0:
tApp.visMode()
else:
tApp.timedMode(timeForOneRun)
tApp.specifyPhysicsList(physList, particleCut)
# detectors
tApp.setScoreDetectorCreator(scoreDetectorCreator)
tApp.buildGeometry()
tiara_dir = os.environ["TIARA_BASE"]
tApp.setPhysics()
primGenBuilder = tiaraGenerators.\
TiaraDPSEnergyGenerator(tiaraSpecs,
tiara_dir +
"/data/expDataConverted/dpsSource.xml")
#primGenBuilder = tiaraGenerators.TiaraPrimaryGenerator(tiaraSpecs)
#primGenBuilder = tiaraGenerators.FixedEnergyPrimaryGenerator(tiaraSpecs)
tApp.setPrimaryGenerator(primGenBuilder.primGen)
tApp.noComponents = 0
tApp.config()
## The following lines should be probably moved here after release Geant4-7.0
##physList = Tiara.LHEP()
##physList = Tiara.LHEP_PRECO()
##physList = Tiara.LHEP_PRECO_HP()
##physList = Tiara.LHEP_LEAD()
##tApp.specifyPhysicsList(physList, particleCut)
##tApp.setPrimaryGenerator(primGenBuilder.primGen)
##########################################################################
# creating of the sampler
##########################################################################
parallelSampler = myUtils.createParallelSampler(impGeo,
impScorer)
##########################################################################
# create a run config object, a run sequence and run the simulation
##########################################################################
if totalTime > 0:
rc = runSequence.RunConfig()
rc.basePath = "simData"
rc.tApp = tApp
rc.tiaraSpecs = tiaraSpecs
rc.impGeo = impGeo
rc.impScorer = impScorer
rc.totalTime = totalTime
rc.comment = comment
rs = runSequence.RunSequence(rc)
rs.runNevents(100)
rs.runLoop()
else:
tApp.tiaraSim.startSession()
##########################################################################
##########################################################################
@@ -1,183 +0,0 @@
#!/usr/bin/env python
#
# $Id: runSimNoAnalysis.py,v 1.7 2005/12/15 16:23:06 ahoward Exp $
# -------------------------------------------------------------------
# GEANT4 tag $Name: geant4-09-02 $
# -------------------------------------------------------------------
import CLHEP
import G4Kernel
import Tiara
import tiaraApplication
import tiaraGenerators
import tiaraDetectors
import tiaraSpecifications
import myUtils
import variableGeometry
import slabGeometry
import runSequence
import os
##########################################################################
# random number initialization
##########################################################################
Tiara.setRandomSeed(891011);
#Tiara.setRandomStatus("dTest/tiara-2003_5_27_20_5_39_pcgeant2/randomNumberFile_run00003");
##########################################################################
# experiment and simulation specific data
##########################################################################
particleCut = {"neutron" : 3 * CLHEP.MeV,
"gamma" : 1 * CLHEP.MeV,
"proton" : 1 * CLHEP.MeV,
"deuteron": 1 * CLHEP.MeV,
"triton" : 1 * CLHEP.MeV,
"alpha" : 1 * CLHEP.MeV}
beamEnergy = 43
shieldWidth = 150 * CLHEP.cm
totalTime = 3 * myUtils.min
timeForOneRun = 1 * myUtils.min
# available physics lists: LHEP_LEAD, LHEP_PRECO_HP
# LHEP_PRECO, LHEP
##physList = Tiara.LHEP()
##physList = Tiara.LHEP_PRECO()
physList = Tiara.LHEP_LEAD()
##physList = Tiara.LHEP_PRECO_HP()
# specify the detectors
scoreDetectorCreator = tiaraDetectors.ThreeZylindricDetectors()
#scoreDetectorCreator = tiaraDetectors.DetectorSlab()
comment = ""
##########################################################################
# Create a Specification object of the configuaration data
##########################################################################
experiment = tiaraSpecifications.Experiment(beamEnergy,
particleCut["neutron"],
particleCut,
shieldWidth,
"concrete")
tiaraSpecs = tiaraSpecifications.Specifications(Tiara.TiaraDimensions(),
experiment,
Tiara.TiaraMaterials())
##########################################################################
# definition of the importance geometry and a scorer
##########################################################################
impGeo = variableGeometry.VariableImpSlabGeometry(tiaraSpecs)
impGeo.addCellImportance(width=15.0 * CLHEP.cm, faktor=1)
for i in range(9):
impGeo.addCellImportance(width=15.0 * CLHEP.cm, faktor=2)
impGeo.construct()
# an alternative
#impGeo = slabGeometry.SlabedImportanceGeometry(tiaraSpecs,
# 10.0 * CLHEP.cm,
# 1.5)
impScorer = G4Kernel.G4Scorer()
##########################################################################
# Creation of a TiaraApplet to define the run mode, physics list,
# detector type and the primary generator
##########################################################################
tApp = tiaraApplication.TiaraApplet(tiaraSpecs = tiaraSpecs,
tSim = Tiara.TiaraSim_GetTiaraSim(),
usePI = False)
#tApp.visMode()
tApp.timedMode(timeForOneRun)
tApp.specifyPhysicsList(physList, particleCut)
# detectors
tApp.setScoreDetectorCreator(scoreDetectorCreator)
tApp.buildGeometry()
tiara_dir = os.environ["TIARA_BASE"]
tApp.setPhysics()
#primGenBuilder = tiaraGenerators.\
# TiaraDPSEnergyGenerator(tiaraSpecs,
# tiara_dir +
# "/data/expDataConverted/dpsSource.xml")
#primGenBuilder = tiaraGenerators.TiaraPrimaryGenerator(tiaraSpecs)
primGenBuilder = tiaraGenerators.FixedEnergyPrimaryGenerator(tiaraSpecs)
tApp.setPrimaryGenerator(primGenBuilder.primGen)
tApp.noComponents = 0
## The following lines should be probably moved here after release Geant4-7.0
##physList = Tiara.LHEP()
##physList = Tiara.LHEP_PRECO()
##physList = Tiara.LHEP_PRECO_HP()
##physList = Tiara.LHEP_LEAD()
##tApp.specifyPhysicsList(physList, particleCut)
##tApp.setPrimaryGenerator(primGenBuilder.primGen)
tApp.config()
##########################################################################
# creating of the sampler
##########################################################################
parallelSampler = myUtils.createParallelSampler(impGeo,
impScorer)
##########################################################################
# create a run config object, a run sequence and run the simulation
##########################################################################
rc = runSequence.RunConfig()
rc.basePath = "simData"
rc.tApp = tApp
rc.tiaraSpecs = tiaraSpecs
rc.impGeo = impGeo
rc.impScorer = impScorer
rc.totalTime = totalTime
rc.comment = comment
rs = runSequence.RunSequence(runConfig=rc, usePI = False)
rs.runNevents(100)
rs.runLoop()
##########################################################################
##########################################################################
-224
View File
@@ -1,224 +0,0 @@
#!/usr/bin/env python
#
# $Id: runVisMode.py,v 1.8 2006/06/26 10:12:05 ahoward Exp $
# -------------------------------------------------------------------
# GEANT4 tag $Name: geant4-09-02 $
# -------------------------------------------------------------------
# importing python libraries
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
# importing python modules specific to this example
# (see source/py_modules)
import tiaraApplication
import tiaraGenerators
import tiaraDetectors
import tiaraSpecifications
import myUtils
import variableGeometry
import slabGeometry
import runSequence
##########################################################################
# random number initialization
##########################################################################
Tiara.setRandomSeed(891011);
#Tiara.setRandomStatus("dTest/tiara-2003_5_27_20_5_39_pcgeant2/randomNumberFile_run00003");
##########################################################################
# experiment and simulation specific data
##########################################################################
# create a list of particles and give a lower energy cut
particleCut = {"neutron" : 3 * CLHEP.MeV,
"gamma" : 1 * CLHEP.MeV,
"proton" : 1 * CLHEP.MeV,
"deuteron": 1 * CLHEP.MeV,
"triton" : 1 * CLHEP.MeV,
"alpha" : 1 * CLHEP.MeV}
# specify if the source neutrons shoul be form the 43 or 68 MeV protons
beamEnergy = 68 * CLHEP.MeV
# specify the shieldwidth [25, 50, 100, 150, (200 for 68 MeV case only)]
shieldWidth = 100 * CLHEP.cm
# available physics lists: TiaraPhysicsList, LHEP_LEAD_HP, LHEP_PRECO_HP
# CASCADE_HP LHEP_BIC LHEP_BIC_BIC
physList = Tiara.LHEP_BIC_HP()
# specify the detectors
scoreDetectorCreator = tiaraDetectors.ThreeZylindricDetectors()
#scoreDetectorCreator = tiaraDetectors.DetectorSlab()
comment = ""
##########################################################################
# Create a Specification object of the configuaration data
##########################################################################
experiment = tiaraSpecifications.Experiment(beamEnergy,
particleCut["neutron"],
particleCut,
shieldWidth,
"concrete")
tiaraSpecs = tiaraSpecifications.Specifications(Tiara.TiaraDimensions(),
experiment,
Tiara.TiaraMaterials())
##########################################################################
# definition of the importance geometry importance values and a scorer
##########################################################################
# create a parallel geometry.
impGeo = variableGeometry.VariableImpSlabGeometry(tiaraSpecs)
# introduce "importance cells" into the shielding region
# In this case the width of all the shields in the shielding region
# are equal and the importance staring from one doubles
# from cell to cell in the beam direction.
impGeo.addCellImportance(width=15.0 * CLHEP.cm, faktor=1)
for i in range(9):
# to run unbiased set: faktor=1 in the next line
impGeo.addCellImportance(width=15.0 * CLHEP.cm, faktor=2)
impGeo.construct()
# Make sure the widths given in the above way add up to the
# shield widths e.g. 25, 50, ... cm.
# The importance geometries take care to give the importance value 1
# to the volume before the shield and to assign the same importance
# as the last cell in the shield region to the volume behind the shield.
# an alternative
#impGeo = slabGeometry.SlabedImportanceGeometry(tiaraSpecs,
# 10.0 * CLHEP.cm,
# 1.5)
impScorer = G4Kernel.G4Scorer()
##########################################################################
# Creation of a TiaraApplet to define the run mode, physics list,
# detector type and the primary generator
##########################################################################
tApp = tiaraApplication.TiaraApplet(tiaraSpecs,
Tiara.TiaraSim_GetTiaraSim())
# chise if you want to run in a timed mode (for a given time) or in
# the visualization mode to see the detector.
tApp.visMode()
tApp.specifyPhysicsList(physList, particleCut)
# detectors
tApp.setScoreDetectorCreator(scoreDetectorCreator)
tApp.buildGeometry()
tiara_dir = os.environ["TIARA_BASE"]
tApp.setPhysics()
tApp.visAdd()
##primGenBuilder = tiaraGenerators.\
## TiaraDPSEnergyGenerator(tiaraSpecs,
## tiara_dir +
## "/data/expDataConverted/dpsSource.xml")
#primGenBuilder = tiaraGenerators.TiaraPrimaryGenerator(tiaraSpecs)
primGenBuilder = tiaraGenerators.FixedEnergyPrimaryGenerator(tiaraSpecs)
tApp.setPrimaryGenerator(primGenBuilder.primGen)
tApp.noComponents = 0
tApp.config()
##########################################################################
# creating of the sampler
##########################################################################
parallelSampler = myUtils.createParallelSampler(impGeo,
impScorer)
##########################################################################
# create a run config object, a run sequence and run the simulation
##########################################################################
rc = runSequence.RunConfig()
rc.basePath = "simData"
rc.tApp = tApp
rc.tiaraSpecs = tiaraSpecs
rc.impGeo = impGeo
rc.impScorer = impScorer
rc.totalTime = totalTime
rc.comment = comment
rs = runSequence.RunSequence(rc)
rs.runNevents(100)
rs.runLoop()
##########################################################################
##########################################################################
@@ -1,225 +0,0 @@
#!/usr/bin/env python
#
# $Id: runVisNoAnalysis.py,v 1.5 2006/06/26 10:12:05 ahoward Exp $
# -------------------------------------------------------------------
# GEANT4 tag $Name: geant4-09-02 $
# -------------------------------------------------------------------
# importing python libraries
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
# importing python modules specific to this example
# (see source/py_modules)
import tiaraApplication
import tiaraGenerators
import tiaraDetectors
import tiaraSpecifications
import myUtils
import variableGeometry
import slabGeometry
import runSequence
##########################################################################
# random number initialization
##########################################################################
Tiara.setRandomSeed(891011);
#Tiara.setRandomStatus("dTest/tiara-2003_5_27_20_5_39_pcgeant2/randomNumberFile_run00003");
##########################################################################
# experiment and simulation specific data
##########################################################################
# create a list of particles and give a lower energy cut
particleCut = {"neutron" : 3 * CLHEP.MeV,
"gamma" : 1 * CLHEP.MeV,
"proton" : 1 * CLHEP.MeV,
"deuteron": 1 * CLHEP.MeV,
"triton" : 1 * CLHEP.MeV,
"alpha" : 1 * CLHEP.MeV}
# specify if the source neutrons shoul be form the 43 or 68 MeV protons
beamEnergy = 68 * CLHEP.MeV
# specify the shieldwidth [25, 50, 100, 150, (200 for 68 MeV case only)]
shieldWidth = 100 * CLHEP.cm
# available physics lists: TiaraPhysicsList, LHEP_LEAD_HP, LHEP_PRECO_HP
# CASCADE_HP LHEP_BIC LHEP_BIC_BIC
physList = Tiara.LHEP_BIC_HP()
# specify the detectors
scoreDetectorCreator = tiaraDetectors.ThreeZylindricDetectors()
#scoreDetectorCreator = tiaraDetectors.DetectorSlab()
comment = ""
##########################################################################
# Create a Specification object of the configuaration data
##########################################################################
experiment = tiaraSpecifications.Experiment(beamEnergy,
particleCut["neutron"],
particleCut,
shieldWidth,
"concrete")
tiaraSpecs = tiaraSpecifications.Specifications(Tiara.TiaraDimensions(),
experiment,
Tiara.TiaraMaterials())
##########################################################################
# definition of the importance geometry importance values and a scorer
##########################################################################
# create a parallel geometry.
impGeo = variableGeometry.VariableImpSlabGeometry(tiaraSpecs)
# introduce "importance cells" into the shielding region
# In this case the width of all the shields in the shielding region
# are equal and the importance staring from one doubles
# from cell to cell in the beam direction.
impGeo.addCellImportance(width=15.0 * CLHEP.cm, faktor=1)
for i in range(9):
# to run unbiased set: faktor=1 in the next line
impGeo.addCellImportance(width=15.0 * CLHEP.cm, faktor=2)
impGeo.construct()
# Make sure the widths given in the above way add up to the
# shield widths e.g. 25, 50, ... cm.
# The importance geometries take care to give the importance value 1
# to the volume before the shield and to assign the same importance
# as the last cell in the shield region to the volume behind the shield.
# an alternative
#impGeo = slabGeometry.SlabedImportanceGeometry(tiaraSpecs,
# 10.0 * CLHEP.cm,
# 1.5)
impScorer = G4Kernel.G4Scorer()
##########################################################################
# Creation of a TiaraApplet to define the run mode, physics list,
# detector type and the primary generator
##########################################################################
tApp = tiaraApplication.TiaraApplet(tiaraSpecs,
Tiara.TiaraSim_GetTiaraSim(), False)
# chise if you want to run in a timed mode (for a given time) or in
# the visualization mode to see the detector.
tApp.visMode()
##timeForOneRun = 1 * myUtils.min
##tApp.timedMode(timeForOneRun)
tApp.specifyPhysicsList(physList, particleCut)
# detectors
tApp.setScoreDetectorCreator(scoreDetectorCreator)
tApp.buildGeometry()
tiara_dir = os.environ["TIARA_BASE"]
tApp.setPhysics()
tApp.visAdd()
##primGenBuilder = tiaraGenerators.\
## TiaraDPSEnergyGenerator(tiaraSpecs,
## tiara_dir +
## "/data/expDataConverted/dpsSource.xml")
#primGenBuilder = tiaraGenerators.TiaraPrimaryGenerator(tiaraSpecs)
primGenBuilder = tiaraGenerators.FixedEnergyPrimaryGenerator(tiaraSpecs)
tApp.setPrimaryGenerator(primGenBuilder.primGen)
tApp.noComponents = 0
tApp.config()
##########################################################################
# creating of the sampler
##########################################################################
parallelSampler = myUtils.createParallelSampler(impGeo,
impScorer)
##########################################################################
# create a run config object, a run sequence and run the simulation
##########################################################################
rc = runSequence.RunConfig()
rc.basePath = "simData"
rc.tApp = tApp
rc.tiaraSpecs = tiaraSpecs
rc.impGeo = impGeo
rc.impScorer = impScorer
rc.totalTime = totalTime
rc.comment = comment
rs = runSequence.RunSequence(rc)
rs.runNevents(100)
rs.runLoop()
##########################################################################
##########################################################################
-13
View File
@@ -1,13 +0,0 @@
# $Id: vis.mac,v 1.2 2003/06/16 17:06:44 dressel Exp $
# -------------------------------------------------------------------
# GEANT4 tag $Name: geant4-09-02 $
# -------------------------------------------------------------------
/vis/scene/create
/vis/open OGLIX
/vis/viewer/set/style w
/vis/viewer/flush
/vis/viewer/set/viewpointThetaPhi -70 -20
/tracking/storeTrajectory 1
/vis/scene/endOfEventAction accumulate
@@ -1,49 +0,0 @@
# $Id: GNUmakefile,v 1.2 2004/06/09 15:04:35 daquinog Exp $
# --------------------------------------------------------------
# GNUmakefile Michael Dressel
# --------------------------------------------------------------
name := CLHEPWrapper
G4TARGET := $(name)
G4EXLIB := true
ifndef G4INSTALL
G4INSTALL = ../..
endif
include $(G4INSTALL)/config/architecture.gmk
.PHONY: all tiaraClean
SWIGFLAGS = -I${CLHEP_BASE_DIR}/include
include $(TIARA_BASE)/source/swig.gmk
all: $(SWIGSO)
include $(G4INSTALL)/config/binmake.gmk
CPPFLAGS += -I$(PYTHON_INCLUDE_DIR)
LDFLAGS += -L$(PYTHON_LIB_DIR)
LDLIBS += -lpython$(PYTHONVERSION) \
-lnsl \
-ldl \
-lreadline \
-ltermcap \
-lieee \
-lpthread \
-lutil
tiaraClean:
@echo Cleaning up $(G4WORKDIR)/tmp/$(G4SYSTEM)/$(name)
@rm -rf $(G4WORKDIR)/tmp/$(G4SYSTEM)/$(name)
@rm -f *.pyc
@@ -1,335 +0,0 @@
# $Id: CLHEP.i,v 1.5 2005/12/15 14:23:31 ahoward Exp $
# -------------------------------------------------------------------
# GEANT4 tag $Name: geant4-09-02 $
# -------------------------------------------------------------------
%module CLHEP
%{
#include <CLHEP/Vector/ThreeVector.h>
#include <CLHEP/Units/SystemOfUnits.h>
%}
%include CLHEP/Units/SystemOfUnits.h
namespace CLHEP {
class Hep3Vector {
public:
// Basic properties and operations on 3-vectors:
enum { X=0, Y=1, Z=2, NUM_COORDINATES=3, SIZE=NUM_COORDINATES };
// Safe indexing of the coordinates when using with matrices, arrays, etc.
// (BaBar)
inline Hep3Vector(double x = 0.0, double y = 0.0, double z = 0.0);
// The constructor.
inline double x() const;
inline double y() const;
inline double z() const;
// The components in cartesian coordinate system. Same as getX() etc.
inline void setX(double);
inline void setY(double);
inline void setZ(double);
// Set the components in cartesian coordinate system.
inline double phi() const;
// The azimuth angle.
inline double theta() const;
// The polar angle.
inline double cosTheta() const;
// Cosine of the polar angle.
inline double cos2Theta() const;
// Cosine squared of the polar angle - faster than cosTheta(). (ZOOM)
inline double mag2() const;
// The magnitude squared (r^2 in spherical coordinate system).
inline double mag() const;
// The magnitude (r in spherical coordinate system).
inline void setPhi(double);
// Set phi keeping mag and theta constant (BaBar).
inline void setTheta(double);
// Set theta keeping mag and phi constant (BaBar).
void setMag(double);
// Set magnitude keeping theta and phi constant (BaBar).
inline double perp2() const;
// The transverse component squared (rho^2 in cylindrical coordinate system).
inline double perp() const;
// The transverse component (rho in cylindrical coordinate system).
inline void setPerp(double);
// Set the transverse component keeping phi and z constant.
void setCylTheta(double);
// Set theta while keeping transvers component and phi fixed
inline double perp2(const Hep3Vector &) const;
// The transverse component w.r.t. given axis squared.
inline double perp(const Hep3Vector &) const;
// The transverse component w.r.t. given axis.
inline bool operator == (const Hep3Vector &) const;
inline bool operator != (const Hep3Vector &) const;
// Comparisons (Geant4).
inline Hep3Vector & operator += (const Hep3Vector &);
// Addition.
inline Hep3Vector & operator -= (const Hep3Vector &);
// Subtraction.
inline Hep3Vector operator - () const;
// Unary minus.
inline Hep3Vector & operator *= (double);
// Scaling with real numbers.
Hep3Vector & operator /= (double);
// Division by (non-zero) real number.
inline Hep3Vector unit() const;
// Vector parallel to this, but of length 1.
inline Hep3Vector orthogonal() const;
// Vector orthogonal to this (Geant4).
inline double dot(const Hep3Vector &) const;
// double product.
inline Hep3Vector cross(const Hep3Vector &) const;
// Cross product.
double angle(const Hep3Vector &) const;
// The angle w.r.t. another 3-vector.
double pseudoRapidity() const;
// Returns the pseudo-rapidity, i.e. -ln(tan(theta/2))
void setEta ( double p );
// Set pseudo-rapidity, keeping magnitude and phi fixed. (ZOOM)
void setCylEta ( double p );
// Set pseudo-rapidity, keeping transverse component and phi fixed. (ZOOM)
Hep3Vector & rotateX(double);
// Rotates the Hep3Vector around the x-axis.
Hep3Vector & rotateY(double);
// Rotates the Hep3Vector around the y-axis.
Hep3Vector & rotateZ(double);
// Rotates the Hep3Vector around the z-axis.
Hep3Vector & rotateUz(const Hep3Vector&);
// Rotates reference frame from Uz to newUz (unit vector) (Geant4).
Hep3Vector & rotate(double, const Hep3Vector &);
// Rotates around the axis specified by another Hep3Vector.
// (Uses methods of HepRotation, forcing linking in of Rotation.cc.)
Hep3Vector & operator *= (const CLHEP::HepRotation &);
Hep3Vector & transform(const CLHEP::HepRotation &);
// Transformation with a Rotation matrix.
// = = = = = = = = = = = = = = = = = = = = = = = =
//
// Esoteric properties and operations on 3-vectors:
//
// 1 - Set vectors in various coordinate systems
// 2 - Synonyms for accessing coordinates and properties
// 3 - Comparisions (dictionary, near-ness, and geometric)
// 4 - Intrinsic properties
// 5 - Properties releative to z axis and arbitrary directions
// 6 - Polar and azimuthal angle decomposition and deltaPhi
// 7 - Rotations
//
// = = = = = = = = = = = = = = = = = = = = = = = =
// 1 - Set vectors in various coordinate systems
inline void setRThetaPhi (double r, double theta, double phi);
// Set in spherical coordinates: Angles are measured in RADIANS
inline void setREtaPhi ( double r, double eta, double phi );
// Set in spherical coordinates, but specify peudorapidiy to determine theta.
inline void setRhoPhiZ (double rho, double phi, double z);
// Set in cylindrical coordinates: Phi angle is measured in RADIANS
void setRhoPhiTheta ( double rho, double phi, double theta);
// Set in cylindrical coordinates, but specify theta to determine z.
void setRhoPhiEta ( double rho, double phi, double eta);
// Set in cylindrical coordinates, but specify pseudorapidity to determine z.
// 2 - Synonyms for accessing coordinates and properties
inline double getX() const;
inline double getY() const;
inline double getZ() const;
// x(), y(), and z()
inline double getR () const;
inline double getTheta() const;
inline double getPhi () const;
// mag(), theta(), and phi()
inline double r () const;
// mag()
inline double rho () const;
inline double getRho () const;
// perp()
double eta () const;
double getEta () const;
// pseudoRapidity()
inline void setR ( double s );
// setMag()
inline void setRho ( double s );
// setPerp()
// 3 - Comparisions (dictionary, near-ness, and geometric)
int compare (const Hep3Vector & v) const;
bool operator > (const Hep3Vector & v) const;
bool operator < (const Hep3Vector & v) const;
bool operator>= (const Hep3Vector & v) const;
bool operator<= (const Hep3Vector & v) const;
// dictionary ordering according to z, then y, then x component
inline double diff2 (const Hep3Vector & v) const;
// |v1-v2|**2
static double setTolerance (double tol);
static inline double getTolerance ();
// Set the tolerance used in isNear() for Hep3Vectors
bool isParallel (const Hep3Vector & v, double epsilon) const;
// Are the vectors parallel, within the given tolerance?
bool isOrthogonal (const Hep3Vector & v, double epsilon) const;
// Are the vectors orthogonal, within the given tolerance?
double howParallel (const Hep3Vector & v) const;
// | v1.cross(v2) / v1.dot(v2) |, to a maximum of 1.
double howOrthogonal (const Hep3Vector & v) const;
// | v1.dot(v2) / v1.cross(v2) |, to a maximum of 1.
enum { ToleranceTicks = 100 };
// 4 - Intrinsic properties
double beta () const;
// relativistic beta (considering v as a velocity vector with c=1)
// Same as mag() but will object if >= 1
double gamma() const;
// relativistic gamma (considering v as a velocity vector with c=1)
double coLinearRapidity() const;
// inverse tanh (beta)
// 5 - Properties relative to Z axis and to an arbitrary direction
// Note that the non-esoteric CLHEP provides
// theta(), cosTheta(), cos2Theta, and angle(const Hep3Vector&)
inline double angle() const;
// angle against the Z axis -- synonym for theta()
inline double theta(const Hep3Vector & v2) const;
// synonym for angle(v2)
double cosTheta (const Hep3Vector & v2) const;
double cos2Theta(const Hep3Vector & v2) const;
// cos and cos^2 of the angle between two vectors
inline Hep3Vector project () const;
Hep3Vector project (const Hep3Vector & v2) const;
// projection of a vector along a direction.
inline Hep3Vector perpPart() const;
inline Hep3Vector perpPart (const Hep3Vector & v2) const;
// vector minus its projection along a direction.
double rapidity () const;
// inverse tanh(v.z())
double rapidity (const Hep3Vector & v2) const;
// rapidity with respect to specified direction:
// inverse tanh (v.dot(u)) where u is a unit in the direction of v2
double eta(const Hep3Vector & v2) const;
// - ln tan of the angle beween the vector and the ref direction.
// 6 - Polar and azimuthal angle decomposition and deltaPhi
// Decomposition of an angle within reference defined by a direction:
double polarAngle (const Hep3Vector & v2) const;
// The reference direction is Z: the polarAngle is abs(v.theta()-v2.theta()).
double deltaPhi (const Hep3Vector & v2) const;
// v.phi()-v2.phi(), brought into the range (-PI,PI]
double azimAngle (const Hep3Vector & v2) const;
// The reference direction is Z: the azimAngle is the same as deltaPhi
double polarAngle (const Hep3Vector & v2,
const Hep3Vector & ref) const;
// For arbitrary reference direction,
// polarAngle is abs(v.angle(ref) - v2.angle(ref)).
double azimAngle (const Hep3Vector & v2,
const Hep3Vector & ref) const;
// To compute azimangle, project v and v2 into the plane normal to
// the reference direction. Then in that plane take the angle going
// clockwise around the direction from projection of v to that of v2.
// 7 - Rotations
// These mehtods **DO NOT** use anything in the HepRotation class.
// Thus, use of v.rotate(axis,delta) does not force linking in Rotation.cc.
Hep3Vector & rotate (const Hep3Vector & axis, double delta);
// Synonym for rotate (delta, axis)
Hep3Vector & rotate (const CLHEP::HepAxisAngle & ax);
// HepAxisAngle is a struct holding an axis direction and an angle.
Hep3Vector & rotate (const CLHEP::HepEulerAngles & e);
Hep3Vector & rotate (double phi,
double theta,
double psi);
// Rotate via Euler Angles. Our Euler Angles conventions are
// those of Goldstein Classical Mechanics page 107.
};
} // namespace CLHEP
%inline %{
typedef CLHEP::Hep3Vector G4ThreeVector;
%}
@@ -1,2 +0,0 @@
This directory will contain the source file for python wrappers
generated by swig.
@@ -1,67 +0,0 @@
# $Id: G4String.i,v 1.1 2003/06/17 15:25:01 mdressel Exp $
# -------------------------------------------------------------------
# GEANT4 tag $Name: geant4-09-02 $
# -------------------------------------------------------------------
// coppied from std_string.i
%include exception.i
%{
#include "G4String.hh"
%}
class G4String;
/* Overloading check */
%typemap(typecheck) G4String = char *;
%typemap(typecheck) const G4String & = char *;
%typemap(in) G4String {
if (PyString_Check($input))
$1 = G4String(PyString_AsString($input));
else
SWIG_exception(SWIG_TypeError, "G4String expected");
}
%typemap(in) const G4String & (G4String temp) {
if (PyString_Check($input)) {
temp = G4String(PyString_AsString($input));
$1 = &temp;
} else {
SWIG_exception(SWIG_TypeError, "G4String expected");
}
}
%typemap(out) G4String {
$result = PyString_FromStringAndSize($1.data(),$1.size());
}
%typemap(out) const G4String & {
$result = PyString_FromStringAndSize($1->data(),$1->size());
}
%typemap(inv, parse="s") G4String, const G4String &, G4String & "$1_name.c_str()";
%typemap(inv, parse="s") G4String *, const G4String * "$1_name->c_str()";
%typemap(outv) G4String {
if (PyString_Check($input))
$result = G4String(PyString_AsString($input));
else
throw SWIG_DIRECTOR_TYPE_MISMATCH("G4String expected");
}
%typemap(outv) const G4String & (G4String temp) {
if (PyString_Check($input)) {
temp = G4String(PyString_AsString($input));
$result = &temp;
} else {
throw SWIG_DIRECTOR_TYPE_MISMATCH("G4String expected");
}
}
@@ -1,47 +0,0 @@
# $Id: GNUmakefile,v 1.7 2006/06/23 13:15:34 ahoward Exp $
# --------------------------------------------------------------
# GNUmakefile Michael Dressel
# --------------------------------------------------------------
name := G4KernelWrapper
G4TARGET := $(name)
G4EXLIB := true
ifndef G4INSTALL
G4INSTALL = ../..
endif
include $(G4INSTALL)/config/architecture.gmk
SWIGFLAGS = -I./ \
-I${G4INSTALL}/source/global/management/include \
-I${G4INSTALL}/source/geometry/biasing/include \
-I${G4INSTALL}/source/digits_hits/detector/include \
-I${G4INSTALL}/source/event/include \
-I${G4INSTALL}/source/processes/transportation/include \
-I${G4INSTALL}/source/visualization/management/include \
-I${TIARA_BASE}/source/CLHEPWrapper/include \
-I${CLHEP_BASE_DIR}/include
include $(TIARA_BASE)/source/swig.gmk
.PHONY: all tiaraClean
all: $(SWIGSO)
include $(G4INSTALL)/config/binmake.gmk
CPPFLAGS += -I$(PYTHON_INCLUDE_DIR)
LDFLAGS += -L$(PYTHON_LIB_DIR)
LDLIBS += -lpython$(PYTHONVERSION) \
-lnsl \
-ldl \
-lreadline \
-ltermcap \
-lieee \
-lpthread \
-lutil
tiaraClean:
@echo Cleaning up $(G4WORKDIR)/tmp/$(G4SYSTEM)/$(name)
@rm -rf $(G4WORKDIR)/tmp/$(G4SYSTEM)/$(name)
@rm -f *.pyc
@@ -1,214 +0,0 @@
# $Id: G4Kernel.i,v 1.7 2005/12/15 14:24:56 ahoward Exp $
# -------------------------------------------------------------------
# GEANT4 tag $Name: geant4-09-02 $
# -------------------------------------------------------------------
%module G4Kernel
%{
#include <memory>
#include <string>
#include "globals.hh"
#include "G4LogicalVolume.hh"
#include "G4VPhysicalVolume.hh"
#include "G4RotationMatrix.hh"
#include "G4PVPlacement.hh"
#include "G4VSolid.hh"
#include "G4Material.hh"
#include "G4FieldManager.hh"
#include "G4VSensitiveDetector.hh"
#include "G4UserLimits.hh"
#include "G4Box.hh"
#include "G4Tubs.hh"
#include "G4VScorer.hh"
#include "G4VCellScorer.hh"
#include "G4CellScorer.hh"
#include "G4CellStoreScorer.hh"
#include "G4VCellScorerStore.hh"
#include "G4ScoreTable.hh"
#include "G4VUserPrimaryGeneratorAction.hh"
#include "G4UserEventAction.hh"
#include "G4VUserPhysicsList.hh"
#include "G4VModularPhysicsList.hh"
#include "G4GeometryCell.hh"
#include "G4CellScoreValues.hh"
#include "G4CellScorerStore.hh"
#include "G4Scorer.hh"
#include "G4VSampler.hh"
#include "G4MassGeometrySampler.hh"
#include "G4ParallelGeometrySampler.hh"
#include "G4VImportanceAlgorithm.hh"
#include "G4CellScoreComposer.hh"
#include "G4VIStore.hh"
#include "G4IStore.hh"
#include "G4UserSteppingAction.hh"
#include <sstream>
#include "G4VisManager.hh"
#include "G4VUserDetectorConstruction.hh"
%}
%include std_string.i
%include G4String.i
%import CLHEP.i
%inline %{
typedef bool G4bool;
typedef double G4double;
typedef int G4int;
%}
%include G4VIStore.hh
%include G4GeometryCell.hh
%include G4IStore.hh
%include G4CellScoreValues.hh
%include G4CellScoreComposer.hh
%include G4VScorer.hh
%include G4VCellScorer.hh
%include G4CellScorer.hh
%include G4VCellScorerStore.hh
%include G4CellScorerStore.hh
%include G4CellStoreScorer.hh
%include G4Scorer.hh
%include G4VImportanceAlgorithm.hh
%include G4VSampler.hh
%include G4MassGeometrySampler.hh
%include G4ParallelGeometrySampler.hh
%include G4ScoreTable.hh
%extend G4ScoreTable {
const char *Write(const G4MapGeometryCellCellScorer &cs){
std::ostringstream tmpout;
self->Print(cs, &tmpout);
std::string *value = new std::string(tmpout.str());
return value->c_str();
};
}
class G4VisManager {
public:
void Initialize();
};
class G4VPhysicalVolume{
};
class G4VUserDetectorConstruction {
public:
G4VPhysicalVolume* Construct();
};
class G4VUserPrimaryGeneratorAction {
};
class G4VUserPhysicsList {
public:
void Construct();
};
class G4VModularPhysicsList: public G4VUserPhysicsList {
public:
void Construct();
};
class G4UserSteppingAction{
};
class G4UserEventAction{
};
class G4FieldManager {
};
class G4VSensitiveDetector {
};
class G4UserLimits {
};
class G4Material {
};
class G4VSolid {
};
class G4CSGSolid : public G4VSolid{
};
class G4Box : public G4CSGSolid
{
public:
G4Box(const G4String &pName, G4double pX, G4double pY, G4double pZ);
};
class G4Tubs : public G4CSGSolid
{
public:
G4Tubs(const G4String &pName,
G4double pRMin,
G4double pRMax,
G4double pDz,
G4double pSPhi,
G4double pDPhi );
};
class G4LogicalVolume
{
public:
G4LogicalVolume(G4VSolid *pSolid,
G4Material *pMaterial,
const G4String &pName,
G4FieldManager* pFieldMgr=0,
G4VSensitiveDetector* pSDetector=0,
G4UserLimits* pULimits=0,
G4bool optimise=true);
// Constructor. The solid and material pointer must be non null.
// The parameters for field, detector and user limits are optional.
// The volume also enters itself into the logical volume Store.
// Optimisation of the geometry (voxelisation) for the volume
// hierarchy is applied by default. For parameterised volumes in
// the hierarchy, optimisation is -always- applied.
};
class G4RotationMatrix{
public:
G4RotationMatrix();
};
class G4PVPlacement : public G4VPhysicalVolume
{
public:
G4PVPlacement(G4RotationMatrix *pRot,
const CLHEP::Hep3Vector &tlate,
G4LogicalVolume *pCurrentLogical,
const G4String &pName,
G4LogicalVolume *pMotherLogical = 0,
G4bool pMany = false,
G4int pCopyNo = 0);
};
@@ -1,2 +0,0 @@
This directory will contain the source file for python wrappers
generated by swig.
@@ -1,90 +0,0 @@
# $Id: GNUmakefile,v 1.10 2006/11/23 08:50:29 ahoward Exp $
# --------------------------------------------------------------
# GNUmakefile Michael Dressel
# --------------------------------------------------------------
name := TiaraWrapper
G4TARGET := $(name)
G4EXLIB := true
ifndef G4INSTALL
G4INSTALL = ../..
endif
include $(G4INSTALL)/config/architecture.gmk
SWIGFLAGS = -I../G4KernelWrapper \
-I$(G4INSTALL)/source/geometry/biasing/include \
-I$(G4INSTALL)/source/digits_hits/detector/include \
-I$(G4INSTALL)/source/event/include \
-I$(G4INSTALL)/source/processes/transportation/include \
-I$(TIARA_BASE)/source/tiara/include \
-I$(G4INSTALL)/source/physics_lists/lists/include \
-I$(TIARA_BASE)/source/CLHEPWrapper/include \
-I$(TIARA_BASE)/source/G4KernelWrapper/include \
-I${CLHEP_BASE_DIR}/include
##include $(TIARA_BASE)/source/hadronic_lists.gmk
#SWIGFLAGS += ${LSTFLAGS}
libdirTiara = $(G4WORKDIR)/tmp/$(G4SYSTEM)/tiara
SWIG_OBJ_DEP = $(wildcard $(libdirTiara)/*.o)
include $(TIARA_BASE)/source/swig.gmk
tiaraDeps = $(notdir $(wildcard ${G4WORKDIR}/tmp/${G4SYSTEM}/tiara/*.d))
copyDeps = $(addprefix ${G4WORKDIR}/tmp/${G4SYSTEM}/TiaraWrapper/, $(tiaraDeps))
.PHONY: all tiaraClean
all: $(copyDeps) $(SWIGSO)
include $(G4INSTALL)/config/binmake.gmk
ifdef G4ANALYSIS_USE
CPPFLAGS += `aida-config --include`
# LDFLAGS += `aida-config --lib`
endif
CPPFLAGS += -I$(TIARA_BASE)/source/tiara/include\
-I$(PYTHON_INCLUDE_DIR) \
-I$(G4INSTALL)/source/physics_lists/lists/include \
-I$(TIARA_BASE)/source/G4KernelWrapper/include
LDFLAGS += -L$(G4WORKDIR)/tmp/$(G4SYSTEM)/tiara \
-L$(G4WORKDIR)/lib/plists/$(G4SYSTEM) \
-L$(PYTHON_LIB_DIR)
ifdef G4ANALYSIS_USE
LDLIBS += `aida-config --lib`
endif
LDLIBS += -lpython$(PYTHONVERSION) \
-lnsl \
-ldl \
-lreadline \
-ltermcap \
-lieee \
-lpthread \
-lutil
${G4WORKDIR}/tmp/${G4SYSTEM}/TiaraWrapper/%.d: ${G4WORKDIR}/tmp/${G4SYSTEM}/tiara/%.d
@cp $< $@
tiaraClean:
@echo Cleaning up $(G4WORKDIR)/tmp/$(G4SYSTEM)/$(name)
@echo $(tiaraDeps)
@rm -rf $(G4WORKDIR)/tmp/$(G4SYSTEM)/$(name)
@rm -f *.pyc
@@ -1,133 +0,0 @@
# $Id: Tiara.i,v 1.9 2005/12/14 13:18:40 ahoward Exp $
# -------------------------------------------------------------------
# GEANT4 tag $Name: geant4-09-02 $
# -------------------------------------------------------------------
%module Tiara
%{
#include "G4PVPlacement.hh"
#include "TiaraSim.hh"
#include "TiaraGeometry.hh"
#include "TiaraMaterials.hh"
#include "TiaraVSourceEnergyGenerator.hh"
#include "TiaraSampledEnergy.hh"
#include "TiaraDPSSampledEnergy.hh"
#include "TiaraFixedEnergyGenerator.hh"
#include "TiaraVDirectionGenerator.hh"
#include "TiaraIsotropicDirections.hh"
#include "TiaraPrimaryGeneratorAction.hh"
#include "TiaraCellScorer.hh"
#include "TiaraCellScorerStore.hh"
#include "TiaraPhysicsList.hh"
#include "LHEP_BIC_HP.hh"
#include "LHEP_BIC.hh"
#include "LHEP.hh"
#include "LHEP_PRECO.hh"
#include "LHEP_LEAD.hh"
#include "LHEP_PRECO_HP.hh"
#include "TiaraVisEventAction.hh"
#include "TiaraTimedEventAction.hh"
#include "TiaraMeasure.hh"
#include "TiaraTally.hh"
#include "TiaraRandom.hh"
%}
%include typemaps.i
%include std_string.i
%include std_vector.i
%template(hist_vec_dbl) std::vector< double >;
%template(particle_vec_string) std::vector< std::string >;
%include CLHEP.i
%import G4Kernel.i
%include TiaraDimensions.hh
%include TiaraMaterials.hh
%include TiaraGeometry.hh
%include TiaraMeasure.hh
%include TiaraTally.hh
%include G4VCellScorer.hh
%include TiaraCellScorer.hh
%include TiaraCellScorerStore.hh
%extend TiaraCellScorerStore {
G4VCellScorerStore *GetG4VCellScorerStore() {
return self;
}
}
%include TiaraVSourceEnergyGenerator.hh
%include TiaraSampledEnergy.hh
%include TiaraDPSSampledEnergy.hh
%include TiaraFixedEnergyGenerator.hh
%include TiaraVDirectionGenerator.hh
%include TiaraIsotropicDirections.hh
%include TiaraPrimaryGeneratorAction.hh
%include TiaraSim.hh
%include TiaraVisEventAction.hh
%include TiaraTimedEventAction.hh
%include TiaraRandom.hh
%include LHEP_BIC_HP.hh
%template(LHEP_BIC_HP) TLHEP_BIC_HP<G4VModularPhysicsList>;
%extend TLHEP_BIC_HP<G4VModularPhysicsList> {
std::string getName() const {
return std::string("LHEP_BIC_HP");
}
}
%include LHEP_BIC.hh
%template(LHEP_BIC) TLHEP_BIC<G4VModularPhysicsList>;
%extend TLHEP_BIC<G4VModularPhysicsList> {
std::string getName() const {
return std::string("LHEP_BIC");
}
}
%include LHEP.hh
%template(LHEP) TLHEP<G4VModularPhysicsList>;
%extend TLHEP<G4VModularPhysicsList> {
std::string getName() const {
return std::string("LHEP");
}
}
%include LHEP_PRECO.hh
%template(LHEP_PRECO) TLHEP_PRECO<G4VModularPhysicsList>;
%extend TLHEP_PRECO<G4VModularPhysicsList> {
std::string getName() const {
return std::string("LHEP_PRECO");
}
}
%include LHEP_LEAD.hh
%template(LHEP_LEAD) TLHEP_LEAD<G4VModularPhysicsList>;
%extend TLHEP_LEAD<G4VModularPhysicsList> {
std::string getName() const {
return std::string("LHEP_LEAD");
}
}
%include LHEP_PRECO_HP.hh
%template(LHEP_PRECO_HP) TLHEP_PRECO_HP<G4VModularPhysicsList>;
%extend TLHEP_PRECO_HP<G4VModularPhysicsList> {
std::string getName() const {
return std::string("LHEP_PRECO_HP");
}
}
@@ -1,2 +0,0 @@
This directory will contain the source file for python wrappers
generated by swig.
@@ -1,54 +0,0 @@
# $Id: hadronic_lists.gmk,v 1.9 2006/06/23 06:37:32 ahoward Exp $
# --------------------------------------------------------------
# hadronic physics-lists setup - H.P.Wellisch
# --------------------------------------------------------------
ifndef G4LISTS_BASE
EXTRALIBS += -L$(G4LIB)/plists/$(G4SYSTEM)
G4LISTS_BASE = $(G4INSTALL)/physics_lists
else
EXTRALIBS += -L$(G4LISTS_BASE)/hadronic/plists/lib/$(G4SYSTEM)
endif
EXTRALIBS += -lFTFC
EXTRALIBS += -lFTFP
EXTRALIBS += -lLBE
EXTRALIBS += -lLHEP
EXTRALIBS += -lLHEP_LEAD
EXTRALIBS += -lLHEP_LEAD_HP
EXTRALIBS += -lLHEP_PRECO
EXTRALIBS += -lQGSP_BERT
EXTRALIBS += -lLHEP_PRECO_HP
EXTRALIBS += -lQGSC
EXTRALIBS += -lQGSC_LEAD
EXTRALIBS += -lQGSC_LEAD_HP
EXTRALIBS += -lQGSP
EXTRALIBS += -lQGSP_HP
EXTRALIBS += -lLHEP_BERT
EXTRALIBS += -lLHEP_BIC
EXTRALIBS += -lLHEP_BIC_HP
EXTRALIBS += -lQGSP_BIC
EXTRALIBS += -lPackaging
LSTFLAGS := -I$(G4LISTS_BASE)/hadronic/FTFC/include
LSTFLAGS += -I$(G4LISTS_BASE)/hadronic/FTFP/include
LSTFLAGS += -I$(G4LISTS_BASE)/hadronic/LBE/include
LSTFLAGS += -I$(G4LISTS_BASE)/hadronic/LHEP/include
LSTFLAGS += -I$(G4LISTS_BASE)/hadronic/LHEP_BERT/include
LSTFLAGS += -I$(G4LISTS_BASE)/hadronic/LHEP_BIC/include
LSTFLAGS += -I$(G4LISTS_BASE)/hadronic/LHEP_BERT_HP/include
LSTFLAGS += -I$(G4LISTS_BASE)/hadronic/LHEP_BIC_HP/include
LSTFLAGS += -I$(G4LISTS_BASE)/hadronic/LHEP_LEAD/include
LSTFLAGS += -I$(G4LISTS_BASE)/hadronic/LHEP_LEAD_HP/include
LSTFLAGS += -I$(G4LISTS_BASE)/hadronic/LHEP_PRECO/include
LSTFLAGS += -I$(G4LISTS_BASE)/hadronic/LHEP_PRECO_HP/include
LSTFLAGS += -I$(G4LISTS_BASE)/hadronic/Packaging/include
LSTFLAGS += -I$(G4LISTS_BASE)/hadronic/QGSC/include
LSTFLAGS += -I$(G4LISTS_BASE)/hadronic/QGSC_LEAD/include
LSTFLAGS += -I$(G4LISTS_BASE)/hadronic/QGSC_LEAD_HP/include
LSTFLAGS += -I$(G4LISTS_BASE)/hadronic/QGSP/include
LSTFLAGS += -I$(G4LISTS_BASE)/hadronic/QGSP_BERT/include
LSTFLAGS += -I$(G4LISTS_BASE)/hadronic/QGSP_BIC/include
LSTFLAGS += -I$(G4LISTS_BASE)/hadronic/QGSP_HP/include
LSTFLAGS += -I$(G4LISTS_BASE)/hadronic/QGSP_Model/include
CPPFLAGS += ${LSTFLAGS}
@@ -1,174 +0,0 @@
# $Id: dataAcess.py,v 1.3 2003/06/26 11:54:13 dressel Exp $
# -------------------------------------------------------------------
# GEANT4 tag $Name: geant4-09-02 $
# -------------------------------------------------------------------
#
import os
import shelve
import myLiz
import dpsManip
import detector
class ExperimentalData(object):
def __init__(self):
tiara_dir = os.environ["TIARA_BASE"]
if not tiara_dir:
print "dataAcess.ExperimentalData: TIARA_BASE not defined run tiara...sh first"
dataFile = tiara_dir + "/data/expDataConverted/TiaraData2.xml"
print "display.ExperimentalData.dataFile:" ,dataFile
self.dataTree = myLiz.tf.create (dataFile,"xml",1,0)
def getDataDPS(self, she, detector):
energy = she["energy"]
shieldWidth = she["shieldWidth"]
dataName = "Tiara-" + energy + "c" + shieldWidth + \
"-" + detector
if shieldWidth == "25" or shieldWidth == "50":
dataName += "a"
dataName += ".pnt"
print dataName
pData = self.dataTree.findDataPointSet(dataName)
dpsManip.setDPSErrorsToZero(pData, 0)
return pData
def getScaledDataaDPS(self, she, detname, df):
pDataO = self.getDataDPS(she, detname)
pData = dpsManip.createScaledDPS(0,
pDataO,
df,
"scaled_" + pDataO.title (),
0.000001)
return pData
class MC_Data(object):
def __init__(self, she, mcTree):
self.she = she
self.energy = self.she["energy"]
self.shield = self.she["shieldWidth"]
self.mcTree = mcTree
self.coli = 0
if self.shield == "25" or \
self.shield == "50":
self.coli = 1
self.baseName = self.energy + "c" + self.shield +\
"_detector_"
def getGeneratedHisto(self):
name = "source_detector"
hGen = self.mcTree.findH1D(name)
return hGen
def getMcPlot(self, detector, histo):
mcName = "detector_" + detector + histo
print mcName
hMc = self.mcTree.findH1D(mcName)
return hMc
def getScale(self, atColiExit):
coli = 0
if atColiExit==1:
coli = 0
else:
coli = self.coli
nPeakNeutrons = self.she["generatorTally"].measures[1].sum
scale = detector.detScale(nPeakNeutrons, self.energy, coli)
print "CompPlot.getScale: scaling with:", scale
return scale
def getScaledMcDPS(self, atColiExit, det, df, histo = ""):
dname = self.baseName + det.name
if histo:
dname += "_" + histo
scale = self.getScale (atColiExit)
hMc = self.getMcPlot (det.name, histo )
binEdges = dpsManip.getBinEdges(hMc)
dScaled = dpsManip.getScaledDPS(hMc, scale/det.volume,
df, dname + "scaled")
dLethScaled = dpsManip.dLogWeightDPS (dScaled,
df,
dname + "df_dlgE",
binEdges)
return dLethScaled
def getScaledGeneratedDPS(self, atColiExit, det, df, histo = ""):
dname = self.baseName + det.name
if histo:
dname += "_" + histo
scale = self.getScale (atColiExit)
hGen = self.getGeneratedHisto()
binEdges = dpsManip.getBinEdges(hGen)
dGenScaled = dpsManip.getScaledDPS(hGen,
scale/detector.sourceDetectorVolume,
df,
dname + "GenScaled")
dGenLethScaled = dpsManip.dLogWeightDPS(dGenScaled, df,
dname + "gen, df_dlgE",
binEdges)
return dGenLethScaled
class ExpMcPlot(object):
"""Prepare and hold source information for a plot.
Hold experimental and Monte Carlo data to plot in one diagram.
"""
def __init__(self, shelveName, dist, detType="ring", histo = ""):
path = os.path.dirname(shelveName)
shelveFile = os.path.basename(shelveName)
self.tt = myLiz.tf.create ()
self.df = myLiz.af.createDataPointSetFactory (self.tt)
self.she = shelve.open(shelveName,"r")
xmlFile = self.she["xmlStoreName"]
if path:
xmlFile = path + "/" + xmlFile
self.mcTree = myLiz.tf.create (xmlFile, "xml", 1, 0)
self.det = detector.Detector(dist,detType)
self.expData = ExperimentalData()
self.mcData = MC_Data(self.she, self.mcTree)
self.pDataDPS = self.expData.getScaledDataaDPS(self.she,
self.det.name,
self.df)
self.pMcDPS = self.mcData.getScaledMcDPS(atColiExit=1,
det=self.det,
df=self.df,
histo="")
self.pGenDPS = self.mcData.getScaledGeneratedDPS(atColiExit=1,
det=self.det,
df=self.df,
histo="")
self.regions = []
def display(self):
if "pl" not in dir(myLiz):
myLiz.pf = myLiz.af.createPlotterFactory ()
myLiz.pl = myLiz.pf.create()
region = myLiz.pl.currentRegion()
self.regions.append(region)
region.plot (self.pDataDPS,"markers overlay")
region.plot (self.pMcDPS,"markers overlay")
myLiz.pl.refresh ()
@@ -1,80 +0,0 @@
# $Id: detector.py,v 1.3 2003/06/26 11:54:13 dressel Exp $
# -------------------------------------------------------------------
# GEANT4 tag $Name: geant4-09-02 $
# -------------------------------------------------------------------
#
# A detector is either the of the "simple" or "ring" type.
# the volumina of the "simple" detectors are the same at all
# positions (00, 20, 40 cm off beam axis). The "ring" type detectors
# have different volumina at the different positions.
# For convinience a class Detector is provided to link a detector
# position and it's volume.
d00Volume = 1608.8 # volume of the 12.9 cm x 12.9 cm cyinder
d20Volume = 20268.3 # volume of the ring at 20 cm
d40Volume = 40536.6 # volume of the ring at 40 cm
# map of distances to volumina for the 12.9 cm x 12.9 cm detectors
SimpleDetectorVolume = {"00":d00Volume, "20":d00Volume, "40":d00Volume}
# map of distances to volumina for ring detectors
RingDetectorVolume = {"00":d00Volume, "20":d20Volume, "40":d40Volume}
# map of detector type to distance-volumina map
DetectorVolume = {"simple":SimpleDetectorVolume,
"ring" :RingDetectorVolume}
# the area of the beam pipe needed for scaling
beamPipeArea = 93.31
# the source detector volume: beamPipeArea * 0.1 cm
sourceDetectorVolume = 9.33
# source flux from the TIARA paper
Fexp43_Coli = 1.76E+04
Fexp43 = 1.94E+04
Fexp68_Coli = 2.04E+04
Fexp68 = 2.46E+04
class Detector(object):
"Distance and volume of a Detector."
def __init__(self, dist, detType):
self.name = dist
self.volume = DetectorVolume[detType][dist]
# function to calculate the scale factor
def detScale(ngen, energy, coli):
"""Detrmine scale.
Determine scale according to the number of generated neutrons,
the proton beam energy. If coli == 1, the flux at the
colimator exit is used, else the flux at 401 cm is used.
"""
Asrc = beamPipeArea
Fexp = 0
if energy == "43":
if coli == 1:
Fexp = Fexp43_Coli
else:
Fexp = Fexp43
else:
if energy == "68":
if coli == 1:
Fexp = Fexp68_Coli
else:
Fexp = Fexp68
S = Fexp * Asrc / ngen
return S
@@ -1,90 +0,0 @@
# $Id: dpsManip.py,v 1.2 2003/06/16 17:06:44 dressel Exp $
# -------------------------------------------------------------------
# GEANT4 tag $Name: geant4-09-02 $
# -------------------------------------------------------------------
#
import math
# functions to manipulate a DPS (data point set)
def getScaledDPS(hSrc, scale, df, name):
"Create a scaled DPS from a histogramm."
hSrc.scale(scale)
dp = df.create(name, hSrc)
setDPSErrorsToZero(dp, 0)
hSrc.scale(1./scale)
return dp
def setDPSErrorsToZero(dps, coNum):
"Set errors of a DPS to zero."
for i in range(dps.size()):
p = dps.point(i)
co = p.coordinate(coNum)
co.setErrorMinus(coNum)
co.setErrorPlus(coNum)
def copyDPS(dSrc, df, name):
"Make a copy of a DPS using the data point set factory df."
dp = df.create(name, dSrc.dimension ())
for i in range( dSrc.size() ):
dp.addPoint()
pNew = dp.point(i)
pOld = dSrc.point(i)
for d in range(dSrc.dimension ()):
cOld = pOld.coordinate(d)
cNew = pNew.coordinate(d)
cNew.setValue(cOld.value())
em = cOld.errorMinus()
ep = cOld.errorPlus()
cNew.setErrorMinus(em)
cNew.setErrorPlus(ep)
return dp
def dLogWeightDPS(dSrc, df, name, binEdges):
"""Create a dps with the coordinate 1 scaled by 1/dlog(coordinate 0).
"""
dp = copyDPS(dSrc, df, name)
for i in range(len(binEdges) - 1):
s = math.log(binEdges[i+1]) - math.log(binEdges[i])
c = dp.point(i).coordinate (1)
value = dSrc.point(i).coordinate(1).value()
errorMinus = dSrc.point(i).coordinate(1).errorMinus()
errorPlus = dSrc.point(i).coordinate(1).errorPlus()
c.setValue(value / s)
c.setErrorMinus(errorMinus / s)
c.setErrorPlus(errorPlus / s)
return dp
def createScaledDPS(coNum, pDataO, df, name, scale):
"""Create a scaled DPS from a DPS.
The coordinate \'coNum\' of the source DPS \'pDataO\' is scaled by
\'scale\'. The result is returned in the DPS created by the given
data point set factory \'df\' named \'name\'.
"""
dp = copyDPS(pDataO, df, name)
for i in range( dp.size() ):
p = dp.point(i)
co = p.coordinate(coNum)
co.setValue(co.value()*scale)
co.setErrorMinus(co.errorMinus()*scale)
co.setErrorPlus(co.errorPlus()*scale)
return dp
def getBinEdges(h):
"Get bin edges of a histogramm."
binEdges = []
a = h.axis ()
for i in range(a.bins ()):
binEdges.append(a.binLowerEdge(i))
binEdges.append(a.binUpperEdge(a.bins () - 1))
return binEdges
@@ -1,118 +0,0 @@
# $Id: extractShelve.py,v 1.3 2003/07/04 13:26:31 dressel Exp $
# -------------------------------------------------------------------
# GEANT4 tag $Name: geant4-09-02 $
# -------------------------------------------------------------------
#
import string
import math
import os
import shelve
import string
import detector
# some functions for calculating the FOM
def getR2(measure):
"Error squared of a measure."
v = measure.variance
m2 = math.pow(measure.mean, 2)
n = measure.entries
r2 = 1e+10
if n>0 and m2 > 0:
r2 = v/m2/n
return r2
def getFOMbyName(shelveName, tallyName, bin):
"FOM by shelve name, tally name and bin of energy region"
she = shelve.open (shelveName, "r")
measure = she[tallyName].measures[bin]
R2= getR2(measure)
T = she["runTime"]
return 1./(T*R2)
def getFOM(aShelve, tallyName, bin):
"FOM given a shelve, tally name and energy bin."
measure = aShelve[tallyName].measures[bin]
R2= getR2(measure)
T = aShelve["runTime"]
return 1./(T*R2)
# functions to retrive information from the shelve
def infoShelve(file):
"Print information stored in a shelve."
she = shelve.open(file, "r")
print file
for k in she.keys():
value = she[k]
if value.__class__.__module__ == "__builtin__" :
print " ", k, ":", value
def lsShelve(path):
"List shelve information found in and under the given path. "
if os.path.isfile(path):
if string.find(path,".shelve") > -1:
infoShelve(path)
else:
if os.path.isdir(path):
files = os.listdir(path)
for file in files:
f=path + "/" + file
lsShelve(f)
def getFluxInRegion(she, dist="00", detType="ring", region=1):
"Get the flux in a detector."
tally = she["detector_" + dist + "Tally"]
m = tally.measures[region]
rawFlux = m.sum
mean = m.mean
var = m.getVariance()
n = m.entries
errRel = -1.
if n>0 and var >0 and mean > 0:
errRel = math.sqrt(var/n)/mean
nPeakNeutrons = she["generatorTally"].measures[1].sum
scale = detector.detScale(nPeakNeutrons, she["energy"], 0)
return rawFlux * scale / detector.DetectorVolume[detType][dist], errRel
def getFluxes(she, detType = "ring"):
"Get all fluxes and FOM in a shelve."
fluxName = "flux_" + she["energy"]+"_"+\
she["shieldWidth"]
keys = she.keys()
fluxes = {}
for k in keys:
if string.find(k,"detector_") > -1:
sp = string.split(k,"detector_")
sp = string.split(sp[1],"Tally")
dist = sp[0]
fluxNameD = fluxName + "_" + dist
for i in range(1,3):
fom = getFOM(she, k, i)
f = fluxNameD + "_" + "%(i)d" % vars()
flux, errRel = getFluxInRegion(she, dist, detType, i)
errRel*=100
sFlux = '%1.2E' % (flux)
sErrRel = '%1.0f' % (errRel)
if errRel < 10.0:
sErrRel = '%1.1f' % (errRel)
print f, sFlux, ", errRel:", sErrRel, " FOM:", fom
# fluxes[f] = sFlux
return fluxes
@@ -1,11 +0,0 @@
# $Id: myPI.py,v 1.1 2004/06/09 15:04:36 daquinog Exp $
# -------------------------------------------------------------------
# GEANT4 tag $Name: geant4-09-02 $
# -------------------------------------------------------------------
#
import sys
origArgv = sys.argv
sys.argv = ["","--noGraphics"]
from PyAida import *
sys.argv = origArgv
@@ -1,269 +0,0 @@
# $Id: myUtils.py,v 1.6 2004/12/08 15:37:14 daquinog Exp $
# -------------------------------------------------------------------
# GEANT4 tag $Name: geant4-09-02 $
# -------------------------------------------------------------------
#
import CLHEP
import G4Kernel
import string
import os
import time
import shelve
G4analysisUse = os.environ.has_key("G4ANALYSIS_USE")
if G4analysisUse:
import myPI
def createParallelSampler(impGeo, impScorer):
parallelSampler = G4Kernel. \
G4ParallelGeometrySampler(\
impGeo.getWorldVolume(), "neutron")
parallelSampler.PrepareScoring(impScorer)
if impGeo.base > 1:
istore = impGeo.getImportanceStore()
parallelSampler.PrepareImportanceSampling(istore,None)
parallelSampler.Configure()
return parallelSampler
def printImpTable(impScorer, istore = ""):
iScMap = impScorer.GetMapGeometryCellCellScorer()
table = ""
if istore:
table = G4Kernel.G4ScoreTable(istore)
else:
table = G4Kernel.G4ScoreTable()
table.Print(iScMap)
def saveResults(tApp, path, shelveName, impScorer, impGeo):
myShelve = shelve.open(path + "/" + shelveName)
printImpTable(impScorer, impGeo.getImportanceStore())
table = G4Kernel.G4ScoreTable()
table.Print(tApp.cellScorerStore.GetMapGeometryCellCellScorer())
if G4analysisUse:
storePath = path + "/" + myShelve["xmlStoreName"]
persistantStore = myPI.tf.create(storePath,"xml",0,1)
coppyTrees(tApp.tree, persistantStore)
persistantStore.commit()
persistantStore.close()
print "wrote to store: ", storePath
tApp.fillShelve(myShelve)
myShelve.close()
print "wrote shelve: ", shelveName
def coppyTrees(srcTree, cpTree):
mntPoint = "cpTreeMountPoint"
srcTree.mkdir("/" + mntPoint)
srcTree.mount("/" + mntPoint, cpTree, "/")
objectNames = srcTree.listObjectNames()
objectTypes = srcTree.listObjectTypes()
for i in range(len(objectNames)):
name = objectNames[i]
type = objectTypes[i]
if string.find(name, mntPoint) < 0:
srcTree.cp (name,"/" + mntPoint +"/")
min = 6000
hour = 60 * min
day = 24 * hour
def getTotalTime(totalTime):
days = totalTime / day
dayRest = totalTime - days*day
hours = dayRest / hour
minrest = dayRest - hours*hour
minutes = minrest / min
tString = ""
if days > 0:
tString += "%(days)dd" % vars()
if hours > 0:
tString += "%(hours)dh" % vars()
if minutes > 0:
tString += "%(minutes)dm" % vars()
return tString
def getStoreName():
Y, M, D, h, m, s, wd, jd, ds = time.localtime()
hostName = os.environ["HOST"]
storeName = "tiara-" + \
"%(Y)d" % vars() + "_" + \
"%(M)d" % vars() + "_" + \
"%(D)d" % vars() + "_" + \
"%(h)d" % vars() + "_" + \
"%(m)d" % vars() + "_" + \
"%(s)d" % vars() + "_" + \
hostName
return storeName
def getConfigurationInfo(impGeo, experiment, physicsList, totalTime,
comment):
configInfo = {}
configInfo["energy"] = experiment.energy
configInfo["shieldMaterial"] = experiment.shieldMaterial
width = experiment.shieldWidth / CLHEP.cm
s_width = "%(width)d" % vars()
configInfo["shieldWidth"] = s_width
base = impGeo.base
simp = "no"
if base > 1:
simp = "ImpBase_%(base)f" % vars()
configInfo["biasing"] = simp
configInfo["physListName"] = physicsList.getName()
particles = ""
configInfo["minEnergyCut"] = experiment.particleCut
stime = "no"
if totalTime > 0:
stime = getTotalTime(totalTime)
configInfo["timeLimit"] = stime
configInfo["impGeoName"] = impGeo.nameExt
configInfo["hostName"] = os.environ["HOST"]
configInfo["comment"] = comment
return configInfo
def setConfigInfo(tree, confInfo, af):
hf = af.createHistogramFactory(tree)
h = hf.createHistogram1D("configInfo","configInfo",1,0,1)
anno = h.annotation()
for k in confInfo:
anno.addItem(k, confInfo[k])
def getConfigInfoFromTree(tree):
configInfo = {}
h = tree.findH1D("configInfo")
anno = h.annotation ()
for i in range(8, anno.size()):
configInfo[anno.key(i)] = anno.value(i)
return configInfo
if G4analysisUse:
def addToXML(mergedXMLStore, xmlStore):
objNames = xmlStore.listObjectNames()
objTypes = xmlStore.listObjectTypes()
hf = myPI.af.createHistogramFactory(mergedXMLStore)
for i in range(len(objNames)):
oName = objNames[i]
oType = objTypes[i]
if oType == "IHistogram1D":
h1 = mergedXMLStore.findH1D(oName)
h2 = xmlStore.findH1D(oName)
hf.add(oName,h1,h2)
if G4analysisUse:
def comparableShelves(she, mergedXMLStore):
comp = 1
if mergedShelve["energy"] != she["energy"]:
comp = 0
if mergedShelve["shieldWidth"] != she["shieldWidth"]:
comp = 0
def setUpMergedShelve(she, mergedShelve, mergedXMLname, shelveNameToBeAdded):
mergedShelve["xmlStoreName"] = mergedXMLname
mergedShelve["energy"] = she["energy"]
mergedShelve["shieldWidth"] = she["shieldWidth"]
mergedShelve["mergedFiles"] = shelveNameToBeAdded
mergedShelve["runTime"] = she["runTime"]
mergedShelve["generatorTally"] = she["generatorTally"]
mergedShelve["sourceDetectorTally"] = she["sourceDetectorTally"]
mergedShelve["detector_00Tally"] = she["detector_00Tally"]
mergedShelve["detector_20Tally"] = she["detector_20Tally"]
mergedShelve["detector_40Tally"] = she["detector_40Tally"]
def addToShelve(mergedShelve, she, shelveNameToBeAdded):
mergedShelve["mergedFiles"] += shelveNameToBeAdded + " "
mergedShelve["runTime"] += she["runTime"]
mergedShelve["generatorTally"].addMeasures(she["generatorTally"])
mergedShelve["sourceDetectorTally"].addMeasures(she["sourceDetectorTally"])
mergedShelve["detector_00Tally"].addMeasures(she["detector_00Tally"])
mergedShelve["detector_20Tally"].addMeasures(she["detector_20Tally"])
mergedShelve["detector_40Tally"].addMeasures(she["detector_40Tally"])
if G4analysisUse:
def mergeData(mergedName, shelveList):
mergedShelveName = mergedName + ".shelve"
print "creating merged shelve: ", mergedShelveName
mergedShelve = shelve.open(mergedShelveName)
mergedXMLname = mergedName + ".xml"
print "creating merged XML store: ", mergedXMLname
mergedXMLStore = myPI.tf.create(mergedXMLname, "xml", 0, 1)
for i in range(len(shelveList)):
shelveName = shelveList[i]
print "adding data from: ", shelveName
she = shelve.open(shelveName,"r")
xmlStoreName = she["xmlStoreName"]
print "opening: ", xmlStoreName
xmlStore = myPI.tf.create(xmlStoreName,"xml",1,0)
if i == 0:
if mergedXMLStore.listObjectNames() == ():
setUpMergedShelve(she, mergedShelve, mergedXMLname, shelveName)
coppyTrees(xmlStore, mergedXMLStore)
else:
if comparableShelves(she, mergedXMLStore):
addToShelve(mergedShelve, she, shelveName)
addToXML(mergedXMLStore, xmlStore)
else:
addToShelve(mergedShelve, she, shelveName)
addToXML(mergedXMLStore, xmlStore)
mergedShelve.close()
mergedXMLStore.commit()
mergedXMLStore.close()
def rmPath(she):
xmlFile = she["xmlStoreName"]
n = string.rfind(xmlFile,"/")
if n > -1:
xmlFile = xmlFile[n+1:]
she["xmlStoreName"] = xmlFile
@@ -1,60 +0,0 @@
# $Id: parallelHall.py,v 1.4 2003/06/20 12:41:06 dressel Exp $
# -------------------------------------------------------------------
# GEANT4 tag $Name: geant4-09-02 $
# -------------------------------------------------------------------
#
import G4Kernel
import CLHEP
import string
class ParallelHall(object):
def __init__(self, tiaraSpecs):
self.halfWidth = tiaraSpecs.dimensions.worldHalfWidth + \
10*CLHEP.cm
self.halfLength = tiaraSpecs.dimensions.worldHalfLength + \
10*CLHEP.cm
self.hallSolid = G4Kernel.G4Box("parallelBox",
self.halfWidth,
self.halfWidth,
self.halfLength)
vacuum = tiaraSpecs.materials.GetMaterial("vacuum")
self.logHall = G4Kernel.G4LogicalVolume(self.hallSolid,
vacuum,
"paralleleLog")
rot = G4Kernel.G4RotationMatrix()
self.worldVolume = G4Kernel.\
G4PVPlacement(rot,
CLHEP.Hep3Vector(0, 0, 0),
self.logHall,
"ParallelHall");
self.geoCells = []
def getWorldVolume(self):
return self.worldVolume
def placeCells(self, arrPosLogVol):
for ele in arrPosLogVol:
phys = self.placeOneCell(ele)
self.geoCells.append(G4Kernel.G4GeometryCell(phys, 0))
def placeOneCell(self, pLog, name = ""):
rot = G4Kernel.G4RotationMatrix()
z = int(pLog.pos)
zstr = "%(z)d" % vars()
zstr = string.rjust(zstr, 5)
zstr = string.replace(zstr,' ','0')
if not name:
name = "cell_z_" + zstr
vPhys = G4Kernel.\
G4PVPlacement(rot,
CLHEP.Hep3Vector(0, 0, pLog.pos),
pLog.log,
name,
self.logHall);
return vPhys
def getGeometryCells(self):
return self.geoCells
@@ -1,10 +0,0 @@
# $Id: posLog.py,v 1.2 2003/06/16 17:06:44 dressel Exp $
# -------------------------------------------------------------------
# GEANT4 tag $Name: geant4-09-02 $
# -------------------------------------------------------------------
#
class PosLog(object):
def __init__(self, pos, log):
self.pos = pos
self.log = log
@@ -1,119 +0,0 @@
# $Id: runSequence.py,v 1.4 2004/06/09 15:04:36 daquinog Exp $
# -------------------------------------------------------------------
# GEANT4 tag $Name: geant4-09-02 $
# -------------------------------------------------------------------
#
import Tiara
import myUtils
import shelve
import os
import string
class RunConfig(object):
def __init__(self):
self.basePath = ""
self.tApp = ""
self.tiaraSpecs = ""
self.impGeo = ""
self.impScorer = ""
self.totalTime = ""
self.comment = ""
def getConfInfo(self):
return myUtils.\
getConfigurationInfo(self.impGeo,
self.tiaraSpecs.experiment,
self.tApp.physicsList,
self.totalTime,
self.comment)
class RunSequence(object):
# methods to be used public
def __init__(self, runConfig, usePI = True):
self.rc = runConfig
self.usePI = usePI
self.runNum = -1
self.confInfo = self.rc.getConfInfo()
self.storeName = myUtils.getStoreName()
self.xmlStore = ""
self.pathXMLName = ""
self.shelveName = ""
self.pathShelveName = ""
self.randomNumberFileName = ""
self.path = self.mkPath()
def runNevents(self, events):
self.runNum += 1
self.mkNames()
self.mkShelve()
self.report()
self.rc.tApp.tiaraSim.BeamOn (events)
Tiara.saveRandomStatus(self.randomNumberFileName)
myUtils.saveResults(self.rc.tApp,
self.path,
self.shelveName,
self.rc.impScorer,
self.rc.impGeo)
def runLoop(self):
while ( not \
(self.rc.tApp.eventAction.\
GetTotalProcessedTime() > self.rc.totalTime)):
self.runNevents(10000000) # dummy num. events
# methods used privately
def report(self):
print "\n\nRunSequence.report:"
print self.confInfo
if self.usePI:
print "the xml store will be named: "
print " ", self.pathXMLName
print "the shelve name: "
print " ", self.pathShelveName
print "\n\n"
def mkPath(self):
if not os.path.exists(self.rc.basePath):
os.mkdir(self.rc.basePath)
path = self.rc.basePath + "/" + self.storeName
if not os.path.exists(path):
os.mkdir(path)
return path
def mkNames(self):
rn = self.runNum
rns = "%(rn)d" % vars()
rns = string.rjust(rns, 5)
rns = string.replace(rns,' ','0')
rId = "_run" + rns
if self.usePI:
self.xmlStore = self.storeName + rId + ".xml"
self.pathXMLName = self.path + "/" + self.xmlStore
self.shelveName = self.storeName + rId + ".shelve"
self.pathShelveName = self.path + "/" + self.shelveName
self.randomNumberFileName = self.path + "/randomNumberFile" + rId
def mkShelve(self):
myShelve = shelve.open(self.pathShelveName)
if self.usePI:
myShelve["xmlStoreName"] = self.xmlStore
for info in self.confInfo:
myShelve[info] = self.confInfo[info]
myShelve.close()
# end of RunSeuence
@@ -1,119 +0,0 @@
# $Id: slabGeometry.py,v 1.3 2003/06/20 12:41:07 dressel Exp $
# -------------------------------------------------------------------
# GEANT4 tag $Name: geant4-09-02 $
# -------------------------------------------------------------------
#
import math
import G4Kernel
import parallelHall
import posLog
class SlabedGeometry(object):
def __init__(self, tiaraSpecs, cellWidth, parallelGeo):
self.arrPosLogVol = []
self.normalCellSolid = None
self.logNormCell = None
self.lastCellSolid = None
self.logLastCell = None
self.createCells(tiaraSpecs, cellWidth, parallelGeo)
def createCells(self, tiaraSpecs, cellWidth, parallelGeo):
print "SlabedGeometry::createCells:"
print "halfLength", parallelGeo.halfLength,\
"halfWidth", parallelGeo.halfWidth
nCells = int(tiaraSpecs.experiment.shieldWidth / cellWidth)
print "cellWidth", cellWidth
print "nCells", nCells
zCellStart = tiaraSpecs.dimensions.targetPosZ + \
tiaraSpecs.dimensions.distTargetExperiment + \
tiaraSpecs.experiment.colWidth
print "zCellStart", zCellStart
zCellRegion = parallelGeo.halfLength - zCellStart
print "zCellRegion", zCellRegion
lengthLastCell = zCellRegion - nCells * cellWidth
print "lengthLastCell", lengthLastCell
print "sum cell length:", lengthLastCell + nCells * cellWidth
vacuum = tiaraSpecs.materials.GetMaterial("vacuum")
self.normalCellSolid = G4Kernel.G4Box("cellBox",
parallelGeo.halfWidth,
parallelGeo.halfWidth,
cellWidth/2)
print "normal box:",parallelGeo.halfWidth,cellWidth/2
self.logNormCell = G4Kernel.G4LogicalVolume(self.normalCellSolid,
vacuum,
"cellLog")
zPos = zCellStart - 0.5 * cellWidth
for i in range(nCells):
zPos += cellWidth
self.arrPosLogVol.append(posLog.PosLog(zPos, self.logNormCell))
print "zPos", zPos
self.lastCellSolid = G4Kernel.G4Box("lastCellBox",
parallelGeo.halfWidth,
parallelGeo.halfWidth,
lengthLastCell/2)
self.logLastCell = G4Kernel.G4LogicalVolume(self.lastCellSolid,
vacuum,
"lastCellLog")
print "last cell:", parallelGeo.halfWidth, lengthLastCell/2
zPos += cellWidth/2+lengthLastCell/2
self.arrPosLogVol.append(posLog.PosLog(zPos, self.logLastCell))
print "last cell zPos", zPos
def getArrPosLogVol(self):
return self.arrPosLogVol
class SlabedImportanceGeometry(object):
def __init__(self, tiaraSpecs, cellWidth, impBase, parallelGeo = None):
self.parallelGeo = parallelGeo
self.tiaraSpecs = tiaraSpecs
self.cellWidth = cellWidth
self.iStore = None
self.geometryCells = []
self.base = impBase
cellwidth_cm = cellWidth / CLHEP.cm
self.nameExt = "-cellWidth_%(cellwidth_cm)d" %vars()
self.buildParallelGeometry()
self.setImportances()
def buildParallelGeometry(self):
self.parallelGeo = parallelHall.ParallelHall(self.tiaraSpecs)
self.slabedGeo = SlabedGeometry(self.tiaraSpecs,
self.cellWidth,
self.parallelGeo)
self.parallelGeo.placeCells(self.slabedGeo.getArrPosLogVol())
self.iStore = G4Kernel.G4IStore(self.parallelGeo.getWorldVolume())
self.geometryCells = self.parallelGeo.getGeometryCells()
def setImportances(self):
worldCell = G4Kernel.G4GeometryCell(self.parallelGeo.\
getWorldVolume(), 0)
self.iStore.AddImportanceGeometryCell(1, worldCell)
nCells = len(self.geometryCells)
for i in range(nCells-1):
cell = self.geometryCells[i]
importance = math.pow(self.base, i)
print "i=", importance
self.iStore.AddImportanceGeometryCell(importance, cell)
lastCell = self.geometryCells[nCells-1]
importance = math.pow(self.base, nCells-2)
print "last cells i=", importance
self.iStore.AddImportanceGeometryCell(importance, lastCell)
def getWorldVolume(self):
return self.parallelGeo.getWorldVolume()
def getImportanceStore(self):
return self.iStore
@@ -1,72 +0,0 @@
# $Id: tallyData.py,v 1.2 2003/06/16 17:06:44 dressel Exp $
# -------------------------------------------------------------------
# GEANT4 tag $Name: geant4-09-02 $
# -------------------------------------------------------------------
#
class MeasureData:
def __init__(self, entries, mean, sum, sumSquared, variance):
self.entries = entries
self.mean = mean
self.sum = sum
self.sumSquared = sumSquared
self.variance = variance
def __iadd__(self,m):
self.entries += m.entries
self.sum += m.sum
self.sumSquared += m.sumSquared
self.mean = self.getMean()
self.variance = self.getVariance()
return self
def __add__(self,b):
c = MeasureData(self.entries,
self.mean,
self.sum,
self.sumSquared,
self.variance)
c+=b
return c
def getMean(self):
return 1.0 * self.sum / self.entries
def getVariance(self):
n = 0
f = 0
if self.entries > 1:
mean = self.getMean()
n = 1.0 * self.entries/(self.entries -1)
f = 1.0 * self.sumSquared/self.entries - mean*mean
return n * f
class TallyData:
def __init__(self, binEdges, measures):
self.binEdges = binEdges
self.measures = measures
def addMeasures(self, tally):
if tally.binEdges != self.binEdges:
print "TallyData.addMeasures: tally.binEdges != self.binEdges"
else:
for i in range(len(self.measures)):
self.measures[i] += tally.measures[i]
def createTallyDat(tally):
measures = []
for i in range(tally.size()):
m = tally.measure(i)
measures.append(MeasureData(m.GetEntries(),
m.GetMean(),
m.GetSum(),
m.GetSumSquared(),
m.GetVariance()))
t = TallyData(tally.binEdges(), measures)
return t
@@ -1,243 +0,0 @@
# $Id: tiaraApplication.py,v 1.7 2006/06/26 10:13:14 ahoward Exp $
# -------------------------------------------------------------------
# GEANT4 tag $Name: geant4-09-02 $
# -------------------------------------------------------------------
#
import string
import CLHEP
import G4Kernel
import Tiara
import tiaraSpecifications
import tallyData
class TiaraApplet(object):
tiaraSim = None
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
if (not TiaraApplet.tiaraSim):
if not tSim:
print "Error: TiaraApplet: argument is empty, and no tiaraSim exists!"
else:
TiaraApplet.tiaraSim = tSim
self.tiaraSpecs = tiaraSpecs
self.tiaraHall = Tiara.TiaraGeometry(self.tiaraSpecs.\
materials)
self.cellScorerStore = Tiara.TiaraCellScorerStore()
self.sampler = G4Kernel.G4MassGeometrySampler("neutron")
self.eventAction = None
self.scorer = None
self.primGen = None
self.scSrc = None
self.physicsList = None
self.nameExt = ""
self.scoreDets = []
self.scoreDetectorCreator = None
self.noComponents = 0
self.createdDPS = 0
self.tiaraSim.SetGeometry(self.tiaraHall)
def specifyPhysicsList(self, pl, particleCut):
self.particleCut = particleCut
self.physicsList = pl
def setScoreDetectorCreator(self, creator):
self.scoreDetectorCreator=creator
def visMode(self):
if self.eventAction:
print "TiaraApplet.visMode(): event action exists already"
else:
self.eventAction = Tiara.TiaraVisEventAction()
# now later self.tiaraSim.AddVisRunAction()
self.tiaraSim.AddTiaraEventAction(self.eventAction)
return
def timedMode(self, time, randomNumFileName = ""):
if self.eventAction:
print "TiaraApplet.timedMode(): event action exists already"
else:
self.eventAction = Tiara.TiaraTimedEventAction(time)
if randomNumFileName:
self.eventAction.SetRnadomNumFilename(randomNumFileName)
self.tiaraSim.AddTiaraEventAction(self.eventAction)
return
def buildColimator(self):
posColi = \
CLHEP.Hep3Vector(0,0, self.tiaraSpecs.
dimensions.targetPosZ +
self.tiaraSpecs.
dimensions.distTargetExperiment +
self.tiaraSpecs.\
experiment.colWidth/2)
logCol = self.tiaraHall.BuildCollimator(self.tiaraSpecs.\
experiment.colWidth,
"iron",
"air")
self.tiaraHall.PlaceExpComponent(posColi,
logCol,
"colimator")
return
def buildShield(self):
log = self.tiaraHall.BuildShield(self.tiaraSpecs.\
experiment.shieldWidth,
self.tiaraSpecs.\
experiment.shieldMaterial)
posShield = CLHEP.Hep3Vector(0,0, self.tiaraSpecs.
dimensions.targetPosZ +
self.tiaraSpecs.
dimensions.
distTargetExperiment +
self.tiaraSpecs.experiment.
colWidth +
self.tiaraSpecs.experiment.\
shieldWidth/2)
self.tiaraHall.PlaceExpComponent(posShield, log, "shield")
return
def buildGeometry(self):
self.tiaraHall.BuildGeometry(self.tiaraSpecs.dimensions)
if self.noComponents != 1:
self.tiaraHall.CreateComponents()
if self.tiaraSpecs.experiment.colWidth > 0:
self.buildColimator()
self.buildShield()
def createCellScorers(self):
self.cellScorer = []
tally = Tiara.TiaraTally()
tally.setBinEdges(tiaraSpecifications.\
tallyBinEdges[self.tiaraSpecs.\
experiment.energy])
for det in self.scoreDets:
det.scorer = None
if self.hf:
det.scorer = \
Tiara.\
TiaraCellScorer(self.hf,
det.name,
self.tiaraSpecs.
experiment.binEdgesScinti,
self.tiaraSpecs.
experiment.binEdgesBonner,
tally)
else:
det.scorer = \
Tiara.\
TiaraCellScorer(det.name,
tally)
self.cellScorer.append(det.scorer)
def buildDetectors(self):
tally = Tiara.TiaraTally()
tally.setBinEdges(tiaraSpecifications.\
tallyBinEdges[self.tiaraSpecs.
experiment.energy])
physSrcDet = self.tiaraHall.AddSourceDetector()
self.scSrc = None
if self.hf:
self.scSrc = Tiara.\
TiaraCellScorer(self.hf,
"source_detector",
self.tiaraSpecs.
experiment.binEdgesScinti,
self.tiaraSpecs.
experiment.binEdgesBonner,
tally)
else:
self.scSrc = Tiara.\
TiaraCellScorer("source_detector",
tally)
self.scoreDets = self.scoreDetectorCreator.\
createScoreDetectors(self.tiaraHall)
self.createCellScorers()
self.cellScorerStore.AddTiaraCellScorer(self.scSrc,
G4Kernel.G4GeometryCell(physSrcDet,
0))
for det in self.scoreDets:
self.cellScorerStore.AddTiaraCellScorer(det.scorer,
G4Kernel.\
G4GeometryCell(det.
phys,
0))
self.scorer = G4Kernel.G4CellStoreScorer(self.cellScorerStore.
GetG4VCellScorerStore())
self.eventAction.SetScorerStore(self.cellScorerStore)
return
def setPhysics(self):
self.tiaraSim.SetPhysicsList(self.physicsList)
return
def visAdd(self):
self.tiaraSim.AddVisRunAction()
return
def setPrimaryGenerator(self, primGen):
self.primGen = primGen
self.tiaraSim.SetPrimaryGenerator(self.primGen)
return
def fillShelve(self, shelveDB):
t = self.primGen.GetTally()
shelveDB["generatorTally"] = tallyData.createTallyDat(t)
t = self.scSrc.GetTally()
shelveDB["sourceDetectorTally"] = tallyData.createTallyDat(t)
for det in self.scoreDets:
t = det.scorer.GetTally()
shelveDB[det.name + "Tally"] = tallyData.createTallyDat(t)
shelveDB["runTime"] = self.eventAction.GetTotalProcessedTime()
def config(self):
self.buildDetectors()
self.tiaraSim.initialize()
if len(self.particleCut) > 0:
for p in self.particleCut:
self.tiaraSim.AddParticleCut(p, self.particleCut[p]);
self.sampler.PrepareScoring(self.scorer)
self.sampler.Configure()
@@ -1,42 +0,0 @@
# $Id: tiaraDetectors.py,v 1.4 2004/06/09 15:04:36 daquinog Exp $
# -------------------------------------------------------------------
# GEANT4 tag $Name: geant4-09-02 $
# -------------------------------------------------------------------
#
import CLHEP
import G4Kernel
class ScoreDetector(object):
def __init__(self, name):
self.name = name
self.phys = ""
self.scorer = ""
class DetectorSlab(object):
def __init__(self):
pass
def createScoreDetectors(self, tiaraHall):
scoreDets = []
scoreDets.append(ScoreDetector("detectorSlab"))
scoreDets[0].phys = tiaraHall.AddDetectorSlab(scoreDets[0].name)
print "+++ DetectorSlab: created slab detector."
return scoreDets
class ThreeZylindricDetectors(object):
def __init__(self):
pass
def createScoreDetectors(self, tiaraHall):
scoreDets = []
scoreDets.append(ScoreDetector("detector_00"))
scoreDets.append(ScoreDetector("detector_20"))
scoreDets.append(ScoreDetector("detector_40"))
dist = 0.0
for det in scoreDets:
if dist > 0.0:
det.phys = tiaraHall.AddPhysicalRingDetector(dist,
det.name)
else:
det.phys = tiaraHall.AddPhysicalDetector(dist, det.name)
dist += 20*CLHEP.cm
print "+++ ThreeZylindricDetectors: created 3 zylindric detectors"
return scoreDets
@@ -1,91 +0,0 @@
# $Id: tiaraGenerators.py,v 1.3 2004/06/09 15:04:36 daquinog Exp $
# -------------------------------------------------------------------
# GEANT4 tag $Name: geant4-09-02 $
# -------------------------------------------------------------------
#
import string
import tiaraSpecifications
import Tiara
import os
tiara_dir = os.environ["TIARA_BASE"]
class TiaraPrimaryGenerator(object):
def __init__(self, tiaraSpecs):
self.name = "preIntegratedSource"
self.eSamp = Tiara.TiaraSampledEnergy(\
tiaraSpecs.experiment.energy,
tiaraSpecs.experiment.minNeutronEnergyCut,
tiara_dir + "/data/expDataConverted/source.xml",
"_v3")
self.tally = Tiara.TiaraTally()
self.tally.setBinEdges(tiaraSpecifications.\
sourceTallyEdges[tiaraSpecs.experiment.energy])
self.directionGenerator = Tiara.TiaraIsotropicDirections(\
0,
tiaraSpecs.dimensions)
self.primGen = Tiara.TiaraPrimaryGeneratorAction(\
self.eSamp,
self.directionGenerator,
self.tally,
tiaraSpecs.dimensions)
return
class TiaraDPSEnergyGenerator(object):
def __init__(self, tiaraSpecs, xmlName):
self.Name = "dpsSource"
self.eSamp = Tiara.\
TiaraDPSSampledEnergy(tiaraSpecs.
experiment.energy,
tiaraSpecs.
experiment.minNeutronEnergyCut,
xmlName,
"")
self.tally = Tiara.TiaraTally()
if string.find(xmlName,"other") > -1:
if tiaraSpecs.experiment.energy == "43":
self.tally.setBinEdges([0,37.5, 43,50])
else:
if tiaraSpecs.experiment.energy == "68":
self.tally.setBinEdges([0,61, 69,80])
else:
self.tally.setBinEdges(tiaraSpecifications.\
sourceTallyEdges[tiaraSpecs.
experiment.energy])
self.directionGenerator = Tiara.TiaraIsotropicDirections(\
0,
tiaraSpecs.dimensions)
self.primGen = Tiara.TiaraPrimaryGeneratorAction(\
self.eSamp,
self.directionGenerator,
self.tally,
tiaraSpecs.dimensions)
return
class FixedEnergyPrimaryGenerator(object):
def __init__(self, tiaraSpecs):
self.name = "fixedSource"
self.eSamp = Tiara.TiaraFixedEnergyGenerator(\
float(tiaraSpecs.experiment.energy))
self.tally = Tiara.TiaraTally()
self.tally.setBinEdges(tiaraSpecifications.\
sourceTallyEdges[tiaraSpecs.
experiment.energy])
self.directionGenerator = Tiara.TiaraIsotropicDirections(\
0,
tiaraSpecs.dimensions)
self.primGen = Tiara.TiaraPrimaryGeneratorAction(\
self.eSamp,
self.directionGenerator,
self.tally,
tiaraSpecs.dimensions)
return
@@ -1,100 +0,0 @@
# $Id: tiaraSpecifications.py,v 1.3 2003/06/20 12:41:07 dressel Exp $
# -------------------------------------------------------------------
# GEANT4 tag $Name: geant4-09-02 $
# -------------------------------------------------------------------
#
import CLHEP
import G4Kernel
ColWidth = {"43":40*CLHEP.cm,
"68":80*CLHEP.cm}
BinEdgesScinti = {"43":range(4,45),
"68":range(6,45) + range(46,71,2)}
BinEdgesBonner = {"43": [4.500E+07,
3.500E+07,
2.750E+07,
2.250E+07,
1.750E+07,
1.350E+07,
1.000E+07,
6.700E+06,
4.490E+06,
3.010E+06,
2.020E+06,
1.350E+06,
9.070E+05,
4.980E+05,
2.240E+05,
8.650E+04,
1.500E+04,
3.350E+03,
4.540E+02,
2.260E+01,
5.040E+00,
1.120E+00,
4.140E-01,
1.000E-04],
"68": [ 8.000E+07,
6.500E+07,
5.500E+07,
4.500E+07,
3.500E+07,
2.750E+07,
2.250E+07,
1.750E+07,
1.350E+07,
1.000E+07,
6.700E+06,
4.490E+06,
3.010E+06,
2.020E+06,
1.350E+06,
9.070E+05,
4.980E+05,
2.240E+05,
8.650E+04,
1.500E+04,
3.350E+03,
4.540E+02,
2.260E+01,
5.040E+00,
1.120E+00,
4.140E-01,
1.000E-04]}
tallyBinEdges = {}
tallyBinEdges["43"] = [0,10,35,45]
tallyBinEdges["68"] = [0,10,60,70]
sourceTallyEdges = {}
sourceTallyEdges["43"] = [0,36.3, 45.5,50]
sourceTallyEdges["68"] = [0,60.8, 72.5,80]
class Experiment(object):
def __init__(self,
energy,
minNeutronEnergyCut,
particleCut,
shieldWidth,
shieldMaterial):
self.energy = "%(energy)d" % vars()
self.minNeutronEnergyCut = minNeutronEnergyCut
self.particleCut = particleCut
self.shieldWidth = shieldWidth
self.shieldMaterial = shieldMaterial
self.binEdgesBonner = BinEdgesBonner[self.energy]
self.binEdgesScinti = BinEdgesScinti[self.energy]
self.colWidth = 0
if self.shieldWidth <= 50.0*CLHEP.cm:
self.colWidth = ColWidth[self.energy]
class Specifications(object):
def __init__(self,dimensions, experiment, materials):
self.dimensions = dimensions
self.experiment = experiment
self.materials = materials
@@ -1,137 +0,0 @@
# $Id: variableGeometry.py,v 1.2 2003/06/16 17:06:45 dressel Exp $
# -------------------------------------------------------------------
# GEANT4 tag $Name: geant4-09-02 $
# -------------------------------------------------------------------
#
import G4Kernel
import parallelHall
import posLog
class VariableSlobedGeometry(object):
def __init__(self,\
tiaraSpecs,
cellSizeImportanceList,
parallelGeo):
self.arrPosLogVol = []
self.normalCellSolids = []
self.logNormCells = []
self.lastCellSolid = None
self.logLastCell = None
self.createCells(tiaraSpecs,
cellSizeImportanceList, parallelGeo)
def createCells(self, tiaraSpecs,
cellSizeImportanceList, parallelGeo):
nImps = len(cellSizeImportanceList)
zCellStart = tiaraSpecs.dimensions.targetPosZ + \
tiaraSpecs.dimensions.distTargetExperiment + \
tiaraSpecs.experiment.colWidth
zCellRegion = parallelGeo.halfLength - zCellStart
print "zCellStart", zCellStart, "zCellRegion", zCellRegion
vacuum = tiaraSpecs.materials.GetMaterial("vacuum")
for i in range(nImps):
ncsName = "cellBox_%(i)d" % vars()
print "i", i, "cswidth", cellSizeImportanceList[i]["width"]
ncs = G4Kernel.G4Box(ncsName,
parallelGeo.halfWidth,
parallelGeo.halfWidth,
0.5 * cellSizeImportanceList[i]["width"])
self.normalCellSolids.append(ncs)
nclName = "cellLog_%(i)d" % vars()
ncl = G4Kernel.G4LogicalVolume(ncs,
vacuum,
nclName)
self.logNormCells.append(ncl)
zPos = zCellStart
for i in range(nImps):
zPos += 0.5 * cellSizeImportanceList[i]["width"]
print "zPos", zPos, "cellNum", i
self.arrPosLogVol.append(posLog.PosLog(zPos, self.logNormCells[i]))
zPos += 0.5 * cellSizeImportanceList[i]["width"]
allCellWidth = 0.0
for i in range(nImps):
allCellWidth+=cellSizeImportanceList[i]["width"]
print "allCellWidth", allCellWidth
lengthLastCell = zCellRegion - allCellWidth
self.lastCellSolid = G4Kernel.G4Box("lastCellBox",
parallelGeo.halfWidth,
parallelGeo.halfWidth,
lengthLastCell/2)
self.logLastCell = G4Kernel.G4LogicalVolume(self.lastCellSolid,
vacuum,
"lastCellLog")
zPos += lengthLastCell/2
print "last cell zPos", zPos, "length", lengthLastCell
self.arrPosLogVol.append(posLog.PosLog(zPos, self.logLastCell))
def getArrPosLogVol(self):
return self.arrPosLogVol
class VariableImpSlabGeometry(object):
def __init__(self, tiaraSpecs,
parallelGeo = None):
self.tiaraSpecs = tiaraSpecs
self.cellSizeImportanceList = []
self.parallelGeo = parallelGeo
self.iStore = None
self.geometryCells = []
self.base = 0.0
self.nameExt = "-variableCellWidth"
def addCellImportance(self, width, faktor):
self.cellSizeImportanceList.append(
{"width":width, "faktor":faktor})
def construct(self):
nImps = len(self.cellSizeImportanceList)
if nImps>0:
for i in range(nImps):
self.base+=1.0*self.cellSizeImportanceList[i]["faktor"]
self.base/=nImps
self.createParallelGeometry(self.tiaraSpecs)
self.setImportances()
def createParallelGeometry(self, tiaraSpecs):
self.parallelGeo = parallelHall.ParallelHall(tiaraSpecs)
self.slobedGeo = VariableSlobedGeometry(\
tiaraSpecs,
self.cellSizeImportanceList,
self.parallelGeo)
self.parallelGeo.placeCells(self.slobedGeo.getArrPosLogVol())
self.iStore = G4Kernel.G4IStore(self.parallelGeo.getWorldVolume())
self.geometryCells = self.parallelGeo.getGeometryCells()
def setImportances(self):
worldCell = G4Kernel.G4GeometryCell(self.parallelGeo.\
getWorldVolume(), 0)
self.iStore.AddImportanceGeometryCell(1, worldCell)
nCells = len(self.geometryCells)
nImps = len(self.cellSizeImportanceList)
if ((nCells - 1) != nImps):
print "VariableImpSlabGeometry: ERROR importances and cells don't mach!", nCells, nImps
importance = 1
for i in range(nImps):
cell = self.geometryCells[i]
importance*=self.cellSizeImportanceList[i]["faktor"]
print "i=", importance
self.iStore.AddImportanceGeometryCell(importance, cell)
lastCell = self.geometryCells[nCells-1]
print "last cells i=", importance
self.iStore.AddImportanceGeometryCell(importance, lastCell)
def getWorldVolume(self):
return self.parallelGeo.getWorldVolume()
def getImportanceStore(self):
return self.iStore
-51
View File
@@ -1,51 +0,0 @@
# $Id: swig.gmk,v 1.6 2006/06/25 14:07:23 ahoward Exp $
# --------------------------------------------------------------
# swig.gmk Michael Dressel
# --------------------------------------------------------------
libdirWrapper = $(G4WORKDIR)/tmp/$(G4SYSTEM)/$(name)
SWIGINC = $(wildcard include/*.i)
TMP = $(subst .i,_wrap.cc,$(SWIGINC))
TMPD = $(subst .i,_wrap.d,$(SWIGINC))
TMPO = $(subst .i,_wrap.o,$(SWIGINC))
TMPSO = $(subst .i,.so,$(SWIGINC))
SWIGCC = $(subst include,src,$(TMP))
SWIGD = $(subst include/,$(libdirWrapper)/,$(TMPD))
objectfilesWrapper = $(subst include,$(libdirWrapper),$(TMPO))
SWIGSO = $(subst include/,$(libdirWrapper)/_,$(TMPSO))
moduleName = $(subst Wrapper,,$(name))
.PHONY: all swigClean
all: ${G4WORKDIR}/tmp/${G4SYSTEM}/$(name) $(SWIGD) $(SWIGCC) ${G4WORKDIR}/tmp/${G4SYSTEM}/$(name)
CXXFLAGS += -w
ifdef G4ANALYSIS_USE
SWIGFLAGS += -DG4ANALYSIS_USE
endif
MYLIBS = $(subst -l$(name),,$(LDLIBS))
$(SWIGSO): $(objectfilesWrapper) $(SWIG_OBJ_DEP)
@echo Creating shared library: $(libdirWrapper)/$@
$(CXX) -Wl,-soname,$(@F) -shared $(LDFLAGS) $(objectfilesWrapper) $(SWIG_OBJ_DEP) $(MYLIBS) -lc -o $(SWIGSO)
src/%_wrap.cc: include/%.i
$(SWIG) -python -c++ -shadow -no_default $(SWIGFLAGS) \
${SWIG_INCDIRS} \
-o $@ $<
@mv src/$(moduleName).py ./
${G4WORKDIR}/tmp/${G4SYSTEM}/$(name):
@mkdir ${G4WORKDIR}/tmp/${G4SYSTEM}/$(name)
swigClean:
@echo Cleaning up $(moduleName).py, $(SWIGCC)
@rm -f $(moduleName).py
@rm -f $(SWIGCC)
@@ -1,56 +0,0 @@
# $Id: hadronic_lists.gmk,v 1.1 2006/06/23 14:33:48 ahoward Exp $
# --------------------------------------------------------------
# hadronic physics-lists setup
# --------------------------------------------------------------
ifndef G4LISTS_BASE
EXTRALIBS += -L$(G4LIB)/plists/$(G4SYSTEM)
G4LISTS_BASE = $(G4INSTALL)/physics_lists
else
EXTRALIBS += -L$(G4LISTS_BASE)/hadronic/plists/lib/$(G4SYSTEM)
endif
EXTRALIBS += -lFTFP
EXTRALIBS += -lLHEP
EXTRALIBS += -lLHEP_BERT_HP
EXTRALIBS += -lLHEP_BIC_HP
EXTRALIBS += -lLHEP_LEAD_HP
EXTRALIBS += -lLHEP_PRECO
EXTRALIBS += -lQGSP_BERT
EXTRALIBS += -lLHEP_PRECO_HP
EXTRALIBS += -lQGSC
EXTRALIBS += -lQGSC_LEAD
EXTRALIBS += -lQGSC_LEAD_HP
EXTRALIBS += -lQGSP
EXTRALIBS += -lQGSP_HP
EXTRALIBS += -lQGSP_BERT_HP
EXTRALIBS += -lQGSP_BIC
EXTRALIBS += -lQBBC
EXTRALIBS += -lPackaging
CPPFLAGS += -I$(G4LISTS_BASE)/hadronic/FTFC/include
CPPFLAGS += -I$(G4LISTS_BASE)/hadronic/FTFP/include
CPPFLAGS += -I$(G4LISTS_BASE)/hadronic/LBE/include
CPPFLAGS += -I$(G4LISTS_BASE)/hadronic/LHEP/include
CPPFLAGS += -I$(G4LISTS_BASE)/hadronic/LHEP_BERT/include
CPPFLAGS += -I$(G4LISTS_BASE)/hadronic/LHEP_BIC/include
CPPFLAGS += -I$(G4LISTS_BASE)/hadronic/LHEP_GN/include
CPPFLAGS += -I$(G4LISTS_BASE)/hadronic/LHEP_HP/include
CPPFLAGS += -I$(G4LISTS_BASE)/hadronic/LHEP_BERT_HP/include
CPPFLAGS += -I$(G4LISTS_BASE)/hadronic/LHEP_BIC_HP/include
CPPFLAGS += -I$(G4LISTS_BASE)/hadronic/LHEP_LEAD/include
CPPFLAGS += -I$(G4LISTS_BASE)/hadronic/LHEP_LEAD_HP/include
CPPFLAGS += -I$(G4LISTS_BASE)/hadronic/LHEP_PRECO/include
CPPFLAGS += -I$(G4LISTS_BASE)/hadronic/LHEP_PRECO_HP/include
CPPFLAGS += -I$(G4LISTS_BASE)/hadronic/Packaging/include
CPPFLAGS += -I$(G4LISTS_BASE)/hadronic/QGSC/include
CPPFLAGS += -I$(G4LISTS_BASE)/hadronic/QGSC_LEAD/include
CPPFLAGS += -I$(G4LISTS_BASE)/hadronic/QGSC_LEAD_HP/include
CPPFLAGS += -I$(G4LISTS_BASE)/hadronic/QGSP/include
CPPFLAGS += -I$(G4LISTS_BASE)/hadronic/QGSP_BERT/include
CPPFLAGS += -I$(G4LISTS_BASE)/hadronic/QGSP_BIC/include
CPPFLAGS += -I$(G4LISTS_BASE)/hadronic/QGSP_BERT_HP/include
CPPFLAGS += -I$(G4LISTS_BASE)/hadronic/QGSP_GN/include
CPPFLAGS += -I$(G4LISTS_BASE)/hadronic/QGSP_HP/include
CPPFLAGS += -I$(G4LISTS_BASE)/hadronic/QGSP_Model/include
CPPFLAGS += -I$(G4LISTS_BASE)/hadronic/QBBC/include
@@ -1,102 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// $Id: TiaraCellScorer.hh,v 1.4 2006/06/29 15:43:19 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ----------------------------------------------------------------------
// Class TiaraCellScorer
//
// Class description:
//
// This class is an example how to build a customized cell scorer
// derived from G4VCellScorer that also uses the G4CellScorer.
//
// Author: Michael Dressel (Michael.Dressel@cern.ch)
// ----------------------------------------------------------------------
#ifndef TiaraCellScorer_hh
#define TiaraCellScorer_hh TiaraCellScorer_hh
#include "G4CellScoreComposer.hh"
#include "G4CellScorer.hh"
#include "G4VCellScorer.hh"
#include <vector>
#ifdef G4ANALYSIS_USE
#include "AIDA/AIDA.h"
#endif
#include "TiaraTally.hh"
class TiaraCellScorer : public G4VCellScorer{
public:
#ifdef G4ANALYSIS_USE
TiaraCellScorer(AIDA::IHistogramFactory *hf,
const G4String &histBaseName,
const std::vector<double> & binEdgesScinti,
const std::vector<double> & binEdgesBonner,
const TiaraTally &tally);
#else
TiaraCellScorer(const G4String &histBaseName,
const TiaraTally &tally);
#endif
virtual ~TiaraCellScorer();
virtual void ScoreAnExitingStep(const G4Step &aStep,
const G4GeometryCell &gCell);
virtual void ScoreAnEnteringStep(const G4Step &aStep,
const G4GeometryCell &gCell);
virtual void ScoreAnInVolumeStep(const G4Step &aStep,
const G4GeometryCell &gCell);
const G4CellScorer &GetG4CellScorer() const {
return fG4CellScorer;
}
const TiaraTally &GetTally() const ;
void EndOfEventAction();
private:
void FillHisto(const G4Step &aStep);
G4CellScorer fG4CellScorer;
G4String fBaseName;
#ifdef G4ANALYSIS_USE
AIDA::IHistogram1D* fEnergyHisto;
AIDA::IHistogram1D* fEnergyFluxHisto;
AIDA::IHistogram1D* fEnergyHistoBonner;
AIDA::IHistogram1D* fEnergyFluxHistoBonner;
#endif
TiaraTally fTally;
};
#endif
@@ -1,85 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// $Id: TiaraCellScorerStore.hh,v 1.3 2006/06/29 15:43:22 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ----------------------------------------------------------------------
// Class TiaraCellScorerStore
//
// Class description:
//
// This class is a cell customized cell scorer store.
// Nevertheless the standard G4CellScorer may be created with this class
// simular to the G4CellScorerStore. In addition this class
// stores TiaraCellScorer pointers.
// This class delivers a map with the G4CellScorer objects
// to be printed with the G4ScorerTable class.
//
// Author: Michael Dressel (Michael.Dressel@cern.ch)
// ----------------------------------------------------------------------
#ifndef TiaraCellScorerStore_hh
#define TiaraCellScorerStore_hh TiaraCellScorerStore_hh
#include <map>
#include "G4GeometryCell.hh"
#include "G4GeometryCellComp.hh"
#include "globals.hh"
#include "G4VCellScorerStore.hh"
#include "G4CellScorerStore.hh"
class G4CellScorer;
class IHistogram1D;
class TiaraCellScorer;
//typedef std::map<G4GeometryCell, G4CellScorer *, G4GeometryCellComp> G4MapGeometryCellCellScorer;
typedef std::map<G4GeometryCell,TiaraCellScorer *, G4GeometryCellComp> TiaraMapGeometryCellTiaraCellScorer;
class TiaraCellScorerStore : public G4VCellScorerStore {
public:
TiaraCellScorerStore();
virtual ~TiaraCellScorerStore(){}
virtual G4VCellScorer *GetCellScore(const G4GeometryCell &gCell);
G4CellScorer *AddG4CellScorer(const G4GeometryCell &gCell);
const G4MapGeometryCellCellScorer &GetMapGeometryCellCellScorer() ;
void AddTiaraCellScorer(TiaraCellScorer *tiaraCellScorer,
const G4GeometryCell &gCell);
const TiaraMapGeometryCellTiaraCellScorer &GetMapGeometryCellTiaraCellScorer() const ;
void EndOfEventAction();
private:
G4MapGeometryCellCellScorer fMapGeometryCellCellScorer;
TiaraMapGeometryCellTiaraCellScorer fMapGeometryCellTiaraCellScorer;
};
#endif
@@ -1,56 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: TiaraConcreteShieldA.hh,v 1.4 2006/06/29 15:43:25 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ----------------------------------------------------------------------
//
// Class TiaraConcreteShieldA
//
#ifndef TiaraConcreteShieldA_hh
#define TiaraConcreteShieldA_hh TiaraConcreteShieldA_hh
#include "TiaraVComponent.hh"
class TiaraDimensions;
class TiaraMaterials;
class TiaraConcreteShieldA : public TiaraVComponent {
public:
TiaraConcreteShieldA(TiaraMaterials &mfac,
const TiaraDimensions &tiaraDimensions);
~TiaraConcreteShieldA();
virtual TiaraParts GetParts();
private:
TiaraParts fTiaraParts;
};
#endif
@@ -1,54 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: TiaraConcreteShieldB.hh,v 1.4 2006/06/29 15:43:28 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ----------------------------------------------------------------------
//
// Class TiaraConcreteShieldB
//
#ifndef TiaraConcreteShieldB_hh
#define TiaraConcreteShieldB_hh TiaraConcreteShieldB_hh
#include "TiaraVComponent.hh"
class TiaraDimensions;
class TiaraMaterials;
class TiaraConcreteShieldB : public TiaraVComponent {
public:
TiaraConcreteShieldB(TiaraMaterials &mfac,
const TiaraDimensions &tiaraDimensions);
~TiaraConcreteShieldB();
virtual TiaraParts GetParts();
private:
TiaraParts fTiaraParts;
};
#endif
@@ -1,82 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: TiaraDPSSampledEnergy.hh,v 1.7 2006/06/29 15:43:31 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ----------------------------------------------------------------------
//
// Class TiaraDPSSampledEnergy
//
#ifndef TiaraDPSSampledEnergy_hh
#define TiaraDPSSampledEnergy_hh TiaraDPSSampledEnergy_hh
#ifdef G4ANALYSIS_USE
#include "TiaraVSourceEnergyGenerator.hh"
#include <memory>
#include <map>
namespace AIDA {
class IDataPointSet;
class ITree;
}
class TiaraDPSSampledEnergy : public TiaraVSourceEnergyGenerator {
public:
TiaraDPSSampledEnergy(const G4String &eng,
G4double minEnergyCut,
const G4String &sourceTree,
const G4String &nameExt = G4String(""));
~TiaraDPSSampledEnergy();
TiaraDPSSampledEnergy(const TiaraDPSSampledEnergy& rhs);
virtual G4double GetEnergy();
virtual TiaraVSourceEnergyGenerator *Clone() const;
TiaraDPSSampledEnergy& operator=(const TiaraDPSSampledEnergy& rhs);
private:
void getBounds(G4int &cL, G4int &cH, G4double v);
//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;
G4double fMinE;
G4double fMaxE;
};
#endif
#endif
@@ -1,74 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: TiaraDimensions.hh,v 1.4 2006/06/29 15:43:34 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ----------------------------------------------------------------------
//
// Class TiaraDimensions
//
#ifndef TiaraDimensions_hh
#define TiaraDimensions_hh TiaraGeometry_hh
#include "globals.hh"
#include "G4ThreeVector.hh"
class TiaraDimensions {
public:
TiaraDimensions();
~TiaraDimensions();
// World volume
G4double worldHalfLength;
G4double worldHalfWidth;
// basic dimensions
G4double targetPosZ;
G4double distTargetWall;
G4double distTargetEndA;
G4double distTargetExperiment;
G4double distTargetEndB;
// beam pipe
G4double pipeRadius;
// radius iron A
G4double radiusIronA;
// experiment width
G4double widthExperiment;
// detector
G4double detectorRadius;
G4double detectorHalfHight;
// source detector
G4double srcDetectorWidth;
};
#endif
@@ -1,96 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: TiaraEnergyCutProcess.hh,v 1.4 2006/06/29 15:43:37 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ----------------------------------------------------------------------
//
// Class TiaraEnergyCutProcess
//
#ifndef TiaraEnergyCutProcess_hh
#define TiaraEnergyCutProcess_hh TiaraEnergyCutProcess_hh
#include "G4VProcess.hh"
#include "G4VTrackTerminator.hh"
class G4VScorer;
class TiaraEnergyCutProcess : public G4VProcess
{
public: // with description
explicit TiaraEnergyCutProcess(G4double minEnergyCut);
virtual ~TiaraEnergyCutProcess();
virtual G4double
PostStepGetPhysicalInteractionLength(const G4Track& aTrack,
G4double previousStepSize,
G4ForceCondition* condition);
// make processed being forced
virtual G4VParticleChange * PostStepDoIt(const G4Track&, const G4Step&);
// message "scorer" with G4Step and a G4GeometryCellStep from the "mass"
// geometry
// to be called by the importance process if the track should
// be killed after scoring
virtual const G4String &GetName() const ;
public: // without description
// no operation in AtRestDoIt and AlongStepDoIt
virtual G4double
AlongStepGetPhysicalInteractionLength(const G4Track&,
G4double ,
G4double ,
G4double& ,
G4GPILSelection*);
virtual G4double
AtRestGetPhysicalInteractionLength(const G4Track&,
G4ForceCondition*);
virtual G4VParticleChange* AtRestDoIt(const G4Track&,
const G4Step&);
virtual G4VParticleChange* AlongStepDoIt(const G4Track&,
const G4Step&);
private:
TiaraEnergyCutProcess(const TiaraEnergyCutProcess &);
TiaraEnergyCutProcess &operator=(const TiaraEnergyCutProcess &);
private:
G4double fMinEnergyCut;
};
#endif
@@ -1,41 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: TiaraFileAcess.hh,v 1.4 2006/06/29 15:43:40 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ----------------------------------------------------------------------
//
// Function TiaraFileAcess
//
#ifndef TiaraFileAcess_hh
#define TiaraFileAcess_hh TiaraFileAcess_hh
#include "globals.hh"
void checkFileIsReadable(const G4String &fileName,
const G4String &caller) ;
#endif
@@ -1,49 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: TiaraFixedEnergyGenerator.hh,v 1.4 2006/06/29 15:43:43 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ----------------------------------------------------------------------
//
// Class TiaraFixedEnergyGenerator
//
#ifndef TiaraFixedEnergyGenerator_hh
#define TiaraFixedEnergyGenerator_hh TiaraFixedEnergyGenerator_hh
#include "TiaraVSourceEnergyGenerator.hh"
class TiaraFixedEnergyGenerator : public TiaraVSourceEnergyGenerator{
public:
explicit TiaraFixedEnergyGenerator(G4double energy);
~TiaraFixedEnergyGenerator();
virtual G4double GetEnergy();
virtual TiaraVSourceEnergyGenerator *Clone() const;
private:
G4double fEnergy;
};
#endif
@@ -1,98 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: TiaraGeometry.hh,v 1.5 2006/06/29 15:43:46 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ----------------------------------------------------------------------
//
// Class TiaraGeometry
//
#ifndef TiaraGeometry_hh
#define TiaraGeometry_hh TiaraGeometry_hh
#include <set>
#include "TiaraDimensions.hh"
#include "G4VUserDetectorConstruction.hh"
#include "TiaraVComponent.hh"
typedef std::set<TiaraVComponent*> TiaraComponents;
class G4Material;
class G4LogicalVolume;
class TiaraMaterials;
class TiaraGeometry : public G4VUserDetectorConstruction {
public:
TiaraGeometry(TiaraMaterials &matfac);
~TiaraGeometry();
void BuildGeometry(const TiaraDimensions &td);
virtual G4VPhysicalVolume* Construct();
G4Material *GetWorldMaterial();
G4VPhysicalVolume *PlaceExpComponent(const G4ThreeVector &pos,
G4LogicalVolume *logVol,
const G4String &physName);
G4LogicalVolume *BuildCollimator(G4double width,
const G4String &outerMatName,
const G4String &innerMatName);
G4LogicalVolume *BuildShield(G4double width,
const G4String &matName);
G4VPhysicalVolume *AddPhysicalDetector(G4double xDist,
const G4String &physName);
G4VPhysicalVolume *AddPhysicalRingDetector(G4double xDist,
const G4String &physName);
G4VPhysicalVolume *AddDetectorSlab( const G4String &physName);
G4VPhysicalVolume *AddSourceDetector();
void CreateComponents();
private:
void ConstHall();
void PlaceComponents();
G4LogicalVolume *fLogicalWorld;
G4VPhysicalVolume *fWorldVolume;
TiaraMaterials &fMaterials;
TiaraComponents fTiaraComponents;
G4double fShieldWidth;
G4double fColimatorWidth;
G4LogicalVolume *fColliPipeLogVol;
TiaraDimensions fTiaraDimensions;
};
#endif
@@ -1,54 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: TiaraIronShieldA.hh,v 1.4 2006/06/29 15:43:49 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ----------------------------------------------------------------------
//
// Class TiaraIronShieldA
//
#ifndef TiaraIronShieldA_hh
#define TiaraIronShieldA_hh TiaraIronShieldA_hh
#include "TiaraVComponent.hh"
class TiaraDimensions;
class TiaraMaterials;
class TiaraIronShieldA : public TiaraVComponent {
public:
TiaraIronShieldA(TiaraMaterials &mfac,
const TiaraDimensions &tiaraDimensions);
~TiaraIronShieldA();
virtual TiaraParts GetParts();
private:
TiaraParts fTiaraParts;
};
#endif
@@ -1,55 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: TiaraIronShieldB.hh,v 1.4 2006/06/29 15:43:51 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ----------------------------------------------------------------------
//
// Class TiaraIronShieldB
//
#ifndef TiaraIronShieldB_hh
#define TiaraIronShieldB_hh TiaraIronShieldB_hh
#include "TiaraVComponent.hh"
class TiaraDimensions;
class TiaraMaterials;
class TiaraIronShieldB : public TiaraVComponent {
public:
TiaraIronShieldB(TiaraMaterials &mfac,
const TiaraDimensions &tiaraDimensions);
~TiaraIronShieldB();
virtual TiaraParts GetParts();
private:
TiaraParts fTiaraParts;
};
#endif
@@ -1,71 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// $Id: TiaraPrimaryGeneratorAction.hh,v 1.1.1.2 2006/06/29 15:44:07 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
#ifndef TiaraPrimaryGeneratorAction_hh
#define TiaraPrimaryGeneratorAction_hh TiaraPrimaryGeneratorAction_hh
#include "G4VUserPrimaryGeneratorAction.hh"
#include "TiaraTally.hh"
class G4ParticleGun;
class G4Event;
class TiaraVSourceEnergyGenerator;
class TiaraVDirectionGenerator;
class TiaraDimensions;
class TiaraPrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
{
public:
TiaraPrimaryGeneratorAction(const TiaraVSourceEnergyGenerator& eG,
const TiaraVDirectionGenerator& dG,
const TiaraTally &tally,
const TiaraDimensions &tiaraDimensions);
TiaraPrimaryGeneratorAction(const TiaraPrimaryGeneratorAction &rhs);
~TiaraPrimaryGeneratorAction();
void GeneratePrimaries(G4Event* anEvent);
const TiaraVSourceEnergyGenerator *GetEnergyGenerator() const;
const TiaraTally &GetTally() const;
TiaraPrimaryGeneratorAction &operator=
(const TiaraPrimaryGeneratorAction &rhs);
private:
TiaraVSourceEnergyGenerator *fEnergyGenerator;
TiaraVDirectionGenerator *fDirectionGenerator;
G4ParticleGun* particleGun;
TiaraTally fTally;
};
#endif
@@ -1,37 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: TiaraRandom.hh,v 1.4 2006/06/29 15:44:09 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ----------------------------------------------------------------------
//
// global function
//
void setRandomSeed(long seed= 345354);
void setRandomStatus(const char *filename);
void saveRandomStatus(const char *filename);
@@ -1,98 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: TiaraSim.hh,v 1.5 2006/06/29 15:44:14 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ----------------------------------------------------------------------
//
// Class TiaraSim
//
#ifndef TiaraSim_hh
#define TiaraSim_hh TiaraSim_hh
#include "G4UIterminal.hh"
#include <map>
#include <string>
#include "G4ProcessPlacer.hh"
class G4RunManager;
class G4VUserPrimaryGeneratorAction;
class G4VUserPhysicsList;
class TiaraPhysicsList;
class G4VUserDetectorConstruction;
class G4VisManager;
class TiaraStackingAction;
class G4UserEventAction;
class TiaraEnergyCutProcess;
class TiaraSim {
public:
~TiaraSim();
static TiaraSim &GetTiaraSim();
void SetGeometry(G4VUserDetectorConstruction *geo);
void SetPrimaryGenerator(G4VUserPrimaryGeneratorAction *primGen);
void SetPhysicsList(G4VUserPhysicsList *physList);
void initialize();
void initializeVisManager();
void startSession();
void AddParticleCut(const std::string &particle,
G4double cut);
void AddTiaraEventAction(G4UserEventAction *eventAction);
void AddVisRunAction();
void BeamOn(G4int nEvents);
private:
TiaraSim();
static TiaraSim *fTiaraSim;
G4RunManager *frunMgr;
G4VisManager *fVisManager;
G4UIterminal fSession;
G4VUserDetectorConstruction *fGeometry;
G4VUserPrimaryGeneratorAction *fPrimary;
G4VUserPhysicsList *fPhysics;
std::vector<TiaraEnergyCutProcess *> fCutProcessVector;
std::vector<G4ProcessPlacer> fPlacers;
TiaraStackingAction *fStackingAction;
G4UserEventAction *fUserEventAction;
};
#endif
@@ -1,64 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: TiaraTally.hh,v 1.5 2006/06/29 15:44:18 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ----------------------------------------------------------------------
//
// Class TiaraTally
//
#ifndef TiaraTally_hh
#define TiaraTally_hh TiaraTally_hh
#include "TiaraMeasure.hh"
#include <vector>
#include <map>
typedef std::map<G4double, std::pair<G4double, TiaraMeasure > > TiaraTallyData;
class TiaraTally{
public:
TiaraTally();
~TiaraTally();
void setBinEdges(const std::vector<double> & binEdges);
void fill(G4double x, G4double w);
void EndOfEventAction();
TiaraMeasure measure(G4int i);
std::vector<double> binEdges();
G4int size();
private:
std::vector<double> fBinEdges;
G4double fLowestEdge;
TiaraTallyData fMapHighEdgeToMeasure;
};
#endif
@@ -1,50 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: TiaraVDirectionGenerator.hh,v 1.4 2006/06/29 15:44:26 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ----------------------------------------------------------------------
//
// Class TiaraVDirectionGenerator
//
#ifndef TiaraVDirectionGenerator_hh
#define TiaraVDirectionGenerator_hh TiaraVDirectionGenerator_hh
#include "globals.hh"
#include "G4ThreeVector.hh"
class TiaraVDirectionGenerator {
public:
TiaraVDirectionGenerator();
virtual ~TiaraVDirectionGenerator();
virtual G4ThreeVector GetDirection() = 0;
virtual TiaraVDirectionGenerator *Clone() const = 0;
};
#endif
@@ -1,49 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: TiaraVSourceEnergyGenerator.hh,v 1.4 2006/06/29 15:44:29 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ----------------------------------------------------------------------
//
// Class TiaraVSourceEnergyGenerator
//
#ifndef TiaraVSourceEnergyGenerator_hh
#define TiaraVSourceEnergyGenerator_hh TiaraVSourceEnergyGenerator_hh
#include "globals.hh"
class TiaraVSourceEnergyGenerator {
public:
TiaraVSourceEnergyGenerator();
virtual ~TiaraVSourceEnergyGenerator();
virtual G4double GetEnergy() = 0;
virtual TiaraVSourceEnergyGenerator *Clone() const = 0;
};
#endif
@@ -1,149 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// $Id: TiaraCellScorer.cc,v 1.5 2006/06/29 15:44:37 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
//
// TiaraCellScorer.cc
//
// ----------------------------------------------------------------------
#include <cmath>
#include "TiaraCellScorer.hh"
#include "G4GeometryCell.hh"
#include "G4Step.hh"
#include "G4StepPoint.hh"
#include "G4CellScoreValues.hh"
#include "Randomize.hh"
#ifdef G4ANALYSIS_USE
TiaraCellScorer::TiaraCellScorer(AIDA::IHistogramFactory *hf,
const G4String &histBaseName,
const std::vector<double>
&binEdgesScinti,
const std::vector<double>
&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)),
//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) :
fBaseName(histBaseName),
fTally(tally)
{}
#endif
TiaraCellScorer::~TiaraCellScorer()
{}
void TiaraCellScorer::ScoreAnExitingStep(const G4Step &aStep,
const G4GeometryCell &pre_gCell){
fG4CellScorer.ScoreAnExitingStep(aStep, pre_gCell);
FillHisto(aStep);
}
void TiaraCellScorer::ScoreAnEnteringStep(const G4Step &aStep,
const G4GeometryCell &post_gCell){
fG4CellScorer.ScoreAnEnteringStep(aStep, post_gCell);
return;
}
void TiaraCellScorer::ScoreAnInVolumeStep(const G4Step &aStep,
const G4GeometryCell &post_gCell){
fG4CellScorer.ScoreAnInVolumeStep(aStep, post_gCell);
FillHisto(aStep);
}
void TiaraCellScorer::FillHisto(const G4Step &aStep){
G4StepPoint *p = 0;
p = aStep.GetPreStepPoint();
G4double sl = aStep.GetStepLength() / cm;
G4double w = p->GetWeight();
G4double slw = sl * w;
G4double e(p->GetKineticEnergy());
#ifdef G4ANALYSIS_USE
fEnergyHisto->fill(e, slw);
fEnergyFluxHisto->fill(e, slw*e);
fEnergyHistoBonner->fill(e/eV, slw);
fEnergyFluxHistoBonner->fill(e/eV, slw*e/eV);
#else
G4cout << fBaseName << ": Energy: " << e << ", sl*w: " << slw << "\n";
#endif
fTally.fill(e, slw);
}
void TiaraCellScorer::EndOfEventAction() {
#ifndef G4ANALYSIS_USE
G4cout << fBaseName << ": end of event" << G4endl;
#endif
fTally.EndOfEventAction();
}
const TiaraTally &TiaraCellScorer::GetTally() const {
return fTally;
}
@@ -1,95 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// $Id: TiaraCellScorerStore.cc,v 1.2 2008/06/14 16:56:59 cirrone Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
//
// TiaraCellScorerStore.cc
//
// ----------------------------------------------------------------------
#include "TiaraCellScorerStore.hh"
#include "G4CellScorer.hh"
#include "TiaraCellScorer.hh"
TiaraCellScorerStore::TiaraCellScorerStore()
{}
G4CellScorer *TiaraCellScorerStore::
AddG4CellScorer(const G4GeometryCell &g) {
return fMapGeometryCellCellScorer[g] =
new G4CellScorer;
}
void TiaraCellScorerStore::
AddTiaraCellScorer(TiaraCellScorer *tiaraScorer,
const G4GeometryCell &g) {
fMapGeometryCellTiaraCellScorer[g] = tiaraScorer;
}
void TiaraCellScorerStore::EndOfEventAction() {
for (TiaraMapGeometryCellTiaraCellScorer::iterator it = fMapGeometryCellTiaraCellScorer.begin();
it != fMapGeometryCellTiaraCellScorer.end(); it++) {
(*it).second->EndOfEventAction();
}
}
const G4MapGeometryCellCellScorer &TiaraCellScorerStore::GetMapGeometryCellCellScorer() {
for (TiaraMapGeometryCellTiaraCellScorer::iterator it = fMapGeometryCellTiaraCellScorer.begin();
it != fMapGeometryCellTiaraCellScorer.end(); it++) {
fMapGeometryCellCellScorer[(*it).first] =
new G4CellScorer((*it).second->GetG4CellScorer());
}
return fMapGeometryCellCellScorer;
}
const TiaraMapGeometryCellTiaraCellScorer &TiaraCellScorerStore::GetMapGeometryCellTiaraCellScorer() const {
return fMapGeometryCellTiaraCellScorer;
}
G4VCellScorer *TiaraCellScorerStore::
GetCellScore(const G4GeometryCell &gCell){
TiaraMapGeometryCellTiaraCellScorer::iterator itTiara =
fMapGeometryCellTiaraCellScorer.find(gCell);
if (itTiara != fMapGeometryCellTiaraCellScorer.end()) {
return (*itTiara).second;
}
else {
G4MapGeometryCellCellScorer::iterator it = fMapGeometryCellCellScorer.find(gCell);
if (it != fMapGeometryCellCellScorer.end()) {
return (*it).second;
}
else {
return 0;
}
}
}
@@ -1,104 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: TiaraConcreteShieldB.cc,v 1.4 2006/06/29 15:44:45 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
#include "TiaraConcreteShieldB.hh"
#include "TiaraDimensions.hh"
#include "TiaraMaterials.hh"
#include "G4Box.hh"
#include "G4LogicalVolume.hh"
#include "G4ThreeVector.hh"
#include "G4VisAttributes.hh"
#include "G4Colour.hh"
TiaraConcreteShieldB::
TiaraConcreteShieldB(TiaraMaterials &mfac,
const TiaraDimensions &tiaraDimensions){
G4double halfHight((tiaraDimensions.distTargetEndB -
tiaraDimensions.distTargetEndA) / 2);
G4double radialHalf(0.5 * (tiaraDimensions.worldHalfWidth -
tiaraDimensions.widthExperiment/2));
G4double lateralHalf(0.5 * (tiaraDimensions.widthExperiment/2 +
tiaraDimensions.worldHalfWidth));
G4double radialShift(tiaraDimensions.widthExperiment/2 + radialHalf);
G4double lateralShift(tiaraDimensions.worldHalfWidth - lateralHalf);
G4Box *concretBbox = new G4Box("concretBbox",
lateralHalf,
radialHalf,
halfHight);
G4LogicalVolume *logConcreteBbox =
new G4LogicalVolume(concretBbox,
mfac.GetMaterial("concrete"),
"ConcreteBbox");
G4VisAttributes* pConcreteAVis = new
G4VisAttributes(G4Colour(0.5, 0.5, 0.5));
// pConcreteAVis->SetForceSolid(true);
logConcreteBbox->SetVisAttributes(pConcreteAVis);
TiaraPart tiaraPart;
tiaraPart.rot = 0;
tiaraPart.logVol = logConcreteBbox;
tiaraPart.pos.setZ(tiaraDimensions.targetPosZ +
tiaraDimensions.distTargetEndA + halfHight);
// upper shield
tiaraPart.pos.setX(lateralShift);
tiaraPart.pos.setY(radialShift);
fTiaraParts.push_back(tiaraPart);
// lower shield
tiaraPart.pos.setX(-1*lateralShift);
tiaraPart.pos.setY(-1*radialShift);
fTiaraParts.push_back(tiaraPart);
// right shield
tiaraPart.rot = new G4RotationMatrix();
tiaraPart.rot->set(G4ThreeVector(0, 0, 1), 90 * deg);
tiaraPart.pos.setX(-1* radialShift);
tiaraPart.pos.setY(lateralShift);
fTiaraParts.push_back(tiaraPart);
// left shield
// tiaraPart.rot->set(G4ThreeVector(0, 0, 1), -90);
tiaraPart.pos.setX(radialShift);
tiaraPart.pos.setY(-1*lateralShift);
fTiaraParts.push_back(tiaraPart);
}
TiaraConcreteShieldB::~TiaraConcreteShieldB(){
}
TiaraParts TiaraConcreteShieldB::GetParts(){
return fTiaraParts;
}
@@ -1,168 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: TiaraDPSSampledEnergy.cc,v 1.9 2006/06/29 15:44:48 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
#include "TiaraDPSSampledEnergy.hh"
#ifdef G4ANALYSIS_USE
#include "Randomize.hh"
#include "TiaraFileAcess.hh"
#include "AIDA/AIDA.h"
TiaraDPSSampledEnergy::TiaraDPSSampledEnergy(const G4String &eng,
G4double minEnergyCut,
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)))),
fMinEnergyCut(minEnergyCut),
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());
fEnergy_Flux[p->coordinate(0)->value() * 10] = prob;
if (prob > fMaxProb) {
fMaxProb = prob;
}
}
if (!(fMaxProb > 0)) {
G4Exception("TiaraDPSSampledEnergy::TiaraDPSSampledEnergy: fMaxProb <= 0!");
}
}
TiaraDPSSampledEnergy::TiaraDPSSampledEnergy(const TiaraDPSSampledEnergy& rhs)
: TiaraVSourceEnergyGenerator()
{
*this = rhs;
}
TiaraDPSSampledEnergy& TiaraDPSSampledEnergy::
operator=(const TiaraDPSSampledEnergy& rhs) {
if (this!=&rhs) {
TiaraDPSSampledEnergy &nonConstRhs = static_cast<TiaraDPSSampledEnergy &>(rhs);
fTree = nonConstRhs.fTree;
fSampleDPS = nonConstRhs.fSampleDPS;
fEnergy_Flux = nonConstRhs.fEnergy_Flux;
fMinEnergyCut = nonConstRhs.fMinEnergyCut;
fMaxProb = nonConstRhs.fMaxProb;
fMinE = nonConstRhs.fMinE;
fMaxE = nonConstRhs.fMaxE;
}
return *this;
}
TiaraDPSSampledEnergy::~TiaraDPSSampledEnergy(){
}
TiaraVSourceEnergyGenerator *TiaraDPSSampledEnergy::Clone() const {
return new TiaraDPSSampledEnergy(*this);
}
G4double TiaraDPSSampledEnergy::GetEnergy() {
G4double e(0.0);
while (!(e>fMinEnergyCut)) {
// a factor 10 is introduced to have an integer map
// for .5 values
G4double r(10 * (fMinE + G4UniformRand() * (fMaxE - fMinE) ));
G4int cLow(0);
G4int cHigh(0);
getBounds(cLow,cHigh,r);
G4double dx10(r-cLow); // a facto 10 enters
G4double fLow(fEnergy_Flux[cLow]);
G4double fHigh(fEnergy_Flux[cHigh]);
// if ( (!(fLow>0.0)) || (!(fHigh>0.0)) ) {
// G4cout << "TiaraDPSSampledEnergy::GetEnergy: WARNING: (!(fLow>0.0) || (!(fHigh>0.0) " << G4endl;
// G4cout << "r: " << r << G4endl;
// G4cout << "d: " << d << G4endl;
// G4cout << "cLow: " << cLow << G4endl;
// G4cout << "cHigh: " << cHigh << G4endl;
// }
// G4cout << "fLow: " << fLow << ", fHigh: " << fHigh << G4endl;
G4double dy(fHigh - fLow);
G4double m01(dy/(cHigh-cLow)); // a factor 1/10 enters
G4double p((fLow + m01*dx10)/fMaxProb);
// G4cout << "p: " << p << G4endl;
G4double discard(G4UniformRand());
// G4cout << "discard: " << discard << G4endl;
if (discard < p) {
e = r/10.;
break;
}
}
return e;
}
void TiaraDPSSampledEnergy::getBounds(G4int &cL, G4int &cH, G4double v) {
std::map<int, double>::iterator itH = fEnergy_Flux.upper_bound(v);
cH = itH->first;
std::map<int, double>::iterator itL = --itH;
cL = itL->first;
}
#endif
@@ -1,66 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: TiaraDimensions.cc,v 1.4 2006/06/29 15:44:51 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
#include "TiaraDimensions.hh"
TiaraDimensions::TiaraDimensions() :
// World volume
worldHalfLength(330 * cm),
worldHalfWidth(100 * cm),
// basic dimensions
targetPosZ(-325 * cm),
distTargetWall(176 * cm),
distTargetEndA(396 * cm),
distTargetExperiment(401 * cm),
distTargetEndB(516 * cm),
// beam pipe
pipeRadius((10.9/2) * cm),
// radius iron A
radiusIronA(26 * cm),
// experiment width
widthExperiment(120 * cm),
// detector
detectorRadius(12.7 / 2 * cm),
detectorHalfHight(12.7 / 2 * cm),
// source detector
srcDetectorWidth(0.1 * cm)
{}
TiaraDimensions::~TiaraDimensions()
{}
@@ -1,98 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: TiaraEnergyCutProcess.cc,v 1.6 2006/06/29 15:44:54 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
#include "TiaraEnergyCutProcess.hh"
TiaraEnergyCutProcess::TiaraEnergyCutProcess(G4double minEnergyCut)
:
G4VProcess("TiaraEnergyCutProcess"),
fMinEnergyCut(minEnergyCut)
{
G4VProcess::pParticleChange = new G4ParticleChange;
if (!G4VProcess::pParticleChange) {
G4Exception("ERROR:TiaraEnergyCutProcess::TiaraEnergyCutProcess new failed to create G4ParticleChange!");
}
}
TiaraEnergyCutProcess::~TiaraEnergyCutProcess()
{
delete pParticleChange;
}
G4double TiaraEnergyCutProcess::
PostStepGetPhysicalInteractionLength(const G4Track&,
G4double,
G4ForceCondition* condition)
{
*condition = Forced;
return kInfinity;
}
G4VParticleChange *
TiaraEnergyCutProcess::PostStepDoIt(const G4Track& aTrack, const G4Step &)
{
pParticleChange->Initialize(aTrack);
if (aTrack.GetKineticEnergy() < fMinEnergyCut) {
pParticleChange->ProposeTrackStatus(fStopAndKill);
}
return G4VProcess::pParticleChange;
}
const G4String &TiaraEnergyCutProcess::GetName() const {
return theProcessName;
}
G4double TiaraEnergyCutProcess::
AlongStepGetPhysicalInteractionLength(const G4Track&,
G4double ,
G4double ,
G4double& ,
G4GPILSelection*) {
return -1.0;
}
G4double TiaraEnergyCutProcess::
AtRestGetPhysicalInteractionLength(const G4Track&,
G4ForceCondition*) {
return -1.0;
}
G4VParticleChange* TiaraEnergyCutProcess::AtRestDoIt(const G4Track&,
const G4Step&) {
return 0;
}
G4VParticleChange* TiaraEnergyCutProcess::AlongStepDoIt(const G4Track&,
const G4Step&) {
return 0;
}
@@ -1,47 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: TiaraFixedEnergyGenerator.cc,v 1.4 2006/06/29 15:45:00 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
#include "TiaraFixedEnergyGenerator.hh"
TiaraFixedEnergyGenerator::
TiaraFixedEnergyGenerator(G4double energy) :
TiaraVSourceEnergyGenerator(),
fEnergy(energy)
{}
TiaraFixedEnergyGenerator::~TiaraFixedEnergyGenerator()
{}
G4double TiaraFixedEnergyGenerator::GetEnergy() {
return fEnergy;
}
TiaraVSourceEnergyGenerator *TiaraFixedEnergyGenerator::Clone() const {
return new TiaraFixedEnergyGenerator(fEnergy);
}
@@ -1,343 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: TiaraGeometry.cc,v 1.5 2006/06/29 15:45:03 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
#include "TiaraGeometry.hh"
#include "TiaraDimensions.hh"
#include "G4LogicalVolume.hh"
#include "G4Box.hh"
#include "G4Tubs.hh"
#include "TiaraMaterials.hh"
#include "G4PVPlacement.hh"
#include "TiaraConcreteShieldA.hh"
#include "TiaraIronShieldA.hh"
#include "TiaraConcreteShieldB.hh"
#include "TiaraIronShieldB.hh"
#include "TiaraPart.hh"
#include "G4Colour.hh"
#include "G4VisAttributes.hh"
TiaraGeometry::TiaraGeometry(TiaraMaterials &matfac) :
fLogicalWorld(0),
fWorldVolume(0),
fMaterials(matfac),
fShieldWidth(0),
fColimatorWidth(0),
fColliPipeLogVol(0),
fTiaraDimensions(TiaraDimensions())
{}
TiaraGeometry::~TiaraGeometry()
{}
G4VPhysicalVolume* TiaraGeometry::Construct(){
PlaceComponents();
return fWorldVolume;
}
G4Material *TiaraGeometry::GetWorldMaterial() {
return fMaterials.GetMaterial("vacuum");
}
void TiaraGeometry::ConstHall(){
G4VSolid *worldSolid = new G4Box("worldBox",
fTiaraDimensions.worldHalfWidth,
fTiaraDimensions.worldHalfWidth,
fTiaraDimensions.worldHalfLength);
fLogicalWorld =
new G4LogicalVolume(worldSolid, GetWorldMaterial(), "LogicalWorld");
G4String name("Hall");
fWorldVolume = new
G4PVPlacement(0, G4ThreeVector(0,0,0), fLogicalWorld,
name, 0, false, 0);
}
void TiaraGeometry::CreateComponents(){
fTiaraComponents.
insert(new TiaraConcreteShieldA(fMaterials, fTiaraDimensions));
fTiaraComponents.
insert(new TiaraIronShieldA(fMaterials, fTiaraDimensions));
fTiaraComponents.
insert(new TiaraConcreteShieldB(fMaterials, fTiaraDimensions));
fTiaraComponents.
insert(new TiaraIronShieldB(fMaterials, fTiaraDimensions));
}
G4VPhysicalVolume *TiaraGeometry::
AddPhysicalDetector(G4double xDist,
const G4String &physName) {
G4Tubs *tub = new G4Tubs("detectorTub",
0,
fTiaraDimensions.detectorRadius,
fTiaraDimensions.detectorHalfHight,
0,
360 * deg);
G4ThreeVector pos(xDist, 0, fTiaraDimensions.targetPosZ +
fTiaraDimensions.distTargetExperiment +
fShieldWidth + fColimatorWidth +
fTiaraDimensions.detectorHalfHight);
G4Material *mat = fMaterials.GetMaterial("vacuum");
G4LogicalVolume *logVol =
new G4LogicalVolume(tub, mat, "logDetectorTub");
G4VisAttributes* pVis = new
G4VisAttributes(G4Colour(1, 0, 0));
logVol->SetVisAttributes(pVis);
return PlaceExpComponent(pos, logVol, physName);
}
G4VPhysicalVolume *TiaraGeometry::
AddPhysicalRingDetector(G4double xDist,
const G4String &physName){
if (xDist < fTiaraDimensions.detectorRadius) {
G4cout << "TiaraGeometry::AddPhysicalRingDetector: (xDist < fTiaraDimensions.detectorRadius" << G4endl;
return 0;
}
G4Tubs *tub = new G4Tubs("detectorTub",
xDist - fTiaraDimensions.detectorRadius,
xDist + fTiaraDimensions.detectorRadius,
fTiaraDimensions.detectorHalfHight,
0,
360 * deg);
G4ThreeVector pos(0, 0, fTiaraDimensions.targetPosZ +
fTiaraDimensions.distTargetExperiment +
fShieldWidth + fColimatorWidth +
fTiaraDimensions.detectorHalfHight);
G4Material *mat = fMaterials.GetMaterial("vacuum");
G4LogicalVolume *logVol =
new G4LogicalVolume(tub, mat, "logRingDetectorTub");
G4VisAttributes* pVis = new
G4VisAttributes(G4Colour(1, 0, 0));
logVol->SetVisAttributes(pVis);
return PlaceExpComponent(pos, logVol, physName);
}
G4VPhysicalVolume *TiaraGeometry::
AddDetectorSlab( const G4String &physName) {
G4Tubs *tub = new G4Tubs("detectorTub",
0,
0.5*fTiaraDimensions.widthExperiment,
fTiaraDimensions.detectorHalfHight,
0,
360 * deg);
G4ThreeVector pos(0, 0, fTiaraDimensions.targetPosZ +
fTiaraDimensions.distTargetExperiment +
fShieldWidth + fColimatorWidth +
fTiaraDimensions.detectorHalfHight);
G4Material *mat = fMaterials.GetMaterial("vacuum");
G4LogicalVolume *logVol =
new G4LogicalVolume(tub, mat, "logSlabDetectorTub");
G4VisAttributes* pVis = new
G4VisAttributes(G4Colour(1, 0, 0));
logVol->SetVisAttributes(pVis);
return PlaceExpComponent(pos, logVol, physName);
}
G4VPhysicalVolume *TiaraGeometry::
AddSourceDetector() {
G4Tubs *tub = new G4Tubs("srcTub",
0,
fTiaraDimensions.pipeRadius,
fTiaraDimensions.srcDetectorWidth / 2,
0,
360 * deg);
G4Material *mat = fMaterials.GetMaterial("vacuum");
G4LogicalVolume *logVol =
new G4LogicalVolume(tub, mat, "logSrcDetector");
G4VisAttributes* pVis = new
G4VisAttributes(G4Colour(1, 0, 0));
logVol->SetVisAttributes(pVis);
G4VPhysicalVolume *physVol = 0;
if (fColliPipeLogVol) {
G4ThreeVector pos(0, 0, fColimatorWidth/2 -
fTiaraDimensions.srcDetectorWidth / 2);
physVol = new G4PVPlacement(0,
pos,
logVol,
"sourceDetector",
fColliPipeLogVol,
false,
0);
}
else {
G4ThreeVector pos(0, 0, fTiaraDimensions.targetPosZ +
fTiaraDimensions.distTargetExperiment +
fColimatorWidth -
fTiaraDimensions.srcDetectorWidth / 2);
physVol = PlaceExpComponent(pos, logVol, "sourceDetector");
}
return physVol;
}
void TiaraGeometry::PlaceComponents(){
for (TiaraComponents::iterator it = fTiaraComponents.begin();
it != fTiaraComponents.end(); ++it) {
TiaraParts tiaraParts = (*it)->GetParts();
for (TiaraParts::iterator ip = tiaraParts.begin();
ip != tiaraParts.end(); ++ip){
TiaraPart tiaraPart = *ip;
G4LogicalVolume *logVol = ip->logVol;
G4cout << logVol->GetName()
<< ", pos: " << ip->pos << G4endl;
G4String name(logVol->GetName());
name += "_placed";
new G4PVPlacement(ip->rot,
ip->pos,
logVol,
name,
fLogicalWorld,
false,
0);
}
}
}
void TiaraGeometry::BuildGeometry(const TiaraDimensions &td){
fTiaraDimensions = td;
ConstHall();
}
G4LogicalVolume *TiaraGeometry::BuildShield(G4double width,
const G4String &matName){
fShieldWidth = width;
G4LogicalVolume *logVol = 0;
if (! (width > 0)) {
G4cout << "TiaraGeometry::BuildShield width must be > 0"
<< G4endl;
}
else {
G4Material *mat = 0;
mat = fMaterials.GetMaterial(matName);
if (!mat) {
G4cout << "TiaraGeometry::BuildShield no valid material"
<< G4endl;
}
else {
G4Box *box = new G4Box("box",
fTiaraDimensions.widthExperiment/2,
fTiaraDimensions.widthExperiment/2,
width/2);
logVol = new G4LogicalVolume(box, mat, "logShieldBox");
G4VisAttributes* pVis = new
G4VisAttributes(G4Colour(1, 1, 0));
logVol->SetVisAttributes(pVis);
}
}
return logVol;
}
G4LogicalVolume *TiaraGeometry::
BuildCollimator(G4double width,
const G4String &outerMatName,
const G4String &innerMatName) {
fColimatorWidth = width;
G4LogicalVolume *logVol = 0;
if (! (width > 0)) {
G4cout << "TiaraGeometry::BuildCollimator witdth must be > 0"
<< G4endl;
}
else {
G4Material *matOuter = 0;
matOuter = fMaterials.GetMaterial(outerMatName);
G4Material *matInner = 0;
matInner = fMaterials.GetMaterial(innerMatName);
if (!matOuter || !matInner) {
G4cout << "TiaraGeometry::BuildCollimator no valid material"
<< G4endl;
}
else {
G4Box *box = new G4Box("box",
fTiaraDimensions.widthExperiment/2,
fTiaraDimensions.widthExperiment/2,
width/2);
logVol = new G4LogicalVolume(box, matOuter, "logColimatorBox");
G4VisAttributes* pVis = new
G4VisAttributes(G4Colour(0.0, 1.0, 0.0));
logVol->SetVisAttributes(pVis);
G4Tubs *tub = new G4Tubs("tub",
0,
fTiaraDimensions.pipeRadius,
width/2,
0,
360 * deg);
fColliPipeLogVol = new G4LogicalVolume(tub, matInner,
"logColimatorTub");
new G4PVPlacement(0,
G4ThreeVector(0, 0, 0),
fColliPipeLogVol,
"pipeInCollimator",
logVol,
false,
0);
}
}
return logVol;
}
G4VPhysicalVolume *TiaraGeometry::
PlaceExpComponent(const G4ThreeVector &pos,
G4LogicalVolume *logVol,
const G4String &physName){
return new G4PVPlacement(0,
pos,
logVol,
physName,
fLogicalWorld,
false,
0);
}
@@ -1,159 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: TiaraIronShieldB.cc,v 1.4 2006/06/29 15:45:09 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
#include "TiaraIronShieldB.hh"
#include "TiaraDimensions.hh"
#include "TiaraMaterials.hh"
#include "G4Box.hh"
#include "G4LogicalVolume.hh"
#include "G4ThreeVector.hh"
#include "G4VisAttributes.hh"
#include "G4Colour.hh"
#include "G4Tubs.hh"
#include "G4PVPlacement.hh"
/*
TiaraIronShieldB::
TiaraIronShieldB(TiaraMaterials &mfac,
const TiaraDimensions &tiaraDimensions){
G4double halfHight((tiaraDimensions.distTargetExperiment -
tiaraDimensions.distTargetEndA) / 2);
G4double radialHalf(0.5 * (tiaraDimensions.widthExperiment/2 -
tiaraDimensions.pipeRadius));
G4double lateralHalf(0.5 * (tiaraDimensions.pipeRadius +
tiaraDimensions.widthExperiment/2));
G4double radialShift(tiaraDimensions.pipeRadius + radialHalf);
G4double lateralShift(tiaraDimensions.widthExperiment/2 - lateralHalf);
G4Box *ironBbox = new G4Box("ironBbox",
lateralHalf,
radialHalf,
halfHight);
G4LogicalVolume *logIronBbox =
new G4LogicalVolume(ironBbox,
mfac.GetMaterial("iron"),
"IronBbox");
G4VisAttributes* pIronAVis = new
G4VisAttributes(G4Colour(0.1, 0.1, 1.0));
// pIronAVis->SetForceSolid(true);
logIronBbox->SetVisAttributes(pIronAVis);
TiaraPart tiaraPart;
tiaraPart.rot = 0;
tiaraPart.logVol = logIronBbox;
tiaraPart.pos.setZ(tiaraDimensions.targetPosZ +
tiaraDimensions.distTargetEndA + halfHight);
// upper shield
tiaraPart.pos.setX(lateralShift);
tiaraPart.pos.setY(radialShift);
fTiaraParts.push_back(tiaraPart);
// lower shield
tiaraPart.pos.setX(-1*lateralShift);
tiaraPart.pos.setY(-1*radialShift);
fTiaraParts.push_back(tiaraPart);
// right shield
tiaraPart.rot = new G4RotationMatrix();
tiaraPart.rot->set(G4ThreeVector(0, 0, 1), 90 * deg);
tiaraPart.pos.setX(-1* radialShift);
tiaraPart.pos.setY(lateralShift);
fTiaraParts.push_back(tiaraPart);
// left shield
// tiaraPart.rot->set(G4ThreeVector(0, 0, 1), -90);
tiaraPart.pos.setX(radialShift);
tiaraPart.pos.setY(-1*lateralShift);
fTiaraParts.push_back(tiaraPart);
}
*/
TiaraIronShieldB::
TiaraIronShieldB(TiaraMaterials &mfac,
const TiaraDimensions &tiaraDimensions){
G4double halfHight((tiaraDimensions.distTargetExperiment -
tiaraDimensions.distTargetEndA) / 2);
G4double halfWidth(tiaraDimensions.widthExperiment/2);
G4Box *ironBbox = new G4Box("ironBbox",
halfWidth,
halfWidth,
halfHight);
G4LogicalVolume *logIronBbox =
new G4LogicalVolume(ironBbox,
mfac.GetMaterial("iron"),
"IronBbox");
G4VisAttributes* pIronAVis = new
G4VisAttributes(G4Colour(0.1, 0.1, 1.0));
// pIronAVis->SetForceSolid(true);
logIronBbox->SetVisAttributes(pIronAVis);
G4Tubs *tub = new G4Tubs("holeIronB",
0,
tiaraDimensions.pipeRadius,
halfHight,
0,
360 * deg);
G4LogicalVolume *logHole = new G4LogicalVolume(tub,
mfac.GetMaterial("air"),
"logHoleIronB");
new G4PVPlacement(0,
G4ThreeVector(0, 0, 0),
logHole,
"holeIronB",
logIronBbox,
false,
0);
TiaraPart tiaraPart;
tiaraPart.rot = 0;
tiaraPart.logVol = logIronBbox;
tiaraPart.pos.setZ(tiaraDimensions.targetPosZ +
tiaraDimensions.distTargetEndA + halfHight);
tiaraPart.pos.setX(0);
tiaraPart.pos.setY(0);
fTiaraParts.push_back(tiaraPart);
}
TiaraIronShieldB::~TiaraIronShieldB(){
}
TiaraParts TiaraIronShieldB::GetParts(){
return fTiaraParts;
}
@@ -1,82 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: TiaraIsotropicDirections.cc,v 1.5 2006/06/29 15:45:12 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
#include "TiaraIsotropicDirections.hh"
#include "TiaraDimensions.hh"
#include "Randomize.hh"
#include <cmath>
TiaraIsotropicDirections::
TiaraIsotropicDirections(G4double colWidth,
const TiaraDimensions &tiaraDimensions) :
fMinCos(MinimumCosine(colWidth,
tiaraDimensions))
{}
TiaraIsotropicDirections::~TiaraIsotropicDirections()
{}
TiaraIsotropicDirections::
TiaraIsotropicDirections(const TiaraIsotropicDirections& rhs)
: TiaraVDirectionGenerator()
{
*this = rhs;
}
G4double TiaraIsotropicDirections::
MinimumCosine(G4double colWidth,
const TiaraDimensions &tiaraDimensions) {
G4double l(tiaraDimensions.distTargetExperiment + colWidth);
G4double r(tiaraDimensions.pipeRadius);
G4double R(std::sqrt(std::pow(l, 2) + std::pow(r, 2)));
return l/R;
}
TiaraIsotropicDirections& TiaraIsotropicDirections::
operator=(const TiaraIsotropicDirections& rhs){
if (this != &rhs) {
fMinCos = rhs.fMinCos;
}
return *this;
}
TiaraVDirectionGenerator *TiaraIsotropicDirections::Clone() const {
return new TiaraIsotropicDirections(*this);
}
G4ThreeVector TiaraIsotropicDirections::GetDirection(){
G4double cosTh(fMinCos + G4UniformRand() * (1 - fMinCos));
G4double sinTh(std::sqrt(1-std::pow(cosTh,2)));
G4double phi(G4UniformRand() * 2*pi);
G4double x(sinTh * std::cos(phi));
G4double y(sinTh * std::sin(phi));
return G4ThreeVector(x, y, cosTh);
}
@@ -1,187 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: TiaraMaterials.cc,v 1.5 2006/06/29 15:45:15 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
#include "TiaraMaterials.hh"
#include "G4Element.hh"
#include "G4Material.hh"
TiaraMaterials::TiaraMaterials()
{
G4String name, symbol;
FillElementMap("Hydrogen", "H", 1, 1.01*g/mole);
FillElementMap("Carbon", "C", 6, 12.01*g/mole);
FillElementMap("Oxygen", "O", 8, 16.00*g/mole);
FillElementMap("Natrium", "Na", 11, 22.99*g/mole);
FillElementMap("Magnesium", "Mg", 12, 24.305*g/mole);
// FillElementMap("Hg", "Hg", 80, 200.59*g/mole);
FillElementMap("Aluminium", "Al", 14, 26.98*g/mole);
FillElementMap("Silicon", "Si", 14, 28.09*g/mole);
FillElementMap("K", "K", 19, 39.1*g/mole);
FillElementMap("Calzium", "Ca", 31, 69.72*g/mole);
FillElementMap("Iron", "Fe", 26, 55.85*g/mole);
FillElementMap("Nitro", "N", 7 , 14.006*g/mole);
G4Material *mat = 0;
mat = CreateConcrete();
fMapNameMaterial[mat->GetName()] = mat;
mat = CreateIron();
fMapNameMaterial[mat->GetName()] = mat;
mat = CreateAir();
fMapNameMaterial[mat->GetName()] = mat;
mat = CreateVakuum();
fMapNameMaterial[mat->GetName()] = mat;
}
TiaraMaterials::~TiaraMaterials(){
}
G4Material *TiaraMaterials::GetMaterial(const G4String &matName) const {
G4Material *mat =0;
TiaraMapNameMaterial::const_iterator matElm =
fMapNameMaterial.find(matName);
if (matElm == fMapNameMaterial.end()) {
G4cout << "TiaraMaterials::GetMaterial: material named \"" <<
matName << "\", not known!" << G4endl;
}
else {
mat = matElm->second;
}
return mat;
}
void TiaraMaterials::FillElementMap(const G4String &name,
const G4String &symbol,
G4int Z,
G4double A) {
TiaraMapSymbolElement::iterator it = fMapSymbolElement.find(symbol);
if (it!=fMapSymbolElement.end()) {
G4cout << "TiaraMaterials::FillElementMap: symbol: "
<< symbol << ", already defined" << G4endl;
}
else {
fMapSymbolElement[symbol] = new G4Element(name, symbol, Z, A);
if (!fMapSymbolElement[symbol]) {
G4Exception("TiaraMaterials::FillElementMap: new failed to create G4Element!");
}
}
return;
}
G4Material *TiaraMaterials::CreateMCNPConcrete(){
typedef std::map< G4Element* , G4double > TiaraMapElementFraction;
TiaraMapElementFraction concreteFractions;
concreteFractions[fMapSymbolElement["H"]] = 0.01;
concreteFractions[fMapSymbolElement["O"]] = 0.529;
concreteFractions[fMapSymbolElement["Na"]] = 0.016;
// concreteFractions[fMapSymbolElement["Hg"]] = 0.002 ;
concreteFractions[fMapSymbolElement["Al"]] = 0.034;
concreteFractions[fMapSymbolElement["Si"]] = 0.337 + 0.002;
concreteFractions[fMapSymbolElement["K"]] = 0.013;
concreteFractions[fMapSymbolElement["Ca"]] = 0.044;
concreteFractions[fMapSymbolElement["Fe"]] = 0.014;
concreteFractions[fMapSymbolElement["C"]] = 0.001;
G4Material *mat =0;
G4double density = 2.03*g/cm3;
mat = new G4Material("concrete", density,
concreteFractions.size());
for (TiaraMapElementFraction::iterator it = concreteFractions.begin();
it != concreteFractions.end(); ++it) {
mat->AddElement(it->first , it->second);
}
return mat;
}
G4Material *TiaraMaterials::CreateConcrete(){
typedef std::map< G4Element* , G4double > TiaraMapElementFraction;
TiaraMapElementFraction concreteFractions;
concreteFractions[fMapSymbolElement["H"]] = 0.010853422;
concreteFractions[fMapSymbolElement["O"]] = 0.48165594;
concreteFractions[fMapSymbolElement["Na"]] = 0.020327181;
concreteFractions[fMapSymbolElement["Mg"]] = 0.010832401;
concreteFractions[fMapSymbolElement["Al"]] = 0.060514396;
concreteFractions[fMapSymbolElement["Si"]] = 0.22409956;
concreteFractions[fMapSymbolElement["K"]] = 0.010680188;
concreteFractions[fMapSymbolElement["Ca"]] = 0.12388306;
concreteFractions[fMapSymbolElement["Fe"]] = 0.056603178;
G4Material *mat =0;
G4double density = 2.31*g/cm3;
mat = new G4Material("concrete", density,
concreteFractions.size());
for (TiaraMapElementFraction::iterator it = concreteFractions.begin();
it != concreteFractions.end(); ++it) {
mat->AddElement(it->first , it->second);
}
return mat;
}
G4Material *TiaraMaterials::CreateAir(){
G4Material *mat =0;
G4double density = 1.29*mg/cm3;
mat = new G4Material("air", density, 2);
mat->AddElement(fMapSymbolElement["N"], 0.75);
mat->AddElement(fMapSymbolElement["O"], 0.25);
return mat;
}
G4Material *TiaraMaterials::CreateIron(){
G4Material *mat =0;
G4double density = 7.87*g/cm3;
mat = new G4Material("iron", density, 1);
mat->AddElement(fMapSymbolElement["Fe"],1);
return mat;
}
G4Material *TiaraMaterials::CreateVakuum(){
G4Material *mat =0;
G4double density(universe_mean_density);
G4double temperature(2.73*kelvin);
G4double pressure(3.e-18*pascal);
mat = new G4Material("vacuum", 1., 1.01*g/mole,
density,
kStateGas,temperature,pressure);
return mat;
}
@@ -1,80 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: TiaraMeasure.cc,v 1.4 2006/06/29 15:45:17 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
#include "TiaraMeasure.hh"
TiaraMeasure::TiaraMeasure() :
fEntries(0),
fSum(0),
fSumSquared(0)
{}
TiaraMeasure::~TiaraMeasure()
{}
void TiaraMeasure::Xin(G4double v) {
fEntries++;
fSum+=v;
fSumSquared+=(v*v);
};
G4int TiaraMeasure::GetEntries() const {
return fEntries;
}
G4double TiaraMeasure::GetMean() const {
G4double mean(0);
if (fEntries>0) {
mean = fSum / fEntries;
} else {
G4cout << "TiaraMeasure::GetMean(): fEntries<=0" << G4endl;
}
return mean;
}
G4double TiaraMeasure::GetVariance() const {
G4double variance(-1);
G4double mean(GetMean());
if (fEntries>1) {
variance = (static_cast<double>(fEntries)/(fEntries - 1)) *
(fSumSquared/fEntries - mean*mean);
} else {
G4cout << "TiaraMeasure::GetVariance(): fEntries<=0" << G4endl;
}
return variance;
}
G4double TiaraMeasure::GetSum() const {
return fSum;
}
G4double TiaraMeasure::GetSumSquared() const {
return fSumSquared;
}
@@ -1,635 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// $Id: TiaraPhysicsList.cc,v 1.6 2006/06/29 15:45:20 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
#include "globals.hh"
#include <iomanip>
#include "TiaraPhysicsList.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleWithCuts.hh"
#include "G4ProcessManager.hh"
#include "G4ProcessVector.hh"
#include "G4ParticleTypes.hh"
#include "G4ParticleTable.hh"
#include "G4BosonConstructor.hh"
#include "G4LeptonConstructor.hh"
#include "G4MesonConstructor.hh"
#include "G4BaryonConstructor.hh"
#include "G4IonConstructor.hh"
#include "G4ShortLivedConstructor.hh"
#include "G4Material.hh"
#include "G4MaterialTable.hh"
TiaraPhysicsList::TiaraPhysicsList() : G4VUserPhysicsList()
{
SetVerboseLevel(1);
}
TiaraPhysicsList::~TiaraPhysicsList()
{}
void TiaraPhysicsList::ConstructParticle()
{
// In this method, static member functions should be called
// for all particles which you want to use.
// This ensures that objects of these particle types will be
// created in the program.
ConstructAllBosons();
ConstructAllLeptons();
ConstructAllMesons();
ConstructAllBaryons();
ConstructAllIons();
ConstructAllShortLiveds();
}
void TiaraPhysicsList::ConstructAllBosons()
{
// Construct all bosons
G4BosonConstructor pConstructor;
pConstructor.ConstructParticle();
}
void TiaraPhysicsList::ConstructAllLeptons()
{
// Construct all leptons
G4LeptonConstructor pConstructor;
pConstructor.ConstructParticle();
}
void TiaraPhysicsList::ConstructAllMesons()
{
// Construct all mesons
G4MesonConstructor pConstructor;
pConstructor.ConstructParticle();
}
void TiaraPhysicsList::ConstructAllBaryons()
{
// Construct all barions
G4BaryonConstructor pConstructor;
pConstructor.ConstructParticle();
}
void TiaraPhysicsList::ConstructAllIons()
{
// Construct light ions
G4IonConstructor pConstructor;
pConstructor.ConstructParticle();
}
void TiaraPhysicsList::ConstructAllShortLiveds()
{
// Construct resonaces and quarks
G4ShortLivedConstructor pConstructor;
pConstructor.ConstructParticle();
}
void TiaraPhysicsList::ConstructProcess()
{
AddTransportation();
ConstructEM();
ConstructLeptHad();
ConstructHad();
ConstructGeneral();
}
#include "G4ComptonScattering.hh"
#include "G4GammaConversion.hh"
#include "G4PhotoElectricEffect.hh"
#include "G4MultipleScattering.hh"
#include "G4eIonisation.hh"
#include "G4eBremsstrahlung.hh"
#include "G4eplusAnnihilation.hh"
#include "G4MuIonisation.hh"
#include "G4MuBremsstrahlung.hh"
#include "G4MuPairProduction.hh"
#include "G4hIonisation.hh"
#include "G4ionIonisation.hh"
void TiaraPhysicsList::ConstructEM()
{
theParticleIterator->reset();
while( (*theParticleIterator)() ){
G4ParticleDefinition* particle = theParticleIterator->value();
G4ProcessManager* pmanager = particle->GetProcessManager();
G4String particleName = particle->GetParticleName();
if (particleName == "gamma") {
// gamma
// Construct processes for gamma
pmanager->AddDiscreteProcess(new G4GammaConversion());
pmanager->AddDiscreteProcess(new G4ComptonScattering());
pmanager->AddDiscreteProcess(new G4PhotoElectricEffect());
} else if (particleName == "e-") {
//electron
// Construct processes for electron
pmanager->AddProcess(new G4MultipleScattering(),-1,1,1);
pmanager->AddProcess(new G4eIonisation(),-1,2,2);
pmanager->AddProcess(new G4eBremsstrahlung(),-1,-1,3);
} else if (particleName == "e+") {
//positron
// Construct processes for positron
pmanager->AddProcess(new G4MultipleScattering(),-1,1,1);
pmanager->AddProcess(new G4eIonisation(),-1,2,2);
pmanager->AddProcess(new G4eBremsstrahlung(),-1,-1,3);
pmanager->AddProcess(new G4eplusAnnihilation(),0,-1,4);
} else if( particleName == "mu+" ||
particleName == "mu-" ) {
//muon
// Construct processes for muon+
pmanager->AddProcess(new G4MultipleScattering(),-1,1,1);
pmanager->AddProcess(new G4MuIonisation(),-1,2,2);
pmanager->AddProcess(new G4MuBremsstrahlung(),-1,-1,3);
pmanager->AddProcess(new G4MuPairProduction(),-1,-1,4);
} else if( particleName == "GenericIon" ) {
pmanager->AddProcess(new G4MultipleScattering(),-1,1,1);
pmanager->AddProcess(new G4ionIonisation(),-1,2,2);
} else {
if ((particle->GetPDGCharge() != 0.0) &&
(particle->GetParticleName() != "chargedgeantino")&&
(!particle->IsShortLived()) ) {
// all others charged particles except geantino
pmanager->AddProcess(new G4MultipleScattering(),-1,1,1);
pmanager->AddProcess(new G4hIonisation(),-1,2,2);
}
}
}
}
// Hadron Processes
#include "G4HadronElasticProcess.hh"
#include "G4HadronFissionProcess.hh"
#include "G4HadronCaptureProcess.hh"
#include "G4PionPlusInelasticProcess.hh"
#include "G4PionMinusInelasticProcess.hh"
#include "G4KaonPlusInelasticProcess.hh"
#include "G4KaonZeroSInelasticProcess.hh"
#include "G4KaonZeroLInelasticProcess.hh"
#include "G4KaonMinusInelasticProcess.hh"
#include "G4ProtonInelasticProcess.hh"
#include "G4AntiProtonInelasticProcess.hh"
#include "G4NeutronInelasticProcess.hh"
#include "G4AntiNeutronInelasticProcess.hh"
#include "G4LambdaInelasticProcess.hh"
#include "G4AntiLambdaInelasticProcess.hh"
#include "G4SigmaPlusInelasticProcess.hh"
#include "G4SigmaMinusInelasticProcess.hh"
#include "G4AntiSigmaPlusInelasticProcess.hh"
#include "G4AntiSigmaMinusInelasticProcess.hh"
#include "G4XiZeroInelasticProcess.hh"
#include "G4XiMinusInelasticProcess.hh"
#include "G4AntiXiZeroInelasticProcess.hh"
#include "G4AntiXiMinusInelasticProcess.hh"
#include "G4DeuteronInelasticProcess.hh"
#include "G4TritonInelasticProcess.hh"
#include "G4AlphaInelasticProcess.hh"
#include "G4OmegaMinusInelasticProcess.hh"
#include "G4AntiOmegaMinusInelasticProcess.hh"
// Low-energy Models
#include "G4LElastic.hh"
#include "G4LFission.hh"
#include "G4LCapture.hh"
#include "G4LEPionPlusInelastic.hh"
#include "G4LEPionMinusInelastic.hh"
#include "G4LEKaonPlusInelastic.hh"
#include "G4LEKaonZeroSInelastic.hh"
#include "G4LEKaonZeroLInelastic.hh"
#include "G4LEKaonMinusInelastic.hh"
#include "G4LEProtonInelastic.hh"
#include "G4LEAntiProtonInelastic.hh"
#include "G4LENeutronInelastic.hh"
#include "G4LEAntiNeutronInelastic.hh"
#include "G4LELambdaInelastic.hh"
#include "G4LEAntiLambdaInelastic.hh"
#include "G4LESigmaPlusInelastic.hh"
#include "G4LESigmaMinusInelastic.hh"
#include "G4LEAntiSigmaPlusInelastic.hh"
#include "G4LEAntiSigmaMinusInelastic.hh"
#include "G4LEXiZeroInelastic.hh"
#include "G4LEXiMinusInelastic.hh"
#include "G4LEAntiXiZeroInelastic.hh"
#include "G4LEAntiXiMinusInelastic.hh"
#include "G4LEDeuteronInelastic.hh"
#include "G4LETritonInelastic.hh"
#include "G4LEAlphaInelastic.hh"
#include "G4LEOmegaMinusInelastic.hh"
#include "G4LEAntiOmegaMinusInelastic.hh"
// -- generator models
#include "G4TheoFSGenerator.hh"
#include "G4ExcitationHandler.hh"
#include "G4Evaporation.hh"
#include "G4CompetitiveFission.hh"
#include "G4FermiBreakUp.hh"
#include "G4StatMF.hh"
#include "G4GeneratorPrecompoundInterface.hh"
#include "G4Fancy3DNucleus.hh"
#include "G4LEProtonInelastic.hh"
#include "G4StringModel.hh"
#include "G4PreCompoundModel.hh"
#include "G4FTFModel.hh"
#include "G4QGSMFragmentation.hh"
#include "G4ExcitedStringDecay.hh"
//
// ConstructHad()
//
// Makes discrete physics processes for the hadrons, at present limited
// to those particles with GHEISHA interactions (INTRC > 0).
// The processes are: Elastic scattering, Inelastic scattering,
// Fission (for neutron only), and Capture (neutron).
//
// F.W.Jones 06-JUL-1998
//
void TiaraPhysicsList::ConstructHad()
{
// this will be the model class for high energies
G4TheoFSGenerator * theTheoModel = new G4TheoFSGenerator;
// all models for treatment of thermal nucleus
G4Evaporation * theEvaporation = new G4Evaporation;
G4FermiBreakUp * theFermiBreakUp = new G4FermiBreakUp;
G4StatMF * theMF = new G4StatMF;
// Evaporation logic
G4ExcitationHandler * theHandler = new G4ExcitationHandler;
theHandler->SetEvaporation(theEvaporation);
theHandler->SetFermiModel(theFermiBreakUp);
theHandler->SetMultiFragmentation(theMF);
theHandler->SetMaxAandZForFermiBreakUp(12, 6);
theHandler->SetMinEForMultiFrag(3*MeV);
// Pre equilibrium stage
G4PreCompoundModel * thePreEquilib = new G4PreCompoundModel(theHandler);
// a no-cascade generator-precompound interaface
G4GeneratorPrecompoundInterface * theCascade = new G4GeneratorPrecompoundInterface;
theCascade->SetDeExcitation(thePreEquilib);
// here come the high energy parts
// the string model; still not quite according to design - Explicite use of the forseen interfaces
// will be tested and documented in this program by beta-02 at latest.
G4VPartonStringModel * theStringModel;
theStringModel = new G4FTFModel;
theTheoModel->SetTransport(theCascade);
theTheoModel->SetHighEnergyGenerator(theStringModel);
theTheoModel->SetMinEnergy(19*GeV);
theTheoModel->SetMaxEnergy(100*TeV);
G4VLongitudinalStringDecay * theFragmentation = new G4QGSMFragmentation;
G4ExcitedStringDecay * theStringDecay = new G4ExcitedStringDecay(theFragmentation);
theStringModel->SetFragmentationModel(theStringDecay);
// done with the generator model (most of the above is also available as default)
G4HadronElasticProcess* theElasticProcess =
new G4HadronElasticProcess;
G4LElastic* theElasticModel = new G4LElastic;
theElasticProcess->RegisterMe(theElasticModel);
G4HadronElasticProcess* theElasticProcess1 =
new G4HadronElasticProcess;
theParticleIterator->reset();
while ((*theParticleIterator)()) {
G4ParticleDefinition* particle = theParticleIterator->value();
G4ProcessManager* pmanager = particle->GetProcessManager();
G4String particleName = particle->GetParticleName();
if (particleName == "pi+") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4PionPlusInelasticProcess* theInelasticProcess =
new G4PionPlusInelasticProcess("inelastic");
G4LEPionPlusInelastic* theInelasticModel =
new G4LEPionPlusInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "pi-") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4PionMinusInelasticProcess* theInelasticProcess =
new G4PionMinusInelasticProcess("inelastic");
G4LEPionMinusInelastic* theInelasticModel =
new G4LEPionMinusInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "kaon+") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4KaonPlusInelasticProcess* theInelasticProcess =
new G4KaonPlusInelasticProcess("inelastic");
G4LEKaonPlusInelastic* theInelasticModel = new G4LEKaonPlusInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "kaon0S") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4KaonZeroSInelasticProcess* theInelasticProcess =
new G4KaonZeroSInelasticProcess("inelastic");
G4LEKaonZeroSInelastic* theInelasticModel =
new G4LEKaonZeroSInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "kaon0L") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4KaonZeroLInelasticProcess* theInelasticProcess =
new G4KaonZeroLInelasticProcess("inelastic");
G4LEKaonZeroLInelastic* theInelasticModel =
new G4LEKaonZeroLInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "kaon-") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4KaonMinusInelasticProcess* theInelasticProcess =
new G4KaonMinusInelasticProcess("inelastic");
G4LEKaonMinusInelastic* theInelasticModel =
new G4LEKaonMinusInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "proton") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4ProtonInelasticProcess* theInelasticProcess =
new G4ProtonInelasticProcess("inelastic");
G4LEProtonInelastic* theInelasticModel = new G4LEProtonInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "anti_proton") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4AntiProtonInelasticProcess* theInelasticProcess =
new G4AntiProtonInelasticProcess("inelastic");
G4LEAntiProtonInelastic* theInelasticModel =
new G4LEAntiProtonInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "neutron") {
// elastic scattering
G4LElastic* theElasticModel1 = new G4LElastic;
theElasticProcess1->RegisterMe(theElasticModel1);
pmanager->AddDiscreteProcess(theElasticProcess1);
// inelastic scattering
G4NeutronInelasticProcess* theInelasticProcess =
new G4NeutronInelasticProcess("inelastic");
G4LENeutronInelastic* theInelasticModel = new G4LENeutronInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
// fission
G4HadronFissionProcess* theFissionProcess =
new G4HadronFissionProcess;
G4LFission* theFissionModel = new G4LFission;
theFissionProcess->RegisterMe(theFissionModel);
pmanager->AddDiscreteProcess(theFissionProcess);
// capture
G4HadronCaptureProcess* theCaptureProcess =
new G4HadronCaptureProcess;
G4LCapture* theCaptureModel = new G4LCapture;
theCaptureProcess->RegisterMe(theCaptureModel);
pmanager->AddDiscreteProcess(theCaptureProcess);
}
else if (particleName == "anti_neutron") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4AntiNeutronInelasticProcess* theInelasticProcess =
new G4AntiNeutronInelasticProcess("inelastic");
G4LEAntiNeutronInelastic* theInelasticModel =
new G4LEAntiNeutronInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "lambda") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4LambdaInelasticProcess* theInelasticProcess =
new G4LambdaInelasticProcess("inelastic");
G4LELambdaInelastic* theInelasticModel = new G4LELambdaInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "anti_lambda") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4AntiLambdaInelasticProcess* theInelasticProcess =
new G4AntiLambdaInelasticProcess("inelastic");
G4LEAntiLambdaInelastic* theInelasticModel =
new G4LEAntiLambdaInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "sigma+") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4SigmaPlusInelasticProcess* theInelasticProcess =
new G4SigmaPlusInelasticProcess("inelastic");
G4LESigmaPlusInelastic* theInelasticModel =
new G4LESigmaPlusInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "sigma-") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4SigmaMinusInelasticProcess* theInelasticProcess =
new G4SigmaMinusInelasticProcess("inelastic");
G4LESigmaMinusInelastic* theInelasticModel =
new G4LESigmaMinusInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "anti_sigma+") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4AntiSigmaPlusInelasticProcess* theInelasticProcess =
new G4AntiSigmaPlusInelasticProcess("inelastic");
G4LEAntiSigmaPlusInelastic* theInelasticModel =
new G4LEAntiSigmaPlusInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "anti_sigma-") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4AntiSigmaMinusInelasticProcess* theInelasticProcess =
new G4AntiSigmaMinusInelasticProcess("inelastic");
G4LEAntiSigmaMinusInelastic* theInelasticModel =
new G4LEAntiSigmaMinusInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "xi0") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4XiZeroInelasticProcess* theInelasticProcess =
new G4XiZeroInelasticProcess("inelastic");
G4LEXiZeroInelastic* theInelasticModel =
new G4LEXiZeroInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "xi-") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4XiMinusInelasticProcess* theInelasticProcess =
new G4XiMinusInelasticProcess("inelastic");
G4LEXiMinusInelastic* theInelasticModel =
new G4LEXiMinusInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "anti_xi0") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4AntiXiZeroInelasticProcess* theInelasticProcess =
new G4AntiXiZeroInelasticProcess("inelastic");
G4LEAntiXiZeroInelastic* theInelasticModel =
new G4LEAntiXiZeroInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "anti_xi-") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4AntiXiMinusInelasticProcess* theInelasticProcess =
new G4AntiXiMinusInelasticProcess("inelastic");
G4LEAntiXiMinusInelastic* theInelasticModel =
new G4LEAntiXiMinusInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "deuteron") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4DeuteronInelasticProcess* theInelasticProcess =
new G4DeuteronInelasticProcess("inelastic");
G4LEDeuteronInelastic* theInelasticModel =
new G4LEDeuteronInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "triton") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4TritonInelasticProcess* theInelasticProcess =
new G4TritonInelasticProcess("inelastic");
G4LETritonInelastic* theInelasticModel =
new G4LETritonInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "alpha") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4AlphaInelasticProcess* theInelasticProcess =
new G4AlphaInelasticProcess("inelastic");
G4LEAlphaInelastic* theInelasticModel =
new G4LEAlphaInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "omega-") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4OmegaMinusInelasticProcess* theInelasticProcess =
new G4OmegaMinusInelasticProcess("inelastic");
G4LEOmegaMinusInelastic* theInelasticModel =
new G4LEOmegaMinusInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
else if (particleName == "anti_omega-") {
pmanager->AddDiscreteProcess(theElasticProcess);
G4AntiOmegaMinusInelasticProcess* theInelasticProcess =
new G4AntiOmegaMinusInelasticProcess("inelastic");
G4LEAntiOmegaMinusInelastic* theInelasticModel =
new G4LEAntiOmegaMinusInelastic;
theInelasticProcess->RegisterMe(theInelasticModel);
theInelasticProcess->RegisterMe(theTheoModel);
pmanager->AddDiscreteProcess(theInelasticProcess);
}
}
}
void TiaraPhysicsList::ConstructLeptHad()
{;}
#include "G4Decay.hh"
void TiaraPhysicsList::ConstructGeneral()
{
G4Decay* theDecayProcess = new G4Decay();
theParticleIterator->reset();
while( (*theParticleIterator)() ){
G4ParticleDefinition* particle = theParticleIterator->value();
G4ProcessManager* pmanager = particle->GetProcessManager();
if (theDecayProcess->IsApplicable(*particle)) {
pmanager ->AddProcess(theDecayProcess);
pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep);
pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest);
}
}
}
void TiaraPhysicsList::SetCuts()
{
if (verboseLevel >0)
{
G4cout << "TiaraPhysicsList::SetCuts:";
G4cout << "CutLength : " << defaultCutValue/mm << " (mm)" << G4endl;
}
// "G4VUserPhysicsList::SetCutsWithDefault" method sets
// the default cut value for all particle types
SetCutsWithDefault();
}
@@ -1,109 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// $Id: TiaraPrimaryGeneratorAction.cc,v 1.5 2006/06/29 15:45:23 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
#include "globals.hh"
#include "TiaraPrimaryGeneratorAction.hh"
#include "G4Event.hh"
#include "G4ParticleGun.hh"
#include "G4Neutron.hh"
#include "G4Geantino.hh"
#include "G4ThreeVector.hh"
#include "TiaraDimensions.hh"
#include "TiaraVSourceEnergyGenerator.hh"
#include "TiaraVDirectionGenerator.hh"
TiaraPrimaryGeneratorAction::
TiaraPrimaryGeneratorAction(const TiaraVSourceEnergyGenerator& eG,
const TiaraVDirectionGenerator& dG,
const TiaraTally &tally,
const TiaraDimensions &tiaraDimensions) :
fEnergyGenerator(eG.Clone()),
fDirectionGenerator(dG.Clone()),
particleGun(new G4ParticleGun(1)),
fTally(tally)
{
particleGun->
SetParticlePosition(G4ThreeVector(0.0, 0.0,
tiaraDimensions.targetPosZ));
}
TiaraPrimaryGeneratorAction::~TiaraPrimaryGeneratorAction()
{
delete particleGun;
delete fDirectionGenerator;
delete fEnergyGenerator;
}
TiaraPrimaryGeneratorAction::
TiaraPrimaryGeneratorAction(const TiaraPrimaryGeneratorAction &rhs)
: G4VUserPrimaryGeneratorAction()
{
*this = rhs;
}
TiaraPrimaryGeneratorAction &
TiaraPrimaryGeneratorAction::
operator=(const TiaraPrimaryGeneratorAction &rhs)
{
if (this != &rhs) {
fEnergyGenerator = rhs.fEnergyGenerator->Clone();
fDirectionGenerator = rhs.fDirectionGenerator->Clone();
particleGun = new G4ParticleGun(1);
fTally = rhs.fTally;
}
return *this;
}
void TiaraPrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
{
particleGun->SetParticleDefinition(G4Neutron::NeutronDefinition());
particleGun->SetParticleMomentumDirection(fDirectionGenerator->
GetDirection());
G4double e(fEnergyGenerator->GetEnergy());
fTally.fill(e, 1);
fTally.EndOfEventAction();
particleGun->SetParticleEnergy(e);
particleGun->GeneratePrimaryVertex(anEvent);
}
const TiaraVSourceEnergyGenerator *TiaraPrimaryGeneratorAction::
GetEnergyGenerator() const {
return fEnergyGenerator;
}
const TiaraTally &
TiaraPrimaryGeneratorAction::GetTally() const {
return fTally;
}
@@ -1,46 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: TiaraRandom.cc,v 1.5 2006/06/29 15:45:26 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
#include "TiaraRandom.hh"
#include "Randomize.hh"
void setRandomSeed(long seed) {
CLHEP::HepRandom::setTheSeed(seed);
}
void setRandomStatus(const char *filename){
CLHEP::HepRandom::restoreEngineStatus(filename);
}
void saveRandomStatus(const char *filename){
CLHEP::HepRandom::saveEngineStatus(filename);
}
@@ -1,93 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: TiaraSampledEnergy.cc,v 1.5 2006/06/29 15:45:29 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
#include "TiaraSampledEnergy.hh"
#ifdef G4ANALYSIS_USE
#include "Randomize.hh"
#include "TiaraFileAcess.hh"
#include "AIDA/AIDA.h"
TiaraSampledEnergy::TiaraSampledEnergy(const G4String &eng,
G4double minEnergyCut,
const G4String &sourceTree,
const G4String &nameExt)
:
TiaraVSourceEnergyGenerator(),
fTree((checkFileIsReadable(sourceTree, "TiaraSampledEnergy::TiaraSampledEnergy"),
AIDA_createAnalysisFactory()
->createTreeFactory()
->create(sourceTree, "xml",true,false))),
fSampleHisto(dynamic_cast<AIDA::IHistogram1D *>(fTree->find(G4String("h" + eng + "int" + nameExt)))),
fScale(fSampleHisto->axis().bins()),
fMinEnergyCut(minEnergyCut)
{}
TiaraSampledEnergy::TiaraSampledEnergy(const TiaraSampledEnergy& rhs) :
TiaraVSourceEnergyGenerator()
{
*this = rhs;
}
TiaraSampledEnergy& TiaraSampledEnergy::
operator=(const TiaraSampledEnergy& rhs) {
if (this!=&rhs) {
TiaraSampledEnergy &nonConstRhs = static_cast<TiaraSampledEnergy &>(rhs);
fTree = nonConstRhs.fTree;
fSampleHisto = nonConstRhs.fSampleHisto;
fScale = nonConstRhs.fScale;
}
return *this;
}
TiaraSampledEnergy::~TiaraSampledEnergy(){
}
TiaraVSourceEnergyGenerator *TiaraSampledEnergy::Clone() const {
return new TiaraSampledEnergy(*this);
}
G4double TiaraSampledEnergy::GetEnergy() {
G4double e(0.0);
while (!(e>fMinEnergyCut)) {
G4double r(G4UniformRand() * fScale);
G4int bin(static_cast<int>(r));
e = fSampleHisto->binHeight(bin) * MeV;
}
return e;
}
#endif
@@ -1,167 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: TiaraSim.cc,v 1.9 2006/06/29 15:45:31 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
#include "TiaraSim.hh"
#include <iostream>
#include "CLHEP/Random/Random.h"
#include "G4RunManager.hh"
#include "G4VPhysicalVolume.hh"
#include "G4VUserPhysicsList.hh"
#include "G4VUserDetectorConstruction.hh"
#include "TiaraPrimaryGeneratorAction.hh"
#include "G4VisExecutive.hh"
#include "G4UItcsh.hh"
#include "TiaraVisEventAction.hh"
#include "TiaraVisRunAction.hh"
#include "G4VUserPrimaryGeneratorAction.hh"
#include "TiaraEnergyCutProcess.hh"
#include "G4UserStackingAction.hh"
#include "G4UserEventAction.hh"
#include "TiaraStackingAction.hh"
TiaraSim *TiaraSim::fTiaraSim = 0;
TiaraSim &TiaraSim::GetTiaraSim() {
if (!fTiaraSim) {
fTiaraSim = new TiaraSim;
}
return *fTiaraSim;
}
TiaraSim::TiaraSim():
fVisManager(0),
fSession(new G4UItcsh),
fGeometry(0),
fPrimary(0),
fPhysics(0),
fCutProcessVector(),
fPlacers(),
fStackingAction(0),
fUserEventAction(0)
{
frunMgr = new G4RunManager;
}
void TiaraSim::SetGeometry(G4VUserDetectorConstruction *geo){
fGeometry = geo;
}
void TiaraSim::AddTiaraEventAction(G4UserEventAction *eventAction) {
fUserEventAction = eventAction;
}
void TiaraSim::
SetPhysicsList(G4VUserPhysicsList *physicsList) {
fPhysics = physicsList;
frunMgr->SetUserInitialization(fPhysics);
}
void TiaraSim::
SetPrimaryGenerator(G4VUserPrimaryGeneratorAction *primGen){
fPrimary = primGen;
}
void TiaraSim::AddParticleCut(const std::string &particle,
G4double cut) {
if (!fStackingAction) {
fStackingAction = new TiaraStackingAction;
frunMgr->SetUserAction(fStackingAction);
}
TiaraEnergyCutProcess *cutProcess = new TiaraEnergyCutProcess(cut);
fCutProcessVector.push_back(cutProcess);
fPlacers.push_back(G4ProcessPlacer(particle));
fPlacers[fPlacers.size() - 1].
AddProcessAsLastDoIt(cutProcess);
fStackingAction->AddParticleCut(particle, cut);
}
void TiaraSim::AddVisRunAction() {
fVisManager = new G4VisExecutive;
frunMgr->SetUserAction(new TiaraVisRunAction);
}
void TiaraSim::initializeVisManager() {
if (fVisManager) {
fVisManager->Initialize();
}else {
G4cout << "TiaraSim::initializeVisManager(): no VisManager!" << G4endl;
}
};
void TiaraSim::initialize(){
G4bool ready(true);
if (!fPrimary) {
G4cout << "TiaraSim::initialize: no primary generator set" << G4endl;
ready = false;
}
if (ready) {
frunMgr->SetUserInitialization(fGeometry);
frunMgr->SetUserAction(fPrimary);
if (fUserEventAction) {
frunMgr->SetUserAction(fUserEventAction);
}
if (fVisManager) {
fVisManager->Initialize();
}
frunMgr->Initialize();
}
}
void TiaraSim::startSession(){
fSession.SessionStart();
}
void TiaraSim::BeamOn(G4int nEvents){
frunMgr->BeamOn(nEvents);
}
TiaraSim::~TiaraSim(){
for (size_t i = 0; i < fCutProcessVector.size(); i++) {
fPlacers[i].RemoveProcess(fCutProcessVector[i]);
delete fCutProcessVector[i];
}
if (fStackingAction) {
delete fStackingAction;
}
if (fVisManager) {
delete fVisManager;
}
delete frunMgr;
}

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