[1350] | 1 | README.test2 DCW 10/9/98 |
---|
| 2 | |
---|
| 3 | Test 2 sends many geantinos at once through a volume and displays which tracks |
---|
| 4 | intersect a volume. Human judgement is used to decide if there are errors. |
---|
| 5 | To make this easier, the origins of the tracks are evenly placed on a grid |
---|
| 6 | that is large enough to cover the cross section of the volume. All of the |
---|
| 7 | tracks are sent in the same direction. In the display, the starting points |
---|
| 8 | of the tracks are drawn as blue if there is no intersection with the volume, |
---|
| 9 | red if they intersect correctly, and white if they intersect incorrectly. |
---|
| 10 | If the angle of the view is selected such that the tracks move exactly |
---|
| 11 | in or out of the view plane, these points will form a silhouette of the |
---|
| 12 | cross section of the volume if tracking is working properly. |
---|
| 13 | |
---|
| 14 | Since it is assumed that all tracks start from outside the test volume, |
---|
| 15 | an incorrect intersecting track is one that does not have the same |
---|
| 16 | number of entrances into the volume as exits. |
---|
| 17 | |
---|
| 18 | For this test, the grid gun should be selected: |
---|
| 19 | |
---|
| 20 | /fred/gun GRID |
---|
| 21 | |
---|
| 22 | And the "shadow" display mode should be selected: |
---|
| 23 | |
---|
| 24 | /fred/draw SHADOW |
---|
| 25 | |
---|
| 26 | Before run initialization, the test volume should be selected. See |
---|
| 27 | README.volumes for more information. |
---|
| 28 | |
---|
| 29 | This test does not work for 3D views with perspective. Instead, the OpenGL |
---|
| 30 | interface is a good choice for this test. It can be invoked with |
---|
| 31 | the script "draw.script". |
---|
| 32 | |
---|
| 33 | The following commands control the grid gun: |
---|
| 34 | |
---|
| 35 | /gridGun/n1 <n1> |
---|
| 36 | /gridGun/n2 <n2> |
---|
| 37 | /gridGun/position <x> <y> <z> [<units>] |
---|
| 38 | /gridGun/grid1 <g1x> <g1y> <g1z> [<units>] |
---|
| 39 | /gridGun/grid2 <g2x> <g2y> <g2z> [<units>] |
---|
| 40 | /gridGun/direction <vx> <vy> <vz> |
---|
| 41 | |
---|
| 42 | n1 = the number of grid points along the first axis (default 10) |
---|
| 43 | n2 = the number of grid points along the second axis (default 10) |
---|
| 44 | |
---|
| 45 | The total number of tracks = (n1+1)*(n2+1) |
---|
| 46 | |
---|
| 47 | x,y,z = the origin of the grid |
---|
| 48 | g1x,y,z = the direction and length of the first grid axis |
---|
| 49 | g2x,y,z = the direction and length of the second grid axis |
---|
| 50 | |
---|
| 51 | The x origin of track i,j (0 <= i <= n1, 0 <= j <= n2) is: |
---|
| 52 | |
---|
| 53 | x(i,j) = x + g1x*i/n1 + g2x*i/n2 |
---|
| 54 | |
---|
| 55 | and similar for y and z. |
---|
| 56 | |
---|
| 57 | vx,y,z = the direction of the tracks. |
---|
| 58 | |
---|
| 59 | If n1=0 and n2=0, only one track is generated, starting at (x,y,z) |
---|
| 60 | and in direction (vx,vy,vz). This can be convenient for debugging. |
---|
| 61 | |
---|
| 62 | The somewhat awkward view port controls of GEANT4's visualization |
---|
| 63 | can make it difficult to adjust the viewport angle to line up with |
---|
| 64 | the direction of the tracks. To simplify this, and generate many |
---|
| 65 | different test angles, the scripts "grids1.script", "grids2.script", |
---|
| 66 | and "grids3.script" have been supplied. These scripts have been |
---|
| 67 | generated using the FORTRAN program "makegridscripts.f". |
---|
| 68 | |
---|
| 69 | An example test session: |
---|
| 70 | |
---|
| 71 | # select GRID gun |
---|
| 72 | /fred/gun GRID |
---|
| 73 | # select SHADOW draw mode |
---|
| 74 | /fred/draw SHADOW |
---|
| 75 | # select BOX test volume |
---|
| 76 | /fred/volume BOX |
---|
| 77 | # initialize |
---|
| 78 | /run/initialize |
---|
| 79 | # initialize x-windows OpenGL viewer |
---|
| 80 | /control/execute draw.script |
---|
| 81 | # select a large but not too time consuming number of tracks |
---|
| 82 | /gridGun/n1 40 |
---|
| 83 | /gridGun/n2 40 |
---|
| 84 | # run script 1 |
---|
| 85 | /control/execute grids1.script |
---|
| 86 | # run script 2 |
---|
| 87 | /control/execute grids2.script |
---|
| 88 | # run script 3 |
---|
| 89 | /control/execute grids3.script |
---|