Import Geant4 7.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 11:11:55 +02:00
parent e083ffb441
commit 516dbf1a58
5914 changed files with 202605 additions and 71141 deletions
-676
View File
@@ -1,676 +0,0 @@
<html>
<head>
<title>
GGE; Geant4 Geometry Editor
</title>
</head>
<body>
<center>
<h1>
GGE; GEANT4 Geometry Editor
</h1><br>
2003 Feb. 22
<br>
Hajime YOSHIDA
<br>
Naruto University of Education
</center>
<hr>
<h1>1) Overview </h1><br>
GGE, or GEANT4 Geometry Editor, is a visual tool to "create" a
detector geometry of GEANT4. It generates a complete C++ class
code for a relatively simple geometry. It is written in Java and runs on
any platform running Java. <p>
<a href="http://erpc1.naruto-u.ac.jp/~geant4/Sources.html">
Java Web Start version </a>is also supported.
If user has installed Java Web Start, GGE(or as a part of MOMO) can be
started directly from the web browser without typing java command on the console.
<p>
<h3>
Characteristics
</h3>
<ol>
<li>It provides users with tables
into which users can fill with their detector parameters.
<li>Using the
data in the tables, even if they are partial and imcomplete,
GGE can generate C++ source codes for a detector.
<br>
The class name must be supplied to get C++ source code.
<li>
When a user uses default functions of GGE, C++ codes generated by GGE
is a complete
description of a detector, including the definition of atoms, materials,
solids, color attributes,
logical volumes and physical volumes with rotations and translations.
<li>
The C++ source codes are saved into files and can be compiled to make a GEANT4 executable.
<li>
When GGE is used together with MOMO, an integrated environment,
a minimum set of user mandatory classes can be generated.
MOMO also generate the main program as well as GNU makefile for the GEANT4 to visualise the detector.
<li>
GAG is helpful to run Geant4 and to visualise the whole detector.
Simple macro files are associated, too, for visualisation.
</ol>
GGE consists of two editors (material and volume) which are
interrelated. Volume editor provides <it>Single
Positioned Volume</it>, <itLRepeatedly Positioned Volumes</it> with incremental copy numbers
(translational arrangement or axially symmetric arrangement), and
<it>Replicas </it>(in any axis).
<p>
<font color=red>Tips!</font>
<ol>
<li>GGE is based on Java's MVC model, or Swing so that any change or input to the
tables by a user
are automatically reflected to the internal data structure of GGE and C++ codes.
This is true at any moment, so that user can get even imcomplete C++ class files
at any moment, even without any filled tabular cells)
<li>
The whole detector description can be saved in a persistent file and can
be loaded for later reuse.
<li>
GGE employs own naming rules to generate C++ codes from the tables.
</ol>
<hr>
<h1>
2) Functionalities of GGE
</h1>
GGE has a top panel on which are placed menu buttons and fill-in text area.
<p>
<h3> Top menus</h3>
<ul>
<li> text area to specify the class name
<li> menu buttons
<ul>
<li> load, save a persistent file
<li> clear the tables
<li> generate cc and hh files using the specified class name
</ul>
</ul>
<h3> Tables </h3> <br>
GGE has several tables on two "tabbed panes";
one pane for the material editor and another for the volumes editor.
By clicking the tab, user can switch between both tables.
<br>
<h2>
2.1) The Material Editor
</h2>
<br>
<a href="./material.jpg">The material editor </a>
is composed of two tables for
<ol>
<li>"material from scratch"
and
<li>"compound materials".
</ol>
These tables can be enlengthened as will.
The boundary of the two tables can be moved as will, too.
<p>
<strong>
Every row represents a material.
</strong><br>
<a href="./periodic.jpg">The periodic table is popped up </a>to the
window, when "append" or "insert" a material button is pushed.
The foundamental properties of atoms; Z, A, etc. are built in to the
atomic table and are copied appropriately.
The atomic table can be hidden by a menu button on its top.
<p>
<hr>
<h3>
Functionalities of the Material Editor
</h3><br>
The functionalities implemented in this version are following;
<ol>
<li> <strong>append, insert, edit and delete a material</strong>
<ul>
<li> <strong>material from scratch</strong><br>
The name of an atom, numbers Z and A are
taken from the atomic table. User has to specify its density,
temperature and pressure. Canonical units and states can be choosen
from the lists.<br>
The corresponding instance in C++ is named "elementX", where
"X" represents element's symbol.
<li> <strong> material by combination </strong>(number or fractional ratios). <br>
User has to type in the name of a compound material,
its density etc.. A pop-up window is displayed when he focuses
on a cell <a href="./compoundeditor.jpg">specifying composition</a>.
<li> <a href="./periodic.jpg"><strong> periodic table of atoms</strong></a>
automatically popped up to
create a material. User can select upto eight atoms to specify
a compound material.
<li> default states (and their canonical names)
and values are provided (material state, temperature,
pressure).
<li> canonical physical units of GEANT4
are shown in selectable combo-boxes.
</ul>
<li> "<strong>in Use</strong>" mark for materials used in user's detector.
<ul>
<li> materials used in the logical volumes are
automatically checked as "in Use" state.
<li> user can add any materials "in Use" to
have C++ constructors, even when they aren't used in
logical volumes.
</ul>
<li> <strong> input and output from/to persistent material file </strong>
<br>
Material tables are saved to a Java's persistent file and can be reused.
<ul>
<li> load, append or save a material file
<li> an exemplary persistent material database
file "MaterialDB.g4mt" from the PDG
</ul>
</ol>
Not yet implemented are; material from materials, isotope and
protection from duplicated "in Use" instances of the same materials.
<hr>
<h2>
2.2) The Volume Editor ; logical and physical volumes
</h2>
<br>
<a href="./volumeeditor.jpg">The volume editor </a>
is composed of two major editors;
<ol>
<li>logical volume editor and
<li>physical volume editors,
</ol>
each is placed in the main scrollable panel.
Physical editor is composed of five tables for physical volumes.
They are placed on tabbed panes.
<p>
<h3>
Functionalities to define Geant4 logical volumes
</h3><p>
Following functionaliteis are implemented;
<ol>
<li> <a href="./selectasolid.jpg"><strong>Selecting a G4Solid</strong></a><br>
All Geant4 solids can be selected from the solid list.
<ul>
<li>all CSG solids; box, tube segment, cone segment, symmetric trapezoid,
sphere segment, parallel piped, torus segment, HYPE,
<li>BREP solids; PolyCone segment and Polygone segment
@@</ul>
After selecting a solid tyle, user pushes the "append" or "insert" button
in order to make a new row in the table. On focusing the "solid" cell,
<a href="./poligon.jpg">a pop up
window </a> appears for the specified solid. User can
<ul>
<li> specify parameters and canonical units of CSG solids
<li> specify any number of nodes and facets
with parameters and canonical units of BREP solids
<li> preview with DAWN with automatically chosen world size
<li> save DAWN format file of the specified solid
</ul>
<li> <strong>Defining G4Color</strong>, or colour attributes,
using a graphical color chooser from which RGB numbers are taken
to generate C++ codes. <br>
Each color is given unique name and is listed in the editor panel.
<li> <strong> Defining G4LogicalVolumes </strong> <br>
Each row of the logical vulume table represents a G4LogicalVolume.
User can append, insert or delete a row with corresponding buttons.<br>
The table has following columns;
<ul>
<li>The first column is to specify the name of the logical volume.
<li> The second column is filled automatically by choosing a
<a href="./selectasolid.jpg">selectable G4Solid</a>. Focusing on it allows user
to edit its parameters and preview with DAWN.
<li> The third column is type-in cell for material name
listed in the material editor. (drag and drop is planned)
<li> The fourth column is to specify the visualization attribute's name
</ul>
<li><strong>"Make the used materials" </strong> button. <br>
Clicking this button examins the materials specified in the logical volume table and marks "in Use" cell (the first one ) of the material
tables accordingly. Note that only rows marked "in Use" are used
to generate C++ codes.
</ol>
<hr>
<h3> Functionalities to define Physical volumes </h3><br>
Compared with the logical volume editor, the physical volume one has limited
generality. So, if user aren't satisfied with the following simplistic way
to place logical volumes, he can use partially generated C++ codes for
logical volumes etc..
<p>
<strong> Constructors of G4PVPlacement</strong><br>
Following four types of constructor are implemented, according to the type of
rotation and type of the mother volume.
<ol>
<li> Type 1 constructor = rotation of the frame, physical mother volume
<li> Type 2 constructor = rotation of a body, physical mother volume
<li> Type 3 constructor = rotation of the frame, logical mother volume
<li> Type 4 constructor = rotation of a body, logical mother volume
</ol>
Following simple placements are provided in GGE.
<ol>
<li> <a href="./single.jpg"><strong>Single Positioned Volume</strong> </a>(SPV)<br>
Each row represents a physical volume. The world volume must be
defined in the first row of this table.
<ol>
<li> The first column specifies either body or frame rotation.
<li> The second column specofies the instance's name of the physical volume
<li> The third column specifies the name of the logical volume to be placed
<li> The fourth column specifies the type of the mother volume.
The mother volume is either
null(Master Reference System), logical or physical.
The MARS or the world volume must be specified at the first row.
<li> The fifth column specifies the name of the mother volume, if it isn't NULL.
<li> The columns 7, 8 and 9-th specify the translation
in the X, Y or Z direction (default is no translation) with a selectable
unit of length
<li>The 11-th column specifies the axis of rotation (frame or body);
rotation around X, Y or Z axis with an angle in the 12-th column
</ol>
<li> <a href="./repeatedtrans.jpg"><strong>
Repeated Translationally Positioned Volumes </strong></a> (RTPV Arrangement)
of any number of copies of a logical volume with incremental copy numbers<br>
Each row represent a physical volume.
<ol>
<li>The first to 4-th columns are same as above.
<li>The columns 6, 7 and 8-th specify the position of the first copy
<li> The 10-th column specifies the direction of placement; X, Y or Z direction
<li> The 11-th column specifies the incremental step size
<li> The last column specifies the number of copies
</ol>
<li> <a href="./repeatedrotate.jpg">
<strong>Repeated Rotationally Positioned Volumes;
</strong> </a>axially symmetric arrangement of any number of copies of a logical volume with incremental copy numbers (RRPV Arrangement)<br>
Each row represents a physical volume.
<ol>
<li> The columns "move", "pName", "pLogic", "MomType" and "pMother" are same as above.
<li>(X0, Y0, Z0) column specify the position of the center of an axial rotation
<li>"Radius" column specifies a radius of axially symmetric arrangement
<li>"RotAxis" column specifies the rotational axis ; X, Y or Z
<li>"Phi_0" and "dPhi" column specify a starting angle and incremental step angle
<li> The last column specifies the number of copies
</ol>
<li><strong> Replica in the X, Y or Z direction</strong>
<li><strong>Replica in rho, phi or Z direction</strong>
<ol>
<li> width (in length or angle) and number of replicas
<li> offset (in length or angle)
<li> logical or physical mother volume
</ol>
</ol>
Planned but
not implemented yet are paremetrised volumes with linear scaling or linear rotation.
<hr>
<h1>
3) Generation of C++ code
</h1>
<ul>
<li>C++ code is output to a editor widget and can be saved.
But edited file loses the persistency and
looses correspondence with the tables contents.
<li>The required and necessary header files are automatically included; solid types etc.
<li>The order of creating instances is following;
<ol>
<li> G4Elements,
<li> G4Material,
<li> G4VisAttributes,
<li> G4Solids,
<li> G4LogicalVolume,
<li> Single Positioned Volumes,
<li> Repeated Volumes,
<li> Replicas
<li> return the instance name of the MARS
</ol>
Order of instantiation inside each section is decided by GGE user,
except MARS
</ul>
Here is a sample of automatically <a href="./skelton.html">generated C++ code</a>
which is created from
almost skelton tables.
<hr>
<h3>
3.1) Naming conventions in GGE
</h3><p>
Knowing GGE's naming convention is helpful to read the generated C++ code as
well as using GGE correctly. Look at relevant Geant4 constructors will be very
suggestive.
<ol>
<li> Elements and materials
<ol>
<li> Elements are named "elementXXX", where XXX stands for the
element's symbol in the periodic table.
<li> materials are named just as you have typed in the second column
of the material window.
</ol>
<li> solids and logical volumes<br>
The "Name" typed in the first (leftmost) column of the "Logical Volume"
is used to name the corresponding solid. If the name "world" is given
to a logical volume of a Box, the G4Solid has an instance "solidworld".
<li> logical and physical volumes<br>
<ol>
<li>The instance of a physical volume defined by "pName" has a name prefixed
with "physical", i.,e., instance's name is "physical" + pName ( + =>
string concatenation). "logical" is added to the instance of a logical
volume.
<li>In case of SPV (single positioned volume), the columns "pName" (instance of
physical volume) and "pLogical" may have the same strings.
<li>
In case of RVA (repeated volumes arrangement), "pName" is different from
"pLogical" whose copies are repeatedly placed.
</ol>
<li>All variables are named after their proper instances.
See for example, the control variable used in the for loop in the
RVA.
<br>
Another examples are arrays to define BREP geometry.
</ol>
<hr>
<h3>
3.2) Default values and combo-boxes
</h3>
<ol>
<li> Default optional values of materials
GGE provides default values in a pre-filled columns or with the
combo-boxes. "Use", "State" and "Unit" columns are equipped with
combo-boxes. Temperature and pressure column are pre-filled with
273.15 * kelvin and 1 * atmosphere.
<li> Default values in volumes
"Mother Type" is either NULL (mother of all), logical (type 2, 4 constructors)
or physical (type 2 or 4 constructors) in G4PVPlacement.
</ol>
<hr>
<hr>
<hr>
<font color=red> WARNING: Materials below are obsolete. Updating them
in conjunction with MOMO is planned now
in March 2003 </font>
<p>
<font color=orange>
<pre>
4) A First Lesson; how to use GGE.
Here is a walk-through of how to use GGE.
4.1) Visualize the prefabricated detector sample
1) In a xterm, type %java gge
2) In the "Volume window", select "Load a Volume file" menu
and double click on "trumpetBREP.g4dt"
3) Click "Makesource" and select "Make C++ code". Have a look of the generated C++ code.
4) Save the C++ code (overwrite the existing one)
in .../GGEmake/src/MyDetectorConstruction.cc" using the file chooser.
5) In another xterm, go to the directory GGEmake/ and type
%make G4TARGET=myGGEdetector
Watch if there is any compilation error. At present,
GGE is made so that it generates correct C++ codes,
if a user uses GGE correctly.
In the example of "trumpetBREP.g4dt", a few warnings are shown on BREP.
6) Check that you have "myGGEdetector" executable, in $(G4INSTALL)/bin/$(G4SYSTEM)
7) In another xterm, type
%java gag
and with the "Run GEANT4" button, choose and run "myGGEdetector".
8) Use /control/execute command and double click on "GGEdraw.g4m".
To have a better view, use vis~ commands (camera/viewpoint, zoom etc).
You can select DAWNFILE to draw and have a PS hardcopy.
4.2) Modify the prefabricated detector
Now let's change the detector configuration. Go to the "Volume" window
and change any part of it, including material.
4.2.1) Changing materials
1) First, you have to "Clear Material" in the Material editor.
2) Then, select "Load material" and double click on "MaterialDB.g4mt".
Now you have a list of materials.
3) Then, in the "Logical Volume" panel, double click the box you want to change
and type in the name of the material in the material editor.
4) Change as many materials as you like and push "Used Material" button.
You see that materials you have typed in are marked "Used" in red.
If not, you might have mistyped the name of a material.
5) If you want to use additional materials, select "Use" in the material
editor (the leftmost column).
6) Push "Makesource" and see your change has been realized in the C++ code.
NOTE!! Be careful that there are no duplicated "Used" materials, when
you load the material DB without "Clear Material".
4.2.2) Modifying the size parameters of solids
To change the sizes of G4 solids
1) click a "solid" box of the logical volume of your choice.
2) You have a pop-up window to edit the parameters. Change a parameter
or its unit, as you like.
3) Push "Makesource" and see if your changes have been correctly applied
to C++ code.
4) In case of BREP solids, the pop-up window has variable number of columns
to accept any number of nodes.
5) For complicated solids like BREPs, preview may be useful. Click "View"
button and you have a view with the DAWN renderer. Its g4.prim file
is also shown in an edit-able widget.
4.2.3) Changing the type of solid of an existing logical volume
You may want to replace the current G4Solid with another one. In the
present GGE you can't do so directly. You have to "Create" a new logical
volume with the type of solid you want and then delete the unnecessary volume.
1) Choose your new solid with "Select Solid" combo-box.
2) Push "Create" button and you have a pop-up window to input parameters.
3) Type in numbers and select their units.
4) Preview if you like and then push "OK".
5) Check the C++ code.
4.2.4) Changing visualization attributes (Color).
1) You have to "Create" a new VisAttributes
2) Upon the "Create" button, you have a Color Chooser.
3) Select RGB (not HSV). Set your color with slide-bars.
4) Give it a name, and push "OK". Then you have a color circle and name in the
VisAttrib panel.
5) Edit the VisAtb box in the LogicalVolume panel.
6) See the C++ code.
4.2.5) Changing Repeated Volumes
"exampleN01.g4dt" contains three "single positioned volumes"
and one "repeated volumes" in the X direction.
Change the parameter of repetition such as the number
or width, or you can add another "repeated volumes"
in another direction.
In "trumpetBREP.g4dt" you can edit BREPs, adding new faces etc..
b) making C++ code "MyDetectorConstruction.cc" and compile.
Finally, back to the step 3 and recompile.
Opening GGE, compile, GAG simultaneously, you can
test and improve the geometry, just like creating
HTML or TeX documents.
2.4) GGEmake; a directory containing the GEANT4 codes to compile and visualize the detector
a) implemented
+ GNUmakefile
+ myDetector.cc ; main() with GAG session and visualization manager
+ src/ directory contains
+ MyDetectorConstruction.cc
+ MyPhysicsList.cc
+ MyPrimaryGeneratorAction.cc
+ MyVisManager.cc
+ include/ directory
2.5) compile and visualize with Momo and GAG
a) implemented
+ canonical scheme of GEANT4 to compile
+ make G4TARGET=myDetector
+ the binary is created as $G4INSTALL/bin/G4SYSTEM/myDetector
+ Momo (GAG, Compile and GGE buttons)
+ rapid cycling of GGE and GAG to edit and view the geometry
+ a macro file for visualization (OGLIX default) "DrawDAWN.g4m", etc..
b) not implemented
- automatic "calibration" of the detector with geantino
2.6) exemplary persistent detector files with *.g4dt suffix
+ 3D array of lead plates using translational RVArrangement
+ BREP Pcones trumpetss using axially symmetric RVArrangement
+ Replicas to form cylinders
-------------------------------------------------------------------------
</pre>
</font>
<hr>
<hr>
<hr>
<font color=red> !!!!!OBSOLETE!!!!!
<p>
<pre>
3) Installation
The minimum set to get C++ source code
1) GGE.jar file
2) Java interpreter ; java
Additional set to compile
3) GEANT4 toolkit with compiled libraries
4) GGEmake directory
Additional set to visualise and use GUI
4) DAWN (plus Ghostview) or OGLIX or VRML
5) GAG (Java version) or GAG.jar file
Additional too to make life easy
6) Momo to use all the above ingredients; Momo.jar file
(without Momo, you have to invoke GGE, compile and GAG respectively in windows.)
3.1) Java and Swing
We have tested GGE on Unix-en (Linux and Solaris) and Windows (95/NT).
3.1.1) Unix:
+ Linux: jdk1.1.3 or later(i.,e., jdk-1.1.6) + Swing-1.0.2
1) jdk1.1.5 may have bugs, while jdk1.1.6 works
2) GGE co-works with Swing-1.0.2 and not with 1.0.1 (or maybe not
with 1.0.3).
3) we are testing the current GGE with JRE1.2-beta04. The present source can be
compiled but doesn't execute correctly. In any case
Sun has announced on 17 August that JDK1.2 will be delayed
till November!!
+ Solaris: jdk1.1.6 + swing-1.0.2
We assume that you have
1)jdk1.1.6/bin/java (Java interpreter) to which paths are set
2)Swing-1.0.2 which is defreezed and placed in $HOME/swing/swingall.jar
3.1.2) Windows:
We use JBuilder2 with Swing-1.0.2. Note that you have to
eliminate all other libraries than swing-1.0.2, after having
copied it into JBuilder2.
We are trying JDK1.2beta4 + JRE1.2 with JBuilder2.
NOTE! At present we have not Momo/GAG for Windows. So,
you can only create C++ code under the Windows.
3.2) GGE and related files
The latest product of GGE is that of Sep. 24.
All *.java, *.class and GGE.jar files are placed in
geant4beta/environments/Momo/java/Momo/GGE
Only "GGE.jar" file is necessary to run GGE.
GGE/*.java GGE source files
GGE/*.class GGE byte code files
GGE/GGE.jar jar archive file to which CLASSPATH must be set
GGE/*.g4mt material database after PDG data
GGE/*.g4dt exampleN0x detector file
C++ source codes and GNUmakefiles to compile with GEANT4 are placed in
geant4beta/environments/Momo/GGEmake.
Only geantino is instantiated in the initialization of GEANT4, so that it is quite
rapid to have a visualization of the geometry. You can choose DAWN, OpenGL or VRML system.
GGEmake/myGGEdetector.cc main() program
/GNUmakefile
/src
/src/MyDetectorConstruction.cc C++ generated by GGE
/src/MyPrimaryGeneratorAction.cc geantino gun
/src/MyVisManager.cc DAWN, DAWNFILE, OGLIX, OGLSX, VRML1, VRML1FILE
/src/MyPhysicsList.cc geantino definition
/include/*.hh
/GGEdraw.g4m default macro file to visualize with OGLIX
3.3) install, setenv and run
%set path=($path jdk1.1.6/bin) <=== add the path to java and javac
%setenv CLASSPATH .:$HOME/swing/swingall.jar:$HOME/geant4beta/environments/Momo/java/Momo/GGE/GGE.jar
Then in any directory, you can invoke GGE.
%java gge
3.4) DAWN, Tcl/Tk and Postscript for the preview of CSG or BREP solids
If you don't use GGE's preview button, these are not necessary.
If you want to preview G4Solids, you have to install
DAWN, Fukui renderer as well as Tcl/Tk wish (Tcl/Tk 8.0) for its GUI.
DAWN uses also Postscript to draw *.prim files.
For the visualization of the whole detector, DAWN or Mesa (for OGLIX)
are necessary.
3.5) GEANT4 toolkit and its environments
The visualization manager instantiates DAWN, DAWNFILE, OPENGLIX,
OPENGLSX, VRML, VRMLFILE. So, you have to setenv accordingly.
</pre>
</font>
</body>
</html>
-129
View File
@@ -1,129 +0,0 @@
<html>
<head>
<title>Gain; how to use it with Geant4</title>
</head>
<body>
<h1> How to use Gain</h1>
<hr>
<h3>What is Gain?</h3><p>
Gain(Geant4 adaptive interface for network) is a networked GUI tool based on GAG.
It inherits almost all features of GAG and has new features to
make use of Geant4 running at (a) remote machine(s).
<p>
Gain runs on a client machine (Windows or Linux),
while Geant4 runs on a remote or local server (Linux or Solaris).
<p>
It provides two ways to connect to the remote server; SSH mode and Gain socket mode.
<dl>
<dt> <strong>Gain SSH mode</strong>
<dl> Gain has a SSH client fuction and use it to connect to a remote server. Geant4 compiled with G4UIGAG class
can be connected to Gain client. When a SSH connection is established after the authentication,
Gain displays the
remote file browser with which user can choose a Geant4 executable and make it run.
Data are encrypted during their transfer and are decripted at both side. So, some CPU
power is required for a client machine, if a large amount of data are transfered from
the running Geant4 to Gain. <br> Output from the remote Geant4 are
displayed <a href="./Gainjpeg/gainconsole.jpg">on the Gain console.</a>
This console can be used as a normal
SSH console and you can type in command directly.<br>
Pluriel remote sessions can be accepted, each displayed in a separate
tabbed pane. A console is attached to each pane/session.
<dt> <strong>Gain socket mode</strong>
<dl> Gain uses its own way of connecting to a remote server. Remote Geant4 must be compiled with
G4UIGainServer class which is distributed in the standard Geant4 package. In this mode, user has to
make a Geant4 executable run on the remote server, after having logged in to the remote
machine. G4UIGainServer acts as a network server
and tells the number of port available for the Gain client. Gain client, after specifying the server and port
number, is allowed to connect to the Geant4. Geant4 output
</dl>
<hr>
<h3>How to use Gain</h3>
<p>
The figure shows a scene when Gain is running in
<a href="./Gainjpeg/GainSnap.jpg">Gain socket mode</a>.
<p>
In this example,
two tabbed panes are displayed to run remote Geant4s running on different servers.
<ol>
<li>
Gain is started on the <a href="./Gainjpeg/cygwin.jpg">Cygwin console</a>. Gain can be started with
Java Web Start.
<li>
<a href="./Gainjpeg/gainInit.jpg">Top menu</a> to connect to a server or close (kill) the running G4ant4 or finish Gain.
<li> The window to
<a href="./Gainjpeg/selectInterface.jpg">choose SSh or Gain socket</a>; now SSHINTERFACE is focused
<li>After typing in the remote host name,
<a href="./Gainjpeg/sshlogin.jpg">SSH login window</a> is shown.
<li>
When SSH login is accepted, Gain shows the
<a href="./Gainjpeg/filechooser.jpg"> remore File Chooser</a>. Geant4 with G4UIGAG interface can be started
from this chooser.
<li> When Geant4 is started,
<a href="./Gainjpeg/startup.jpg">Geant4 initialisation output are shown on the cygwin console</a>.
<li> After the initialisation phase,
<a href="./Gainjpeg/startuptree.jpg"> command tree window</a> is available on Gain.
<li> Then, the Gain console is shown below the command tree window.
See <a href="./Gainjpeg/gainconsole.jpg"> the hardcopy </a>
of the whole Gain window.
This console is the SSH console, so that you can type in Geant4 commands
in stead of selecting them in the above command panel.
<br>
You can shrink the console by single click on the triangle at the left
border.
<li>
<a href="./Gainjpeg/exit.jpg">Two ways of ending Geant4 execution are provided. </a>
The command tree provides "exit" command which is just the "exit" of Geant4. On the top
menu, "Close one" menu is to send CTRL + C to the running Geant4 process. It can be sent at any
moment.
</ol>
<hr>
<h3>Notices on Gain console</h3><br>
<ul>
<li> At present, Gain's console displays ecerything G4cout from Geant4
with G4UIGAG interface. So, strings employed for Gain protocols are
displayed. Please ignore lines starting with @@.
<li> Gain console demands heavy Windows (X or Windows) power.
So, with old graphic accelerators like S3 etc. which are yet common
on Linux platforms, speed of console may be very slow. In such cases,
shrinking the console pane is a good way to speed up the execution.
<li> We have tested Gain over the Internet for a session of more than 24 hours.
On Windows XP, We observed some curious deformed tree icons during the session,
but the functions were correct and they became normal after some elapsed time.
<br>
Here is the <a href="./Gainjpeg/gainconsoleAday.jpg">copy of the long run.</a>
<li> The console provides a session of G4UIterminal, and NOT G4UItcsh, at present.
<li>If you type "exit" on the console, the execution of Geant4 is stopped.
The console is yet a usual ssh console, while the upper windows for
the command tree is losing connection to Geant4. If you type in "exit" on the
console, it end the ssh session and the whole Gain will be destroyed.
</ul>
<hr>
<h3> <a href="./techManual/index.html">Inside Gain</a></h3><br>
In this manual, Gain and RGAG are described. But in the final
form, they were merged and Gain is the name for it.
"RGAG" represents the SSH mode of Gain now, while "Gain"
in the avobe manual represents the
own socket mode of the present Gain.
<address>
<a href="mailto:yoshidah@naruto-u.ac.jp">yoshida</a>
</address>
</body>
</html>
+2336
View File
File diff suppressed because it is too large Load Diff
-17
View File
@@ -1,17 +0,0 @@
<HTML>
MOMO known problems
<OL>
<LI> Electro-magnetic physics list displays "rho-zero" which
has been removed from the stable particle list since Geant4.3.<br>
===> <font color=red> Corrected 2002 May 21 </Font>
<LI> A set of the minimum set of Geant4 canonical classes is lacking.
This will be available soon.
<LI> "Compile" menu button doesn't work, even though the makefile "Momomake.gmk" is correctly created, reflecting your environment variables.
Please make -f Momomake.gmk in the directory where your G4TARGET main class
is stored.
</OL>
</HTML>
-206
View File
@@ -1,206 +0,0 @@
<html>
<head>
<title>How to Gain</title>
</head>
<h2>How to use the GainServer interface class and Gain client GUI</h2>
<hr>
<pre>
version 0.9, May 31 2002
revised for Geant4.4.1 release, July 03
revised 17 January 2003
H. Yoshida, H. Minamimoto
Naruto University of Education
A) Features of GainServer class and its client partner "Gain"
This new class belongs to the "interfaces" category and provides
a user interface using socket connection with a remote client GUI Gain.
The new client Gain is quite similar with GAG in that it provides the
fully graphical user interface to steer execution of the Geant4 simulation.
The new features using a socket connection are as follows;
1) GainServer uses TCP/IP socket to communicate with the
client GUI tool Gain.
In general, a server may be decoupled from the terminal
(or the control terminal) on which it was invoked and run
as a daemon (daemon mode).
The present Gain server class doesn't behave as a daemon, but
it requires the control terminal on which the Geant4 application
has been invoked and is coupled as long as
it is running (terminal mode).
In the terminal mode, all outputs from G4cout and G4cerr are
sent to the client by default and can be displayed
on the client remote terminal.
If you want to run Geant4 simulation even after having logged out,
the shell command "nohup" can be used (Linux and Solaris).
You have to run a Geant4 application like;
%nohup $G4WORKDIR/exampleN02 > exampleN02 &
and then log out.
%exit
2) The partner client GUI software is "Gain" which runs
on any platform running Java Virtual Machine, i.e.,
Windows, Linux etc.. Gain can be invoked from the
command line (pseudo-terminal in the X windows or
cygwin in Windows) or newly can be invoked directly from
the Web browser like Netscape/Mozilla and Internet Explorer,
when they are equipped with the plugin software "Java Web Start".
This new facility will be explained in the later sections.
B) Making the library
G4UIGainServer is a part of Geant4 distribution since Grant-4.4 or Geant-5.0.
GainServer class uses the standard socket implementation which is
usually found in the platforms like Solaris or Linux. It is tested against
G4SYSTEM=SUN-CC and Linux-g++ and WIN32-g++(Cygwin).
This new class depends on no external libraries (except the default system
libraries) so that no new environment variables G4UI_BUILD_XX is required.
GainServer.cc/hh files are located in source/interfaces/GAG and the
corresponding library is archived in the libG4UIGAG.a(so).
It is simple to make the library.
1. go to the directory "interfaces/GAG".
2. make (or gmake)
3. and you will have a libG4UIGAG.a (so)
C) How to use GainServer in your application
The way how to use it completely similar to G4UIterminal or G4UIGAG class.
In your main program
1. include the header file
#include "G4UIGainServer.hh"
2. instantiate the session and run
G4UIsession* session = new G4UIGainServer();
session->SessionStart();
delete session;
Your application can be compiled just like the ones using G4UIterminal
or G4UIGAG interface classes. No new environment variables are required
to use this new class.
D) How to get and run the Gain client
GainServer must communicate with its partner GUI Gain. Gain is
written in Java and Gain is distributed in two compiled forms.
In any forms, you have to install Java, i.e., j2sdk.
(See www.javasoft.com)
1. command line mode
One form is the common jar (Java archive) format; Gain.jar which
is provided at http://erpc1.naruto-u.ac.jp/~geant4/Sources.html.
To run it, you have to invoke Java Virtual Machine on your terminal;
% java -cp foobar/Gain.jar Gain
where foobar is the directory containing Gain.jar file.
On Windowz, use cygwin for the terminal.
2. Web Start mode
Another form is easier to use, once all set-up steps have been
completed. In this mode, Gain can be invoked by a simple mouse click
on the link in the Web page, which is provided by the Geant4
developer.
1. You connect to the Java site and install "Web Start" in your
PC, following the instructions. If you are using Mozilla/Netscape,
you have to add a new MIME type (JNLP) to your list of "Helper
programs".
2. Try if the examples associated with the Java Web Start kit
run correctly. Note that applications which
requires file I/O on your system asks you to go out of the
"sandbox" environment (three times on Windows).
This execution of Java applications including local I/O operation
is only allowed by your permission. To get your permission,
demos provided by Java Soft are digitally signed.
3. Then connect to http://erpc1.naruto-u.ac.jp/~geant4/Sources.html
and run Gain. It is digitally signed by the Geant4 developer
at Naruto University of Education.
On Windows, you may have the icon for "Java Web Start Manager" in which
Gain will be listed as one of the verified applications. Then, you can
use Gain directly from Java Web Start without the Internet connection.
The Manager also provides a focility to log the output from the
application. It will be helpful to see runtime warnings or error
messages as well as to see the G4cout of the Geant4 application.
E) What you can do with Gain
Gain has a graphical interface quite similar to that of GAG.
In addition, it provides a function to connect pluriel remote GainServers
simultaneously. Each connection has an independent GUI window in Gain
so that you can run several Geant4 applications on different remote sites
and run them simultaneously with the help of Gain which is running on your PC.
Gain and GainServers can run on the same host (localhost). The free ports are
allocated automatically to respective GainServer.
E) How to run GainServer ans Gain together
As stated above, the present implementation of GainServer doesn't run in the
daemon mode. So, you have to keep your terminal session as long as your
application is running.
The steps are as follows;
1. login to the remote host(s) on which you are going to run your
Geant4 application(s)
2. run your application. GainServer displays the message;
"GainServer waiting at port 40000"
The port number starting from 40000 is automatically allocated to
your application(s). This port number is used to connect Gain
client to the server.
If you run another Geant4 application on the same remote machine,
another port number is automatically allocated and displayed.
3. run Gain client on your PC. The upper left menu urges you to
type in the port number and host name. Select "localhost", if
GainServer is running on your PC.
When connection is established, you will have the commands tree
and parameter window just like those of GAG.
If you connect to another Geant4 application, another tabbed pane
is created to manage that connection.
4. You can disconnect one or all connections. By this disconnection,
corresponding Geant4 applications exit using a gentle exit command
of Geant4, so that normal exitng procedures of Geant4 is performed.
F) How to use VRML viewer together with Gain (Under test)
A prototype implementation of Gain is available (2002 end July)
which incorporates Geant4's vrmlview.
You can use VRML viewer to visualize the geometry and events.
Thus, you can use and run Geant4 on your PC running Java (i.e., Windows,
Linux, Solaris, MacOSX etc.) with Gain to control the execution and
with your VRML viewer of your choice to visualize, while your simulation
is being executed on a remote compute server (maybe with bad Java support).
</pre>
</html>