78 lines
2.7 KiB
Plaintext
78 lines
2.7 KiB
Plaintext
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
|
|
|
|
|