Import Geant4 9.6.0 source tree
This commit is contained in:
@@ -18,6 +18,26 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
envs-V09-05-03 / 8 November 2012 Koichi Murakami
|
||||
[g4py]
|
||||
- configure script is updated for CMake build
|
||||
- updated Geant4 interface for the latest
|
||||
- G4SystemOfUnits.hh and G4PhysicalConstants.hh are explictly added.
|
||||
- Documentations are updated in Markdown format.
|
||||
- some minor updates for examples
|
||||
|
||||
envs-V09-05-02 / 23 July 2012 Koichi Murakami
|
||||
[g4py]
|
||||
- configure script: fixed logics for specifying python include path (bug.1316)
|
||||
- pyG4VisManager: (bug.1318))
|
||||
added static statement for GetVerbosity.
|
||||
fixed GetConcreteInstance returns an insufficient class pointer.
|
||||
|
||||
envs-V09-05-01 / 21 July 2012 Koichi Murakami
|
||||
[g4py]
|
||||
- scripts updated for internal clhep use
|
||||
- updated for 9.5.p01 (bug.1317)
|
||||
|
||||
envs-V09-04-01 / 10 November 2011 Koichi Murakami
|
||||
[g4py]
|
||||
- include fixes on OSX Lion
|
||||
|
||||
@@ -1,152 +0,0 @@
|
||||
$Id: 00README,v 1.13 2010-12-02 08:34:42 kmura Exp $
|
||||
==========================================================================
|
||||
Geant4Py
|
||||
|
||||
Geant4Py is a set of python modules for using Geant4.
|
||||
|
||||
==========================================================================
|
||||
|
||||
URL
|
||||
---
|
||||
http://www-geant4.kek.jp/projects/Geant4Py/
|
||||
|
||||
System Requirements:
|
||||
-------------------
|
||||
Python
|
||||
- Python2.x and Python 3.x (experimental)
|
||||
|
||||
Geant4
|
||||
- version 9.x
|
||||
- should be built in "GLOBAL" and "SHARED" libraries.
|
||||
- All header files should be collected into $(G4INSTALL)/include
|
||||
by "make includes"
|
||||
|
||||
CLHEP
|
||||
- version 2.x
|
||||
- should be built in shared library.
|
||||
|
||||
(Optional)
|
||||
ROOT
|
||||
|
||||
Before Starting:
|
||||
----------------
|
||||
In dafault situation, Geant4 creates and uses "granular static libraries".
|
||||
But, the Python interface requires "GLOBAL SHARED library".
|
||||
If you donot build your Geant4 libraries in global shared mode,
|
||||
you have to recreate your instance additionally.
|
||||
|
||||
In "tools" directory, you can find some ways to handle both "glanular static"
|
||||
and "global shared" environments. Please take a look.
|
||||
|
||||
|
||||
How to Install:
|
||||
---------------
|
||||
There is a configuraton script for building the package.
|
||||
|
||||
# ./configure --help
|
||||
`configure' configures Geant4Py to adapt to many kinds of systems.
|
||||
|
||||
Usage: ./configure SYSTEM [OPTION]... [VAR=VALUE]...
|
||||
|
||||
SYSTEM: System type (see Supported Arhitectures)
|
||||
|
||||
Options:
|
||||
-h, --help Display this help and exit
|
||||
|
||||
Installation directories:
|
||||
--prefix=PREFIX Installation prefix [./]
|
||||
--libdir=DIR Python modules dir [PREFIX/lib]
|
||||
|
||||
Fine tuning of the library path:
|
||||
--with-g4-incdir=DIR Geant4 header dir [$G4INSTALL/include]
|
||||
--with-g4-libdir=DIR Geant4 library dir [$G4INSTALL/lib/$G4SYSTEM]
|
||||
--with-clhep-incdir=DIR CLHEP header dir [$CLHEP_BASE_DIR/include]
|
||||
--with-clhep-libdir=DIR CLHEP library dir [$CLHEP_BASE_DIR/lib]
|
||||
--with-clhep-lib=LIB library name of libCLHEP.so [CLHEP|$CLHEP_LIB]
|
||||
|
||||
--with-python-incdir=DIR Python header dir [/usr/include/python(2.#)],
|
||||
(location of pyconfig.h)
|
||||
--with-python-libdir=DIR Python library dir [/usr/lib(64)]
|
||||
--with-python3 Use Python3
|
||||
|
||||
--with-boost-incdir=DIR BOOST-C++ header dir [/usr/include],
|
||||
(location of boost/)
|
||||
--with-boost-libdir=DIR BOOST-C++ library dir [/usr/lib]
|
||||
--with-boost-python-lib=LIB library name of libboost_python.so [boost_python]
|
||||
|
||||
--with-package-dir=DIR Geant4 Package dir
|
||||
|
||||
--with-extra-dir=DIR Install path for extra packages [/usr/local]
|
||||
|
||||
--with-xercesc-incdir=DIR Xerces-C header dir [/usr/include]
|
||||
--with-xercesc-libdir=DIR Xerces-C library dir [/usr/lib(64)]
|
||||
|
||||
Enable/disable options: prefix with either --enable- or --disable-
|
||||
openglx OpenGLX support [auto]
|
||||
openglxm OpenGLXm support [disable, $G4VIS_USE_OPENGLXM]
|
||||
raytracerx RayTracerX support [disable, $G4VIS_USE_RAYTRACERX]
|
||||
|
||||
Supported Architectures:
|
||||
linux for Linux gcc 3.x and 4.x (32bit)
|
||||
linux64 for Linux gcc 3.x and 4.x (64bit, alias to linuxx8664gcc)
|
||||
linuxx8664gcc for AMD Opteron and Intel EM64T Linux gcc 3.x and 4.x
|
||||
macosx for MacOSX with gcc (Tiger/Leopard and Xcode)
|
||||
|
||||
You can specify all parameters adopting your environment.
|
||||
|
||||
For example,
|
||||
# ./configure linux64 (miserable)
|
||||
--with-g4-incdir=/opt/heplib/Geant4/geant4.8.1/include
|
||||
--with-g4-libdir=/opt/heplib/Geant4/geant4.8.1/slib/Linux-g++
|
||||
--with-clhep-incdir=/opt/heplib/CLHEP/2.0.2.2/include
|
||||
--with-clhep-libdir=/opt/heplib/CLHEP/2.0.2.2/lib
|
||||
--with-clhep-lib=CLHEP-2.0.2.2
|
||||
|
||||
# ./configure linux64 (smart)
|
||||
--with-package-dir=/opt/heplib/Geant4/packages/9.1.2
|
||||
|
||||
# ./confugre linux64 (intelligent or haphazard ?)
|
||||
|
||||
The configuration script will create config/config.gmk, which describes
|
||||
your envrionment.
|
||||
|
||||
After executing the configure script, then
|
||||
|
||||
# make
|
||||
# make install
|
||||
|
||||
That's all!
|
||||
|
||||
How to Use:
|
||||
-----------
|
||||
Some environment variables are required at run time.
|
||||
|
||||
* PYTHONPATH
|
||||
Python module search directories, given by a colon-separated list
|
||||
of directories.
|
||||
Practically, $(INSTALL_PATH)/lib is ok.
|
||||
|
||||
* LD_LIBRARY_PATH
|
||||
Additional shared library path to be searched.
|
||||
|
||||
Some libraries paths are already specified via "-rpath" linker option,
|
||||
so these paths do not have to be added to "LD_LIBRARY_PATH".
|
||||
* Geant4
|
||||
* CLHEP
|
||||
* boost-python library
|
||||
* $(INSTALL_PATH)/lib
|
||||
* $(G4PY_EXLIB_LIBDIR) specified in a module makefile.
|
||||
|
||||
|
||||
You can import Geant4Py modules in Python just like
|
||||
|
||||
>>> import Geant4
|
||||
|
||||
Notes:
|
||||
-----
|
||||
>> IMPORTANT <<
|
||||
All users' libraries should be build in SHARED libaries.
|
||||
|
||||
Have A Fun!!
|
||||
|
||||
Koichi Murakami <Koichi.Murakami@kek.jp>
|
||||
@@ -1,6 +0,0 @@
|
||||
Copy Right (C) 2004-2005 Koichi Murakami <Koichi.Murakami@kek.jp>
|
||||
|
||||
Contributors:
|
||||
H.Yoshida, G.Iwai
|
||||
|
||||
A special thanks goes to the Geant4 Collaboration.
|
||||
@@ -1,6 +1,3 @@
|
||||
$Id: History,v 1.53 2010-12-02 08:34:26 kmura Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
|
||||
=========================================================
|
||||
@@ -14,6 +11,24 @@ Geant4Py is a Geant4-Python bridge.
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
8 November 2012 K.Murakami
|
||||
- configure script is updated for CMake build
|
||||
- updated Geant4 interface for the latest
|
||||
- G4SystemOfUnits.hh and G4PhysicalConstants.hh are explictly added.
|
||||
- Documentations are updated in Markdown format.
|
||||
- some minor updated for examples
|
||||
|
||||
23 July 2012 K.Murakami
|
||||
- configure script: fixed logics for specifying python include path (bug.1316)
|
||||
- pyG4VisManager: (bug.1318))
|
||||
added static statement for GetVerbosity.
|
||||
fixed GetConcreteInstance returns an insufficient class pointer.
|
||||
|
||||
21 July 2012 K.Murakami
|
||||
- configure script is updated for internal G4clhep
|
||||
- pyG4Run.cc, pyG4Event.cc are updated as non-copyable (9.5.p01) (bug.1317)
|
||||
- g4autobuild, g4package scripts are apdated for internal clhep use.
|
||||
|
||||
10 Nomvembter 2011 K.Murakami
|
||||
- fixes on OSX Lion matters
|
||||
- some minor fixes for 9.5 release
|
||||
|
||||
@@ -0,0 +1,307 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="generated-by" content="Markdown PRO, http://markdownpro.com"/>
|
||||
<title></title>
|
||||
<style type="text/css">
|
||||
html,body{margin:0;padding:0;}
|
||||
body {padding: 20px}
|
||||
h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,cite,code,del,dfn,em,img,q,s,samp,small,strike,strong,sub,sup,tt,var,dd,dl,dt,li,ol,ul,fieldset,form,label,legend,button,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;font-weight:normal;font-style:normal;font-size:100%;line-height:1;font-family:inherit;}
|
||||
table{border-collapse:collapse;border-spacing:0;}
|
||||
ol,ul{list-style:none;}
|
||||
q:before,q:after,blockquote:before,blockquote:after{content:"";}
|
||||
html{overflow-y:scroll;font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;}
|
||||
a:focus{outline:thin dotted;}
|
||||
a:hover,a:active{outline:0;}
|
||||
article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block;}
|
||||
audio,canvas,video{display:inline-block;*display:inline;*zoom:1;}
|
||||
audio:not([controls]){display:none;}
|
||||
sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline;}
|
||||
sup{top:-0.5em;}
|
||||
sub{bottom:-0.25em;}
|
||||
img{border:0;-ms-interpolation-mode:bicubic;}
|
||||
button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle;}
|
||||
button,input{line-height:normal;*overflow:visible;}
|
||||
button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0;}
|
||||
button,input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button;}
|
||||
input[type="search"]{-webkit-appearance:textfield;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;}
|
||||
input[type="search"]::-webkit-search-decoration{-webkit-appearance:none;}
|
||||
textarea{overflow:auto;vertical-align:top;}
|
||||
html,body{background-color:#ffffff;}
|
||||
body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:18px;color:#404040;}
|
||||
.container{width:940px;margin-left:auto;margin-right:auto;zoom:1;}.container:before,.container:after{display:table;content:"";zoom:1;*display:inline;}
|
||||
.container:after{clear:both;}
|
||||
.container-fluid{position:relative;min-width:940px;padding-left:20px;padding-right:20px;zoom:1;}.container-fluid:before,.container-fluid:after{display:table;content:"";zoom:1;*display:inline;}
|
||||
.container-fluid:after{clear:both;}
|
||||
.container-fluid>.sidebar{float:left;width:220px;}
|
||||
.container-fluid>.content{margin-left:240px;}
|
||||
a{color:#0069d6;text-decoration:none;line-height:inherit;font-weight:inherit;}a:hover{color:#00438a;text-decoration:underline;}
|
||||
.pull-right{float:right;}
|
||||
.pull-left{float:left;}
|
||||
.hide{display:none;}
|
||||
.show{display:block;}
|
||||
.row{zoom:1;margin-left:-20px;}.row:before,.row:after{display:table;content:"";zoom:1;*display:inline;}
|
||||
.row:after{clear:both;}
|
||||
p{font-size:13px;font-weight:normal;line-height:18px;margin-bottom:9px;}p small{font-size:11px;color:#bfbfbf;}
|
||||
h1,h2,h3,h4,h5,h6{font-weight:bold;color:#404040;}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{color:#bfbfbf;}
|
||||
h1{margin-bottom:18px;font-size:30px;line-height:36px;}h1 small{font-size:18px;}
|
||||
h2{font-size:24px;line-height:36px;}h2 small{font-size:14px;}
|
||||
h3,h4,h5,h6{line-height:36px;}
|
||||
h3{font-size:18px;}h3 small{font-size:14px;}
|
||||
h4{font-size:16px;}h4 small{font-size:12px;}
|
||||
h5{font-size:14px;}
|
||||
h6{font-size:13px;color:#bfbfbf;text-transform:uppercase;}
|
||||
ul,ol{margin:0 0 18px 25px;}
|
||||
ul ul,ul ol,ol ol,ol ul{margin-bottom:0;}
|
||||
ul{list-style:disc;}
|
||||
ol{list-style:decimal;}
|
||||
li{line-height:18px;color:#808080;}
|
||||
ul.unstyled{list-style:none;margin-left:0;}
|
||||
dl{margin-bottom:18px;}dl dt,dl dd{line-height:18px;}
|
||||
dl dt{font-weight:bold;}
|
||||
dl dd{margin-left:9px;}
|
||||
hr{margin:20px 0 19px;border:0;border-bottom:1px solid #eee;}
|
||||
strong{font-style:inherit;font-weight:bold;}
|
||||
em{font-style:italic;font-weight:inherit;line-height:inherit;}
|
||||
.muted{color:#bfbfbf;}
|
||||
blockquote{margin-bottom:18px;border-left:5px solid #eee;padding-left:15px;}blockquote p{font-size:14px;font-weight:300;line-height:18px;margin-bottom:0;}
|
||||
blockquote small{display:block;font-size:12px;font-weight:300;line-height:18px;color:#bfbfbf;}blockquote small:before{content:'\2014 \00A0';}
|
||||
address{display:block;line-height:18px;margin-bottom:18px;}
|
||||
code,pre{padding:0 3px 2px;font-family:Monaco, Andale Mono, Courier New, monospace;font-size:12px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
|
||||
code{padding:1px 3px;}
|
||||
pre{background-color:#f5f5f5;display:block;padding:8.5px;margin:0 0 18px;line-height:18px;font-size:12px;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.15);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;white-space:pre;white-space:pre-wrap;word-wrap:break-word;}
|
||||
form{margin-bottom:18px;}
|
||||
fieldset{margin-bottom:18px;padding-top:18px;}fieldset legend{display:block;padding-left:150px;font-size:19.5px;line-height:1;color:#404040;*padding:0 0 5px 145px;*line-height:1.5;}
|
||||
form .clearfix{margin-bottom:18px;zoom:1;}form .clearfix:before,form .clearfix:after{display:table;content:"";zoom:1;*display:inline;}
|
||||
form .clearfix:after{clear:both;}
|
||||
label,input,select,textarea{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:normal;}
|
||||
label{padding-top:6px;font-size:13px;line-height:18px;float:left;width:130px;text-align:right;color:#404040;}
|
||||
form .input{margin-left:150px;}
|
||||
input[type=checkbox],input[type=radio]{cursor:pointer;}
|
||||
input,textarea,select,.uneditable-input{display:inline-block;width:210px;height:18px;padding:4px;font-size:13px;line-height:18px;color:#808080;border:1px solid #ccc;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
|
||||
input[type=checkbox],input[type=radio]{width:auto;height:auto;padding:0;margin:3px 0;*margin-top:0;line-height:normal;border:none;}
|
||||
input[type=file]{background-color:#ffffff;padding:initial;border:initial;line-height:initial;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}
|
||||
input[type=button],input[type=reset],input[type=submit]{width:auto;height:auto;}
|
||||
select,input[type=file]{height:27px;line-height:27px;*margin-top:4px;}
|
||||
select[multiple]{height:inherit;}
|
||||
textarea{height:auto;}
|
||||
.uneditable-input{background-color:#ffffff;display:block;border-color:#eee;-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);cursor:not-allowed;}
|
||||
:-moz-placeholder{color:#bfbfbf;}
|
||||
::-webkit-input-placeholder{color:#bfbfbf;}
|
||||
input,textarea{-webkit-transition:border linear 0.2s,box-shadow linear 0.2s;-moz-transition:border linear 0.2s,box-shadow linear 0.2s;-ms-transition:border linear 0.2s,box-shadow linear 0.2s;-o-transition:border linear 0.2s,box-shadow linear 0.2s;transition:border linear 0.2s,box-shadow linear 0.2s;-webkit-box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1);-moz-box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1);box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1);}
|
||||
input:focus,textarea:focus{outline:0;border-color:rgba(82, 168, 236, 0.8);-webkit-box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1),0 0 8px rgba(82, 168, 236, 0.6);-moz-box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1),0 0 8px rgba(82, 168, 236, 0.6);box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1),0 0 8px rgba(82, 168, 236, 0.6);}
|
||||
input[type=file]:focus,input[type=checkbox]:focus,select:focus{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;outline:1px dotted #666;}
|
||||
form div.clearfix.error{background:#fae5e3;padding:10px 0;margin:-10px 0 10px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}form div.clearfix.error>label,form div.clearfix.error span.help-inline,form div.clearfix.error span.help-block{color:#9d261d;}
|
||||
form div.clearfix.error input,form div.clearfix.error textarea{border-color:#c87872;-webkit-box-shadow:0 0 3px rgba(171, 41, 32, 0.25);-moz-box-shadow:0 0 3px rgba(171, 41, 32, 0.25);box-shadow:0 0 3px rgba(171, 41, 32, 0.25);}form div.clearfix.error input:focus,form div.clearfix.error textarea:focus{border-color:#b9554d;-webkit-box-shadow:0 0 6px rgba(171, 41, 32, 0.5);-moz-box-shadow:0 0 6px rgba(171, 41, 32, 0.5);box-shadow:0 0 6px rgba(171, 41, 32, 0.5);}
|
||||
form div.clearfix.error .input-prepend span.add-on,form div.clearfix.error .input-append span.add-on{background:#f4c8c5;border-color:#c87872;color:#b9554d;}
|
||||
table{width:100%;margin-bottom:18px;padding:0;border-collapse:separate;*border-collapse:collapse;font-size:13px;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}table th,table td{padding:10px 10px 9px;line-height:18px;text-align:left;}
|
||||
table th{padding-top:9px;font-weight:bold;vertical-align:middle;border-bottom:1px solid #ddd;}
|
||||
table td{vertical-align:top;}
|
||||
table th+th,table td+td{border-left:1px solid #ddd;}
|
||||
table tr+tr td{border-top:1px solid #ddd;}
|
||||
table tbody tr:first-child td:first-child{-webkit-border-radius:4px 0 0 0;-moz-border-radius:4px 0 0 0;border-radius:4px 0 0 0;}
|
||||
table tbody tr:first-child td:last-child{-webkit-border-radius:0 4px 0 0;-moz-border-radius:0 4px 0 0;border-radius:0 4px 0 0;}
|
||||
table tbody tr:last-child td:first-child{-webkit-border-radius:0 0 0 4px;-moz-border-radius:0 0 0 4px;border-radius:0 0 0 4px;}
|
||||
table tbody tr:last-child td:last-child{-webkit-border-radius:0 0 4px 0;-moz-border-radius:0 0 4px 0;border-radius:0 0 4px 0;}
|
||||
.zebra-striped tbody tr:nth-child(odd) td{background-color:#f9f9f9;}
|
||||
.zebra-striped tbody tr:hover td{background-color:#f5f5f5;}
|
||||
.zebra-striped .header{cursor:pointer;}.zebra-striped .header:after{content:"";float:right;margin-top:7px;border-width:0 4px 4px;border-style:solid;border-color:#000 transparent;visibility:hidden;}
|
||||
.zebra-striped .header:hover:after{visibility:visible;}
|
||||
footer{margin-top:17px;padding-top:17px;border-top:1px solid #eee;}
|
||||
.page-header{margin-bottom:17px;border-bottom:1px solid #ddd;-webkit-box-shadow:0 1px 0 rgba(255, 255, 255, 0.5);-moz-box-shadow:0 1px 0 rgba(255, 255, 255, 0.5);box-shadow:0 1px 0 rgba(255, 255, 255, 0.5);}.page-header h1{margin-bottom:8px;}
|
||||
.close{float:right;color:#000000;font-size:20px;font-weight:bold;line-height:13.5px;text-shadow:0 1px 0 #ffffff;filter:alpha(opacity=20);-khtml-opacity:0.2;-moz-opacity:0.2;opacity:0.2;}.close:hover{color:#000000;text-decoration:none;filter:alpha(opacity=40);-khtml-opacity:0.4;-moz-opacity:0.4;opacity:0.4;}
|
||||
|
||||
pre {
|
||||
padding: 0;
|
||||
margin: 10px 0px 10px;
|
||||
overflow: auto; /*--If the Code exceeds the width, a scrolling is available--*/
|
||||
overflow-Y: hidden; /*--Hides vertical scroll created by IE--*/
|
||||
}
|
||||
pre code {
|
||||
margin: 5px; /*--Left Margin--*/
|
||||
padding: 0px;
|
||||
display: block;
|
||||
line-height: 18px;
|
||||
}
|
||||
.center { text-align:center}
|
||||
.left {text-align:left}
|
||||
.right {text-align:right}
|
||||
|
||||
</style><style type="text/css">
|
||||
body{font-size:14px;line-height:1.6;font-family: Helvetica, arial, freesans, clean, sans-serif;padding: 20px;}
|
||||
body>*:first-child{margin-top:0!important;}
|
||||
body>*:last-child{margin-bottom:0!important;}
|
||||
body a:active {outline: none;}
|
||||
body a:hover {text-decoration: underline;}
|
||||
body a {color: #4183C4;text-decoration: none;}
|
||||
body a.absent{color:#c00;}
|
||||
body h1, body h2, h3, h4, h5, h6{margin:20px 0 10px;padding:0;font-weight:bold;-webkit-font-smoothing:antialiased;}
|
||||
body h1 tt, h1 code, h2 tt, h2 code, h3 tt, h3 code, h4 tt, h4 code, h5 tt, h5 code, h6 tt, h6 code{font-size:inherit;}
|
||||
body h1{font-size:28px;color:#000;}
|
||||
body h2{font-size:24px;border-bottom:1px solid #ccc;color:#000;}
|
||||
body h3{font-size:18px;}
|
||||
body h4{font-size:16px;}
|
||||
body h5{font-size:14px;}
|
||||
body h6{color:#777;font-size:14px;}
|
||||
body p, blockquote, ul, ol, dl, li, table, pre{margin:15px 0;}
|
||||
body hr{background:transparent url('../../images/modules/pulls/dirty-shade.png') repeat-x 0 0;border:0 none;color:#ccc;height:4px;padding:0;}
|
||||
body>h2:first-child,>h1:first-child,>h1:first-child+h2,>h3:first-child,>h4:first-child,>h5:first-child,>h6:first-child{margin-top:0;padding-top:0;}
|
||||
body h1+p, h2+p, h3+p, h4+p, h5+p, h6+p{margin-top:0;}
|
||||
body li p.first{display:inline-block;}
|
||||
body ul, ol{padding-left:30px;}
|
||||
body ul li>:first-child, ol li>:first-child{margin-top:0;}
|
||||
body ul li>:last-child, ol li>:last-child{margin-bottom:0;}
|
||||
body dl{padding:0;}
|
||||
body dl dt{font-size:14px;font-weight:bold;font-style:italic;padding:0;margin:15px 0 5px;}
|
||||
body dl dt:first-child{padding:0;}
|
||||
body dl dt>:first-child{margin-top:0;}
|
||||
body dl dt>:last-child{margin-bottom:0;}
|
||||
body dl dd{margin:0 0 15px;padding:0 15px;}
|
||||
body dl dd>:first-child{margin-top:0;}
|
||||
body dl dd>:last-child{margin-bottom:0;}
|
||||
body blockquote{border-left:4px solid #DDD;padding:0 15px;color:#777;}
|
||||
body blockquote>:first-child{margin-top:0;}
|
||||
body blockquote>:last-child{margin-bottom:0;}
|
||||
body table{padding:0;}
|
||||
body table tr{border-top:1px solid #ccc;background-color:#fff;margin:0;padding:0;}
|
||||
body table tr:nth-child(2n){background-color:#f8f8f8;}
|
||||
body table tr th{font-weight:bold;}
|
||||
body table tr th, table tr td{border:1px solid #ccc;text-align:left;margin:0;padding:6px 13px;}
|
||||
body table tr th>:first-child, table tr td>:first-child{margin-top:0;}
|
||||
body table tr th>:last-child, table tr td>:last-child{margin-bottom:0;}
|
||||
body img{max-width:100%;}
|
||||
body span.frame{display:block;overflow:hidden;}
|
||||
body span.frame>span{border:1px solid #ddd;display:block;float:left;overflow:hidden;margin:13px 0 0;padding:7px;width:auto;}
|
||||
body span.frame span img{display:block;float:left;}
|
||||
body span.frame span span{clear:both;color:#333;display:block;padding:5px 0 0;}
|
||||
body span.align-center{display:block;overflow:hidden;clear:both;}
|
||||
body span.align-center>span{display:block;overflow:hidden;margin:13px auto 0;text-align:center;}
|
||||
body span.align-center span img{margin:0 auto;text-align:center;}
|
||||
body span.align-right{display:block;overflow:hidden;clear:both;}
|
||||
body span.align-right>span{display:block;overflow:hidden;margin:13px 0 0;text-align:right;}
|
||||
body span.align-right span img{margin:0;text-align:right;}
|
||||
body span.float-left{display:block;margin-right:13px;overflow:hidden;float:left;}
|
||||
body span.float-left span{margin:13px 0 0;}
|
||||
body span.float-right{display:block;margin-left:13px;overflow:hidden;float:right;}
|
||||
body span.float-right>span{display:block;overflow:hidden;margin:13px auto 0;text-align:right;}
|
||||
body code, tt{margin:0 2px;padding:0 5px;white-space:nowrap;border:1px solid #eaeaea;background-color:#f8f8f8;border-radius:3px;}
|
||||
body pre>code{margin:0;padding:0;white-space:pre;border:none;background:transparent;}
|
||||
body .highlight pre, pre{background-color:#f8f8f8;border:1px solid #ccc;font-size:13px;line-height:19px;overflow:auto;padding:6px 10px;border-radius:3px;}
|
||||
body pre code, pre tt{background-color:transparent;border:none;}
|
||||
</style></head>
|
||||
<body>
|
||||
<h1>Geant4Py</h1>
|
||||
|
||||
<p><em>A set of python modules for using Geant4</em></p>
|
||||
|
||||
<h2>System Requirements</h2>
|
||||
|
||||
<h3>Python</h3>
|
||||
|
||||
<p>Python2.x and Python 3.x (experimental)</p>
|
||||
|
||||
<h3>Geant4</h3>
|
||||
|
||||
<p>built with CMake</p>
|
||||
|
||||
<h3>CLHEP</h3>
|
||||
|
||||
<p>use Geant4-CLHEP</p>
|
||||
|
||||
<h3>(Optional)</h3>
|
||||
|
||||
<p>ROOT for histogramming/analysis</p>
|
||||
|
||||
<h2>How to Install</h2>
|
||||
|
||||
<p>There is a configuration script for building the package.</p>
|
||||
|
||||
<pre><code># ./configure --help
|
||||
`configure' configures Geant4Py to adapt to many kinds of systems.
|
||||
|
||||
Usage: ./configure SYSTEM [OPTION]... [VAR=VALUE]...
|
||||
|
||||
SYSTEM: System type (see Supported Arhitectures)
|
||||
|
||||
Options:
|
||||
-h, --help Display this help and exit
|
||||
|
||||
Installation directories:
|
||||
--prefix=PREFIX Installation prefix [./]
|
||||
--libdir=DIR Python modules dir [PREFIX/lib]
|
||||
|
||||
Fine tuning of the library path:
|
||||
--with-g4install-dir=DIR Geant4 installed dir
|
||||
|
||||
--with-python-incdir=DIR Python header dir [/usr/include/python(2.#)],
|
||||
(location of pyconfig.h)
|
||||
--with-python-libdir=DIR Python library dir [/usr/lib(64)]
|
||||
--with-python3 Use Python3
|
||||
|
||||
--with-boost-incdir=DIR BOOST-C++ header dir [/usr/include],
|
||||
(location of boost/)
|
||||
--with-boost-libdir=DIR BOOST-C++ library dir [/usr/lib]
|
||||
--with-boost-python-lib=LIB library name of libboost_python.so [boost_python]
|
||||
|
||||
--with-extra-dir=DIR Install path for extra packages [/usr/local]
|
||||
|
||||
--with-xercesc-incdir=DIR Xerces-C header dir [/usr/include]
|
||||
--with-xercesc-libdir=DIR Xerces-C library dir [/usr/lib(64)]
|
||||
|
||||
Enable/disable options: prefix with either --enable- or --disable-
|
||||
openglx OpenGLX support [auto]
|
||||
openglxm OpenGLXm support [disable]
|
||||
raytracerx RayTracerX support [disable]
|
||||
|
||||
Supported Architectures:
|
||||
linux for Linux gcc (32bit)
|
||||
linux64 for Linux gcc (64bit)
|
||||
linuxx8664gcc for Linux gcc (64bit)
|
||||
macosx for Apple OS X with gcc
|
||||
</code></pre>
|
||||
|
||||
<p>For example,</p>
|
||||
|
||||
<pre><code># ./configure linux64 -with-g4install-dir=<geant4 install path with CMake>
|
||||
</code></pre>
|
||||
|
||||
<p>The configuration script will create config/config.gmk,
|
||||
which describes your environment.</p>
|
||||
|
||||
<p>After executing the <code>configure</code> script, then </p>
|
||||
|
||||
<pre><code># make
|
||||
# make install
|
||||
</code></pre>
|
||||
|
||||
<h2>How to Use:</h2>
|
||||
|
||||
<p>Some environment variables are required at run time.</p>
|
||||
|
||||
<h3><em>PYTHONPATH</em></h3>
|
||||
|
||||
<p>Python module search directories, given by a colon-separated list of directories.
|
||||
Practically, <code>$(INSTALL_PATH)/lib</code> is ok.</p>
|
||||
|
||||
<h3><em>LD_LIBRARY_PATH</em></h3>
|
||||
|
||||
<p>Additional shared library path to be searched.</p>
|
||||
|
||||
<p>Some libraries paths are already specified via <em>-rpath</em> linker option,
|
||||
so these paths do not have to be added to <em>LD_LIBRARY_PATH</em>.</p>
|
||||
|
||||
<ul>
|
||||
<li>Geant4</li>
|
||||
<li>boost-python library</li>
|
||||
<li>$(INSTALL_PATH)/lib</li>
|
||||
<li>$(G4PY_EXLIB_LIBDIR) specified in a module makefile.</li>
|
||||
</ul>
|
||||
|
||||
<p>You can import Geant4Py modules in Python just like</p>
|
||||
|
||||
<pre><code>>>> import Geant4
|
||||
</code></pre>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,112 @@
|
||||
Geant4Py
|
||||
========
|
||||
|
||||
_A set of python modules for using Geant4_
|
||||
|
||||
|
||||
System Requirements
|
||||
-------------------
|
||||
### Python
|
||||
|
||||
Python2.x and Python 3.x (experimental)
|
||||
|
||||
### Geant4
|
||||
|
||||
built with CMake
|
||||
|
||||
### CLHEP
|
||||
|
||||
use Geant4-CLHEP
|
||||
|
||||
### (Optional)
|
||||
|
||||
ROOT for histogramming/analysis
|
||||
|
||||
|
||||
How to Install
|
||||
--------------
|
||||
There is a configuration script for building the package.
|
||||
|
||||
# ./configure --help
|
||||
`configure' configures Geant4Py to adapt to many kinds of systems.
|
||||
|
||||
Usage: ./configure SYSTEM [OPTION]... [VAR=VALUE]...
|
||||
|
||||
SYSTEM: System type (see Supported Arhitectures)
|
||||
|
||||
Options:
|
||||
-h, --help Display this help and exit
|
||||
|
||||
Installation directories:
|
||||
--prefix=PREFIX Installation prefix [./]
|
||||
--libdir=DIR Python modules dir [PREFIX/lib]
|
||||
|
||||
Fine tuning of the library path:
|
||||
--with-g4install-dir=DIR Geant4 installed dir
|
||||
|
||||
--with-python-incdir=DIR Python header dir [/usr/include/python(2.#)],
|
||||
(location of pyconfig.h)
|
||||
--with-python-libdir=DIR Python library dir [/usr/lib(64)]
|
||||
--with-python3 Use Python3
|
||||
|
||||
--with-boost-incdir=DIR BOOST-C++ header dir [/usr/include],
|
||||
(location of boost/)
|
||||
--with-boost-libdir=DIR BOOST-C++ library dir [/usr/lib]
|
||||
--with-boost-python-lib=LIB library name of libboost_python.so [boost_python]
|
||||
|
||||
--with-extra-dir=DIR Install path for extra packages [/usr/local]
|
||||
|
||||
--with-xercesc-incdir=DIR Xerces-C header dir [/usr/include]
|
||||
--with-xercesc-libdir=DIR Xerces-C library dir [/usr/lib(64)]
|
||||
|
||||
Enable/disable options: prefix with either --enable- or --disable-
|
||||
openglx OpenGLX support [auto]
|
||||
openglxm OpenGLXm support [disable]
|
||||
raytracerx RayTracerX support [disable]
|
||||
|
||||
Supported Architectures:
|
||||
linux for Linux gcc (32bit)
|
||||
linux64 for Linux gcc (64bit)
|
||||
linuxx8664gcc for Linux gcc (64bit)
|
||||
macosx for Apple OS X with gcc
|
||||
|
||||
|
||||
For example,
|
||||
|
||||
# ./configure linux64 -with-g4install-dir=<geant4 install path with CMake>
|
||||
|
||||
The configuration script will create config/config.gmk,
|
||||
which describes your environment.
|
||||
|
||||
After executing the `configure` script, then
|
||||
|
||||
# make
|
||||
# make install
|
||||
|
||||
|
||||
How to Use:
|
||||
-----------
|
||||
Some environment variables are required at run time.
|
||||
|
||||
### *PYTHONPATH*
|
||||
|
||||
Python module search directories, given by a colon-separated list of directories.
|
||||
Practically, `$(INSTALL_PATH)/lib` is ok.
|
||||
|
||||
### *LD\_LIBRARY\_PATH*
|
||||
|
||||
Additional shared library path to be searched.
|
||||
|
||||
Some libraries paths are already specified via *-rpath* linker option,
|
||||
so these paths do not have to be added to *LD\_LIBRARY\_PATH*.
|
||||
|
||||
* Geant4
|
||||
* boost-python library
|
||||
* $(INSTALL_PATH)/lib
|
||||
* $(G4PY\_EXLIB\_LIBDIR) specified in a module makefile.
|
||||
|
||||
|
||||
You can import Geant4Py modules in Python just like
|
||||
|
||||
>>> import Geant4
|
||||
|
||||
@@ -9,6 +9,7 @@ G4PY_INCFLAGS := -I$(Q_G4_INCDIR)
|
||||
G4PY_LOPT := -L$(Q_G4_LIBDIR) \
|
||||
-lG4persistency \
|
||||
-lG4readout \
|
||||
-lG4physicslists \
|
||||
-lG4run \
|
||||
-lG4event \
|
||||
-lG4tracking \
|
||||
@@ -22,17 +23,12 @@ G4PY_LOPT := -L$(Q_G4_LIBDIR) \
|
||||
-lG4graphics_reps \
|
||||
-lG4intercoms \
|
||||
-lG4interfaces \
|
||||
-lG4global
|
||||
|
||||
ifeq ($(Q_ENABLE_PHYSICSLIST), 1)
|
||||
G4PY_LOPT += -lG4physicslists
|
||||
endif
|
||||
-lG4global \
|
||||
-lG4clhep
|
||||
|
||||
include $(G4PY_INSTALL)/config/g4vis.gmk
|
||||
G4PY_LOPT += $(G4PY_VISLIBS)
|
||||
|
||||
G4PY_INCFLAGS += -I$(Q_CLHEP_INCDIR)
|
||||
G4PY_LOPT += -L$(Q_CLHEP_LIBDIR) -l$(Q_CLHEP_LIB)
|
||||
G4PY_LOPT += -lm -lz -lexpat
|
||||
|
||||
# geant4 version
|
||||
|
||||
Vendored
+33
-125
@@ -1,12 +1,9 @@
|
||||
#! /bin/sh -
|
||||
#$Id: configure,v 1.18 2010-12-02 08:36:02 kmura Exp $
|
||||
# ======================================================================
|
||||
# A configure script for Geant4Py
|
||||
# ======================================================================
|
||||
export LANG=C
|
||||
|
||||
IFS='
|
||||
'
|
||||
PATH=/bin:/usr/bin
|
||||
export PATH
|
||||
|
||||
@@ -16,7 +13,7 @@ export PATH
|
||||
if `(echo "testing\c"; echo 1,2,3) | grep c > /dev/null` ; then
|
||||
if `(echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn > /dev/null`; then
|
||||
ac_n= ac_c='
|
||||
' ac_t=' '
|
||||
' ac_t=' '
|
||||
else
|
||||
ac_n=-n ac_c= ac_t=
|
||||
fi
|
||||
@@ -43,11 +40,7 @@ Installation directories:
|
||||
--libdir=DIR Python modules dir [PREFIX/lib]
|
||||
|
||||
Fine tuning of the library path:
|
||||
--with-g4-incdir=DIR Geant4 header dir [\$G4INSTALL/include]
|
||||
--with-g4-libdir=DIR Geant4 library dir [\$G4INSTALL/lib/\$G4SYSTEM]
|
||||
--with-clhep-incdir=DIR CLHEP header dir [\$CLHEP_BASE_DIR/include]
|
||||
--with-clhep-libdir=DIR CLHEP library dir [\$CLHEP_BASE_DIR/lib]
|
||||
--with-clhep-lib=LIB library name of libCLHEP.so [CLHEP|\$CLHEP_LIB]
|
||||
--with-g4install-dir=DIR Geant4 installed dir
|
||||
|
||||
--with-python-incdir=DIR Python header dir [/usr/include/python(2.#)],
|
||||
(location of pyconfig.h)
|
||||
@@ -59,8 +52,6 @@ Fine tuning of the library path:
|
||||
--with-boost-libdir=DIR BOOST-C++ library dir [/usr/lib]
|
||||
--with-boost-python-lib=LIB library name of libboost_python.so [boost_python]
|
||||
|
||||
--with-package-dir=DIR Geant4 Package dir
|
||||
|
||||
--with-extra-dir=DIR Install path for extra packages [/usr/local]
|
||||
|
||||
--with-xercesc-incdir=DIR Xerces-C header dir [/usr/include]
|
||||
@@ -68,14 +59,14 @@ Fine tuning of the library path:
|
||||
|
||||
Enable/disable options: prefix with either --enable- or --disable-
|
||||
openglx OpenGLX support [auto]
|
||||
openglxm OpenGLXm support [disable, \$G4VIS_USE_OPENGLXM]
|
||||
raytracerx RayTracerX support [disable, \$G4VIS_USE_RAYTRACERX]
|
||||
openglxm OpenGLXm support [disable]
|
||||
raytracerx RayTracerX support [disable]
|
||||
|
||||
Supported Architectures:
|
||||
linux for Linux gcc 3.x and 4.x (32bit)
|
||||
linux64 for Linux gcc 3.x and 4.x (64bit, alias to linuxx8664gcc)
|
||||
linuxx8664gcc for AMD Opteron and Intel EM64T Linux gcc 3.x and 4.x
|
||||
macosx for MacOSX with gcc (Tiger/Leopard and Xcode)
|
||||
linux for Linux gcc (32bit)
|
||||
linux64 for Linux gcc (64bit)
|
||||
linuxx8664gcc for Linux gcc (64bit)
|
||||
macosx for Apple OS X with gcc
|
||||
|
||||
EOF
|
||||
}
|
||||
@@ -93,10 +84,6 @@ current_dir=`pwd`
|
||||
g4_incdir=/zzz
|
||||
g4_libdir=/zzz
|
||||
|
||||
clhep_incdir=/zzz
|
||||
clhep_libdir=/zzz
|
||||
clhep_lib=${CLHEP_LIB:-CLHEP}
|
||||
|
||||
python_incdir=/zzz
|
||||
python_exe=python
|
||||
with_python3=0
|
||||
@@ -104,10 +91,8 @@ boost_incdir=/usr/include
|
||||
boost_python_lib=boost_python
|
||||
|
||||
enable_openglx=1
|
||||
enable_openglxm=${G4VIS_USE_OPENGLXM:+1}
|
||||
enable_openglxm=${enable_openglxm:-0}
|
||||
enable_raytracerx=${G4VIS_USE_RAYTRACERX:+1}
|
||||
enable_raytracerx=${enable_raytracerx:-0}
|
||||
enable_openglxm=0
|
||||
enable_raytracerx=0
|
||||
enable_gl2ps=0
|
||||
|
||||
enable_physicslist=0
|
||||
@@ -161,15 +146,7 @@ do
|
||||
# ---------------------------------------------------------------
|
||||
--prefix=*) prefix=$optarg ;;
|
||||
--libdir=*) libdir=$optarg ;;
|
||||
--with-package-dir=*) g4_incdir=$optarg/include/Geant4
|
||||
g4_libdir=$optarg/lib
|
||||
clhep_incdir=$optarg/include
|
||||
clhep_libdir=$optarg/lib ;;
|
||||
--with-g4-incdir=*) g4_incdir=$optarg ;;
|
||||
--with-g4-libdir=*) g4_libdir=$optarg ;;
|
||||
--with-clhep-incdir=*) clhep_incdir=$optarg ;;
|
||||
--with-clhep-libdir=*) clhep_libdir=$optarg ;;
|
||||
--with-clhep-lib=*) clhep_lib=$optarg ;;
|
||||
--with-g4install-dir=*) g4_install=$optarg ;;
|
||||
--with-extra-dir=*) extra_dir=$optarg ;;
|
||||
--with-python-incdir=*) python_incdir=$optarg ;;
|
||||
--with-python-libdir=*) python_libdir=$optarg ;;
|
||||
@@ -227,42 +204,26 @@ libdir=${libdir:-$prefix/lib}
|
||||
echo $libdir
|
||||
|
||||
echo $ac_n "Checking for G4 include dir ... $ac_c"
|
||||
g4_incdir1=${G4INSTALL:+$G4INSTALL/include}
|
||||
g4_incdir2=${G4INCLUDE:+$G4INCLUDE}
|
||||
set $g4_incdir $g4_incdir1 $g4_incdir2
|
||||
for adir in $*
|
||||
do
|
||||
if [ -d "$adir" ]; then
|
||||
g4_incdir=$adir
|
||||
break
|
||||
fi
|
||||
done
|
||||
g4_incdir=$g4_install/include/Geant4
|
||||
|
||||
if [ ! -d "$g4_incdir" ]; then
|
||||
echo "no"
|
||||
echo $ac_n "### $g4_incdir (g4-incdir) does not exist. $ac_c"
|
||||
echo "Try --with-g4-incdir option."
|
||||
echo $ac_n "### Geant4 include directory does not exist. $ac_c"
|
||||
exit -1
|
||||
fi
|
||||
echo "$g4_incdir"
|
||||
|
||||
# ---
|
||||
echo $ac_n "Checking for G4 lib dir ... $ac_c"
|
||||
g4_libdir1=${G4INSTALL:+$G4INSTALL/lib/$G4SYSTEM}
|
||||
g4_libdir2=${G4LIB:+$G4LIB/$G4SYSTEM}
|
||||
set $g4_libdir/$G4SYSTEM $g4_libdir $g4_libdir1 $g4_libdir2
|
||||
for adir in $*
|
||||
do
|
||||
if [ -d "$adir" ]; then
|
||||
g4_libdir=$adir
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [ $arch = 64 ]; then
|
||||
g4_libdir=$g4_install/lib64
|
||||
else
|
||||
g4_libdir=$g4_install/lib
|
||||
fi
|
||||
|
||||
if [ ! -d "$g4_libdir" ]; then
|
||||
echo "no"
|
||||
echo $ac_n "### $g4_libdir (g4-libdir) does not exist. $ac_c"
|
||||
echo "Try --with-g4-libdir option."
|
||||
echo $ac_n "### Geant4 lib directory does not exist. $ac_c"
|
||||
exit -1
|
||||
fi
|
||||
echo "$g4_libdir"
|
||||
@@ -276,72 +237,23 @@ if [ ! -f ${g4_libdir}/libG4run.${shlib} ]; then
|
||||
fi
|
||||
echo "ok"
|
||||
|
||||
# ---
|
||||
clhep_incdir1=${CLHEP_INCLUDE_DIR:-/zzz}
|
||||
clhep_incdir2=${CLHEP_BASE_DIR:+$CLHEP_BASE_DIR/include}
|
||||
set $clhep_incdir $clhep_incdir1 $clhep_incdir2
|
||||
for adir in $*
|
||||
do
|
||||
if [ -d "$adir" ]; then
|
||||
clhep_incdir=$adir
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
echo $ac_n "Checking for CLHEP include dir ... $ac_c"
|
||||
if [ ! -d "$clhep_incdir" ]; then
|
||||
echo "no"
|
||||
echo $ac_n "### $clhep_incdir (clhep-incdir) does not exist. $ac_c"
|
||||
echo "Try --with-clhep-incdir option."
|
||||
exit -1
|
||||
fi
|
||||
echo "$clhep_incdir"
|
||||
|
||||
# ---
|
||||
clhep_libdir1=${CLHEP_LIB_DIR:-/zzz}
|
||||
clhep_libdir2=${CLHEP_BASE_DIR:+$CLHEP_BASE_DIR/lib}
|
||||
set $clhep_libdir $clhep_libdir1 $clhep_libdir2
|
||||
for adir in $*
|
||||
do
|
||||
if [ -d "$adir" ]; then
|
||||
clhep_libdir=$adir
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
echo $ac_n "Checking for CLHEP lib dir ... $ac_c"
|
||||
if [ ! -d "$clhep_libdir" ]; then
|
||||
echo "no"
|
||||
echo $ac_n "### $clhep_libdir (clhep-libdir) does not exist. $ac_c"
|
||||
echo "Try --with-clhep-libdir option."
|
||||
exit -1
|
||||
fi
|
||||
echo "$clhep_libdir"
|
||||
|
||||
echo $ac_n "Checking for CLHEP lib name ... $ac_c"
|
||||
if [ ! -f "$clhep_libdir"/lib${clhep_lib}.${shlib} ]; then
|
||||
echo "no"
|
||||
echo $ac_n "### lib${clhep_lib}.${shlib} (clhep-lib) does not exist. $ac_c"
|
||||
echo "Try --with-clhep-lib option."
|
||||
exit -1
|
||||
fi
|
||||
echo "lib${clhep_lib}.${shlib}"
|
||||
|
||||
# ---
|
||||
echo $ac_n "Checking for Python include dir (pyconfig.h) ... $ac_c"
|
||||
# check version
|
||||
if [ $with_python3 = 0 ]; then
|
||||
set python python2.7 python2.6 python2.5 python2.4 python2.3 python2.2
|
||||
else
|
||||
set python3.1 python3.0
|
||||
fi
|
||||
for aincdir in $*
|
||||
do
|
||||
if [ -d /usr/include/"$aincdir" ]; then
|
||||
python_incdir=/usr/include/$aincdir
|
||||
break
|
||||
if [ $python_incdir = /zzz ]; then
|
||||
# check version
|
||||
if [ $with_python3 = 0 ]; then
|
||||
set python python2.7 python2.6 python2.5 python2.4 python2.3 python2.2
|
||||
else
|
||||
set python3.3 python3.2 python3.1 python3.0
|
||||
fi
|
||||
done
|
||||
for aincdir in $*
|
||||
do
|
||||
if [ -d /usr/include/"$aincdir" ]; then
|
||||
python_incdir=/usr/include/$aincdir
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
if [ ! -f "$python_incdir"/pyconfig.h ]; then
|
||||
echo "no"
|
||||
@@ -557,10 +469,6 @@ EOF
|
||||
|
||||
cat >> $make_config <<EOF
|
||||
|
||||
Q_CLHEP_INCDIR := $clhep_incdir
|
||||
Q_CLHEP_LIBDIR := $clhep_libdir
|
||||
Q_CLHEP_LIB := $clhep_lib
|
||||
|
||||
Q_PYTHON_INCDIR := $python_incdir
|
||||
Q_PYTHON_LIBDIR := $python_libdir
|
||||
Q_PYTHON := $python_exe
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
#include "G4SolidStore.hh"
|
||||
|
||||
#include "G4UnitsTable.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
|
||||
#include "G4LossTableManager.hh"
|
||||
#include "G4UnitsTable.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
#include "G4Event.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#include "G4UnitsTable.hh"
|
||||
#include "G4EmCalculator.hh"
|
||||
#include "G4Electron.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
||||
@@ -166,7 +166,7 @@ myMaterials.Construct()
|
||||
myDC= demo_wp.MyDetectorConstruction()
|
||||
gRunManager.SetUserInitialization(myDC)
|
||||
|
||||
myPL= demo_wp.MyPhysicsList()
|
||||
myPL= FTFP_BERT()
|
||||
gRunManager.SetUserInitialization(myPL)
|
||||
|
||||
# set user actions...
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4PVPlacement.hh"
|
||||
#include "G4VisAttributes.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
// ====================================================================
|
||||
//
|
||||
|
||||
@@ -32,6 +32,8 @@
|
||||
// ====================================================================
|
||||
#include "MyMaterials.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4PhysicalConstants.hh"
|
||||
|
||||
// ====================================================================
|
||||
//
|
||||
|
||||
@@ -1,69 +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: MyPhysicsList.cc,v 1.3 2006-06-29 15:28:21 gunter Exp $
|
||||
// $Name: not supported by cvs2svn $
|
||||
// ====================================================================
|
||||
// MyPhysicsList.cc
|
||||
//
|
||||
// 2005 Q
|
||||
// ====================================================================
|
||||
#include "MyPhysicsList.hh"
|
||||
#include "Particles.hh"
|
||||
#include "PhysicsListEMstd.hh"
|
||||
#include "PhysicsListLHad.hh"
|
||||
|
||||
// ====================================================================
|
||||
//
|
||||
// class description
|
||||
//
|
||||
// ====================================================================
|
||||
|
||||
//////////////////////////////
|
||||
MyPhysicsList::MyPhysicsList()
|
||||
: G4VModularPhysicsList()
|
||||
//////////////////////////////
|
||||
{
|
||||
defaultCutValue = 1.*mm;
|
||||
SetVerboseLevel(1);
|
||||
|
||||
RegisterPhysics(new Particles);
|
||||
RegisterPhysics(new PhysicsListEMstd);
|
||||
RegisterPhysics(new PhysicsListLHad);
|
||||
}
|
||||
|
||||
///////////////////////////////
|
||||
MyPhysicsList::~MyPhysicsList()
|
||||
///////////////////////////////
|
||||
{
|
||||
}
|
||||
|
||||
/////////////////////////////
|
||||
void MyPhysicsList::SetCuts()
|
||||
/////////////////////////////
|
||||
{
|
||||
SetCutsWithDefault();
|
||||
}
|
||||
|
||||
@@ -1,53 +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: MyPhysicsList.hh,v 1.3 2006-06-29 15:28:23 gunter Exp $
|
||||
// $Name: not supported by cvs2svn $
|
||||
// ====================================================================
|
||||
// MyPhysicsList.hh
|
||||
//
|
||||
// 2005 Q
|
||||
// ====================================================================
|
||||
#ifndef MY_PHYSICS_LIST_H
|
||||
#define MY_PHYSICS_LIST_H
|
||||
|
||||
#include "G4VModularPhysicsList.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
// ====================================================================
|
||||
//
|
||||
// class definition
|
||||
//
|
||||
// ====================================================================
|
||||
|
||||
class MyPhysicsList: public G4VModularPhysicsList {
|
||||
public:
|
||||
MyPhysicsList();
|
||||
~MyPhysicsList();
|
||||
|
||||
virtual void SetCuts();
|
||||
};
|
||||
|
||||
#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: Particles.cc,v 1.3 2006-06-29 15:28:25 gunter Exp $
|
||||
// $Name: not supported by cvs2svn $
|
||||
// ====================================================================
|
||||
// Particles.cc
|
||||
//
|
||||
// Physics list for defining particles
|
||||
//
|
||||
// ====================================================================
|
||||
#include "Particles.hh"
|
||||
|
||||
#include "G4LeptonConstructor.hh"
|
||||
#include "G4BosonConstructor.hh"
|
||||
#include "G4MesonConstructor.hh"
|
||||
#include "G4BaryonConstructor.hh"
|
||||
#include "G4ShortLivedConstructor.hh"
|
||||
#include "G4IonConstructor.hh"
|
||||
|
||||
// ====================================================================
|
||||
//
|
||||
// class description
|
||||
//
|
||||
// ====================================================================
|
||||
|
||||
//////////////////////////////////////
|
||||
Particles::Particles()
|
||||
: G4VPhysicsConstructor("Particles")
|
||||
//////////////////////////////////////
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
///////////////////////
|
||||
Particles::~Particles()
|
||||
///////////////////////
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////
|
||||
void Particles::ConstructParticle()
|
||||
///////////////////////////////////
|
||||
{
|
||||
G4LeptonConstructor::ConstructParticle();
|
||||
G4BosonConstructor::ConstructParticle();
|
||||
G4MesonConstructor::ConstructParticle();
|
||||
G4BaryonConstructor::ConstructParticle();
|
||||
G4ShortLivedConstructor::ConstructParticle();
|
||||
G4IonConstructor::ConstructParticle();
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////
|
||||
void Particles::ConstructProcess()
|
||||
//////////////////////////////////
|
||||
{
|
||||
}
|
||||
|
||||
@@ -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: Particles.hh,v 1.3 2006-06-29 15:28:27 gunter Exp $
|
||||
// ====================================================================
|
||||
// Particles.hh
|
||||
//
|
||||
// 2004 Q
|
||||
// ====================================================================
|
||||
#ifndef PARTICLES_H
|
||||
#define PARTICLES_H
|
||||
|
||||
#include "G4VPhysicsConstructor.hh"
|
||||
|
||||
// ====================================================================
|
||||
//
|
||||
// class definition
|
||||
//
|
||||
// ====================================================================
|
||||
|
||||
class Particles : public G4VPhysicsConstructor {
|
||||
|
||||
public:
|
||||
Particles();
|
||||
~Particles();
|
||||
|
||||
virtual void ConstructParticle();
|
||||
virtual void ConstructProcess();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,123 +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: PhysicsListEMstd.cc,v 1.4 2010-06-04 05:43:47 kmura Exp $
|
||||
// $Name: not supported by cvs2svn $
|
||||
// ====================================================================
|
||||
// PhysicsListEMstd.cc
|
||||
//
|
||||
// Physics list for electron/positron/gamma
|
||||
// EM-standard package w/ default parameters
|
||||
//
|
||||
// ====================================================================
|
||||
#include "PhysicsListEMstd.hh"
|
||||
|
||||
#include "G4ProcessManager.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
|
||||
#include "G4Gamma.hh"
|
||||
#include "G4Electron.hh"
|
||||
#include "G4Positron.hh"
|
||||
#include "G4NeutrinoE.hh"
|
||||
#include "G4AntiNeutrinoE.hh"
|
||||
|
||||
#include "G4ComptonScattering.hh"
|
||||
#include "G4GammaConversion.hh"
|
||||
#include "G4PhotoElectricEffect.hh"
|
||||
#include "G4eIonisation.hh"
|
||||
#include "G4eBremsstrahlung.hh"
|
||||
#include "G4eplusAnnihilation.hh"
|
||||
#include "G4eMultipleScattering.hh"
|
||||
|
||||
// ====================================================================
|
||||
//
|
||||
// class description
|
||||
//
|
||||
// ====================================================================
|
||||
|
||||
////////////////////////////////////
|
||||
PhysicsListEMstd::PhysicsListEMstd()
|
||||
: G4VPhysicsConstructor("EM-std")
|
||||
////////////////////////////////////
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////
|
||||
PhysicsListEMstd::~PhysicsListEMstd()
|
||||
/////////////////////////////////////
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////
|
||||
void PhysicsListEMstd::ConstructParticle()
|
||||
//////////////////////////////////////////
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////
|
||||
void PhysicsListEMstd::ConstructProcess()
|
||||
/////////////////////////////////////////
|
||||
{
|
||||
G4ProcessManager* pm;
|
||||
|
||||
// ----------------------------------------------------------
|
||||
// gamma physics
|
||||
// ----------------------------------------------------------
|
||||
pm= G4Gamma::Gamma()-> GetProcessManager();
|
||||
pm-> AddDiscreteProcess(new G4PhotoElectricEffect);
|
||||
pm-> AddDiscreteProcess(new G4ComptonScattering);
|
||||
pm-> AddDiscreteProcess(new G4GammaConversion);
|
||||
|
||||
// ----------------------------------------------------------
|
||||
// electron physics
|
||||
// ----------------------------------------------------------
|
||||
G4eMultipleScattering* msc= new G4eMultipleScattering;
|
||||
G4eIonisation* eion= new G4eIonisation;
|
||||
G4eBremsstrahlung* ebrems= new G4eBremsstrahlung;
|
||||
|
||||
pm= G4Electron::Electron()->GetProcessManager();
|
||||
pm-> AddProcess(msc, ordInActive, 1, 1);
|
||||
pm-> AddProcess(eion, ordInActive, 2, 2);
|
||||
pm-> AddProcess(ebrems, ordInActive, ordInActive, 3);
|
||||
|
||||
// ----------------------------------------------------------
|
||||
// positron physics
|
||||
// ----------------------------------------------------------
|
||||
msc= new G4eMultipleScattering;
|
||||
eion= new G4eIonisation;
|
||||
ebrems= new G4eBremsstrahlung;
|
||||
G4eplusAnnihilation* annihilation= new G4eplusAnnihilation;
|
||||
|
||||
pm= G4Positron::Positron()-> GetProcessManager();
|
||||
pm-> AddProcess(msc, ordInActive, 1, 1);
|
||||
pm-> AddProcess(eion, ordInActive, 2, 2);
|
||||
pm-> AddProcess(ebrems, ordInActive, ordInActive, 3);
|
||||
pm-> AddProcess(annihilation, 0, ordInActive, 4);
|
||||
|
||||
}
|
||||
|
||||
@@ -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: PhysicsListEMstd.hh,v 1.3 2006-06-29 15:28:32 gunter Exp $
|
||||
// ====================================================================
|
||||
// PhysicsListEMstd.hh
|
||||
//
|
||||
// 2004 Q
|
||||
// ====================================================================
|
||||
#ifndef PHYSICS_LIST_EM_STD_H
|
||||
#define PHYSICS_LIST_EM_STD_H
|
||||
|
||||
#include "G4VPhysicsConstructor.hh"
|
||||
|
||||
// ====================================================================
|
||||
//
|
||||
// class definition
|
||||
//
|
||||
// ====================================================================
|
||||
|
||||
class PhysicsListEMstd : public G4VPhysicsConstructor {
|
||||
|
||||
public:
|
||||
PhysicsListEMstd();
|
||||
~PhysicsListEMstd();
|
||||
|
||||
virtual void ConstructParticle();
|
||||
virtual void ConstructProcess();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,396 +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: PhysicsListLHad.cc,v 1.4 2010-06-04 05:43:47 kmura Exp $
|
||||
// ====================================================================
|
||||
// PhysicsListLHad.cc
|
||||
//
|
||||
// Light package of hadron physics
|
||||
// ====================================================================
|
||||
#include "PhysicsListLHad.hh"
|
||||
#include "G4ProcessManager.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
|
||||
#include "G4hMultipleScattering.hh"
|
||||
#include "G4hIonisation.hh"
|
||||
|
||||
// Hadronic Processes
|
||||
#include "G4HadronElasticProcess.hh"
|
||||
#include "G4HadronFissionProcess.hh"
|
||||
#include "G4HadronCaptureProcess.hh"
|
||||
#include "G4ProtonInelasticProcess.hh"
|
||||
#include "G4AntiProtonInelasticProcess.hh"
|
||||
#include "G4NeutronInelasticProcess.hh"
|
||||
#include "G4AntiNeutronInelasticProcess.hh"
|
||||
#include "G4PionPlusInelasticProcess.hh"
|
||||
#include "G4PionMinusInelasticProcess.hh"
|
||||
#include "G4KaonPlusInelasticProcess.hh"
|
||||
#include "G4KaonZeroSInelasticProcess.hh"
|
||||
#include "G4KaonZeroLInelasticProcess.hh"
|
||||
#include "G4KaonMinusInelasticProcess.hh"
|
||||
|
||||
// Low energy models
|
||||
#include "G4LElastic.hh"
|
||||
#include "G4LFission.hh"
|
||||
#include "G4LCapture.hh"
|
||||
#include "G4LEProtonInelastic.hh"
|
||||
#include "G4LEAntiProtonInelastic.hh"
|
||||
#include "G4LENeutronInelastic.hh"
|
||||
#include "G4LEAntiNeutronInelastic.hh"
|
||||
#include "G4LEPionPlusInelastic.hh"
|
||||
#include "G4LEPionMinusInelastic.hh"
|
||||
#include "G4LEKaonPlusInelastic.hh"
|
||||
#include "G4LEKaonZeroSInelastic.hh"
|
||||
#include "G4LEKaonZeroLInelastic.hh"
|
||||
#include "G4LEKaonMinusInelastic.hh"
|
||||
|
||||
// High-energy Models
|
||||
#include "G4HEProtonInelastic.hh"
|
||||
#include "G4HEAntiProtonInelastic.hh"
|
||||
#include "G4HEPionPlusInelastic.hh"
|
||||
#include "G4HEPionMinusInelastic.hh"
|
||||
#include "G4HEKaonPlusInelastic.hh"
|
||||
#include "G4HEKaonZeroInelastic.hh"
|
||||
#include "G4HEKaonZeroInelastic.hh"
|
||||
#include "G4HEKaonMinusInelastic.hh"
|
||||
|
||||
// Stopping processes
|
||||
#include "G4AntiProtonAnnihilationAtRest.hh"
|
||||
|
||||
// Binary Cascade
|
||||
#include "G4BinaryCascade.hh"
|
||||
#include "G4ProtonInelasticCrossSection.hh"
|
||||
|
||||
// ====================================================================
|
||||
//
|
||||
// class description
|
||||
//
|
||||
// ====================================================================
|
||||
|
||||
//////////////////////////////////
|
||||
PhysicsListLHad::PhysicsListLHad()
|
||||
: G4VPhysicsConstructor("LHad")
|
||||
//////////////////////////////////
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////
|
||||
PhysicsListLHad::~PhysicsListLHad()
|
||||
///////////////////////////////////
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////
|
||||
void PhysicsListLHad::ConstructParticle()
|
||||
/////////////////////////////////////////
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////
|
||||
void PhysicsListLHad::ConstructProcess()
|
||||
////////////////////////////////////////
|
||||
{
|
||||
G4ProcessManager* pManager;
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// proton
|
||||
// ---------------------------------------------------------------
|
||||
pManager= G4Proton::Proton()-> GetProcessManager();
|
||||
|
||||
// elastic
|
||||
G4HadronElasticProcess* thepElasticProcess = new G4HadronElasticProcess();
|
||||
G4LElastic* thepElasticModel = new G4LElastic();
|
||||
thepElasticProcess->RegisterMe(thepElasticModel);
|
||||
pManager-> AddDiscreteProcess(thepElasticProcess);
|
||||
|
||||
// inelastic
|
||||
G4ProtonInelasticProcess* theProtonInelasticProcess
|
||||
= new G4ProtonInelasticProcess();
|
||||
|
||||
G4HEProtonInelastic* theProtonHEPModel = new G4HEProtonInelastic();
|
||||
|
||||
G4LEProtonInelastic* theProtonLEPModel = new G4LEProtonInelastic();
|
||||
theProtonLEPModel->SetMinEnergy(2.8*GeV);
|
||||
|
||||
G4BinaryCascade* theProtonBICModel = new G4BinaryCascade();
|
||||
theProtonBICModel->SetMaxEnergy(3.2*GeV);
|
||||
|
||||
theProtonInelasticProcess-> RegisterMe(theProtonHEPModel);
|
||||
theProtonInelasticProcess-> RegisterMe(theProtonLEPModel);
|
||||
theProtonInelasticProcess-> RegisterMe(theProtonBICModel);
|
||||
|
||||
// add Xsection data of BIC
|
||||
G4ProtonInelasticCrossSection* theProtonInelasticData
|
||||
= new G4ProtonInelasticCrossSection();
|
||||
theProtonInelasticProcess-> AddDataSet( theProtonInelasticData );
|
||||
|
||||
pManager-> AddDiscreteProcess(theProtonInelasticProcess);
|
||||
|
||||
// QED
|
||||
G4VProcess* thepMultipleScattering = new G4hMultipleScattering();
|
||||
G4VProcess* thepIonisation = new G4hIonisation();
|
||||
|
||||
pManager-> AddProcess(thepIonisation);
|
||||
pManager-> AddProcess(thepMultipleScattering);
|
||||
|
||||
pManager-> SetProcessOrdering(thepMultipleScattering, idxAlongStep, 1);
|
||||
pManager-> SetProcessOrdering(thepIonisation, idxAlongStep, 2);
|
||||
|
||||
pManager-> SetProcessOrdering(thepMultipleScattering, idxPostStep, 1);
|
||||
pManager-> SetProcessOrdering(thepIonisation, idxPostStep, 2);
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// anti-proton
|
||||
// ---------------------------------------------------------------
|
||||
pManager= G4AntiProton::AntiProton()-> GetProcessManager();
|
||||
|
||||
// elastic
|
||||
G4HadronElasticProcess* theapElasticProcess = new G4HadronElasticProcess();
|
||||
G4LElastic* theapElasticModel = new G4LElastic();
|
||||
theapElasticProcess-> RegisterMe(theapElasticModel);
|
||||
pManager-> AddDiscreteProcess(theapElasticProcess);
|
||||
|
||||
// inelastic
|
||||
G4AntiProtonInelasticProcess* theAntiProtonInelasticProcess
|
||||
= new G4AntiProtonInelasticProcess();
|
||||
|
||||
G4LEAntiProtonInelastic* theAntiProtonLEPModel
|
||||
= new G4LEAntiProtonInelastic();
|
||||
G4HEAntiProtonInelastic* theAntiProtonHEPModel
|
||||
= new G4HEAntiProtonInelastic();
|
||||
|
||||
theAntiProtonInelasticProcess-> RegisterMe(theAntiProtonLEPModel);
|
||||
theAntiProtonInelasticProcess-> RegisterMe(theAntiProtonHEPModel);
|
||||
pManager-> AddDiscreteProcess(theAntiProtonInelasticProcess);
|
||||
|
||||
G4AntiProtonAnnihilationAtRest* theAntiProtonAnnihilation
|
||||
= new G4AntiProtonAnnihilationAtRest();
|
||||
pManager-> AddRestProcess(theAntiProtonAnnihilation);
|
||||
|
||||
// QED
|
||||
G4VProcess* theapMultipleScattering = new G4hMultipleScattering();
|
||||
G4VProcess* theapIonisation = new G4hIonisation();
|
||||
|
||||
pManager-> AddProcess(theapIonisation);
|
||||
pManager-> AddProcess(theapMultipleScattering);
|
||||
|
||||
pManager->SetProcessOrdering(theapMultipleScattering, idxAlongStep, 1);
|
||||
pManager->SetProcessOrdering(theapIonisation, idxAlongStep, 2);
|
||||
|
||||
pManager->SetProcessOrdering(theapMultipleScattering, idxPostStep, 1);
|
||||
pManager->SetProcessOrdering(theapIonisation, idxPostStep, 2);
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// mesons...
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// pi+
|
||||
// ---------------------------------------------------------------
|
||||
pManager= G4PionPlus::PionPlus()-> GetProcessManager();
|
||||
|
||||
// elastic
|
||||
G4HadronElasticProcess* theppElasticProcess = new G4HadronElasticProcess();
|
||||
G4LElastic* theppElasticModel = new G4LElastic();
|
||||
theppElasticProcess-> RegisterMe(theppElasticModel);
|
||||
pManager-> AddDiscreteProcess(theppElasticProcess);
|
||||
|
||||
// inelastic
|
||||
G4PionPlusInelasticProcess* thePionPlusInelasticProcess
|
||||
= new G4PionPlusInelasticProcess();
|
||||
|
||||
G4LEPionPlusInelastic* thePionPlusLEPModel = new G4LEPionPlusInelastic();
|
||||
G4HEPionPlusInelastic* thePionPlusHEPModel = new G4HEPionPlusInelastic();
|
||||
thePionPlusInelasticProcess->RegisterMe(thePionPlusLEPModel);
|
||||
thePionPlusInelasticProcess->RegisterMe(thePionPlusHEPModel);
|
||||
pManager-> AddDiscreteProcess(thePionPlusInelasticProcess);
|
||||
|
||||
// QED
|
||||
G4VProcess* theppMultipleScattering = new G4hMultipleScattering();
|
||||
G4VProcess* theppIonisation = new G4hIonisation();
|
||||
|
||||
pManager-> AddProcess(theppIonisation);
|
||||
pManager-> AddProcess(theppMultipleScattering);
|
||||
|
||||
pManager-> SetProcessOrdering(theppMultipleScattering, idxAlongStep, 1);
|
||||
pManager-> SetProcessOrdering(theppIonisation, idxAlongStep, 2);
|
||||
|
||||
pManager-> SetProcessOrdering(theppMultipleScattering, idxPostStep, 1);
|
||||
pManager-> SetProcessOrdering(theppIonisation, idxPostStep, 2);
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// pi-
|
||||
// ---------------------------------------------------------------
|
||||
pManager= G4PionMinus::PionMinus()-> GetProcessManager();
|
||||
|
||||
// elastic
|
||||
G4HadronElasticProcess* thepmElasticProcess = new G4HadronElasticProcess();
|
||||
G4LElastic* thepmElasticModel = new G4LElastic();
|
||||
thepmElasticProcess->RegisterMe(thepmElasticModel);
|
||||
pManager-> AddDiscreteProcess(thepmElasticProcess);
|
||||
|
||||
// inelastic
|
||||
G4PionMinusInelasticProcess* thePionMinusInelasticProcess
|
||||
= new G4PionMinusInelasticProcess();
|
||||
|
||||
G4LEPionMinusInelastic* thePionMinusLEPModel = new G4LEPionMinusInelastic();
|
||||
G4HEPionMinusInelastic* thePionMinusHEPModel = new G4HEPionMinusInelastic();
|
||||
thePionMinusInelasticProcess-> RegisterMe(thePionMinusLEPModel);
|
||||
thePionMinusInelasticProcess-> RegisterMe(thePionMinusHEPModel);
|
||||
pManager-> AddDiscreteProcess(thePionMinusInelasticProcess);
|
||||
|
||||
// QED
|
||||
G4VProcess* thepmMultipleScattering = new G4hMultipleScattering();
|
||||
G4VProcess* thepmIonisation = new G4hIonisation();
|
||||
|
||||
pManager-> AddProcess(thepmIonisation);
|
||||
pManager-> AddProcess(thepmMultipleScattering);
|
||||
|
||||
pManager-> SetProcessOrdering(thepmMultipleScattering, idxAlongStep, 1);
|
||||
pManager-> SetProcessOrdering(thepmIonisation, idxAlongStep, 2);
|
||||
|
||||
pManager-> SetProcessOrdering(thepmMultipleScattering, idxPostStep, 1);
|
||||
pManager-> SetProcessOrdering(thepmIonisation, idxPostStep, 2);
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// K+
|
||||
// ---------------------------------------------------------------
|
||||
pManager= G4KaonPlus::KaonPlus()-> GetProcessManager();
|
||||
|
||||
// elastic
|
||||
G4HadronElasticProcess* thekpElasticProcess = new G4HadronElasticProcess();
|
||||
G4LElastic* thekpElasticModel = new G4LElastic();
|
||||
thekpElasticProcess->RegisterMe(thekpElasticModel);
|
||||
pManager->AddDiscreteProcess(thekpElasticProcess);
|
||||
|
||||
// inelastic
|
||||
G4KaonPlusInelasticProcess* theKaonPlusInelasticProcess
|
||||
= new G4KaonPlusInelasticProcess();
|
||||
|
||||
G4LEKaonPlusInelastic* theKaonPlusLEPModel = new G4LEKaonPlusInelastic();
|
||||
G4HEKaonPlusInelastic* theKaonPlusHEPModel = new G4HEKaonPlusInelastic();
|
||||
theKaonPlusInelasticProcess-> RegisterMe(theKaonPlusLEPModel);
|
||||
theKaonPlusInelasticProcess-> RegisterMe(theKaonPlusHEPModel);
|
||||
pManager-> AddDiscreteProcess(theKaonPlusInelasticProcess);
|
||||
|
||||
// QED
|
||||
G4VProcess* thekpMultipleScattering = new G4hMultipleScattering();
|
||||
G4VProcess* thekpIonisation = new G4hIonisation();
|
||||
|
||||
pManager-> AddProcess(thekpIonisation);
|
||||
pManager-> AddProcess(thekpMultipleScattering);
|
||||
|
||||
pManager-> SetProcessOrdering(thekpMultipleScattering, idxAlongStep, 1);
|
||||
pManager-> SetProcessOrdering(thekpIonisation, idxAlongStep, 2);
|
||||
|
||||
pManager-> SetProcessOrdering(thekpMultipleScattering, idxPostStep, 1);
|
||||
pManager-> SetProcessOrdering(thekpIonisation, idxPostStep, 2);
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// K-
|
||||
// ---------------------------------------------------------------
|
||||
pManager= G4KaonMinus::KaonMinus()->GetProcessManager();
|
||||
|
||||
// elastic
|
||||
G4HadronElasticProcess* thekmElasticProcess = new G4HadronElasticProcess();
|
||||
G4LElastic* thekmElasticModel = new G4LElastic();
|
||||
thekmElasticProcess->RegisterMe(thekmElasticModel);
|
||||
pManager->AddDiscreteProcess(thekmElasticProcess);
|
||||
|
||||
// inelastic
|
||||
G4KaonMinusInelasticProcess* theKaonMinusInelasticProcess
|
||||
= new G4KaonMinusInelasticProcess();
|
||||
|
||||
G4LEKaonMinusInelastic* theKaonMinusLEPModel = new G4LEKaonMinusInelastic();
|
||||
G4HEKaonMinusInelastic* theKaonMinusHEPModel = new G4HEKaonMinusInelastic();
|
||||
theKaonMinusInelasticProcess->RegisterMe(theKaonMinusLEPModel);
|
||||
theKaonMinusInelasticProcess->RegisterMe(theKaonMinusHEPModel);
|
||||
pManager->AddDiscreteProcess(theKaonMinusInelasticProcess);
|
||||
|
||||
// QED
|
||||
G4VProcess* thekmMultipleScattering = new G4hMultipleScattering();
|
||||
G4VProcess* thekmIonisation = new G4hIonisation();
|
||||
|
||||
pManager-> AddProcess(thekmIonisation);
|
||||
pManager-> AddProcess(thekmMultipleScattering);
|
||||
|
||||
pManager->SetProcessOrdering(thekmMultipleScattering, idxAlongStep, 1);
|
||||
pManager->SetProcessOrdering(thekmIonisation, idxAlongStep, 2);
|
||||
|
||||
pManager->SetProcessOrdering(thekmMultipleScattering, idxPostStep, 1);
|
||||
pManager->SetProcessOrdering(thekmIonisation, idxPostStep, 2);
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// K0L
|
||||
// ---------------------------------------------------------------
|
||||
pManager= G4KaonZeroLong::KaonZeroLong()-> GetProcessManager();
|
||||
|
||||
// elastic
|
||||
G4HadronElasticProcess* thek0lElasticProcess = new G4HadronElasticProcess();
|
||||
G4LElastic* thek0lElasticModel = new G4LElastic();
|
||||
thek0lElasticProcess-> RegisterMe(thek0lElasticModel);
|
||||
pManager-> AddDiscreteProcess(thek0lElasticProcess);
|
||||
|
||||
// inelastic
|
||||
G4KaonZeroLInelasticProcess* theKaonZeroLInelasticProcess
|
||||
= new G4KaonZeroLInelasticProcess();
|
||||
|
||||
G4LEKaonZeroLInelastic* theKaonZeroLLEPModel = new G4LEKaonZeroLInelastic();
|
||||
G4HEKaonZeroInelastic* theKaonZerolHEPModel = new G4HEKaonZeroInelastic();
|
||||
|
||||
theKaonZeroLInelasticProcess-> RegisterMe(theKaonZeroLLEPModel);
|
||||
theKaonZeroLInelasticProcess-> RegisterMe(theKaonZerolHEPModel);
|
||||
|
||||
pManager-> AddDiscreteProcess(theKaonZeroLInelasticProcess);
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// K0S
|
||||
// ---------------------------------------------------------------
|
||||
pManager= G4KaonZeroShort::KaonZeroShort()-> GetProcessManager();
|
||||
|
||||
// elastic
|
||||
G4HadronElasticProcess* thek0sElasticProcess = new G4HadronElasticProcess();
|
||||
G4LElastic* thek0sElasticModel = new G4LElastic();
|
||||
thek0sElasticProcess-> RegisterMe(thek0sElasticModel);
|
||||
pManager-> AddDiscreteProcess(thek0sElasticProcess);
|
||||
|
||||
// inelastic
|
||||
G4KaonZeroSInelasticProcess* theKaonZeroSInelasticProcess
|
||||
= new G4KaonZeroSInelasticProcess();
|
||||
|
||||
G4LEKaonZeroSInelastic* theKaonZeroSLEPModel = new G4LEKaonZeroSInelastic();
|
||||
G4HEKaonZeroInelastic* theKaonZerosHEPModel = new G4HEKaonZeroInelastic();
|
||||
|
||||
theKaonZeroSInelasticProcess-> RegisterMe(theKaonZeroSLEPModel);
|
||||
theKaonZeroSInelasticProcess-> RegisterMe(theKaonZerosHEPModel);
|
||||
|
||||
pManager-> AddDiscreteProcess(theKaonZeroSInelasticProcess);
|
||||
|
||||
}
|
||||
|
||||
@@ -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: PhysicsListLHad.hh,v 1.3 2006-06-29 15:28:37 gunter Exp $
|
||||
// ====================================================================
|
||||
// PhysicsListLHad.hh
|
||||
//
|
||||
// 2004 Q
|
||||
// ====================================================================
|
||||
#ifndef PHYSICS_L_HAD_H
|
||||
#define PHYSICS_L_HAD_H
|
||||
|
||||
#include "G4VPhysicsConstructor.hh"
|
||||
|
||||
// ====================================================================
|
||||
//
|
||||
// class definition
|
||||
//
|
||||
// ====================================================================
|
||||
|
||||
class PhysicsListLHad : public G4VPhysicsConstructor {
|
||||
|
||||
public:
|
||||
PhysicsListLHad();
|
||||
~PhysicsListLHad();
|
||||
|
||||
virtual void ConstructParticle();
|
||||
virtual void ConstructProcess();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
#include <boost/python.hpp>
|
||||
#include "MyMaterials.hh"
|
||||
#include "MyDetectorConstruction.hh"
|
||||
#include "MyPhysicsList.hh"
|
||||
#include "G4VSensitiveDetector.hh"
|
||||
|
||||
using namespace boost::python;
|
||||
@@ -53,11 +52,5 @@ BOOST_PYTHON_MODULE(demo_wp) {
|
||||
("MyDetectorConstruction", "my detector")
|
||||
.def("SetSDtoScoreVoxel", &MyDetectorConstruction::SetSDtoScoreVoxel)
|
||||
;
|
||||
|
||||
class_<MyPhysicsList, MyPhysicsList*,
|
||||
bases<G4VUserPhysicsList> >
|
||||
("MyPhysicsList", "my physics list")
|
||||
;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ myMaterials.Construct()
|
||||
myDC= demo_wp.MyDetectorConstruction()
|
||||
gRunManager.SetUserInitialization(myDC)
|
||||
|
||||
myPL= demo_wp.MyPhysicsList()
|
||||
myPL= FTFP_BERT()
|
||||
gRunManager.SetUserInitialization(myPL)
|
||||
|
||||
# set user actions...
|
||||
|
||||
@@ -36,6 +36,6 @@ navigator= gTransportationManager.GetNavigatorForTracking()
|
||||
world_volume= navigator.GetWorldVolume()
|
||||
|
||||
gdml_parser = G4GDMLParser()
|
||||
gdml_parser.Write("qgeom.gdml", world_volume)
|
||||
gdml_parser.Write("qgeom_out.gdml", world_volume)
|
||||
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4PVPlacement.hh"
|
||||
#include "globals.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
// ====================================================================
|
||||
//
|
||||
|
||||
@@ -49,6 +49,8 @@
|
||||
|
||||
#include "G4VisAttributes.hh"
|
||||
#include "G4Colour.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4PhysicalConstants.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4PVPlacement.hh"
|
||||
#include "G4VisAttributes.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
// ====================================================================
|
||||
//
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#include "G4PVPlacement.hh"
|
||||
#include "G4VisAttributes.hh"
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4PhysicalConstants.hh"
|
||||
|
||||
G4VPhysicalVolume* G4EzWorld::world= G4EzWorld::CreateWorld();
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#define G4_EZ_WORLD_H
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
// ====================================================================
|
||||
//
|
||||
|
||||
@@ -31,6 +31,8 @@
|
||||
// 2005 Q
|
||||
// ====================================================================
|
||||
#include "G4Material.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4PhysicalConstants.hh"
|
||||
|
||||
////////////////
|
||||
void Construct()
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
// 2006 Q
|
||||
// ====================================================================
|
||||
#include "PhysicsListEMstd.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
#include "G4ProcessManager.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "PhysicsList.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
#include "G4ProcessManager.hh"
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ using namespace pyG4Event;
|
||||
// ====================================================================
|
||||
void export_G4Event()
|
||||
{
|
||||
class_<G4Event, G4Event*>("G4Event", "event class")
|
||||
class_<G4Event, G4Event*, boost::noncopyable>("G4Event", "event class")
|
||||
.def(init<G4int>())
|
||||
// ---
|
||||
.def("Print", &G4Event::Print)
|
||||
|
||||
@@ -48,7 +48,6 @@ namespace pyG4GDMLParser {
|
||||
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_GetWorldVolume,
|
||||
GetWorldVolume, 0, 1);
|
||||
|
||||
#if G4VERSION_NUMBER >= 940
|
||||
void (G4GDMLParser::*f1_Write)
|
||||
(const G4String&, const G4VPhysicalVolume*, G4bool,
|
||||
const G4String&) = &G4GDMLParser::Write;
|
||||
@@ -58,14 +57,9 @@ void (G4GDMLParser::*f2_Write)
|
||||
const G4String&) = &G4GDMLParser::Write;
|
||||
|
||||
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(g_Write, Write, 2, 4);
|
||||
#endif
|
||||
|
||||
|
||||
#if G4VERSION_NUMBER >= 920
|
||||
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_Read, Read, 1, 2);
|
||||
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_ReadModule, ReadModule, 1, 2);
|
||||
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_Write, Write, 1, 4);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
@@ -79,24 +73,12 @@ void export_G4GDMLParser()
|
||||
class_<G4GDMLParser, boost::noncopyable>
|
||||
("G4GDMLParser", "GDML parser")
|
||||
// ---
|
||||
#if G4VERSION_NUMBER < 920
|
||||
.def("Read", &G4GDMLParser::Read)
|
||||
#else
|
||||
.def("Read", &G4GDMLParser::Read, f_Read())
|
||||
.def("ReadModule", &G4GDMLParser::ReadModule, f_ReadModule())
|
||||
.def("ParseST", &G4GDMLParser::ParseST,
|
||||
return_value_policy<reference_existing_object>())
|
||||
#endif
|
||||
|
||||
#if G4VERSION_NUMBER >= 920
|
||||
#if G4VERSION_NUMBER >= 940
|
||||
.def("Write", f1_Write, f_Write())
|
||||
.def("Write", f2_Write, g_Write())
|
||||
#else
|
||||
.def("Write", &G4GDMLParser::Write, f_Write())
|
||||
#endif
|
||||
#endif
|
||||
|
||||
.def("GetWorldVolume", &G4GDMLParser::GetWorldVolume,
|
||||
f_GetWorldVolume()
|
||||
[return_value_policy<reference_existing_object>()])
|
||||
|
||||
@@ -52,18 +52,18 @@ G4PyCoutDestination::~G4PyCoutDestination()
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////
|
||||
G4int G4PyCoutDestination::ReceiveG4cout(G4String coutString)
|
||||
/////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////
|
||||
G4int G4PyCoutDestination::ReceiveG4cout(const G4String& coutString)
|
||||
////////////////////////////////////////////////////////////////////
|
||||
{
|
||||
PySys_WriteStdout("%s", coutString.c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////
|
||||
G4int G4PyCoutDestination::ReceiveG4cerr(G4String cerrString)
|
||||
/////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////
|
||||
G4int G4PyCoutDestination::ReceiveG4cerr(const G4String& cerrString)
|
||||
////////////////////////////////////////////////////////////////////
|
||||
{
|
||||
PySys_WriteStderr("%s", cerrString.c_str());
|
||||
return 0;
|
||||
|
||||
@@ -46,8 +46,8 @@ public:
|
||||
G4PyCoutDestination();
|
||||
~G4PyCoutDestination();
|
||||
|
||||
virtual G4int ReceiveG4cout(G4String coutString);
|
||||
virtual G4int ReceiveG4cerr(G4String cerrString);
|
||||
virtual G4int ReceiveG4cout(const G4String& coutString);
|
||||
virtual G4int ReceiveG4cerr(const G4String& cerrString);
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include <boost/python.hpp>
|
||||
#include "G4VExceptionHandler.hh"
|
||||
#include "G4StateManager.hh"
|
||||
#include <stdlib.h>
|
||||
|
||||
using namespace boost::python;
|
||||
|
||||
@@ -52,43 +53,47 @@ public:
|
||||
G4ExceptionSeverity severity,
|
||||
const char* description) {
|
||||
|
||||
G4cerr << "*** G4Exception : " << exceptionCode << G4endl;
|
||||
G4cerr << " issued by : " << originOfException << G4endl;
|
||||
G4cerr << description << G4endl;
|
||||
G4cerr << G4endl << "Severity : ";
|
||||
|
||||
std::ostringstream message;
|
||||
message << "*** G4Exception : " << exceptionCode << G4endl
|
||||
<< " issued by : " << originOfException << G4endl
|
||||
<< description << G4endl;
|
||||
|
||||
switch(severity) {
|
||||
case FatalException:
|
||||
PyErr_SetString(PyExc_AssertionError,
|
||||
"*** Fatal Exception ***");
|
||||
PyErr_Print();
|
||||
G4cerr << message.str() << G4endl;
|
||||
break;
|
||||
|
||||
case FatalErrorInArgument:
|
||||
PyErr_SetString(PyExc_ValueError,
|
||||
"*** Fatal Error In Argument ***");
|
||||
PyErr_Print();
|
||||
G4cerr << message.str() << G4endl;
|
||||
break;
|
||||
|
||||
case RunMustBeAborted:
|
||||
PyErr_SetString(PyExc_RuntimeError,
|
||||
"*** Run Must Be Aborted ***");
|
||||
PyErr_Print();
|
||||
G4cerr << message.str() << G4endl;
|
||||
break;
|
||||
|
||||
case EventMustBeAborted:
|
||||
PyErr_SetString(PyExc_RuntimeError,
|
||||
"*** Event Must Be Aborted ***");
|
||||
PyErr_Print();
|
||||
G4cerr << message.str() << G4endl;
|
||||
break;
|
||||
|
||||
default:
|
||||
PyErr_Warn(PyExc_RuntimeWarning,
|
||||
"*** This is just a warning message. ***");
|
||||
G4cerr << message.str() << G4endl;
|
||||
break;
|
||||
}
|
||||
|
||||
G4cerr << G4endl;
|
||||
|
||||
// anyway, no abort.
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -45,14 +45,14 @@ using namespace boost::python;
|
||||
namespace pyG4UImanager {
|
||||
|
||||
// ApplyCommand
|
||||
G4int(G4UImanager::*f1_ApplyCommand)(const char*)= &G4UImanager::ApplyCommand;
|
||||
G4int(G4UImanager::*f2_ApplyCommand)(G4String)= &G4UImanager::ApplyCommand;
|
||||
G4int(G4UImanager::*f1_ApplyCommand)(const char*) = &G4UImanager::ApplyCommand;
|
||||
G4int(G4UImanager::*f2_ApplyCommand)(const G4String&) =
|
||||
&G4UImanager::ApplyCommand;
|
||||
|
||||
// CreateHTML
|
||||
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_CreateHTML, CreateHTML, 0, 1);
|
||||
|
||||
|
||||
|
||||
//////////////////////////////////////////////
|
||||
G4int ApplyUICommand_1(const G4String& cmdstr)
|
||||
//////////////////////////////////////////////
|
||||
@@ -130,6 +130,9 @@ void export_G4UImanager()
|
||||
.def("ApplyCommand", f1_ApplyCommand)
|
||||
.def("ApplyCommand", f2_ApplyCommand)
|
||||
.def("CreateHTML", &G4UImanager::CreateHTML, f_CreateHTML())
|
||||
.def("SetMacroSearchPath", &G4UImanager::SetMacroSearchPath)
|
||||
.def("GetMacroSearchPath", &G4UImanager::GetMacroSearchPath,
|
||||
return_value_policy<return_by_value>())
|
||||
// ---
|
||||
.def("SetPauseAtBeginOfEvent", &G4UImanager::SetPauseAtBeginOfEvent)
|
||||
.def("GetPauseAtBeginOfEvent", &G4UImanager::GetPauseAtBeginOfEvent)
|
||||
|
||||
@@ -33,9 +33,7 @@
|
||||
#include <boost/python.hpp>
|
||||
#include "G4Version.hh"
|
||||
#include "G4DynamicParticle.hh"
|
||||
#if G4VERSION_NUMBER <= 701
|
||||
#include "G4PrimaryParticle.hh"
|
||||
#endif
|
||||
|
||||
using namespace boost::python;
|
||||
|
||||
@@ -48,9 +46,9 @@ void export_G4DynamicParticle()
|
||||
("G4DynamicParticle", "dynamic particle")
|
||||
// ---
|
||||
.def("GetMomentumDirection", &G4DynamicParticle::GetMomentumDirection,
|
||||
return_value_policy<return_by_value>())
|
||||
return_value_policy<return_by_value>())
|
||||
.def("GetMomentum", &G4DynamicParticle::GetMomentum,
|
||||
return_value_policy<return_by_value>())
|
||||
return_value_policy<return_by_value>())
|
||||
//.def("Get4Momentum", &G4DynamicParticle::Get4Momentum,
|
||||
//return_value_policy<return_by_value>())
|
||||
.def("GetTotalMomentum", &G4DynamicParticle::GetTotalMomentum)
|
||||
@@ -58,7 +56,7 @@ void export_G4DynamicParticle()
|
||||
.def("GetKineticEnergy", &G4DynamicParticle::GetKineticEnergy)
|
||||
.def("GetProperTime", &G4DynamicParticle::GetProperTime)
|
||||
.def("GetPolarization", &G4DynamicParticle::GetPolarization,
|
||||
return_value_policy<return_by_value>())
|
||||
return_value_policy<return_by_value>())
|
||||
.def("GetMass", &G4DynamicParticle::GetMass)
|
||||
.def("GetCharge", &G4DynamicParticle::GetCharge)
|
||||
//.def("GetElectronOccupancy", &G4DynamicParticle::GetElectronOccupancy,
|
||||
@@ -66,17 +64,15 @@ void export_G4DynamicParticle()
|
||||
.def("GetTotalOccupancy", &G4DynamicParticle::GetTotalOccupancy)
|
||||
.def("GetOccupancy", &G4DynamicParticle::GetOccupancy)
|
||||
.def("GetDefinition", &G4DynamicParticle::GetDefinition,
|
||||
return_internal_reference<>())
|
||||
return_internal_reference<>())
|
||||
.def("GetPreAssignedDecayProperTime",
|
||||
&G4DynamicParticle::GetPreAssignedDecayProperTime)
|
||||
&G4DynamicParticle::GetPreAssignedDecayProperTime)
|
||||
.def("DumpInfo", &G4DynamicParticle::DumpInfo)
|
||||
.def("SetVerboseLevel", &G4DynamicParticle::SetVerboseLevel)
|
||||
.def("GetVerboseLevel", &G4DynamicParticle::GetVerboseLevel)
|
||||
.def("GetPrimaryParticle", &G4DynamicParticle::GetPrimaryParticle,
|
||||
return_internal_reference<>())
|
||||
#if G4VERSION_NUMBER >= 710
|
||||
return_internal_reference<>())
|
||||
.def("GetPDGcode", &G4DynamicParticle::GetPDGcode)
|
||||
#endif
|
||||
;
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
@@ -38,63 +38,39 @@
|
||||
#include "G4HadronCaptureProcess.hh"
|
||||
#include "G4HadronQElasticPhysics.hh"
|
||||
|
||||
#include "CHIPS.hh"
|
||||
#include "CHIPS_HP.hh"
|
||||
#include "FTFP_BERT.hh"
|
||||
//#include "FTFP_BERT_EMV.hh"
|
||||
#include "FTFP_BERT_EMX.hh"
|
||||
#include "FTFP_BERT_TRV.hh"
|
||||
#include "FTF_BIC.hh"
|
||||
#include "LBE.hh"
|
||||
#include "LHEP.hh"
|
||||
#include "LHEP_EMV.hh"
|
||||
#include "QBBC.hh"
|
||||
#include "QGSC_BERT.hh"
|
||||
#include "QGSC_CHIPS.hh"
|
||||
#include "QGSP.hh"
|
||||
#include "QGSP_BERT.hh"
|
||||
#include "QGSP_BERT_HP.hh"
|
||||
#include "QGSP_BIC.hh"
|
||||
#include "QGSP_BIC_HP.hh"
|
||||
#include "QGSP_QEL.hh"
|
||||
#include "QGSP_BERT_EMV.hh"
|
||||
#include "QGSP_BERT_TRV.hh"
|
||||
|
||||
// dropped at 9.4
|
||||
//#include "FTFC.hh"
|
||||
//#include "FTFP.hh"
|
||||
//#include "LHEP_BERT.hh"
|
||||
//#include "LHEP_BERT_HP.hh"
|
||||
//#include "LHEP_PRECO_HP.hh"
|
||||
//#include "QGSC.hh"
|
||||
//#include "QGSC_EMV.hh"
|
||||
//#include "QGSP_EMV.hh"
|
||||
//#include "QGSC_EFLOW.hh"
|
||||
//#include "QGSP_EMX.hh"
|
||||
//#include "FTFP_EMV.hh"
|
||||
//#include "QGSP_BERT_NQE.hh"
|
||||
//#include "QGSP_EMV_NQE.hh"
|
||||
//#include "QGSP_NQE.hh"
|
||||
|
||||
#if G4VERSION_NUMBER >= 910
|
||||
#include "FTFP_BERT.hh"
|
||||
#include "FTF_BIC.hh"
|
||||
#include "QGSC_BERT.hh"
|
||||
#include "QGS_BIC.hh"
|
||||
// dropped at 9.4
|
||||
//#include "QGSP_DIF.hh"
|
||||
//#include "QGSP_BERT_DIF.hh"
|
||||
#endif
|
||||
|
||||
#if G4VERSION_NUMBER >= 930
|
||||
#include "CHIPS.hh"
|
||||
#include "FTFP_BERT_EMV.hh"
|
||||
#include "FTFP_BERT_EMX.hh"
|
||||
#include "FTFP_BERT_TRV.hh"
|
||||
#include "QGSC_CHIPS.hh"
|
||||
#include "QGSP_BERT_EMX.hh"
|
||||
#include "QGSP_BERT_NOLEP.hh"
|
||||
#include "QGSP_BIC_EMY.hh"
|
||||
#include "QGSP_FTFP_BERT.hh"
|
||||
#include "QGSP_INCL_ABLA.hh"
|
||||
// dropped at 9.4
|
||||
//#include "QGSC_QGSC.hh"
|
||||
#endif
|
||||
|
||||
#if G4VERSION_NUMBER >= 940
|
||||
#include "QGSP_BERT_95.hh"
|
||||
#include "QGSP_BERT_95XS.hh"
|
||||
#include "QGSP_BERT_CHIPS.hh"
|
||||
#endif
|
||||
#include "QGSP_BERT_EMV.hh"
|
||||
#include "QGSP_BERT_EMX.hh"
|
||||
#include "QGSP_BERT_HP.hh"
|
||||
#include "QGSP_BERT_NOLEP.hh"
|
||||
#include "QGSP_BERT_TRV.hh"
|
||||
#include "QGSP_BIC.hh"
|
||||
#include "QGSP_BIC_EMY.hh"
|
||||
#include "QGSP_BIC_HP.hh"
|
||||
#include "QGSP_FTFP_BERT.hh"
|
||||
#include "QGSP_FTFP_BERT_95.hh"
|
||||
#include "QGSP_FTFP_BERT_95XS.hh"
|
||||
#include "QGSP_INCLXX.hh"
|
||||
//#include "QGSP_QEL.hh"
|
||||
#include "QGS_BIC.hh"
|
||||
|
||||
|
||||
// macro for adding physics lists
|
||||
#define ADD_PHYSICS_LIST(plname) \
|
||||
@@ -133,63 +109,39 @@ void export_PhysicsLists()
|
||||
{
|
||||
def("ListPhysicsList", ListPhysicsList);
|
||||
|
||||
ADD_PHYSICS_LIST(CHIPS);
|
||||
ADD_PHYSICS_LIST(CHIPS_HP);
|
||||
ADD_PHYSICS_LIST(FTFP_BERT);
|
||||
//ADD_PHYSICS_LIST(FTFP_BERT_EMV);
|
||||
ADD_PHYSICS_LIST(FTFP_BERT_EMX);
|
||||
ADD_PHYSICS_LIST(FTFP_BERT_TRV);
|
||||
ADD_PHYSICS_LIST(FTF_BIC);
|
||||
ADD_PHYSICS_LIST(LBE);
|
||||
ADD_PHYSICS_LIST(LHEP);
|
||||
ADD_PHYSICS_LIST(LHEP_EMV);
|
||||
ADD_PHYSICS_LIST(QBBC);
|
||||
ADD_PHYSICS_LIST(QGSC_BERT);
|
||||
ADD_PHYSICS_LIST(QGSC_CHIPS);
|
||||
ADD_PHYSICS_LIST(QGSP);
|
||||
ADD_PHYSICS_LIST(QGSP_BERT);
|
||||
ADD_PHYSICS_LIST(QGSP_BERT_HP);
|
||||
ADD_PHYSICS_LIST(QGSP_BIC);
|
||||
ADD_PHYSICS_LIST(QGSP_BIC_HP);
|
||||
ADD_PHYSICS_LIST(QGSP_QEL);
|
||||
ADD_PHYSICS_LIST(QGSP_BERT_EMV);
|
||||
ADD_PHYSICS_LIST(QGSP_BERT_TRV);
|
||||
|
||||
//ADD_PHYSICS_LIST(FTFC);
|
||||
//ADD_PHYSICS_LIST(FTFP);
|
||||
//ADD_PHYSICS_LIST(LHEP_BERT);
|
||||
//ADD_PHYSICS_LIST(LHEP_BERT_HP);
|
||||
//ADD_PHYSICS_LIST(LHEP_PRECO_HP);
|
||||
//ADD_PHYSICS_LIST(QGSC);
|
||||
//ADD_PHYSICS_LIST(QGSC_EMV);
|
||||
//ADD_PHYSICS_LIST(QGSP_EMV);
|
||||
//ADD_PHYSICS_LIST(QGSC_EFLOW);
|
||||
//ADD_PHYSICS_LIST(QGSP_EMX);
|
||||
//ADD_PHYSICS_LIST(FTFP_EMV);
|
||||
//ADD_PHYSICS_LIST(QGSP_BERT_NQE);
|
||||
//ADD_PHYSICS_LIST(QGSP_EMV_NQE);
|
||||
//ADD_PHYSICS_LIST(QGSP_NQE);
|
||||
|
||||
#if G4VERSION_NUMBER >= 910
|
||||
ADD_PHYSICS_LIST(FTFP_BERT);
|
||||
ADD_PHYSICS_LIST(FTF_BIC);
|
||||
ADD_PHYSICS_LIST(QGSC_BERT);
|
||||
ADD_PHYSICS_LIST(QGS_BIC);
|
||||
//ADD_PHYSICS_LIST(QGSP_DIF);
|
||||
//ADD_PHYSICS_LIST(QGSP_BERT_DIF);
|
||||
#endif
|
||||
|
||||
#if G4VERSION_NUMBER >= 930
|
||||
ADD_PHYSICS_LIST(CHIPS);
|
||||
ADD_PHYSICS_LIST(FTFP_BERT_EMV);
|
||||
ADD_PHYSICS_LIST(FTFP_BERT_EMX);
|
||||
ADD_PHYSICS_LIST(FTFP_BERT_TRV);
|
||||
ADD_PHYSICS_LIST(QGSC_CHIPS);
|
||||
ADD_PHYSICS_LIST(QGSP_BERT_EMX);
|
||||
ADD_PHYSICS_LIST(QGSP_BERT_NOLEP);
|
||||
ADD_PHYSICS_LIST(QGSP_BIC_EMY);
|
||||
ADD_PHYSICS_LIST(QGSP_FTFP_BERT);
|
||||
ADD_PHYSICS_LIST(QGSP_INCL_ABLA);
|
||||
//ADD_PHYSICS_LIST(QGSC_QGSC);
|
||||
#endif
|
||||
|
||||
#if G4VERSION_NUMBER >= 940
|
||||
ADD_PHYSICS_LIST(QGSP_BERT_95);
|
||||
ADD_PHYSICS_LIST(QGSP_BERT_95XS);
|
||||
ADD_PHYSICS_LIST(QGSP_BERT_CHIPS);
|
||||
#endif
|
||||
|
||||
ADD_PHYSICS_LIST(QGSP_BERT_EMV);
|
||||
ADD_PHYSICS_LIST(QGSP_BERT_EMX);
|
||||
ADD_PHYSICS_LIST(QGSP_BERT_HP);
|
||||
ADD_PHYSICS_LIST(QGSP_BERT_NOLEP);
|
||||
ADD_PHYSICS_LIST(QGSP_BERT_TRV);
|
||||
ADD_PHYSICS_LIST(QGSP_BIC);
|
||||
ADD_PHYSICS_LIST(QGSP_BIC_EMY);
|
||||
ADD_PHYSICS_LIST(QGSP_BIC_HP);
|
||||
ADD_PHYSICS_LIST(QGSP_FTFP_BERT);
|
||||
ADD_PHYSICS_LIST(QGSP_FTFP_BERT_95);
|
||||
ADD_PHYSICS_LIST(QGSP_FTFP_BERT_95XS);
|
||||
ADD_PHYSICS_LIST(QGSP_INCLXX);
|
||||
//ADD_PHYSICS_LIST(QGSP_QEL);
|
||||
ADD_PHYSICS_LIST(QGS_BIC);
|
||||
|
||||
// sort PL vector
|
||||
std::sort(plList.begin(), plList.end());
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ using namespace boost::python;
|
||||
// ====================================================================
|
||||
void export_G4Run()
|
||||
{
|
||||
class_<G4Run, G4Run*>("G4Run", "run class")
|
||||
class_<G4Run, G4Run*, boost::noncopyable>("G4Run", "run class")
|
||||
// ---
|
||||
.def("GetRunID", &G4Run::GetRunID)
|
||||
.def("SetRunID", &G4Run::SetRunID)
|
||||
|
||||
@@ -44,13 +44,16 @@ public:
|
||||
PyG4VisManager() { SetVerboseLevel(quiet); }
|
||||
~PyG4VisManager() { }
|
||||
|
||||
static PyG4VisManager* _get_concrete_instance() {
|
||||
return dynamic_cast<PyG4VisManager*>(fpConcreteInstance);
|
||||
}
|
||||
|
||||
virtual void RegisterGraphicsSystems() { }
|
||||
|
||||
virtual void RegisterModelFactories() {
|
||||
RegisterModelFactory(new G4TrajectoryDrawByChargeFactory());
|
||||
RegisterModelFactory(new G4TrajectoryDrawByParticleIDFactory());
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// ====================================================================
|
||||
@@ -62,7 +65,7 @@ void (PyG4VisManager::*f1_SetVerboseLevel)(G4int)
|
||||
= &PyG4VisManager::SetVerboseLevel;
|
||||
void (PyG4VisManager::*f2_SetVerboseLevel)(const G4String&)
|
||||
= &PyG4VisManager::SetVerboseLevel;
|
||||
void (PyG4VisManager::*f3_SetVerboseLevel)(G4VisManager::Verbosity)
|
||||
void (PyG4VisManager::*f3_SetVerboseLevel)(G4VisManager::Verbosity)
|
||||
= &PyG4VisManager::SetVerboseLevel;
|
||||
|
||||
}
|
||||
@@ -76,9 +79,9 @@ void export_G4VisManager()
|
||||
{
|
||||
scope in_PyG4VisManager =
|
||||
class_<PyG4VisManager, boost::noncopyable>
|
||||
("G4VisManager", "visualization manager")
|
||||
("G4VisManager", "visualization manager")
|
||||
// ---
|
||||
.def("GetConcreteInstance", &PyG4VisManager::GetConcreteInstance,
|
||||
.def("GetConcreteInstance", &PyG4VisManager::_get_concrete_instance,
|
||||
"Get an instance of G4VisManager",
|
||||
return_value_policy<reference_existing_object>())
|
||||
.staticmethod("GetConcreteInstance")
|
||||
@@ -87,6 +90,7 @@ void export_G4VisManager()
|
||||
.def("SetVerboseLevel", f2_SetVerboseLevel)
|
||||
.def("SetVerboseLevel", f3_SetVerboseLevel)
|
||||
.def("GetVerbosity", &PyG4VisManager::GetVerbosity)
|
||||
.staticmethod("GetVerbosity")
|
||||
.def("Initialize", &PyG4VisManager::Initialize)
|
||||
.def("RegisterGraphicsSystem", &PyG4VisManager::RegisterGraphicsSystem)
|
||||
;
|
||||
@@ -94,7 +98,7 @@ void export_G4VisManager()
|
||||
// enum LineStyle
|
||||
enum_<G4VisManager::Verbosity>("Verbosity")
|
||||
.value("quiet", G4VisManager::quiet)
|
||||
.value("startuo", G4VisManager::startup)
|
||||
.value("startup", G4VisManager::startup)
|
||||
.value("errors", G4VisManager::errors)
|
||||
.value("warnings", G4VisManager::warnings)
|
||||
.value("confirmations", G4VisManager::confirmations)
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
$Id: README,v 1.5 2007-08-07 03:37:36 kmura Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
Geant4Py - A Geant4-Python Bridge
|
||||
=========================================================
|
||||
|
||||
Tests Module
|
||||
------------
|
||||
|
||||
This module collects a set of tests for python wrapping of C++ elements.
|
||||
|
||||
Note:
|
||||
- "testXX" directories contain tests without Geant4 package.
|
||||
- "gtestXX" directories contain tests with Geant4 package.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
test00 ## hallo world (K.M)
|
||||
test01 ## simple class wrapping (K.M)
|
||||
test02 ## simple inheritance (K.M)
|
||||
test03 ## singleton w/o public constructor (K.M)
|
||||
## can NOT be compiled.
|
||||
test04 ## call policies (K.M)
|
||||
test05 ## function overloading & default arguments (K.M)
|
||||
test06 ## python inheritabce from base class (K.M)
|
||||
test07 ## enums (K.M)
|
||||
test08 ## static member function (K.M)
|
||||
test09 ## operators (K.M)
|
||||
test10 ## call by-reference (K.M)
|
||||
test11 ## no_init (K.M)
|
||||
test12 ## indexing a STL vector (K.M)
|
||||
test13 ## test for a list argument/return (K.M)
|
||||
-------------------------------------------------------------------
|
||||
gtest01 ## user application (K.M)
|
||||
gtest02 ## test for using site-module packages (K.M)
|
||||
gtest03 ## test for EZsim package (K.M)
|
||||
gtest04 ## test for getting command tree and command information (K.M)
|
||||
gtest05 ## test for constructing CSG geometries in Python (K.M)
|
||||
gtest06 ## test for constructing/visualizing boolean geoemtries (K.M)
|
||||
gtest07 ## test for checking overlapped geometries (K.M)
|
||||
@@ -0,0 +1,309 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="generated-by" content="Markdown PRO, http://markdownpro.com"/>
|
||||
<title></title>
|
||||
<style type="text/css">
|
||||
html,body{margin:0;padding:0;}
|
||||
body {padding: 20px}
|
||||
h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,cite,code,del,dfn,em,img,q,s,samp,small,strike,strong,sub,sup,tt,var,dd,dl,dt,li,ol,ul,fieldset,form,label,legend,button,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;font-weight:normal;font-style:normal;font-size:100%;line-height:1;font-family:inherit;}
|
||||
table{border-collapse:collapse;border-spacing:0;}
|
||||
ol,ul{list-style:none;}
|
||||
q:before,q:after,blockquote:before,blockquote:after{content:"";}
|
||||
html{overflow-y:scroll;font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;}
|
||||
a:focus{outline:thin dotted;}
|
||||
a:hover,a:active{outline:0;}
|
||||
article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block;}
|
||||
audio,canvas,video{display:inline-block;*display:inline;*zoom:1;}
|
||||
audio:not([controls]){display:none;}
|
||||
sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline;}
|
||||
sup{top:-0.5em;}
|
||||
sub{bottom:-0.25em;}
|
||||
img{border:0;-ms-interpolation-mode:bicubic;}
|
||||
button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle;}
|
||||
button,input{line-height:normal;*overflow:visible;}
|
||||
button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0;}
|
||||
button,input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button;}
|
||||
input[type="search"]{-webkit-appearance:textfield;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;}
|
||||
input[type="search"]::-webkit-search-decoration{-webkit-appearance:none;}
|
||||
textarea{overflow:auto;vertical-align:top;}
|
||||
html,body{background-color:#ffffff;}
|
||||
body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:18px;color:#404040;}
|
||||
.container{width:940px;margin-left:auto;margin-right:auto;zoom:1;}.container:before,.container:after{display:table;content:"";zoom:1;*display:inline;}
|
||||
.container:after{clear:both;}
|
||||
.container-fluid{position:relative;min-width:940px;padding-left:20px;padding-right:20px;zoom:1;}.container-fluid:before,.container-fluid:after{display:table;content:"";zoom:1;*display:inline;}
|
||||
.container-fluid:after{clear:both;}
|
||||
.container-fluid>.sidebar{float:left;width:220px;}
|
||||
.container-fluid>.content{margin-left:240px;}
|
||||
a{color:#0069d6;text-decoration:none;line-height:inherit;font-weight:inherit;}a:hover{color:#00438a;text-decoration:underline;}
|
||||
.pull-right{float:right;}
|
||||
.pull-left{float:left;}
|
||||
.hide{display:none;}
|
||||
.show{display:block;}
|
||||
.row{zoom:1;margin-left:-20px;}.row:before,.row:after{display:table;content:"";zoom:1;*display:inline;}
|
||||
.row:after{clear:both;}
|
||||
p{font-size:13px;font-weight:normal;line-height:18px;margin-bottom:9px;}p small{font-size:11px;color:#bfbfbf;}
|
||||
h1,h2,h3,h4,h5,h6{font-weight:bold;color:#404040;}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{color:#bfbfbf;}
|
||||
h1{margin-bottom:18px;font-size:30px;line-height:36px;}h1 small{font-size:18px;}
|
||||
h2{font-size:24px;line-height:36px;}h2 small{font-size:14px;}
|
||||
h3,h4,h5,h6{line-height:36px;}
|
||||
h3{font-size:18px;}h3 small{font-size:14px;}
|
||||
h4{font-size:16px;}h4 small{font-size:12px;}
|
||||
h5{font-size:14px;}
|
||||
h6{font-size:13px;color:#bfbfbf;text-transform:uppercase;}
|
||||
ul,ol{margin:0 0 18px 25px;}
|
||||
ul ul,ul ol,ol ol,ol ul{margin-bottom:0;}
|
||||
ul{list-style:disc;}
|
||||
ol{list-style:decimal;}
|
||||
li{line-height:18px;color:#808080;}
|
||||
ul.unstyled{list-style:none;margin-left:0;}
|
||||
dl{margin-bottom:18px;}dl dt,dl dd{line-height:18px;}
|
||||
dl dt{font-weight:bold;}
|
||||
dl dd{margin-left:9px;}
|
||||
hr{margin:20px 0 19px;border:0;border-bottom:1px solid #eee;}
|
||||
strong{font-style:inherit;font-weight:bold;}
|
||||
em{font-style:italic;font-weight:inherit;line-height:inherit;}
|
||||
.muted{color:#bfbfbf;}
|
||||
blockquote{margin-bottom:18px;border-left:5px solid #eee;padding-left:15px;}blockquote p{font-size:14px;font-weight:300;line-height:18px;margin-bottom:0;}
|
||||
blockquote small{display:block;font-size:12px;font-weight:300;line-height:18px;color:#bfbfbf;}blockquote small:before{content:'\2014 \00A0';}
|
||||
address{display:block;line-height:18px;margin-bottom:18px;}
|
||||
code,pre{padding:0 3px 2px;font-family:Monaco, Andale Mono, Courier New, monospace;font-size:12px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
|
||||
code{padding:1px 3px;}
|
||||
pre{background-color:#f5f5f5;display:block;padding:8.5px;margin:0 0 18px;line-height:18px;font-size:12px;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.15);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;white-space:pre;white-space:pre-wrap;word-wrap:break-word;}
|
||||
form{margin-bottom:18px;}
|
||||
fieldset{margin-bottom:18px;padding-top:18px;}fieldset legend{display:block;padding-left:150px;font-size:19.5px;line-height:1;color:#404040;*padding:0 0 5px 145px;*line-height:1.5;}
|
||||
form .clearfix{margin-bottom:18px;zoom:1;}form .clearfix:before,form .clearfix:after{display:table;content:"";zoom:1;*display:inline;}
|
||||
form .clearfix:after{clear:both;}
|
||||
label,input,select,textarea{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:normal;}
|
||||
label{padding-top:6px;font-size:13px;line-height:18px;float:left;width:130px;text-align:right;color:#404040;}
|
||||
form .input{margin-left:150px;}
|
||||
input[type=checkbox],input[type=radio]{cursor:pointer;}
|
||||
input,textarea,select,.uneditable-input{display:inline-block;width:210px;height:18px;padding:4px;font-size:13px;line-height:18px;color:#808080;border:1px solid #ccc;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
|
||||
input[type=checkbox],input[type=radio]{width:auto;height:auto;padding:0;margin:3px 0;*margin-top:0;line-height:normal;border:none;}
|
||||
input[type=file]{background-color:#ffffff;padding:initial;border:initial;line-height:initial;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}
|
||||
input[type=button],input[type=reset],input[type=submit]{width:auto;height:auto;}
|
||||
select,input[type=file]{height:27px;line-height:27px;*margin-top:4px;}
|
||||
select[multiple]{height:inherit;}
|
||||
textarea{height:auto;}
|
||||
.uneditable-input{background-color:#ffffff;display:block;border-color:#eee;-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);cursor:not-allowed;}
|
||||
:-moz-placeholder{color:#bfbfbf;}
|
||||
::-webkit-input-placeholder{color:#bfbfbf;}
|
||||
input,textarea{-webkit-transition:border linear 0.2s,box-shadow linear 0.2s;-moz-transition:border linear 0.2s,box-shadow linear 0.2s;-ms-transition:border linear 0.2s,box-shadow linear 0.2s;-o-transition:border linear 0.2s,box-shadow linear 0.2s;transition:border linear 0.2s,box-shadow linear 0.2s;-webkit-box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1);-moz-box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1);box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1);}
|
||||
input:focus,textarea:focus{outline:0;border-color:rgba(82, 168, 236, 0.8);-webkit-box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1),0 0 8px rgba(82, 168, 236, 0.6);-moz-box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1),0 0 8px rgba(82, 168, 236, 0.6);box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1),0 0 8px rgba(82, 168, 236, 0.6);}
|
||||
input[type=file]:focus,input[type=checkbox]:focus,select:focus{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;outline:1px dotted #666;}
|
||||
form div.clearfix.error{background:#fae5e3;padding:10px 0;margin:-10px 0 10px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}form div.clearfix.error>label,form div.clearfix.error span.help-inline,form div.clearfix.error span.help-block{color:#9d261d;}
|
||||
form div.clearfix.error input,form div.clearfix.error textarea{border-color:#c87872;-webkit-box-shadow:0 0 3px rgba(171, 41, 32, 0.25);-moz-box-shadow:0 0 3px rgba(171, 41, 32, 0.25);box-shadow:0 0 3px rgba(171, 41, 32, 0.25);}form div.clearfix.error input:focus,form div.clearfix.error textarea:focus{border-color:#b9554d;-webkit-box-shadow:0 0 6px rgba(171, 41, 32, 0.5);-moz-box-shadow:0 0 6px rgba(171, 41, 32, 0.5);box-shadow:0 0 6px rgba(171, 41, 32, 0.5);}
|
||||
form div.clearfix.error .input-prepend span.add-on,form div.clearfix.error .input-append span.add-on{background:#f4c8c5;border-color:#c87872;color:#b9554d;}
|
||||
table{width:100%;margin-bottom:18px;padding:0;border-collapse:separate;*border-collapse:collapse;font-size:13px;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}table th,table td{padding:10px 10px 9px;line-height:18px;text-align:left;}
|
||||
table th{padding-top:9px;font-weight:bold;vertical-align:middle;border-bottom:1px solid #ddd;}
|
||||
table td{vertical-align:top;}
|
||||
table th+th,table td+td{border-left:1px solid #ddd;}
|
||||
table tr+tr td{border-top:1px solid #ddd;}
|
||||
table tbody tr:first-child td:first-child{-webkit-border-radius:4px 0 0 0;-moz-border-radius:4px 0 0 0;border-radius:4px 0 0 0;}
|
||||
table tbody tr:first-child td:last-child{-webkit-border-radius:0 4px 0 0;-moz-border-radius:0 4px 0 0;border-radius:0 4px 0 0;}
|
||||
table tbody tr:last-child td:first-child{-webkit-border-radius:0 0 0 4px;-moz-border-radius:0 0 0 4px;border-radius:0 0 0 4px;}
|
||||
table tbody tr:last-child td:last-child{-webkit-border-radius:0 0 4px 0;-moz-border-radius:0 0 4px 0;border-radius:0 0 4px 0;}
|
||||
.zebra-striped tbody tr:nth-child(odd) td{background-color:#f9f9f9;}
|
||||
.zebra-striped tbody tr:hover td{background-color:#f5f5f5;}
|
||||
.zebra-striped .header{cursor:pointer;}.zebra-striped .header:after{content:"";float:right;margin-top:7px;border-width:0 4px 4px;border-style:solid;border-color:#000 transparent;visibility:hidden;}
|
||||
.zebra-striped .header:hover:after{visibility:visible;}
|
||||
footer{margin-top:17px;padding-top:17px;border-top:1px solid #eee;}
|
||||
.page-header{margin-bottom:17px;border-bottom:1px solid #ddd;-webkit-box-shadow:0 1px 0 rgba(255, 255, 255, 0.5);-moz-box-shadow:0 1px 0 rgba(255, 255, 255, 0.5);box-shadow:0 1px 0 rgba(255, 255, 255, 0.5);}.page-header h1{margin-bottom:8px;}
|
||||
.close{float:right;color:#000000;font-size:20px;font-weight:bold;line-height:13.5px;text-shadow:0 1px 0 #ffffff;filter:alpha(opacity=20);-khtml-opacity:0.2;-moz-opacity:0.2;opacity:0.2;}.close:hover{color:#000000;text-decoration:none;filter:alpha(opacity=40);-khtml-opacity:0.4;-moz-opacity:0.4;opacity:0.4;}
|
||||
|
||||
pre {
|
||||
padding: 0;
|
||||
margin: 10px 0px 10px;
|
||||
overflow: auto; /*--If the Code exceeds the width, a scrolling is available--*/
|
||||
overflow-Y: hidden; /*--Hides vertical scroll created by IE--*/
|
||||
}
|
||||
pre code {
|
||||
margin: 5px; /*--Left Margin--*/
|
||||
padding: 0px;
|
||||
display: block;
|
||||
line-height: 18px;
|
||||
}
|
||||
.center { text-align:center}
|
||||
.left {text-align:left}
|
||||
.right {text-align:right}
|
||||
|
||||
</style><style type="text/css">
|
||||
body{font-size:14px;line-height:1.6;font-family: Helvetica, arial, freesans, clean, sans-serif;padding: 20px;}
|
||||
body>*:first-child{margin-top:0!important;}
|
||||
body>*:last-child{margin-bottom:0!important;}
|
||||
body a:active {outline: none;}
|
||||
body a:hover {text-decoration: underline;}
|
||||
body a {color: #4183C4;text-decoration: none;}
|
||||
body a.absent{color:#c00;}
|
||||
body h1, body h2, h3, h4, h5, h6{margin:20px 0 10px;padding:0;font-weight:bold;-webkit-font-smoothing:antialiased;}
|
||||
body h1 tt, h1 code, h2 tt, h2 code, h3 tt, h3 code, h4 tt, h4 code, h5 tt, h5 code, h6 tt, h6 code{font-size:inherit;}
|
||||
body h1{font-size:28px;color:#000;}
|
||||
body h2{font-size:24px;border-bottom:1px solid #ccc;color:#000;}
|
||||
body h3{font-size:18px;}
|
||||
body h4{font-size:16px;}
|
||||
body h5{font-size:14px;}
|
||||
body h6{color:#777;font-size:14px;}
|
||||
body p, blockquote, ul, ol, dl, li, table, pre{margin:15px 0;}
|
||||
body hr{background:transparent url('../../images/modules/pulls/dirty-shade.png') repeat-x 0 0;border:0 none;color:#ccc;height:4px;padding:0;}
|
||||
body>h2:first-child,>h1:first-child,>h1:first-child+h2,>h3:first-child,>h4:first-child,>h5:first-child,>h6:first-child{margin-top:0;padding-top:0;}
|
||||
body h1+p, h2+p, h3+p, h4+p, h5+p, h6+p{margin-top:0;}
|
||||
body li p.first{display:inline-block;}
|
||||
body ul, ol{padding-left:30px;}
|
||||
body ul li>:first-child, ol li>:first-child{margin-top:0;}
|
||||
body ul li>:last-child, ol li>:last-child{margin-bottom:0;}
|
||||
body dl{padding:0;}
|
||||
body dl dt{font-size:14px;font-weight:bold;font-style:italic;padding:0;margin:15px 0 5px;}
|
||||
body dl dt:first-child{padding:0;}
|
||||
body dl dt>:first-child{margin-top:0;}
|
||||
body dl dt>:last-child{margin-bottom:0;}
|
||||
body dl dd{margin:0 0 15px;padding:0 15px;}
|
||||
body dl dd>:first-child{margin-top:0;}
|
||||
body dl dd>:last-child{margin-bottom:0;}
|
||||
body blockquote{border-left:4px solid #DDD;padding:0 15px;color:#777;}
|
||||
body blockquote>:first-child{margin-top:0;}
|
||||
body blockquote>:last-child{margin-bottom:0;}
|
||||
body table{padding:0;}
|
||||
body table tr{border-top:1px solid #ccc;background-color:#fff;margin:0;padding:0;}
|
||||
body table tr:nth-child(2n){background-color:#f8f8f8;}
|
||||
body table tr th{font-weight:bold;}
|
||||
body table tr th, table tr td{border:1px solid #ccc;text-align:left;margin:0;padding:6px 13px;}
|
||||
body table tr th>:first-child, table tr td>:first-child{margin-top:0;}
|
||||
body table tr th>:last-child, table tr td>:last-child{margin-bottom:0;}
|
||||
body img{max-width:100%;}
|
||||
body span.frame{display:block;overflow:hidden;}
|
||||
body span.frame>span{border:1px solid #ddd;display:block;float:left;overflow:hidden;margin:13px 0 0;padding:7px;width:auto;}
|
||||
body span.frame span img{display:block;float:left;}
|
||||
body span.frame span span{clear:both;color:#333;display:block;padding:5px 0 0;}
|
||||
body span.align-center{display:block;overflow:hidden;clear:both;}
|
||||
body span.align-center>span{display:block;overflow:hidden;margin:13px auto 0;text-align:center;}
|
||||
body span.align-center span img{margin:0 auto;text-align:center;}
|
||||
body span.align-right{display:block;overflow:hidden;clear:both;}
|
||||
body span.align-right>span{display:block;overflow:hidden;margin:13px 0 0;text-align:right;}
|
||||
body span.align-right span img{margin:0;text-align:right;}
|
||||
body span.float-left{display:block;margin-right:13px;overflow:hidden;float:left;}
|
||||
body span.float-left span{margin:13px 0 0;}
|
||||
body span.float-right{display:block;margin-left:13px;overflow:hidden;float:right;}
|
||||
body span.float-right>span{display:block;overflow:hidden;margin:13px auto 0;text-align:right;}
|
||||
body code, tt{margin:0 2px;padding:0 5px;white-space:nowrap;border:1px solid #eaeaea;background-color:#f8f8f8;border-radius:3px;}
|
||||
body pre>code{margin:0;padding:0;white-space:pre;border:none;background:transparent;}
|
||||
body .highlight pre, pre{background-color:#f8f8f8;border:1px solid #ccc;font-size:13px;line-height:19px;overflow:auto;padding:6px 10px;border-radius:3px;}
|
||||
body pre code, pre tt{background-color:transparent;border:none;}
|
||||
</style></head>
|
||||
<body>
|
||||
<h1>Test Modules</h1>
|
||||
|
||||
<p>This module collects a set of tests for python wrapping of C++ elements.</p>
|
||||
|
||||
<blockquote>
|
||||
<p><strong>Notes:</strong> <br>
|
||||
"<em>testXX</em>" directories contain tests without Geant4 package. <br>
|
||||
"<em>gtestXX</em>" directories contain tests with Geant4 package.</p>
|
||||
</blockquote>
|
||||
|
||||
<h2>Basic tests</h2>
|
||||
|
||||
<table><thead>
|
||||
<tr>
|
||||
<th style="text-align: center">Test</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead><tbody>
|
||||
<tr>
|
||||
<td style="text-align: center">test00</td>
|
||||
<td>hallo world (K.M)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: center">test01</td>
|
||||
<td>simple class wrapping (K.M)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: center">test02</td>
|
||||
<td>simple inheritance (K.M)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: center">test03</td>
|
||||
<td>singleton w/o public constructor (K.M) <br> can NOT be compiled.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: center">test04</td>
|
||||
<td>call policies (K.M)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: center">test05</td>
|
||||
<td>function overloading & default arguments (K.M)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: center">test06</td>
|
||||
<td>python inheritance from base class (K.M)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: center">test07</td>
|
||||
<td>enums (K.M)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: center">test08</td>
|
||||
<td>static member function (K.M)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: center">test09</td>
|
||||
<td>operators (K.M)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: center">test10</td>
|
||||
<td>call by-reference (K.M)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: center">test11</td>
|
||||
<td>no_init (K.M)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: center">test12</td>
|
||||
<td>indexing a STL vector (K.M)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: center">test13</td>
|
||||
<td>test for a list argument/return (K.M)</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
|
||||
<h2>Function tests</h2>
|
||||
|
||||
<table><thead>
|
||||
<tr>
|
||||
<th style="text-align: center">Test</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead><tbody>
|
||||
<tr>
|
||||
<td style="text-align: center">gtest01</td>
|
||||
<td>user application (K.M)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: center">gtest02</td>
|
||||
<td>test for using site-module packages (K.M)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: center">gtest03</td>
|
||||
<td>test for EZsim package (K.M)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: center">gtest04</td>
|
||||
<td>test for getting command tree and command information (K.M)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: center">gtest05</td>
|
||||
<td>test for constructing CSG geometries in Python (K.M)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: center">gtest06</td>
|
||||
<td>test for constructing/visualizing boolean geoemtries (K.M)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: center">gtest07</td>
|
||||
<td>test for checking overlapped geometries (K.M)</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,44 @@
|
||||
Test Modules
|
||||
============
|
||||
|
||||
This module collects a set of tests for python wrapping of C++ elements.
|
||||
|
||||
>**Notes:** <br>
|
||||
"*testXX*" directories contain tests without Geant4 package. <br>
|
||||
"*gtestXX*" directories contain tests with Geant4 package.
|
||||
|
||||
|
||||
Basic tests
|
||||
-----------
|
||||
|
||||
| Test | Description |
|
||||
|:------:|-------------
|
||||
|test00 | hallo world (K.M)
|
||||
|test01 | simple class wrapping (K.M)
|
||||
|test02 | simple inheritance (K.M)
|
||||
|test03 | singleton w/o public constructor (K.M) <br> can NOT be compiled.
|
||||
|test04 | call policies (K.M)
|
||||
|test05 | function overloading & default arguments (K.M)
|
||||
|test06 | python inheritance from base class (K.M)
|
||||
|test07 | enums (K.M)
|
||||
|test08 | static member function (K.M)
|
||||
|test09 | operators (K.M)
|
||||
|test10 | call by-reference (K.M)
|
||||
|test11 | no_init (K.M)
|
||||
|test12 | indexing a STL vector (K.M)
|
||||
|test13 | test for a list argument/return (K.M)
|
||||
|
||||
|
||||
Function tests
|
||||
--------------
|
||||
|
||||
| Test | Description |
|
||||
|:------:|-------------
|
||||
|gtest01 | user application (K.M)
|
||||
|gtest02 | test for using site-module packages (K.M)
|
||||
|gtest03 | test for EZsim package (K.M)
|
||||
|gtest04 | test for getting command tree and command information (K.M)
|
||||
|gtest05 | test for constructing CSG geometries in Python (K.M)
|
||||
|gtest06 | test for constructing/visualizing boolean geoemtries (K.M)
|
||||
|gtest07 | test for checking overlapped geometries (K.M)
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
$Id: README,v 1.2 2006-04-25 07:54:28 kmura Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
Geant4Py - A Geant4-Python Bridge
|
||||
=========================================================
|
||||
|
||||
gtest01
|
||||
-------
|
||||
|
||||
This test shows some basic tests for Geant4 Python interface;
|
||||
|
||||
- An example of how to connect an existing Geant4 users' code to Python
|
||||
- Python overriding of UserAction-s
|
||||
- Setting magnetic fields in Python
|
||||
- Visualization
|
||||
- Thread testing
|
||||
|
||||
|
||||
* How to build
|
||||
|
||||
# cd g4lib
|
||||
# make
|
||||
|
||||
A python module "gtest01.so" will be created in the head directory.
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4PVPlacement.hh"
|
||||
#include "G4VisAttributes.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
// ====================================================================
|
||||
//
|
||||
|
||||
@@ -32,6 +32,8 @@
|
||||
// ====================================================================
|
||||
#include "QMaterials.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4PhysicalConstants.hh"
|
||||
|
||||
// ====================================================================
|
||||
//
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include "QPhysicsList.hh"
|
||||
#include "Particles.hh"
|
||||
#include "PhysicsListEMstd.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
// ====================================================================
|
||||
//
|
||||
|
||||
@@ -17,7 +17,7 @@ G4BASE /opt/heplib/Geant4
|
||||
#
|
||||
# Base directory of CLHEP
|
||||
#
|
||||
CLHEPBASE /opt/heplib/CLHEP
|
||||
#CLHEPBASE /opt/heplib/CLHEP
|
||||
|
||||
#
|
||||
# Base directory of XERCES-C
|
||||
@@ -28,7 +28,7 @@ CLHEPBASE /opt/heplib/CLHEP
|
||||
# G4 version and CLHEP version (starting with "-")
|
||||
#
|
||||
# G4 version CLHEP version
|
||||
- geant4.9.1 2.0.3.2
|
||||
- geant4.9.1 --
|
||||
|
||||
#
|
||||
# Visualization Options (starting with "v")
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# ======================================================================
|
||||
# A script for Geant4 autobuild
|
||||
#
|
||||
# Version 2.4.2 Apr. 2010
|
||||
# Version 2.5.0 May 2012
|
||||
#
|
||||
# [usage]
|
||||
# g4autobuild [<options>]
|
||||
@@ -13,6 +13,7 @@
|
||||
# --config=CONFIG configure file [PREFIX/g4auto.cfg]
|
||||
# --jobs=N allow N jobs at once
|
||||
# --with-fpic default -fPIC option
|
||||
# --with-clhep require external clhep
|
||||
# ======================================================================
|
||||
export LANG=C
|
||||
|
||||
@@ -33,7 +34,7 @@ cat <<EOF
|
||||
--config=CONFIG configure file [PREFIX/g4auto.cfg]
|
||||
--jobs=N allow N jobs at once
|
||||
--with-fpic default -fPIC option
|
||||
|
||||
--with-clhep require external clhep
|
||||
EOF
|
||||
}
|
||||
|
||||
@@ -139,6 +140,7 @@ config=$prefix/g4auto.cfg
|
||||
status_dir=$prefix/status
|
||||
njobs=1
|
||||
qfpic=0
|
||||
qclhep=0
|
||||
|
||||
# parsing options
|
||||
while test $# -gt 0
|
||||
@@ -155,6 +157,7 @@ do
|
||||
--config=*) config=$optarg ;;
|
||||
--jobs=*) njobs=$optarg ;;
|
||||
--with-fpic ) qfpic=1 ;;
|
||||
--with-clhep ) qclhep=1 ;;
|
||||
# ---------------------------------------------------------------
|
||||
-*)
|
||||
echo "Unrecognized option: $1"
|
||||
@@ -213,8 +216,10 @@ if [ ! -d $g4base ]; then
|
||||
fi
|
||||
|
||||
if [ ! -d $clhepbase ]; then
|
||||
echo "*** abort :$clhepbase does not exist."
|
||||
exit -1
|
||||
if [ $qclhep == 1 ]; then
|
||||
echo "*** abort :$clhepbase does not exist."
|
||||
exit -1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $xercescroot ]; then
|
||||
@@ -263,7 +268,6 @@ export LANG=C
|
||||
# ========================================================================
|
||||
export G4SYSTEM=$g4sys
|
||||
export G4INSTALL=$g4base/$g4
|
||||
export CLHEP_BASE_DIR=$clhepbase/$clhep
|
||||
EOF
|
||||
|
||||
cat > g4rc.csh << EOF
|
||||
@@ -277,9 +281,12 @@ setenv LANG C
|
||||
# ========================================================================
|
||||
setenv G4SYSTEM $g4sys
|
||||
setenv G4INSTALL $g4base/$g4
|
||||
setenv CLHEP_BASE_DIR $clhepbase/$clhep
|
||||
EOF
|
||||
|
||||
if [ $qclhep == 1 ]; then
|
||||
add_ext_env CLHEP_BASE_DIR $clhepbase/$clhep
|
||||
fi
|
||||
|
||||
if [ $xercescroot ]; then
|
||||
envval=XERCESCROOT
|
||||
add_ext_env XERCESCROOT $xercescroot
|
||||
|
||||
@@ -2,14 +2,11 @@
|
||||
# ======================================================================
|
||||
# A script for Geant4 packaging
|
||||
#
|
||||
# Version 2.2 Dec 2008
|
||||
# Version 2.3 July 2012
|
||||
#
|
||||
# ======================================================================
|
||||
export LANG=C
|
||||
|
||||
IFS='
|
||||
'
|
||||
|
||||
PATH=/bin:/usr/bin
|
||||
export PATH
|
||||
|
||||
@@ -39,7 +36,7 @@ Options:
|
||||
|
||||
--with-g4system=G4SYSTEM G4SYSTEM [\$G4SYSTEM]
|
||||
--with-g4-dir=DIR Geant4 dir [\$G4INSTALL]
|
||||
--with-clhep-dir=DIR CLHEP dir [\$CLHEP_BASE_DIR]
|
||||
--with-clhep-dir=DIR CLHEP dir [no] [\$CLHEP_BASE_DIR]
|
||||
|
||||
--with-lib-dir=DIR G4 static granular libdir [lib]
|
||||
--with-glib-dir=DIR G4 global static libdir [glib]
|
||||
@@ -93,6 +90,7 @@ g4dir=${G4INSTALL:-/zzz}
|
||||
clhepdir=${CLHEP_BASE_DIR:-/zzz}
|
||||
|
||||
install_dir=/zzz
|
||||
with_clhep=0
|
||||
|
||||
libdir=lib
|
||||
glibdir=glib
|
||||
@@ -115,7 +113,7 @@ do
|
||||
# ---------------------------------------------------------------
|
||||
--with-g4system=*) g4system=$optarg ;;
|
||||
--with-g4-dir=*) g4dir=$optarg ;;
|
||||
--with-clhep-dir=*) clhepdir=$optarg ;;
|
||||
--with-clhep-dir=*) clhepdir=$optarg; with_clhep=1 ;;
|
||||
--with-lib-dir=*) libdir=$optarg ;;
|
||||
--with-glib-dir=*) glibdir=$optarg ;;
|
||||
--with-slib-dir=*) slibdir=$optarg ;;
|
||||
@@ -154,13 +152,15 @@ if [ ! -d $g4dir ]; then
|
||||
fi
|
||||
echo $g4dir
|
||||
|
||||
echo $ac_n "Checking for CLHEP dir ...$ac_c"
|
||||
if [ ! -d $clhepdir ]; then
|
||||
echo "no"
|
||||
echo "### $clhepdir does not exist."
|
||||
exit -1
|
||||
if [ $with_clhep = 1 ]; then
|
||||
echo $ac_n "Checking for CLHEP dir ...$ac_c"
|
||||
if [ ! -d $clhepdir ]; then
|
||||
echo "no"
|
||||
echo "### $clhepdir does not exist."
|
||||
exit -1
|
||||
fi
|
||||
echo $clhepdir
|
||||
fi
|
||||
echo $clhepdir
|
||||
|
||||
echo $ac_n "Checking for G4SYSTEM ...$ac_c"
|
||||
if [ ! -e $g4dir/config/sys/$g4system.gmk ]; then
|
||||
@@ -218,8 +218,10 @@ mkdir -p $g4packdir/include
|
||||
mkdir -p $g4packdir/lib
|
||||
|
||||
# CLHEP
|
||||
cp -pR $clhepdir/include/CLHEP $g4packdir/include/
|
||||
cp -pR $clhepdir/lib/libCLHEP-[12]* $g4packdir/lib/
|
||||
if [ $with_clhep = 1 ]; then
|
||||
cp -pR $clhepdir/include/CLHEP $g4packdir/include/
|
||||
cp -pR $clhepdir/lib/libCLHEP-[12]* $g4packdir/lib/
|
||||
fi
|
||||
|
||||
# Geant4
|
||||
cp -pR $g4dir/include $g4packdir/include/
|
||||
@@ -227,11 +229,11 @@ mv $g4packdir/include/include $g4packdir/include/Geant4
|
||||
rm $g4packdir/include/Geant4/README
|
||||
|
||||
if [ $enable_glib = 1 ]; then
|
||||
cp -pR $g4dir/$glibdir/$g4system/lib* $g4packdir/lib
|
||||
cp -pR $g4dir/$glibdir/$g4system/libG4* $g4packdir/lib
|
||||
fi
|
||||
|
||||
if [ $enable_slib = 1 ]; then
|
||||
cp -pR $g4dir/$slibdir/$g4system/lib* $g4packdir/lib
|
||||
cp -pR $g4dir/$slibdir/$g4system/libG4* $g4packdir/lib
|
||||
|
||||
if [ $g4system = Darwin-g++ ]; then
|
||||
if [ $enable_glib = 0 ]; then
|
||||
@@ -245,14 +247,16 @@ if [ $enable_slib = 1 ]; then
|
||||
fi
|
||||
|
||||
if [ $enable_lib = 1 ]; then
|
||||
cp -pR $g4dir/$libdir/$g4system/lib* $g4packdir/lib
|
||||
cp -pR $g4dir/$libdir/$g4system/libG4* $g4packdir/lib
|
||||
fi
|
||||
|
||||
# CLHEP links
|
||||
pushd $g4packdir/lib > /dev/null 2>&1
|
||||
ln -s libCLHEP-*.a libCLHEP.a
|
||||
ln -s libCLHEP-*.$shlib libCLHEP.$shlib
|
||||
popd > /dev/null 2>&1
|
||||
if [ $with_clhep = 1 ]; then
|
||||
pushd $g4packdir/lib > /dev/null 2>&1
|
||||
ln -s libCLHEP-*.a libCLHEP.a
|
||||
ln -s libCLHEP-*.$shlib libCLHEP.$shlib
|
||||
popd > /dev/null 2>&1
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user