Import Geant4 11.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2021-12-12 17:16:06 +01:00
parent 80e2389dd8
commit 84f33a068c
593 changed files with 68589 additions and 1 deletions
+33
View File
@@ -0,0 +1,33 @@
-------------------------------------------------------------------
This directory contains a set of examples for Geant4Py.
[demos/water_phantom]
An example of "water phantom dosimetry"
This demo program shows that a Geant4 application well coworks with ROOT
on Python front end. VisManager, PrimaryGeneratorAction, UserAction-s,
histogramming with ROOT are implemented in Python;
+ dose calculation in a water phantom
+ Python overloading of user actions
+ on-line histogramming with ROOT
+ visualization
[education]
Educational examples with Graphical User Interface using TKinter
* lesson1
The first version of the courseware of the mass attenuation coefficient.
* lesson2
GUI interface of ExN03, which can control geometry configuration,
intial particle condition, physics processes, cut value,
magnetic field and visualization outputs.
[emplot]
Examples of plotting photon cross sections and stopping powers with ROOT
[gdml]
Examples of writing/reading user's geometry to/from a GDML file
@@ -0,0 +1,54 @@
Hajime Yoshida
******* README of lesson1 ******
26 September 2006
- Lesson1.py as before
- Lesson1withN03.py
- physics is list is taken from examples/novice/N03
- process on/off
- Leson1Wx.py
- same as Lesson1withN03 but
- New GUI toolkit is used and the default Python isn't enough
- wxPython is necessary
26 May 2006 Geant4.8.1
The first version of the courseware of the mass attenuation coefficient
- Lesson1.py
select absorber material
set its thickness upto 500 mm
select beam particle
set its energy upto 100 MeV
set nu of events up to 100
run
and then
zoom in (x1.1) or zoom out (x0.9)
pan in up/down and/or right/left in the unit of mm (type in two
numbers separated by a space)
execute any G4 command but /gun/particle or /gun/energy which are
defined by the above
-oglx.mac
OGLSX => important to make zooming effective after showing trajectories.
if you want to use VRML, you have to specify the directory where *.wrl
file is stored and the VRML viewer to which the path is set:
G4VRMLFILE_DEST_DIR=/home/yoshidah/tmp/
G4VRMLFILE_VIEWER=vrmlview
And you have VRML drivers built.
G4VIS_BUILD_VRML_DRIVER=1
G4VIS_USE_VRMLFILE=1
G4VIS_BUILD_VRMLFILE_DRIVER=1
G4VIS_USE_VRML=1
-gun.mac
This is used only at the initialization time.
@@ -0,0 +1,82 @@
26 Sep 2006
- added Lesson2Wx.py
New version using wxPython
functionas are identical with ExN03.py
26 May 2006
revised 02 July 2006
Geant4.8.1 release
===============================================
Prerequisites for G4 environment variables.
==============================================
This scripts offers the choice of visualization systems;
one among OGLSX (OpenGL stored mode), or VRML2FILE or Wired3.
OGLSX is the default viewer and you need no environment variables.
To use VRML2FILE you have to specify its viewer which is found in your
search path and the destination directory where *.wrl file is stored.
If you don't specify the name of the viewer, you can't choose it on the panel.
For example,
setenv G4VRMLFILE_VIEWER $HOME/bin/vrmlview
setenv G4VRMLFILE_DEST_DIR $HOME/tmp/ <= terminate with /
To use Wired, download it and install under your directory. Java Runtime
Environment is necessary.
Then set, for example;
setenv G4HEPREPFILE_VIEWER $HOME/Wired/bin/wired <= any path you use
setenv G4HEPREPFILE_DIR $HOME/tmp/
setenv G4HEPREPFILE_NAME lesson2_00 <= any name you choose.
setenv G4HEPREPFILE_OVERWRITE 1 <= to reuse the file for "next event"
G4HEPREPFILE_VIEWER isn't an official Geant4 environment variable but is employed
here to control the vissssualization viewers.
The name of the HepRepFile is ${G4HEPREPFILE_NAME}.heprep which will be
stored in ${G4HEPREPFILE_DIR}.
ExN03.py script don't use VRML or Wired if their *_VIEWER isn't set.
But other env variables are also used in the script to look for the
file and to activate the viewer, you have to set all of the above variables
in the shell where you activate ExN03.py script.
NOTICE) VRML viewer blocks the window (modal), so that you have to exit it to
display another run.
********* ExN03.py script ***********
This example id derived from examples/novice/N03.
You can
- choose the materials of absorber and gap
- set the thickness of the absorber and gap
- set the lateral (in YZ plane) size of the sandwitch cal.
- choose an incedent particle
- set its energy
- set the number of events to run
- toggle on/off of the electromagnetic processes
- set cut length
- set magnetic field
- typein any Geant4 command (except related with the above functions) and execute it
How to run it?
%python ExN03.py
You can visualize with OpenGL stored mode or VRML or Wired3
You can choose either of the active viewers by pushing the
radio buttons.
=========================
NOTICE)
VRML viewer runs in the modal action, and you have to exit it
to have a new diaplay for the new run, or you want to switch to
another viewer.
Wired has the "next"/"previous" event button. So to see the next
event, first run and then "next" event. Wired doesn't block G4
and you can have Wired and OGLSX both open.
ExN03-Wired.py is OBSOLETE. Please use ExN03.py