[807] | 1 | ####################################################################### |
---|
| 2 | # # |
---|
| 3 | # This code implementation is the intellectual property of # |
---|
| 4 | # the GEANT4 collaboration. # |
---|
| 5 | # # |
---|
| 6 | # By copying, distributing or modifying the Program (or any work # |
---|
| 7 | # based on the Program) you indicate your acceptance of this # |
---|
| 8 | # statement, and all its terms. # |
---|
| 9 | # # |
---|
| 10 | # ******************************************************************* # |
---|
| 11 | # * * # |
---|
| 12 | # * GEANT 4 xray_telescope advanced example * # |
---|
| 13 | # * * # |
---|
| 14 | # * MACRO: opengl.mac * # |
---|
| 15 | # * ------ demostrates the OGLIX DRIVER * # |
---|
| 16 | # * * # |
---|
| 17 | # * Version: 1.0 * # |
---|
| 18 | # * Date: 16/10/01 * # |
---|
| 19 | # * Author: R Nartallo * # |
---|
| 20 | # * Organisation: ESA/ESTEC, Noordwijk, THe Netherlands * # |
---|
| 21 | # * * # |
---|
| 22 | # ******************************************************************* # |
---|
| 23 | # # |
---|
| 24 | # NOTES # |
---|
| 25 | # ----- # |
---|
| 26 | # USAGE: Idle> /control/execute opengl.mac. # |
---|
| 27 | # prompt> XrayTel opengl.mac # |
---|
| 28 | # # |
---|
| 29 | # REQUIRED PLATFORMS & SOFTWARE: OpenGL, e.g. Mesa # |
---|
| 30 | # # |
---|
| 31 | # ENVIRONMENT VARIABLES (C-MACROS) FOR INSTALLATION: # |
---|
| 32 | # (See geant4/source/visualization/README for details.) # |
---|
| 33 | # # |
---|
| 34 | # % setenv OGLHOME opengl_home_dir # |
---|
| 35 | # (where opengl_home_dir is e.g. /usr/local/Mesa-3.2.1 # |
---|
| 36 | # # |
---|
| 37 | # % setenv G4VIS_USE_OPENGLX 1 # |
---|
| 38 | # % setenv G4VIS_BUILD_OPENGLX_DRIVER 1 # |
---|
| 39 | # # |
---|
| 40 | ####################################################################### |
---|
| 41 | # # |
---|
| 42 | # CHANGE HISTORY # |
---|
| 43 | # -------------- # |
---|
| 44 | # # |
---|
| 45 | # 16.10.2001 R. Nartallo # |
---|
| 46 | # - New implementation with new "/vis" commands # |
---|
| 47 | # # |
---|
| 48 | # 15.11.2000 R. Nartallo # |
---|
| 49 | # - Replaced standard particle gun by GPS set options # |
---|
| 50 | # # |
---|
| 51 | # 08.11.2000 R. Nartallo # |
---|
| 52 | # - First implementation # |
---|
| 53 | # # |
---|
| 54 | ####################################################################### |
---|
| 55 | |
---|
| 56 | # Set verbose level |
---|
| 57 | /run/verbose 2 |
---|
| 58 | |
---|
| 59 | # Invoke the OGLIX driver |
---|
| 60 | /vis/open OGLIX |
---|
| 61 | /vis/viewer/set/style wireframe |
---|
| 62 | /vis/drawVolume |
---|
| 63 | /vis/viewer/set/viewpointThetaPhi 60 -75 deg |
---|
| 64 | /vis/scene/endOfEventAction accumulate |
---|
| 65 | |
---|
| 66 | # Visualize one event added to the current scene |
---|
| 67 | # * Command "/vis/scene/notifyHandlers" is written in |
---|
| 68 | # XrayTelRunAction::BeginOfRunAction() |
---|
| 69 | # * Command "/vis/viewer/update" is written in |
---|
| 70 | # XrayTelRunAction::EndOfRunAction() |
---|
| 71 | |
---|
| 72 | # Store particle trajactories for visualization |
---|
| 73 | /tracking/storeTrajectory 1 |
---|
| 74 | |
---|
| 75 | # Set to draw tracks of positively charged particles |
---|
| 76 | /event/drawTracks charged |
---|
| 77 | |
---|
| 78 | # Set General Particle Source options |
---|
| 79 | /gps/particle proton |
---|
| 80 | /gps/pos/type Plane |
---|
| 81 | /gps/pos/shape Annulus |
---|
| 82 | /gps/pos/rot1 0. 0. 1. |
---|
| 83 | /gps/pos/rot2 0. 1. 0. |
---|
| 84 | /gps/pos/radius 35.5 cm |
---|
| 85 | /gps/pos/inner_radius 30.5 cm |
---|
| 86 | /gps/pos/centre 780.1 0. 0. cm |
---|
| 87 | /gps/ang/type cos |
---|
| 88 | /gps/ang/maxtheta 1. deg |
---|
| 89 | /gps/ene/type Mono |
---|
| 90 | /gps/ene/mono 0.5 MeV |
---|
| 91 | |
---|
| 92 | # Set number of particles and start |
---|
| 93 | /run/beamOn 30000 |
---|
| 94 | |
---|
| 95 | |
---|
| 96 | |
---|
| 97 | |
---|
| 98 | |
---|
| 99 | |
---|
| 100 | |
---|
| 101 | |
---|
| 102 | |
---|
| 103 | |
---|