| 1 | 26 Sep 2006
|
|---|
| 2 | - added Lesson2Wx.py
|
|---|
| 3 | New version using wxPython
|
|---|
| 4 | functionas are identical with ExN03.py
|
|---|
| 5 |
|
|---|
| 6 | 26 May 2006
|
|---|
| 7 | revised 02 July 2006
|
|---|
| 8 | Geant4.8.1 release
|
|---|
| 9 | ===============================================
|
|---|
| 10 | Prerequisites for G4 environment variables.
|
|---|
| 11 | ==============================================
|
|---|
| 12 |
|
|---|
| 13 | This scripts offers the choice of visualization systems;
|
|---|
| 14 | one among OGLSX (OpenGL stored mode), or VRML2FILE or Wired3.
|
|---|
| 15 |
|
|---|
| 16 | OGLSX is the default viewer and you need no environment variables.
|
|---|
| 17 |
|
|---|
| 18 | To use VRML2FILE you have to specify its viewer which is found in your
|
|---|
| 19 | search path and the destination directory where *.wrl file is stored.
|
|---|
| 20 | If you don't specify the name of the viewer, you can't choose it on the panel.
|
|---|
| 21 | For example,
|
|---|
| 22 | setenv G4VRMLFILE_VIEWER $HOME/bin/vrmlview
|
|---|
| 23 | setenv G4VRMLFILE_DEST_DIR $HOME/tmp/ <= terminate with /
|
|---|
| 24 |
|
|---|
| 25 | To use Wired, download it and install under your directory. Java Runtime
|
|---|
| 26 | Environment is necessary.
|
|---|
| 27 | Then set, for example;
|
|---|
| 28 | setenv G4HEPREPFILE_VIEWER $HOME/Wired/bin/wired <= any path you use
|
|---|
| 29 | setenv G4HEPREPFILE_DIR $HOME/tmp/
|
|---|
| 30 | setenv G4HEPREPFILE_NAME lesson2_00 <= any name you choose.
|
|---|
| 31 | setenv G4HEPREPFILE_OVERWRITE 1 <= to reuse the file for "next event"
|
|---|
| 32 | G4HEPREPFILE_VIEWER isn't an official Geant4 environment variable but is employed
|
|---|
| 33 | here to control the vissssualization viewers.
|
|---|
| 34 | The name of the HepRepFile is ${G4HEPREPFILE_NAME}.heprep which will be
|
|---|
| 35 | stored in ${G4HEPREPFILE_DIR}.
|
|---|
| 36 |
|
|---|
| 37 | ExN03.py script don't use VRML or Wired if their *_VIEWER isn't set.
|
|---|
| 38 | But other env variables are also used in the script to look for the
|
|---|
| 39 | file and to activate the viewer, you have to set all of the above variables
|
|---|
| 40 | in the shell where you activate ExN03.py script.
|
|---|
| 41 |
|
|---|
| 42 |
|
|---|
| 43 | NOTICE) VRML viewer blocks the window (modal), so that you have to exit it to
|
|---|
| 44 | display another run.
|
|---|
| 45 |
|
|---|
| 46 | ********* ExN03.py script ***********
|
|---|
| 47 |
|
|---|
| 48 | This example id derived from examples/novice/N03.
|
|---|
| 49 | You can
|
|---|
| 50 | - choose the materials of absorber and gap
|
|---|
| 51 | - set the thickness of the absorber and gap
|
|---|
| 52 | - set the lateral (in YZ plane) size of the sandwitch cal.
|
|---|
| 53 | - choose an incedent particle
|
|---|
| 54 | - set its energy
|
|---|
| 55 | - set the number of events to run
|
|---|
| 56 | - toggle on/off of the electromagnetic processes
|
|---|
| 57 | - set cut length
|
|---|
| 58 | - set magnetic field
|
|---|
| 59 | - typein any Geant4 command (except related with the above functions) and execute it
|
|---|
| 60 |
|
|---|
| 61 | How to run it?
|
|---|
| 62 | %python ExN03.py
|
|---|
| 63 |
|
|---|
| 64 | You can visualize with OpenGL stored mode or VRML or Wired3
|
|---|
| 65 | You can choose either of the active viewers by pushing the
|
|---|
| 66 | radio buttons.
|
|---|
| 67 | =========================
|
|---|
| 68 | NOTICE)
|
|---|
| 69 |
|
|---|
| 70 | VRML viewer runs in the modal action, and you have to exit it
|
|---|
| 71 | to have a new diaplay for the new run, or you want to switch to
|
|---|
| 72 | another viewer.
|
|---|
| 73 |
|
|---|
| 74 | Wired has the "next"/"previous" event button. So to see the next
|
|---|
| 75 | event, first run and then "next" event. Wired doesn't block G4
|
|---|
| 76 | and you can have Wired and OGLSX both open.
|
|---|
| 77 |
|
|---|
| 78 |
|
|---|
| 79 |
|
|---|
| 80 | ExN03-Wired.py is OBSOLETE. Please use ExN03.py
|
|---|
| 81 |
|
|---|
| 82 |
|
|---|