Import Geant4 11.0.0 source tree
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
<< Portability >>
|
||||
|
||||
Compilation of DAWN-file and DAWN-network drivers
|
||||
are confirmed at the following platforms:
|
||||
|
||||
Linux, DEC, HP, AIX, Solaris, IRIX
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,152 @@
|
||||
This G4 Graphics Driver creates a HepRep File suitable for viewing
|
||||
by the HepRApp, Wired4 or FRED Event Display clients.
|
||||
It requires no external packages.
|
||||
|
||||
The HepRep graphics format is further described at
|
||||
http://www.slac.stanford.edu/~perl/heprep/
|
||||
|
||||
|
||||
Two different drivers are available for either HepRep1 or HepRep2.
|
||||
|
||||
|
||||
Driver: HepRepFile
|
||||
------------------
|
||||
The version of HepRep produced by this driver is HepRep Version 1.
|
||||
|
||||
Writes files with file extension .heprep.
|
||||
|
||||
First file is written to current directory and is named G4Data0.heprep.
|
||||
Subsequent files increment the number, as in G4Data1.heprep, G4Data2.heprep...
|
||||
|
||||
To specify a different output file directory (instead of current directory),
|
||||
set G4HEPREPFILE_DIR
|
||||
|
||||
To specify a different output file name (instead of G4Data),
|
||||
set G4HEPREPFILE_NAME
|
||||
|
||||
To repeatedly overwrite the same output file (instead of having incremental
|
||||
numbers at the end of the file name),
|
||||
set G4HEPREPFILE_OVERWRITE
|
||||
|
||||
By default, invisible objects are not culled but are left in the heprep file
|
||||
with their visibility initially set to false (so that you can subsequently
|
||||
choose to make them visible from within the heprep browser).
|
||||
To force culling of invisible objects,
|
||||
set G44HEPREPFILE_CULL
|
||||
|
||||
View the file using the HepRApp HepRep Browser, available from:
|
||||
http://www.slac.stanford.edu/~perl/HepRApp
|
||||
|
||||
HepRApp can read xml files in zipped format as well as unzipped,
|
||||
so you can save space by applying gzip to the xml file.
|
||||
This will reduce the file to about five percent of its original size.
|
||||
|
||||
Joseph Perl
|
||||
15 November 2007
|
||||
|
||||
|
||||
Driver: HepRepXML
|
||||
-----------------
|
||||
The version of HepRep produced by this driver is HepRep Version 2.
|
||||
|
||||
This driver can write both Binary HepRep (.bheprep) and XML HepRep
|
||||
(.heprep) files. Binary HepRep files are a one-to-one translation
|
||||
of XML HepRep files, but they are considerably shorter and faster
|
||||
to parse by a HepRepViewer such as WIRED 4.
|
||||
|
||||
You can view the files using the WIRED 4 Event Display, available from:
|
||||
|
||||
http://wired4.freehep.org
|
||||
|
||||
Both Binary HepRep and XML HepRep can be compressed using the standard
|
||||
zlib library if linked into Geant4 using G4LIB_USE_ZLIB. If a standard
|
||||
zlib is not available (WIN32-VC for instance) you should also set
|
||||
G4LIB_BUILD_ZLIB to build G4zlib included with Geant4.
|
||||
|
||||
HepRep files (Binary and XML) can contain multiple HepRep events/geometries.
|
||||
If the file contains more than one HepRep it is not strictly XML anymore.
|
||||
Files can be written in .heprep.zip, .heprep.gz or .heprep format and their
|
||||
binary versions .bheprep.zip, .bheprep.gz or .bheprep.
|
||||
|
||||
The .heprep.zip is the default for file output, the .heprep is the default
|
||||
for stdout and stderr.
|
||||
|
||||
(Optional) To set the filename with a particular extension such as:
|
||||
.heprep.zip, .heprep.gz, .heprep, .bheprep.zip, .bheprep.gz or .bheprep
|
||||
use for instance:
|
||||
|
||||
/vis/scene/create filename.bheprep.zip
|
||||
|
||||
|
||||
(Optional) To create separate files for each event, you can set a suffix such as
|
||||
"-0001" to start writing files from filename-0001.bheprep.zip to
|
||||
filename-9999.bheprep.zip (or up), while "-55-sub" will start write files
|
||||
filename-55-sub.bheprep.zip to filename-99-sub.bheprep.zip (or up).
|
||||
|
||||
/vis/heprep/setEventNumberSuffix -0001
|
||||
(Note: suffix has to contain at least one digit)
|
||||
|
||||
|
||||
(Optional) To route the HepRep XML output to stdout (or stderr),
|
||||
by default uncompressed, use:
|
||||
|
||||
/vis/scene/create stdout
|
||||
|
||||
|
||||
To select the driver, where the file if not create by scene is set to
|
||||
G4HepRepOutput.heprep.zip, use:
|
||||
|
||||
/vis/open HepRepXML
|
||||
|
||||
|
||||
(Optional) To write a geometry, use:
|
||||
|
||||
/vis/viewer/flush
|
||||
|
||||
|
||||
(Optional) To signal a change in geometry (to be written with the next event), use:
|
||||
|
||||
/vis/viewer/refresh
|
||||
|
||||
|
||||
To write 10 events (and geometries), use:
|
||||
|
||||
/run/beamOn 10
|
||||
|
||||
|
||||
(Optional) To accumulate multiple (5) G4 events into one HepRep event, use:
|
||||
/vis/scene/endOfEventAction accumulate
|
||||
/run/beamOn 5
|
||||
/vis/viewer/update
|
||||
|
||||
|
||||
(Optional) To add attributes to each point on a trajectory, use:
|
||||
/vis/heprep/addPointAttributes 1
|
||||
Be aware that this may increase the size of the output dramatically.
|
||||
|
||||
|
||||
(Optional) You may use the commands:
|
||||
/vis/viewer/zoom to set an initial zoom factor
|
||||
/vis/viewer/set/viewpointThetaPhi to set an initial view point
|
||||
/vis/heprep/setCoordinateSystem uvw to change the coordinate system, where uvw can be "xyz", "zxy", ...
|
||||
|
||||
|
||||
(Optional) You may decide to write .zip files with events and geometry separated (but linked).
|
||||
This results in a smaller zip file, as the geometry is only written once. Use the command:
|
||||
|
||||
/vis/heprep/appendGeometry false
|
||||
|
||||
|
||||
(Optional) To close the file, remove the SceneHandler, use:
|
||||
|
||||
/vis/sceneHandler/remove scene-handler-0
|
||||
|
||||
|
||||
Limitations:
|
||||
|
||||
Only one SceneHandler can exist at any time, connected to a single Viewer.
|
||||
Since the HepRep format is a model rather than a view this is not a real
|
||||
limitation. In WIRED 4 you can create as many views (SceneHandlers) as you like.
|
||||
|
||||
1 June 2005
|
||||
Mark.Donszelmann@slac.stanford.edu
|
||||
@@ -0,0 +1,23 @@
|
||||
Apart from the heprep1 files:
|
||||
|
||||
G4HepRepFile.hh
|
||||
G4HepRepFileSceneHandler.hh
|
||||
G4HepRepFileViewer.hh
|
||||
G4HepRepFileXMLWriter.hh
|
||||
|
||||
and heprep2 files:
|
||||
|
||||
G4HepRep.hh
|
||||
G4HepRepSceneHandler.hh
|
||||
G4HepRepMessenger.hh
|
||||
G4HepRepViewer.hh
|
||||
|
||||
the other sources are copies from the FreeHEP library
|
||||
(java.freehep.org) and are maintained there.
|
||||
|
||||
The files starting with G4 are geant4 compliant, the others may not be.
|
||||
|
||||
Changes made here may be overwritten.
|
||||
|
||||
4 May 2005
|
||||
Mark Donszelmann
|
||||
@@ -0,0 +1,186 @@
|
||||
Extended OI Xt viewer
|
||||
=====================
|
||||
INCOMPLETE DRAFT
|
||||
|
||||
G4OpenInventorXtExaminerViewer is based on and is
|
||||
a plug-in replacement for SoXtExaminerViewer which
|
||||
is a base class viewer provided by the SoXt (Coin3d)
|
||||
library. SoXtExaminerViewer is the normal viewer
|
||||
that you get when doing /vis/open OIX.
|
||||
These viewers depend on X, Xt and Xm and so are
|
||||
limited to UNIX/MAC and will not run on native
|
||||
Windows.
|
||||
|
||||
The SoXtExaminerViewer is instantiated by
|
||||
G4OpenInventorXtViewer. This has been temporarily
|
||||
disabled and has been replaced by an instantiation
|
||||
of G4OpenInventorXtExaminerViewer, together with
|
||||
some additional configuration. The intention
|
||||
is to find a suitable mechanism to allow a choice
|
||||
of viewer (standard or extended) at run time.
|
||||
|
||||
No modifications to user code or to any other
|
||||
Geant4 categories are required to use the extended
|
||||
viewer. Many of the implemented features are made
|
||||
possible by the SCENE GRAPH technology in Open
|
||||
Inventor which stores the scene elements and
|
||||
associated information in a structured way.
|
||||
|
||||
Features
|
||||
========
|
||||
|
||||
Reference Path navigation
|
||||
-------------------------
|
||||
|
||||
Most of the new features are concerned with navigation
|
||||
along a "reference path" which is a piecewise
|
||||
linear path through the world. The reference path
|
||||
can be any particle trajectory, chosen as follows:
|
||||
|
||||
The application can attach a "reference trajectory"
|
||||
attribute to a particular trajectory.
|
||||
|
||||
If there is no such designated trajectory, the viewer
|
||||
chooses the longest trajectory as the initial reference
|
||||
path.
|
||||
|
||||
Any other trajectory can be selected as the reference
|
||||
by selecting it with the mouse.
|
||||
|
||||
Elements are assigned a "distance" along the reference
|
||||
path, based on the perpendicular from the element's
|
||||
placement coordinates to the path. Elements are then
|
||||
sorted by distance and the list is displayed in an
|
||||
auxiliary window of the viewer. NOTE: at present
|
||||
the path is not extrapolated at the ends, so elements
|
||||
"before" or "after" the path are assigned distances
|
||||
of 0 or the total path length respectively. This
|
||||
will be generalized in future.
|
||||
|
||||
Reference path navigation controls:
|
||||
|
||||
Select an element from the list: navigate along the
|
||||
path to the element's "location" (distance along
|
||||
the path.
|
||||
|
||||
L,R,U,D refer to the arrow keys.
|
||||
|
||||
Shift-L and Shift-R: navigate to the previous or next
|
||||
element on the path (with wraparound).
|
||||
|
||||
L and R: rotate 90 degrees around the vertical axis
|
||||
|
||||
U and D: rotate 90 degrees around the path
|
||||
|
||||
Ctrl-L and Ctrl-R: rotate 90 degrees around the horizontal axis
|
||||
|
||||
All these keys have a "repeat" function for continuous motion.
|
||||
|
||||
The rotation keys put the camera in a definite orientation.
|
||||
The Shift-L and Shift-R keys can be used to "fly" along the
|
||||
path in whatever orientation is in effect.
|
||||
NOTE: if this appears to be "stuck", try switching from
|
||||
orthonormal camera to perspective camera ("cube" viewer button).
|
||||
|
||||
Tools / Go to start of reference path: useful if you get lost
|
||||
|
||||
Tools / Invert reference path: flips the direction of travel
|
||||
and the distance readout
|
||||
|
||||
|
||||
Reference path animation
|
||||
|
||||
This is a special mode which flys the camera steadily along the
|
||||
path, without wraparound. Special controls are:
|
||||
|
||||
Tools / Animate Ref Particle: start animation mode
|
||||
|
||||
Page-Up: increase speed
|
||||
Page-Down: decrease speed
|
||||
U: raise camera
|
||||
D: lower camera
|
||||
ESC: exit animation mode
|
||||
|
||||
For suitable geometries the U and D keys can be used to
|
||||
get "Star Wars" style fly-over and fly-under effects.
|
||||
|
||||
Bookmarks
|
||||
|
||||
At any time, the viewpoint and other camera parameters can
|
||||
be saved in a file as a labelled "bookmark".
|
||||
The view can then be restored later in the current run or
|
||||
in another run.
|
||||
|
||||
The default name for the bookmark file is ".bookmarkFile"
|
||||
The first time a viewpoint is saved, this file will be
|
||||
created if it does not already exist. When the viewer
|
||||
is first opened, it will automatically read this file
|
||||
if present and load the viewpoints into the left-hand
|
||||
panel of the viewer's auxiliary window.
|
||||
|
||||
Controls:
|
||||
|
||||
Select viewpoint from list: restore this view
|
||||
|
||||
Right-arrow VIEWER button: go to next viewpoint
|
||||
Left-arrow VIEWER button: go to next viewpoint
|
||||
|
||||
"Floppy Disk" button: save current view.
|
||||
The user can type in a label for the view,
|
||||
or use the default label provided.
|
||||
|
||||
File / Open Viewpoint File: loads an existing bookmark file
|
||||
File / New Viewpoint File: creates a new bookmark file for
|
||||
saving subsequent views
|
||||
|
||||
|
||||
Special Picking Modes
|
||||
|
||||
"Console" VIEWER button: enable brief trajectory picking and
|
||||
mouse-over element readout
|
||||
For trajectories, the list of all trajectory points is
|
||||
replaced by the first and last point only, allowing easier
|
||||
identification of the particle without scrolling back.
|
||||
Passing the mouse over an element will give a readout
|
||||
of the volume name, material, and position on the
|
||||
reference path.
|
||||
|
||||
"Star" VIEWER button: select new reference path
|
||||
The cursor will change to a small cross (+)
|
||||
after which a trajectory can be selected to become
|
||||
the new reference path.
|
||||
|
||||
Convenience feature
|
||||
|
||||
Escape from viewer without using the mouse:
|
||||
In addition to the File / Escape menu item, pressing the "e"
|
||||
key on the keyboard will exit from the viewer's X event loop.
|
||||
The viewer becomes inactive and control returns to the
|
||||
Geant4 UI prompt.
|
||||
|
||||
Prototype only:
|
||||
|
||||
File / Save-Load Ref Coords: status to be determined
|
||||
|
||||
File / Save-Load Scene Graph: this saves the current scene graph,
|
||||
(whatever is being viewed and navigated in the viewer)
|
||||
including the geometry, camera, lighting information, into a
|
||||
file which can be read back, thus returning to a previous
|
||||
viewing "experience". This only partially works and some
|
||||
or all of the geometry may be missing. Geant4-specific
|
||||
scene elements may be lacking a "save" method.
|
||||
|
||||
Known problems:
|
||||
|
||||
Viewer occasionally hangs in an unknown state.
|
||||
Usually can be "cleared" by trying various viewer buttons
|
||||
or menu items. Last resort: escape to the G4 prompt and
|
||||
run more events. Viewer will usually be o.k. afterwards.
|
||||
|
||||
Unpredictable mode-switching behaviour: switching between
|
||||
orthonormal and perspective camera may give wierd results.
|
||||
Navigation may appear "stuck" with orthonormal camera.
|
||||
|
||||
Both the standard and extended viewers can crash the
|
||||
executable or even the X server if they are pushed
|
||||
too far (e.g. by excessive zooming).
|
||||
@@ -0,0 +1,82 @@
|
||||
|
||||
G4RayTracer version 1.0 (29/Jan/00)
|
||||
|
||||
1. Introduction
|
||||
|
||||
G4RayTracer is a "ray tracing" package which uses Geant4 kernel mechanism
|
||||
of tracking/navigation. It visualizes any kinds of solids that Geant4
|
||||
kernel can navigate.
|
||||
|
||||
2. Building a library
|
||||
|
||||
G4RayTracer is one of visualization driver which Geant4 supports. To build
|
||||
a library of G4RayTracer (library name G4RayTracer), set an environment
|
||||
variable G4VIS_BUILD_RAYTRACER_DRIVER.
|
||||
|
||||
$ setenv G4VIS_BUILD_RAYTRACER_DRIVER 1
|
||||
|
||||
3. Using G4RayTracer
|
||||
|
||||
To use G4RayTracer, set an environment variable G4VIS_USE_RAYTRACER.
|
||||
|
||||
$ setenv G4VIS_USE_RAYTRACER 1
|
||||
|
||||
Also, G4RayTracer has to be registored to the user's concrete VisManager.
|
||||
Refer an example given in
|
||||
geant4/source/visualization/management/include/MyVisManager.cc.
|
||||
|
||||
4. Notes
|
||||
|
||||
a) G4RayTracer generates JPEG file(s). To visualize these files, use your
|
||||
local program such as NetScape or xview, etc.
|
||||
|
||||
b) The eye position must be inside of the defined world volume. If you want
|
||||
to draw your detector setup from very far position, you need to enlarge
|
||||
your world volume.
|
||||
|
||||
c) G4RayTracer ignores volumes without G4VisAttributes, volumes which are
|
||||
set as "forced wire frame", and volumes which are set as "invisible".
|
||||
|
||||
d) In case you get unexpected figure, check
|
||||
d.1) eye position and target position are properly set,
|
||||
d.2) light direction is properly set (note light direction is from
|
||||
illumination light source to the objects),
|
||||
d.3) span angle (given by angle for 100 pixels) is reasonable,
|
||||
d.4) there is no surrounding volume(s) without transparency.
|
||||
|
||||
e) G4RayTracer can be executed ONLY AT "Idle" state.
|
||||
|
||||
5. Basic UI commands
|
||||
|
||||
a) /vis/rayTracer/eyePosition x y z unit
|
||||
eye position
|
||||
|
||||
b) /vis/rayTracer/target x y z unit
|
||||
target position
|
||||
in default it is set to the origine
|
||||
|
||||
c) /vis/rayTracer/lightDirection ex ey ez
|
||||
vector of the illuminating light (need not to be a unit vector)
|
||||
note light direction is from illumination light source to the objects
|
||||
|
||||
d) /vis/rayTracer/column nColumn
|
||||
number of holizontal pixels
|
||||
in default 640 pixels
|
||||
|
||||
e) /vis/rayTracer/row nRow
|
||||
number of virtical pixels
|
||||
in default 640 pixels
|
||||
|
||||
f) /vis/rayTracer/span angle unit
|
||||
angle for 100 pixels
|
||||
in default 5 degree
|
||||
|
||||
g) /vis/rayTracer/trace fileName
|
||||
execution of G4RayTracer
|
||||
"fileName" is the out put JPEG file name
|
||||
in default "g4RayTracer.jpeg"
|
||||
NOTE THAT THIS COMMAND IS AVAILABLE ONLY AT IDLE STATE
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
//-- gMocren-file driver --//
|
||||
|
||||
Oct. 12, 2009 : Akinori Kimura
|
||||
Beta release.
|
||||
It supports a geometry constructed with G4PhantomParameterisation or
|
||||
G4VNestedParameterisation and a hits collection based on G4VHits,
|
||||
primitive scorer or the interactive scorer.
|
||||
|
||||
Apr. 1, 2009 : Akinori Kimura
|
||||
|
||||
First version of the gMocren-file driver.
|
||||
This is a prototype, not a release version.
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
Modeling
|
||||
=======
|
||||
|
||||
The idea is to put GEANT4-aware but user-enviroment-independent code
|
||||
here. It introduces the concept of a G4VModel.
|
||||
|
||||
Reference in New Issue
Block a user