Introduction to the Interactive version of GEANT3

+-------------+                                               +----------##
| Geant 3.15  |               GEANT User's Guide              | XINT002  ##
+-------------+                                               +----------##
                                   

Author(s) : S.Giani Submitted: 15.06.84 Origin : Same Revised: 27.01.93

KUIP

Command Processor commands.

HELP [ item option ]

  ITEM       C    ``Command or menu path''  D=' '
  OPTION     C    ``View mode''  D='N'

Possible OPTION values are:

  EDIT      The help text is written to a file and the editor is invoked,
  E         Same as 'EDIT'.
  NOEDIT    The help text is output on the terminal output.
  N         Same as 'NOEDIT'

Give the help of a command. If ITEM is a command its full explanation is given: syntax (as given by the command USAGE), functionality, list of parameters with their attributes (prompt, type, default, range, etc.). If ITEM='/' the help for all commands is given.

If HELP is entered without parameters or ITEM is a submenu, the dialogue style is switched to 'AN', guiding the user in traversing the tree command structure. 'HELP -EDIT' (or just 'HELP -E') switches to edit mode: instead of writing the help text to the terminal output, it is written into a temporary file and the pager or editor defined by the command HOSTPAGER is invoked. (On Unix workstations the pager can be defined to display the help text asynchrously in a separated window.) 'HELP -NOEDIT' (or just 'HELP -N') switches back to standard mode.

USAGE item

  ITEM       C    ``Command name''

Give the syntax of a command. If ITEM='/' the syntax of all commands is given.

MANUAL item [ output option ]

  ITEM       C    ``Command or menu path''
  OUTPUT     C    ``Output file name''  D=' '
  OPTION     C    ``Text formatting system''  D=' '

Possible OPTION values are:

  ' '      plain text format
  LATEX    LaTeX format (encapsulated)
  TEX      LaTeX format (without header)

Write on a file the text formatted help of a command. If ITEM is a menu path the help for all commands linked to that menu is written. If ITEM='/' the help for the complete command tree is written. If OUTPUT=' ' the text is written to the terminal.

The output file produced with option LATEX can be processed directly by LaTeX, i.e. it contains a standard header defining the meta commands used for formatting the document body. With option TEX only the document body is written into the output file which can be included by a driver file containing customized definitions of the standard meta commands. Example:

    MANUAL / MAN.TEX LATEX

will produce the file MAN.TEX containg the documentation of all available commands in LaTeX format.

EDIT fname

  FNAME      C    ``File name''

Invoke the editor on the file. The command HOSTEDITOR can be used to define the editor.

If FNAME does not contain an extension the default filetype '.KUMAC' is supplied. The search path defined by the command DEFAULTS is used to find an already existing file. If the file does not exist it is created with the given name.

LAST [ n fname ]

  N          I    ``N last commands to be saved''  D=-1
  FNAME      C    ``File name''  D=' '

Perform various operations with the history file.

If FNAME is not specified, the current history file is assumed by default (the startup history file name is LAST.KUMAC). To change the history file the command LAST 0 NEWFNAME must be entered.

If N.LT.0 (default case) the default host editor is called to edit the current history file, containing all the commands of the session.

If N.EQ.0 the history file FNAME is rewound and set as the current one (the command LAST 0 FNAME itself is not recorded).

If N.GT.0 the last N commands of the session are saved in the current history file.

See also the command RECORDING.

MESSAGE [ string ]

  STRING     C    ``Message string''  D=' '
Write a message string on the terminal. A useful command inside a macro. Several message strings can be given in the same command line, each of them separated by one or more spaces (the usual parameter separator); therefore multiple blanks will be dropped and only one will be kept. If multiple blanks should not be dropped, the string must be surrounded by single quotes.

SHELL [ cmd ]

  CMD        C    ``Shell command string''  D=' '

Execute a command of the host operating system. The command string is passed to the command processor defined by HOSTSHELL. If CMD=' ' the shell is spawned as interactive subprocess. To return from the shell enter 'RETURN' (the full word, not just ) or 'exit' (depending on the operation system).

WAIT [ string sec ]

  STRING     C    ``Message string''  D=' '
  SEC        R    ``Number of seconds''  D=0

Make a pause (e.g. inside a macro). Wait a given number of seconds (if SEC.GT.0) or just until is entered (if SEC.LE.0). A message string is also written on the terminal before waiting.

UNITS

List all Input/Output logical units currently open. The files attached to them are also shown.

EXIT

End of the interactive session.

QUIT

End of the interactive session.

FUNCTIONS

          *** KUIP System Functions ***

The function name (and arguments) is literally replaced, at run-time, by its current value. At present, the following functions are available:

    $DATE  .......................  Current date in format DD/MM/YY
    $TIME  .......................  Current time in format HH.MM.SS
    $CPTIME  .....................  CP time elapsed since last call (in sec)
    $RTIME  ......................  Real time elapsed since last call (in sec)
    $VDIM(VNAME,IDIM)  ...........  Physical length of vector VNAME
                                    on dimension IDIM (1..3)
    $VLEN(VNAME,IDIM)  ...........  As above, but for the logical length
                                    (i.e. stripping trailing zeroes)
    $NUMVEC  .....................  Current number of vectors
    $VEXIST(VNAME)  ..............  Index of vector VNAME
                                    (1..$NUMVEC or 0 if VNAME does not exist)
    $SUBSTRING(STRING,IX,NCH)  ...  STRING(IX:IX+NCH-1)
    $UPPER(STRING)  ..............  STRING changed to upper case
    $LOWER(STRING)  ..............  STRING changed to lower case
    $LEN(STRING)  ................  Length of STRING, stripping
                                    leading/trailing blanks and single quotes
    $SIGMA(Expression)  ..........  Result of the Expression computed by SIGMA
    $ARGS  .......................  Command line at program invocation
    $KEYNUM  .....................  Address of latest clicked key in style GP
    $KEYVAL  .....................  Value of latest clicked key in style GP
    $LAST  .......................  Latest command line executed
    $ANUM  .......................  Number of aliases
    $ANAM(I)  ....................  Name of I-th alias
    $AVAL(I)  ....................  Value of I-th alias
    $STYLE  ......................  Current style as defined by SET/STYLE

ALIAS

Operations with aliases. Aliases are defined to provide shortcut abbreviations for the input line or some part of it. When encountered on an input line an alias is replaced by its string value which can contain further aliases. (Be careful not to define recursive aliases.)

To juxtaposition aliases, a double slash can be used as concatenation sign. Inside quoted strings and for the ALIAS commands themselves the alias substitution is inhibited. Otherwise

    ALIAS/CREATE ALPHA BETA
    ALIAS/CREATE ALPHA BETA

whould create an recursive alias BETA and

    ALIAS/CREATE ALPHA BETA
    ALIAS/CREATE BETA GAMMA
    ALIAS/DELETE ALPHA
would delete the alias name BETA instead of ALPHA itself.

CREATE name value [ chopt ]

  NAME       C    ``Alias name''
  VALUE      C    ``Alias value''
  CHOPT      C    ``Option''  D=' '

Possible CHOPT values are:

  ' '    create an Argument alias
  C      create a Command alias

Create an alias NAME which should be substituted by VALUE. An alias name is a sequence of letters and digits starting with a letter. The underscores (''), the at-sign ('@') and the dollar-sign ('$') count as letters.

There are two types of aliases: Command aliases are recognized only if they occur in the command position, i.e. as the first token on the line. Argument aliases are recognized anywhere on the command line (except inside quoted strings) if they are surrounded by one of the following separators:

    blank  /  ,  =  :  .  %  '  (  )

Also switch ON the alias translation, i.e. ALIAS/TRANSLATION ON. If CHOPT='C' then the alias is a command alias, i.e. an alias that will only be translated when it is the first token on a command line. Example:

    Alias/Create GG Graph/Struct/Scratch
    Alias/Create FF File1/Name1/Name2
    GG FF/ID

is equivalent to

    Graph/Struct/Scratch File1/Name1/Name2/ID

    Alias/Create LS DIR C

is equivalent to

    DIR

only when LS is the first token on a command line. In the following case LS will not be translated

    SHELL LS

LIST

List all aliases (names and values).

DELETE alist

  ALIST      C    ``Alias list''

Delete the definition of aliases in the list ALIST. The aliases are separated in the list by a comma and imbedded blanks are not allowed. If ALIST='*' then delete all aliases and the alias translation is switched OFF (i.e.: ALIAS/TRANSLATION OFF is executed).

TRANSLATION [ option ]

  OPTION     C    ``Option''  D='ON'

Possible OPTION values are:

  ?      show current setting
  ON     switch alias translation ON
  OFF    switch alias translation OFF

Switch ON/OFF the alias translation. If OFF, alias definitions are not used in parsing the command lines. It is automatically switched ON when an alias is created. If OPTION='?' the current value is shown. The startup value is OFF.

SETSHOW

Set or show various KUIP parameters and options.

STYLE [ option sgylen sgsize sgyspa sgbord wktype ]

  OPTION     C    ``Option''  D='?'
  SGYLEN     R    ``max Y LENgth of each menu item box''  D=0.025
                  R=0.005:0.25
  SGSIZE     R    ``space available for the application''  D=0.8 R=0:0.90
  SGYSPA     R    ``max Y length of space between menus''  D=0.02 R=-0.5:0.50
  SGBORD     R    ``X or Y border for menus''  D=0.015 R=0:0.25
  WKTYPE     I    ``Graphics workstation type''  D=0

Possible OPTION values are:

  ?     show current style
  C     select Command line input
  AN    select general Alpha menu (with Numbers)
  AL    select general Alpha menu (with Letters)
  G     select Graphics menu (with hardware character fonts)
  GW    select Graphics menu (with shadowed Width effect)
  GS    select Graphics menu (with Software character fonts)
  GP    select Graphics menu (with Panel keys only, i.e. no command tree
        menu)
  XM    select Motif/X11 interface
Select the user dialogue style (or working mode). The startup value is 'C' (command mode). The current value is returned by the system function $STYLE.

The G-styles are only available if the application program is calling KUWHAG instead of KUWHAT. When one of these options is choosen the remaining parameters control the geometrical layout of the menus on the screen and the graphics workstation type (in case HIGZ was not initialized).

Style 'XM' is only available if the program is calling KUWHAM. In that case switching to other styles is not possible.

PANEL line [ gkey ]

  LINE       R    ``Line number''  D=0
  GKEY       C    ``Graphics key value(s)''  D=' '

Set up the panel of graphics keys (used by STYLE GP).

Examples:

    PANEL  0                        | reset the panel
    PANEL  2 A/L QUIT V/L           | initialize line 2 with 3 graphics keys,
                                      respectively A/L, QUIT, V/L
    PANEL  2 A/L ' '  V/L ' ' ' '   | initialize line 2 with 5 graphics keys,
                                      and fill 1st and 3rd keys
    PANEL  2.04 MESSAGE             | initialize 4th key of 2nd line to MESSAGE
    PANEL  2.04                     | clear 4th key of 2nd line
    PANEL -2.08                     | initialize line 2 with 8 graphics keys
    PANEL -6.16                     | initialize line 6 with 16 graphics keys

Note that the key number on the right of the decimal point must always be defined with two digits.

Keys ending with a minus sign make an additional request of keyboard input; the complete command line will be the key text, with a blank at the place of the minus, concatenated with the additional keyboard input. Example:

    PANEL 1.03 'VEC/PRI-'        | entering VAB will execute VEC/PRI VAB.

Keys ending with a double minus sign behave as above but no blank is put at the place of the double minus. Example:

    PANEL 1.03 'VEC/PRI V--'     | entering AB will execute VEC/PRI VAB

The dollar sign inside a key is replaced by additional keyboard input. Example:

    PANEL 1.03 'VEC/PRI V($)'    | entering 11:20 will execute VEC/PRI V(11:20)

COMMAND [ chpath ]

  CHPATH     C    ``Path name for command line''  D=' '

Set a filter for the parsing of command lines. If it has been called, it means that whenever a command line is entered, if and only if it is not an existing command (not just ambiguous), it is inserted into the CHPATH string, with $n (n=1..9) being replaced by the n-th token of the command (tokens are separated by spaces), or $* being replaced by the whole command line. Examples:

    COMMAND 'V/CR $*(10)'
    AA                     =>   V/CR AA(10)
    BB                     =>   V/CR BB(10)
    V/LIST                 =>   V/LIST

    COMMAND 'VECTOR/PLOT $1 555 $2'
    AA E                   =>   VECTOR/PLOT AA 555 E
    BB                     =>   VECTOR/PLOT BB 555

    COMMAND                =>   shows its current value
    COMMAND *              =>   reset (equivalent to COMMAND $*)

Note that COMMAND and subsequent command lines can be used inside macros, excepted when producing macro statements (like EXEC, IF, GOTO, etc.). For example, the above examples would work also inside macros, while COMMAND 'EXEC $*' or COMMAND 'GOTO $1' will not.

APPLICATION [ path cmdex ]

  PATH       C    ``Application name''  D=' '
  CMDEX      C    ``Exit command''  D='EXIT'

Set the application name. This means that all input lines will be concatenated to the string PATH (until the command specified by the parameter CMDEX is executed, which resets the application to the null string). The value of CMDEX may be specified if the default value EXIT has to be changed (i.e. because already used by the application). APPLICATION can also be inserted in a macro: in this case at least 4 characters must be specified (i.e. APPL).

ROOT [ path ]

  PATH       C    ``Root directory''  D='/'

Set the root for searching commands. If PATH='?' the current root is shown. This allows to access commands regardless of possible ambiguities with different menus. Commands are first searched starting from the current root: if a command is found it is executed. Only if a command is not found a second pass of search is done, starting now from the top root of the command tree (i.e. '/').

TIMING [ option ]

  OPTION     C    ``Option''  D='ON'

Possible OPTION values are:

  ON
  OFF
  ALL

Set ON/OFF/ALL the timing of commands. If ON, the real time and the CPU time for the latest executed command (or macro) are presented. If ALL, the time is shown for each command being executed within a macro. The startup value is OFF.

PROMPT prompt

  PROMPT     C    ``Prompt string''  D=' '

Set the prompt string for the command mode dialogue. If PROMPT is blank the current prompt is left unchanged. If PROMPT contains the character sequence '[]' the current command number is inserted between the square brackets.

BREAK [ option ]

  OPTION     C    ``Option''  D='ON'

Possible OPTION values are:

  ON
  OFF
  TB
  ?

Set ON/OFF the break handling. If OPTION='?' the current value is shown. The startup value is ON.

Hitting the keyboard interrupt (CTRL/C on VMS or CTRL/Q on the Apollo) under break ON condition, the current command or macro execution will be interrupted and the user will get again the application prompt.

BREAK TB switch ON the traceback of the routines called, with their line numbers, when an error occurs. This allows the detection of the routines which provoked the error.

COLUMNS [ ncol ]

  NCOL       I    ``Number of columns for terminal output''  D=80 R=0:132
Set the maximum number of columns for terminal output. If NCOL=0 the current number of columns is shown. The startup value is 80.

RECORDING [ nrec ]

  NREC       I    ``Rate for recording on history file''  D=25 R=0:25

Set the recording rate for the history file. Every NREC commands of the session the current history file is updated. If NREC=0 the history is not kept at all (i.e. the file is not written). See also the command LAST.

HOST_EDITOR [ editor top left width height dxpad dypad npads ]

  EDITOR     C    ``Host editor command''  D='?'
  TOP        I    ``Top position of the edit window''  D=20
  LEFT       I    ``Left position of the edit window''  D=20
  WIDTH      I    ``Width of the edit window''  D=0
  HEIGHT     I    ``Height of the edit window''  D=0
  DXPAD      I    ``X offset for help PAD windows''  D=30 R=0:
  DYPAD      I    ``Y offset for help PAD windows''  D=20 R=0:
  NPADS      I    ``Maximum number of shifted pads''  D=4 R=1:

Set the host command to invoke the editor. The EDIT command will invoke this editor. If EDITOR='?' the current host editor command is shown.

On Apollo the special value EDITOR='DM' invoke Display Manager pads. The special values EDITOR='WINDOW' and 'PAD' can be used to specify the window positions (in pixel units). 'WINDOW' defines the parameters for edit pads, while 'PAD' defines the parameters for read-only pads (e.g. used by 'HELP -EDIT').

On VMS the special values EDITOR='EDT' and 'TPU' invoke the callable editors. The startup time is considerably lower compared to spawning the editor as a subprocess. The callable EDT has one disadvantage though: after an error, e.g. trying to edit a file in a non-existing directory, subsequent calls will always fail. The TPU call can be augmented by command line options, e.g.

    HOST_EDITOR TPU/DISP=DECW    | DECwindow interface to EVE

On Unix a variety of editors are available, e.g.

    HOST_EDITOR vi
    HOST_EDITOR 'emacs -geometry 80x48'

On Unix workstations it is possible to do asynchronous editing via the KUIP edit server, i.e. to start an editor in a separate window while the application can continue to receive commands. In order to do that the following conditions must be fulfilled:

    - The KUIP edit server 'kuesvr' must be found in the search path.
    - The editor command set by HOST_EDITOR must end with an ampersand ('&').
    - The environment variable 'DISPLAY' must be set.

The ampersand flags your intention to use the edit server if possible. If the edit server cannot be used the ampersand will be ignored, i.e. even with

    HOST_EDITOR 'vi &'

the KUIP/EDIT command will block until the editor terminates if either the 'kuesvr' is not available or 'DISPLAY' is undefined. When using the edit server the editor command is expected to create its own window. 'vi' being a frequent choice, the above command is automatically interpreted as

    HOST_EDITOR 'xterm -e vi &'

The startup value can be defined by the environment variable 'EDITOR'. Otherwise it is set to a system dependent default: 'DM' (Apollo), 'EDT' (VMS), 'XEDIT' (VM/CMS), 'vi' (Unix).

HOST_PAGER [ pager ]

  PAGER      C    ``Host pager command''  D='?'

Set the host command to view a file in read-only mode. If OPTION='?' the current host pager command is shown. The 'HELP -EDIT' command will invoke this pager, e.g.

    HOST_PAGER more
On Unix workstations the pager can be asynchronous by creating a separate window, e.g.

    HOST_PAGER 'xterm -e view &'
    HOST_PAGER 'ved &'

On Apollo the special value PAGER='DM' defines the use of Display Manager read-only pads. The pad positions can be adjusted by the HOSTEDITOR command.

The startup value can be defined by the environment variables 'KUIPPAGER' or 'PAGER'. If neither of them is defined the value set by the HOSTEDITOR command is used. On VAX/VMS the startup value is 'TYPE/PAGE'.

HOST_SHELL [ shell ]

  SHELL      C    ``Host shell command''  D='?'

Set the default host shell invoked by the KUIP/SHELL command. If OPTION='?' the current host shell is shown. The startup value is taken from the 'SHELL' environment variable.

RECALL_STYLE [ option ]

  OPTION     C    ``Command recall and editing style''  D='?'

Possible OPTION values are:

  ?       show current setting
  KSH     Korn shell / Emacs like command line editing
  KSHO    like 'KSH' but overwrite instead of insert mode
  DCL     VAX/VMS DCL command line editing
  DCLO    like 'DCL' but overwrite instead of insert mode
  NONE    disable command line editing

Set the command recall and editing style. If OPTION='?' the current style is shown. The startup value is 'DCL' on VAX/VMS, 'NONE' on Cray and Apollo DM pads, and 'KSH' on other systems.

If the terminal emulator returns ANSI escape sequences (hpterm doesn't!) the up/down arrow keys can be used to recall items from the command history list and the left/right arrow keys to move the cursor.

'KSH' style provides the following control keys for editing:

     ^A/^E   : Move cursor to beginning/end of the line.
     ^F/^B   : Move cursor forward/backward one character.
     ^D      : Delete the character under the cursor.
     ^H, DEL : Delete the character to the left of the cursor.
     ^K      : Kill from the cursor to the end of line.
     ^L      : Redraw current line.
     ^O      : Toggle overwrite/insert mode. Text added in overwrite mode
               (including yanks) overwrites existing text, while insert mode
               does not overwrite.
     ^P/^N   : Move to previous/next item on history list.
     ^R/^S   : Perform incremental reverse/forward search for string on
               the history list.  Typing normal characters adds to the
               current search string and searches for a match.  Typing
               ^R/^S marks the start of a new search, and moves on to
               the next match.  Typing ^H or DEL deletes the last
               character from the search string, and searches from the
               starting location of the last search.
               Therefore, repeated DEL's appear to unwind to the match
               nearest the point at which the last ^R or ^S was typed.
               If DEL is repeated until the search string is empty the
               search location begins from the start of the history
               list. Typing ESC or any other editing character accepts
               the current match and loads it into the buffer,
               terminating the search.
     ^T      : Toggle the characters under and to the left of the cursor.
     ^U      : Kill from the prompt to the end of line.
     ^Y      : Yank previously killed text back at current location.
               Note that this will overwrite or insert, depending on
               the current mode.
     TAB     : By default adds spaces to buffer to get to next TAB stop
               (just after every 8th column).
     LF, CR  : Returns current buffer to the program.

'DCL' style provides the following control keys for editing:

     BS/^E   : Move cursor to beginning/end of the line.
     ^F/^D   : Move cursor forward/backward one character.
     DEL     : Delete the character to the left of the cursor.
     ^A      : Toggle overwrite/insert mode.
     ^B      : Move to previous item on history list.
     ^U      : Delete from the beginning of the line to the cursor.
     TAB     : Move to next TAB stop.
     LF, CR  : Returns current buffer to the program.

VISIBILITY cmd [ chopt ]

  CMD        C    ``Command name''  D=' '
  CHOPT      C    ``?, OFF, ON''  D='?'

Possible CHOPT values are:

  ?
  OFF
  ON

Set or show the visibility attributes of a command.

If CHOPT='OFF':

    - the command it is not executable anymore
    - STYLE G draws a shadowed box on the command
    - HELP may be still requested on the command

The startup value is ON.

FILECASE [ option ]

  OPTION     C    ``Case conversion for filenames''  D='?'

Possible OPTION values are:

  ?          show current setting
  KEEP       filenames are kept as entered on the command line
  CONVERT    filenames are case converted
  RESTORE    restore previous FILECASE setting

Set or show the case conversion for filenames.

This command has only an effect on Unix systems to select whether filenames are kept as entered on the command line. The startup value is 'CONVERT', i.e. filenames are converted to lowercase.

On other systems filenames are always converted to uppercase.

The 'RESTORE' option set the conversion mode to the value effective before the last FILECASE KEEP/CONVERT command. E.g. the sequence

        FILECASE KEEP; EDIT Read.Me; FILECASE RESTORE

forces case sensitivity for the EDIT command and restores the previous mode afterwards.

MACRO

Macro Processor commands.

EXEC mname [ margs ]

  MNAME      C    ``Macro name''
  MARGS      C    ``Macro arguments''  D=' '

Execute the command lines contained in the macro MNAME. As a file can contain several macros, the character '#' is used to select a particular macro inside a file as explained below.

If MNAME does not contain the character '#', the file MNAME.KUMAC is searched and the first macro is executed (it may be an unnamed macro if a MACRO statement is not found as first command line in the file).

If MNAME is of the form FILE#MACRO, the file named FILE.KUMAC is searched and the macro named MACRO is executed.

Examples:

    EXEC ABC   to exec first (or unnamed) macro of file ABC.KUMAC
    EXEC ABC#M to exec macro M of file ABC.KUMAC

The command MACRO/DEFAULTS can be used to define a directory search path for macro files.

LIST [ mname ]

  MNAME      C    ``Macro name pattern''  D=' '

List all macros in the search path defined by MACRO/DEFAULTS. Macros are files with the extension KUMAC. MNAME may be specified to restrict the list to the macros containing such a string in the first part of their name. For example,

    MACRO/LIST ABC

will list only macros starting with ABC.

TRACE [ option level ]

  OPTION     C    ``Option''  D='ON'
  LEVEL      C    ``Level''  D=' ' R=' ,TEST,WAIT'

Possible OPTION values are:

  ON
  OFF

Set ON/OFF the trace of commands during macro execution. If TRACE='ON' the next command is written on the terminal before being executed. If LEVEL='TEST' the command is only echoed but not executed. If LEVEL='WAIT' the command WAIT is automatically inserted after the execution of each command. The startup values are OPTION='OFF' and LEVEL=' '.

DEFAULTS [ path option ]

  PATH       C    ``Search path for macro files''  D='?'
  OPTION     C    ``Automatic EXEC''  D='?'

Possible OPTION values are:

  ?              show current setting
  COMMAND        search for commands only
  C              same as 'Command'
  AUTO           search for commands before macros
  A              same as 'Auto'
  AUTOREVERSE    search for macros before commands
  AR             same as 'AutoReverse'

Set or show MACRO search attributes.

On Unix and VMS systems PATH defines a comma separated list of directories in which the commands KUIP/EDIT, MACRO/EXEC, and MACRO/LIST search for macro files. For example,

    MACRO/DEFAULT '.,macro,~/macro'          | Unix
    MACRO/DEFAULT '[],[.macro],[macro]'      | VMS

defines to search files first in the current directory, then in the subdirectory 'macro' of the current directory, and last the subdirectory 'macro' of the home directory.

On VM/CMS system PATH defines a comma separated list of filemodes. E.g.

    MACRO/DEFAULT '*'       | search all disks
    MACRO/DEFAULT 'A,C'     | search only disks A and C

If PATH='?' the currently defined search path is shown. If PATH='.' the search path is undefined, i.e. files are search for in the current directory (A-disk on VM/CMS) only. The startup value is PATH='.'.

The search path is not applied if the file specification already contains an explicit directory path or if it starts with a '-' character (which is stripped off).

OPTION allows to define whether macros can be envoked by their name only without prepending the KUIP/EXEC command:

    DEFAULT -Command
    CMD                     | CMD must be a command
    DEFAULT -Auto
    CMD                     | if CMD is not a command try EXEC CMD
    DEFAULT -AutoReverse
    CMD                     | try EXEC CMD first; if not found try command CMD

The startup value is 'Command' (also reset by PATH='.').

Important note:

Inside macros the DEFAULT -A (or -AR) logic is disabled, i.e. DEFAULT -C is always assumed.

RECURSION [ option ]

  OPTION     C    ``Option''  D='ON'

Possible OPTION values are:

  ON
  OFF

Set ON/OFF the option to execute macros recursively. The startup value is OFF.

DZDOC

HELP_ZEBRA

. *** The Zebra-Browser ***

Selecting "Zebra" from the KUIP object browser will display an icon for each Zebra store, for each open Fzfile and each open Rzfile. A store is named with its number plus the name given to MZSTOR with slashes (/) replaced by underscores (). A Fzfile is named with the logical unit number, a Rzfile with the top directory given to it by RZFILE.

Double click in the store symbol will display icons for the divisions in this store, clicking the divisions will display the banks im this divisions, clicking a bank will show the tree for this bank in the graphics window (see DZDISP). Popup menus (use right mouse key) are provided which allow to print information on stores, divisions and banks (DZSTOR, DZSNAP, DZSURV). The layout of banks in divisions can be shown graphically by the command 'Displaydivision'.

Double click in the FZfile symbol will read the next data structure from the file into division 1 of store 0 and display the bank tree for the top bank in the graphics window. A popup menu allows to read the User header only, to display information (see FZINFO) on the file or close the file. Trying to read beyond End of Data will force the file to be rewound to avoid exit via ZFATAL.

Double click in the RZfile symbol will display directories and/or keys contained in the file. Double click on a key symbol will read the data structure for this key into division 1 of store 0 and display the bank tree for the top bank in ths graphics window. Show status (RZSTAT) and close are accessible by a popup menu.

. **** Embedded DZDOC ****

The Zebra browser popup menus give access to parts of the DZDOC package. DZDOC allows to describe Zebra banks (linkage and data words) with a defined format. It puts this description into a Rzfile for direct access and makes it available to DZDISP which can then display the data words of a bank together with their meaning.

Opening, updating and using of the Rzfile can be done in the same session. The file is opened via the menu item 'Openbank-doc-Rzfile', one has to choose if it should be opened 'New' for 'Update' or 'Readonly'. Information can put into the file using the item 'Putdoc-into-Rzfile', for more information see help for this command.

An alternative way is to use the item 'Editdocumentation' in the popup menu associated with each bank (in the browser or graphics window). In this case the editor is called with the documentation contained in an (open) Rzfile if it is there. If not a template with the documentation generated from the selected bank in memory is presented in the editor. If the file gets modified the documentation will be put into the Rzfile if it is open for update. Note that the file naming convention uses the hollerith Id of a bank concatinated with the Id of its up-bank ('none' for a top bank) with the extension '.dzdoc'.

. **** Vector/histogram filling ****

The data words of a bank may be copied into a KUIP vector which is optionally directly plotted or drawn (VECTOR/PLOT or DRAW). This is done from the popup menu in the graphics or Icon display of the ZEBRA banks. The vectors may then further be manipulated by all the commands of the vector package.

. **** Ntuple filling ****

A simple facility is provided to mark words in a data structure read from an FZ-file for filling into a Ntuple. The entries may be scalar variables (i.e. one value of a bank) or arrays. Marking of data words may be done explicitly giving the absolute offset in a bank (a range in case of an array) or symbolically if a (correct) documentation for the bank is available. In the second case all values of a variable (max 100) in a bank are extracted and filled into the Ntuple.

The marking is done from the popup menu associated to banks in the graphics display, the system finds and remembers the links to the bank.

Filling is controlled from the popup menu for the FZ-file icon. For further details consult the Help items for these commands.

RZFILE chdocb [ chopt ]

  CHDOCB     C    ``File name''  D=' '
  CHOPT      C    ``Options''  D='R'

Possible CHOPT values are:

  R
  N
  U
  L

Open (RZ) file with bank documentation in Readonly (default), New or Update mode Option L: List contents (RZLDIR) (file must be open)

CFOPEN lun chfile lrecw

  LUN        I    ``Logical unit number''  D=21 R=21:59
  CHFILE     C    ``File name''  D=' '
  LRECW      I    ``Record length in words''  D=8100

Open an FZ file with L option in read mode, i.e. call CFOPEN)

DIR_ADD chdir

  CHDIR      C    ``Directory name''  D=' '

Add a directory into search path when looking for bank documention files. (max 10 dirs allowed)

DZEDIT_DOC chbank chupid chopt chfile store div

  CHBANK     C    ``Bank Hol-Id ''  D=' '
  CHUPID     C    ``UpBank Hol-Id''  D=' '
  CHOPT      C    ``Option ''  D='Rz'
  CHFILE     C    ``File name ''  D=' '
  STORE      I    ``Store ''  D=0
  DIV        I    ``Division ''  D=2

Possible CHOPT values are:

  Rz
  Ascii
  Memory

Edit documentation for selected bank. The source may be taken from:

            - an (open) RZ documentation file
            - an Ascii file in current dir or one added by DIR_ADD
            - a template of a bank in memory (Store and div must be given)

In the case of 'Ascii' the file name may explicitly be given in CHFILE, if CHFILE = ' ' it is defaulted to 'CHBANKCHUPID.dzdoc'.

DZDOC_SET_PAR chopt ikdsp1 ikdsp2 icydsp iwkid

  CHOPT      C    ``Color bank display''  D='Yes'
  IKDSP1     I    ``Key to display''  D=1
  IKDSP2     I    ``Key to display''  D=2
  ICYDSP     I    ``Cycle to display''  D=1000000
  IWKID      I    ``Use workstation Id''  D=1

Possible CHOPT values are:

  Yes
  No

Choose if bank display should be colored Select (2) keys to show in browser and which cycle. DZDOC may optionally use a different window (workstation) for its output.

DISP_TREE chbank [ nid store div chupid ]

  CHBANK     C    ``Bank Hol-Id''  D=' '
  NID        I    ``Num Id ''  D=0
  STORE      I    ``Store ''  D=0
  DIV        I    ``Division ''  D=2
  CHUPID     C    ``UpBank Hol-Id''  D=' '

Show bank tree for selected bank

DISP_CONT chbank [ nid store div chupid ]

  CHBANK     C    ``Bank Hol-Id''  D=' '
  NID        I    ``Num Id ''  D=0
  STORE      I    ``Store ''  D=0
  DIV        I    ``Division ''  D=2
  CHUPID     C    ``UpBank Hol-Id''  D=' '

Show contents of bank

DZSHOW_CONT chbank [ nid store div chupid ]

  CHBANK     C    ``Bank Hol-Id''  D=' '
  NID        I    ``Num Id ''  D=0
  STORE      I    ``Store ''  D=0
  DIV        I    ``Division ''  D=2
  CHUPID     C    ``UpBank Hol-Id''  D=' '

Show contents of bank

DISP_SYS chbank [ nid store div chupid ]

  CHBANK     C    ``Bank Hol-Id''  D=' '
  NID        I    ``Num Id ''  D=0
  STORE      I    ``Store ''  D=0
  DIV        I    ``Division ''  D=2
  CHUPID     C    ``UpBank Hol-Id''  D=' '

Show system words and links for selected bank

DISP_DOC chbank [ nid store div chupid ]

  CHBANK     C    ``Bank Hol-Id''  D=' '
  NID        I    ``Num Id ''  D=0
  STORE      I    ``Store ''  D=0
  DIV        I    ``Division ''  D=2
  CHUPID     C    ``UpBank Hol-Id''  D=' '

Show documentation for selected bank

SURVEY chbank [ nid store div chupid ]

  CHBANK     C    ``Bank Hol-Id''  D=' '
  NID        I    ``Num Id ''  D=0
  STORE      I    ``Store ''  D=0
  DIV        I    ``Division ''  D=2
  CHUPID     C    ``UpBank Hol-Id''  D=' '

Call DZSURV for selected bank

BROWSE

FILT_BANKS cidmsk nidmsk

  CIDMSK     C    ``Mask Hol Id''  D=' '
  NIDMSK     I    ``Numerical Id''  D=0

Set a mask on hollerith and/or numerical Id of a bank. The wildcard character is * or blank (i.e. CIDMSK = ' ' selects all). Example: C**S , display all banks with Id starting with C and ending with S. If NIDMSK /= 0 display only banks with this numerical Id.

SHOW_CONT chbank

  CHBANK     C    ``Int Bank Id ''  D=' '

Show contents of bank

DZSHOW_CONT chbank

  CHBANK     C    ``Int Bank Id''  D=' '

Show contents of bank

SHOW_TREE chbank

  CHBANK     C    ``Int Bank Id''  D=' '
Show bank tree for selected bank

SHOW_DROP chbank chopt

  CHBANK     C    ``Int Bank Id''  D=' '
  CHOPT      C    ``Option for MZDROP''  D=' '

Drop bank (tree)

SHOW_MODIFY bnumb ifword ilword ivalue rvalue cvalue

  BNUMB      I    ``Int bank Id (DONT TOUCH)''  D=0
  IFWORD     C    ``First word''  D=' '
  ILWORD     C    ``Last word''  D=' '
  IVALUE     I    ``Integer value''  D=0
  RVALUE     R    ``Real value''  D=0.
  CVALUE     C    ``Char*4 value''  D=' '

Modify data words of bank. Data words IFWORD - ILWORD will be filled with IVALUE, RVALUE or CVALUE depending on the type given in the IO-Char. If more than 1 word are modified the type of the first taken. The integer value is interpreted as hexadecimal if preceeded by $ or 16x. If ILWORD=0 its set to IFWORD. WARNING: If the dataword offset is <=0 system words will be modified on your own risk.

SHOW_SYS chbank

  CHBANK     C    ``Int Bank Id''  D=' '

Show system words and links for selected bank

SHOW_DOC chbank

  CHBANK     C    ``Int Bank Id''  D=' '

Show documentation for selected bank

DOC_EDIT chbank

  CHBANK     C    ``Int Bank Id''  D=' '

Edit documentation for selected bank (from Rz-file or memory)

SURVEY chbank

  CHBANK     C    ``Int Bank Id''  D=' '

Call DZSURV for selected bank

PUT_VECT chbank idhist chvect ifword ilword chopt

  CHBANK     C    ``Int Bank Id (DONT TOUCH)''  D=' '
  IDHIST     I    ``Histogram Id''  D=12345
  CHVECT     C    ``Vector Name''  D=' '
  IFWORD     I    ``First word''  D=0
  ILWORD     I    ``Last word''  D=0
  CHOPT      C    ``Option''  D='DRAW'

Possible CHOPT values are:

  DRAW
  PLOT

Put bank contents into a vector, If CHVECT is blank name is taken from hollerith Id. If IFWORD and ILWORD are 0 all data words are taken. With option PLOT the values are filled in a histogram which is then plotted (see VECTOR/PLOT), DRAW interprets the data words as histogram contents (VECTOR/DRAW).

MARK_NT chbank chopt iwordf iwordl chname copt

  CHBANK     C    ``Int Bank Id (DONT TOUCH)''  D=' '
  CHOPT      C    ``Single variable or array''  D='Array'
  IWORDF     I    ``First word number''  D=0
  IWORDL     I    ``Last word number''  D=0
  CHNAME     C    ``Mnemonic (variable name)''  D=' '
  COPT       C    ``Option''  D=' '

Possible CHOPT values are:

  Single
  Array

Mark data word(s) for Ntuple. An explicit word number or range of words may be given, in this case CHNAME is only used as a tag. If blank its defaulted to: Bankid+IWORD (8 Characters) If IWORDF is 0, it is assumed that a bank doc is available, and CHNAME is the name of a variable in the doc. If used with the option "array" all values with this name in the bank will be filled (max. 100) CHBANK: internal bank numbering, dont touch CHOPT: Switch between single variables and arrays.

             'single'  mark a single (scalar) variable
             'array'  put each occurence of a variable in bank
             into an array and call HFNT once per event

IWORDF:

           if > 0 data
           -1     length of bank (not yet implemented)
           -2     number of links (nyi)
           -5     numerical Id of bank (nyi)
           -10    the link offset (Jbias of bank in Upbank) (nyi)

IWORDL:

           > IWORDF  last word to be marked (only with "array")

Option: 'L' loop on all other links (Jbias) to this bank

               in Upbank or on all next banks if it is part
               of a linear structure (nyi)

SH_CONT bnumb

  BNUMB      I    ``Bank number''  D=0

Show contents of bank

DZSH_CONT bnumb

  BNUMB      I    ``Int bank Id (DONT TOUCH)''  D=0

Show contents of bank

SH_MORE bnumb

  BNUMB      I    ``Int bank Id (DONT TOUCH)''  D=0

Continue with down banks

SH_TREE bnumb

  BNUMB      I    ``Int bank Id (DONT TOUCH)''  D=0

Show bank tree for selected bank

SH_DROP bnumb chopt

  BNUMB      I    ``Int bank Id (DONT TOUCH''  D=0
  CHOPT      C    ``Option for MZDROP''  D=' '

Drop bank (tree)

SH_MODIFY bnumb ifword ilword ivalue rvalue cvalue

  BNUMB      I    ``Int bank Id (DONT TOUCH)''  D=0
  IFWORD     C    ``First word''  D=' '
  ILWORD     C    ``Last word''  D=' '
  IVALUE     C    ``Integer value''  D=' '
  RVALUE     R    ``Real value''  D=0.
  CVALUE     C    ``Char*4 value''  D=' '

Modify data words of bank. Data words IFWORD - ILWORD will be filled with IVALUE, RVALUE or CVALUE depending on the type given in the IO-Char. If more than 1 word are modified the type of the first taken. The integer value is interpreted as hexadecimal if preceeded by $ or 16x. If ILWORD=0 its set to IFWORD. WARNING: If the dataword offset is <=0 system words will be modified on your own risk.

SH_SYS bnumb

  BNUMB      I    ``Int bank Id (DONT TOUCH)''  D=0

Show system words and links for selected bank

SH_DOC chbank

  CHBANK     C    ``Int Bank Id''  D=' '

Show documentation for selected bank

DC_EDIT chbank

  CHBANK     C    ``Int Bank Id''  D=' '

Edit documentation for selected bank (from Rz-file)

SH_SURVEY chbank

  CHBANK     C    ``Int Bank Id''  D=' '

Call DZSURV for selected bank

PT_VECT chbank idhist chvect ifword ilword chopt

  CHBANK     C    ``Int Bank Id (DONT TOUCH)''  D=' '
  IDHIST     I    ``Histogram Id''  D=12345
  CHVECT     C    ``Vector Name''  D=' '
  IFWORD     I    ``First word''  D=0
  ILWORD     I    ``Last word''  D=0
  CHOPT      C    ``Option''  D='DRAW'

Possible CHOPT values are:

  DRAW
  PLOT

Put bank contents into a vector, If CHVECT is blank name is taken from hollerith Id. If IFWORD and ILWORD are 0 all data words are taken. With option PLOT the values are filled in a histogram which is then plotted (see VECTOR/PLOT), DRAW interprets the data words as histogram contents (VECTOR/DRAW).

SHOW_RZS chpath

  CHPATH     C    ``Rz directory''  D=' '
Show status of a RZ file

GET_KEY chpath chknum

  CHPATH     C    ``Rz directory''  D=' '
  CHKNUM     C    ``Key sequential num''  D=' '

Read d/s of a RZ key into memory

SH_KEY chpath chknum

  CHPATH     C    ``Rz directory''  D=' '
  CHKNUM     C    ``Key sequential num''  D=' '

Show key words

SH_KEY_DEF chpath

  CHPATH     C    ``Rz directory''  D=' '

Show tags of keys

SH_RZLDIR chpath

  CHPATH     C    ``Rz directory''  D=' '

List directory (RZLDIR)

FILT_KEY ikeynr ivalue cvalue chopt chyeno

  IKEYNR     I    ``Keyword number''  D=1
  IVALUE     I    ``Integer value''  D=0
  CVALUE     C    ``Char*4 (hollerith) value''  D=' '
  CHOPT      C    ``Option''  D='Int'
  CHYENO     C    ``List keys with Append opt''  D='NO' R='NO,YES'

Possible CHOPT values are:

  Int
  Char
  Reset

Set a filter on keywords (max first 9), Keys created with the A option may be shown optionally.

CLOSE_RZ chpath

  CHPATH     C    ``Rz directory''  D=' '

Close RZ file

CLOSE_FZ chlun

  CHLUN      C    ``Unit number''  D=' '

Close FZ file

REWIND_FZ chlun

  CHLUN      C    ``Unit number''  D=' '

Rewind FZ file

FZ_LOG_LEVEL chlun logl

  CHLUN      C    ``Unit number''  D=' '
  LOGL       I    ``Log level''  R=-3:4

Set logging level for FZ file

GET_EVENT chlun

  CHLUN      C    ``Unit number''  D=' '

Read next d/s into memory

GET_HEADER chlun

  CHLUN      C    ``Unit number''  D=' '

Read next User header into memory

GET_PDS chlun

  CHLUN      C    ``Unit number''  D=' '

Read the pending d/s into memory

SH_FZINFO chlun

  CHLUN      C    ``Unit number''  D=' '

Show Fz information for file open on Unit CHLUN

FILL_NTUPLE chlun ntupid cname rzpath nevent chopt

  CHLUN      C    ``Unit number''  D=' '
  NTUPID     I    ``Id for Ntuple''  D=99
  CNAME      C    ``Ntuple title''  D='Zbrowse'
  RZPATH     C    ``Dir of Rzfile''  D=' '
  NEVENT     I    ``Number of events''  D=100000
  CHOPT      C    ``Option''  D=' '

Read events from FZfile and fill Ntuple RZPATH may contain the directory in an (open) Rzfile to receive the Ntuple. Option: 'R' Rewind file before filling

SHOW_STORE chsto

  CHSTO      C    ``Store name''  D=' '

Call DZSTOR, CHSTOR is given in format:Store01 Default: Div 2 of current Store

SHOW_DIV chdiv

  CHDIV      C    ``Div name''  D=' '

Call DZDDIV, CHDIV is given in format:Store01/Div03. Default: Div 2 of current Store

COL_GARB chdiv

  CHDIV      C    ``Div name''  D=' '

Call MZGARB for selected division

SNAP_DIV chdiv

  CHDIV      C    ``Div name''  D=' '

Call DZSNAP, CHDIV is given in format:Store01/Div03. Default: Div 2 of current Store

VERIFY_DIV chdiv chopt

  CHDIV      C    ``Div name''  D=' '
  CHOPT      C    ``Option''  D='CLSU'

Call DZVERI, CHDIV is given in format:Store01/Div03. Default: Div 2 of current Store

CVOL

Clipping commands. The hidden line removal technique is necessary to visualize properly very complex detectors. At the same time, it can be useful to visualize the inner elements of a detector in detail. For this purpose, the commands menu CVOL has been developed: these commands allow subtractions (via boolean operation) of given shapes from any part of the detector, therefore showing its inner contents. It is possible to clip each different volume by means of a different shape (BOX , TUBE, CONE, SPHE are available). If '*' is given as the name of the volume to be clipped, all volumes are clipped by the given shape. A volume can be clipped at most twice (even by different shapes); if a volume is explicitely clipped twice, the '*' will not act on it anymore. Giving '.' as the name of the volume to be clipped will reset the clipping.

BOX cnnv [ xmin xmax ymin ymax zmin zmax ]

  CNNV       C    `` Name of volume to be clipped ''  D='* '
  XMIN       R    `` Lower limit of the Shape X coordinate ''  D=-10000.
  XMAX       R    `` Upper limit of the Shape X coordinate ''  D=-9999.
  YMIN       R    `` Lower limit of the Shape Y coordinate ''  D=-10000.
  YMAX       R    `` Upper limit of the Shape Y coordinate ''  D=-9999.
  ZMIN       R    `` Lower limit of the Shape Z coordinate ''  D=-10000.
  ZMAX       R    `` Upper limit of the Shape Z coordinate ''  D=-9999.

This command performs a boolean subtraction between the volume CNVV and a box placed in the MARS according the values of the given coordinates. See also CVOL. The following commands will clip by a box, with a vertex at the origin, the volume specified by NAME (a valid string for the NAME of the volume can be found using the DTREE command).

    EXAMPLE -
    dopt hide on
    satt * seen -2
    draw NAME 40 40 0 10 10 .01 .01
    next
    box NAME 0 1000 0 1000 0 1000
    draw NAME 40 40 0 10 10 .01 .01
    box .

TUBE cnvv [ rmax zdem xmed ymed zmed ]

  CNVV       C    `` Name of volume to be clipped ''  D='* '
  RMAX       R    `` External radius of tube ''  D=0.1
  ZDEM       R    `` Half length of tube axis ''  D=0.1
  XMED       R    `` Center X coordinate ''  D=-10000.
  YMED       R    `` Center Y coordinate ''  D=-10000.
  ZMED       R    `` Center Z coordinate ''  D=-10000.

This command performs a boolean subtraction between the volume CNVV and a tube; the tube has the given parameters and is placed in the MARS according the given coordinates of its center. See also CVOL. The following commands will clip, by a tube, positioned according to the given parameters, the volume specified by NAME (a valid string for the NAME of the volume can be found using the DTREE command).

    EXAMPLE -
    dopt hide on
    satt * seen -2
    draw NAME 40 40 0 10 10 .01 .01
    next
    tube * 500 1000 500 0 0
    draw NAME 40 40 0 10 10 .01 .01
    box .

CONE cnvv [ rmax1 rmax2 zdem xmed ymed zmed ]

  CNVV       C    `` Name of volume to be clipped ''  D='* '
  RMAX1      R    `` Min external radius ''  D=0.1
  RMAX2      R    `` Max external radius ''  D=0.1
  ZDEM       R    `` Half length of cone axis ''  D=0.1
  XMED       R    `` Center X coordinate ''  D=-10000.
  YMED       R    `` Center Y coordinate ''  D=-10000.
  ZMED       R    `` Center Z coordinate ''  D=-10000.

This command performs a boolean subtraction between the volume CNVV and a cone; the cone has the given parameters and is placed in the MARS according to the given coordinates of its center. See also CVOL. The following commands will clip by a cone, positioned according the given parameters, the volume specified by NAME (a valid string for the NAME of the volume can be found using the DTREE command).

    EXAMPLE -
    dopt hide on
    satt * seen -2
    draw NAME 40 40 0 10 10 .01 .01
    next
    cone * 1 750 1000 0 0 1000
    draw NAME 40 40 0 10 10 .01 .01
    box .

SPHE cnvv [ rmax xmed ymed zmed ]

  CNVV       C    `` Name of volume to be clipped ''  D='* '
  RMAX       R    `` External radius of sphere ''  D=0.1
  XMED       R    `` Center X coordinate ''  D=-10000.
  YMED       R    `` Center Y coordinate ''  D=-10000.
  ZMED       R    `` Center Z coordinate ''  D=-10000.

This command performs a boolean subtraction between the volume CNVV and a sphere; the sphere has the given parameters and is placed in the MARS according to the given coordinates of its center. See also CVOL. The following commands clip by a sphere, positioned according to the given parameters, the volume specified by NAME (a valid string for the NAME of the volume can be found using the DTREE command). EXAMPLE -

    dopt hide on
    satt * seen -2
    draw NAME 40 40 0 10 10 .01 .01
    next
    sphe * 500 0 0 500
    draw NAME 40 40 0 10 10 .01 .01
    box .

DRAWING

Drawing commands. These commands allow the visualization in several ways of the volumes defined in the geometrical data structure. It is possible to draw the logical tree of volumes belonging to the detector (DTREE), to show their geometrical specification (DSPEC,DFSPC), to draw them and their cut views (DRAW, DCUT). Moreover, it is possible to execute these commands when the hidden line removal option is activated; in this case, the volumes can be also either translated in the space (SHIFT), or clipped by boolean operation (CVOL). In addition, it is possible to fill the surfaces of the volumes with solid colours when the shading option (SHAD) is activated. Several tools (ZOOM, LENS) have been developed to zoom detailed parts of the detectors or to scan physical events as well. Finally, the command MOVE will allow the rotation, translation and zooming on real time parts of the detectors or tracks and hits of a simulated event.

DRAW name [ theta phi psi u0 v0 su sv ]

  NAME       C    ``Volume name''
  THETA      R    ``Viewing angle theta (for 3D projection)''  R=0.:180.
  PHI        R    ``Viewing angle phi (for 3D projection)''  R=0.:360.
  PSI        R    ``Viewing angle psi (for 2D rotation)''  R=0.:180.
  U0         R    ``U-coord. (horizontal) of volume origin''
  V0         R    ``V-coord. (vertical) of volume origin''
  SU         R    ``Scale factor for U-coord.''
  SV         R    ``Scale factor for V-coord.''

    CALL GDRAW(name,theta,phi,psi,u0,v0,su,sv)

If optional parameters are missing, the corresponding values are taken from the common /GCDRAW/. This command will draw the volumes, selected with their graphical attributes, set by the SATT facility. The drawing may be performed with hidden line removal and with shading effects according to the value of the options HIDE and SHAD; if the option SHAD is ON, the contour's edges can be drawn or not. If the option HIDE is ON, the detector can be exploded (BOMB), clipped with different shapes (CVOL), and some of its parts can be shifted from their original position (SHIFT). When HIDE is ON, if the drawing requires more than the available memory, the program will evaluate and display the number of missing words (so that the user can increase the size of its ZEBRA store). Finally, at the end of each drawing (with HIDE on), the program will print messages about the memory used and statistics on the volumes' visibility. The following commands will produce the drawing of a green volume, specified by NAME, without using the hidden line removal technique, using the hidden line removal technique, with different linewidth and colour (red), with solid colour, with shading of surfaces, and without edges. (A possible string for the NAME of the volume can be found using the command DTREE).

    EXAMPLE -
    satt * seen -2
    satt NAME colo 3
    draw NAME 40 40 0 10 10 .01 .01
    next
    dopt hide on
    draw NAME 40 40 0 10 10 .01 .01
    next
    satt NAME colo 2
    satt NAME lwid 4
    draw NAME 40 40 0 10 10 .01 .01
    next
    dopt shad on
    satt * lwid 1
    satt NAME fill 1
    draw NAME 40 40 0 10 10 .01 .01
    next
    satt NAME fill 3
    draw NAME 40 40 0 10 10 .01 .01
    next
    dopt edge off
    draw NAME 40 40 0 10 10 .01 .01

DVOLUME n namnum chnrs [ theta phi psi u0 v0 su sv ]

  N          I    ``Number of elements in arrays LNAMES and LNUMBS''  D=1
  NAMNUM     C    ``Volume names and numbers (ex. "NAME1,NR1,NAME2,NR2")''
  CHNRS      C    ``Reference system used''  D='MARS' R='MARS,DRS'
  THETA      R    ``Viewing angle theta (for 3D projection)''  R=0.:360.
  PHI        R    ``Viewing angle phi (for 3D projection)''  R=0.:360.
  PSI        R    ``Viewing angle psi (for 2D rotation)''  R=0.:180.
  U0         R    ``U-coord. (horizontal) of volume origin''
  V0         R    ``V-coord. (vertical) of volume origin''
  SU         R    ``Scale factor for U-coord.''
  SV         R    ``Scale factor for V-coord.''

    CALL GDRVOL(n,lnames,lnumbs,nrs,theta,phi,psi,u0,v0,su,sv)

N is the number of levels from the top of the geometry structure to the volume lnames(n),lnumbs(n) to be drawn. NAMNUM contain the arrays lnames and lnumbs, identifying the path, in pairs and separated by commas; for example (with n=2) : 'lname(1),lnumbs(1),lname(2),lnumbs(2) ' CHNRS is the name of the reference system used: MARS for MAster Reference System or DRS for Daughter Reference System. NRS=0 for MARS or NRS<>0 for DRS If optional parameters are missing, the current values in /GCDRAW/ are taken.

DCUT name caxis cutval [ u0 v0 su sv ]

  NAME       C    ``Volume name''
  CAXIS      C    ``Axis value''  R='X,Y,Z'
  CUTVAL     R    ``Cut plane distance from the origin along the axis''
  U0         R    ``U-coord. (horizontal) of volume origin''
  V0         R    ``V-coord. (vertical) of volume origin''
  SU         R    ``Scale factor for U-coord.''
  SV         R    ``Scale factor for V-coord.''

    CALL GDRAWC(name,iaxis,cutval,u0,v0,su,sv)

The cut plane is normal to caxis (X,Y,Z), corresponding to iaxis (1,2,3), and placed at the distance cutval from the origin. The resulting picture is seen from the the same axis. If optional parameters are missing, the current values in /GCDRAW/ are taken. When HIDE Mode is ON, it is possible to get the same effect with the CVOL/BOX command.

DXCUT name cutthe cutphi cutval [ theta phi u0 v0 su sv ]

  NAME       C    ``Volume name''
  CUTTHE     R    ``Theta angle of the line normal to cut plane''  R=0.:360.
  CUTPHI     R    ``Phi angle of the line normal to cut plane''  R=0.:360.
  CUTVAL     R    ``Cut plane distance from the origin along the axis''
  THETA      R    ``Viewing angle theta (for 3D projection)''  R=0.:360.
  PHI        R    ``Viewing angle phi (for 3D projection)''  R=0.:360.
  U0         R    ``U-coord. (horizontal) of volume origin''
  V0         R    ``V-coord. (vertical) of volume origin''
  SU         R    ``Scale factor for U-coord.''
  SV         R    ``Scale factor for V-coord.''

    CALL GDRAWX(name,cutthe,cutphi,cutval,theta,phi,u0,v0,su,sv)

The cut plane is normal to the line given by the cut angles cutthe and cutphi and placed at the distance cutval from the origin. The resulting picture is seen from the viewing angles theta,phi. If optional parameters are missing, the current values in /GCDRAW/ are taken.

SHIFT cnvn xxxx yyyy zzzz

  CNVN       C    `` Name of volume to be shifted ''  D='*'
  XXXX       R    `` Shift along X axis ''  D=0.
  YYYY       R    `` Shift along Y axis ''  D=0.
  ZZZZ       R    `` Shift along Z axis ''  D=0.

To draw a volume shifted from its initial position when hidden line removal is ON. It can be useful if you want to extract a volume or some volumes from the detector to show them more clearly. The last requested SHIFT for each volume NAME is performed. Moreover, the SHIFT of each volume will be performed starting from where its mother has been shifted, so that it's easier to SHIFT nicely sets of volumes using the mother-daughter relationships. If '.' is given as the name of the volume to be shifted, the shifts for all volumes will be reset. The following commands will produce the translation along the Z-axis of the previously drawn volume:

    EXAMPLE -
    dopt hide on
    satt * seen -2
    draw NAME 40 40 0 10 10 .01 .01
    shift NAME 0 0 10

BOMB boom

  BOOM       R    `` Exploding factor for volumes position ''  D=0.
                  R=-10.:10.

To 'explode' the detector. If BOOM is positive (values smaller than 1. are suggested, but any value is possible) all the volumes are shifted by a distance proportional to BOOM along the direction between their centre and the origin of the MARS; the volumes which are symmetric with respect to this origin are simply not shown. BOOM equal to 0 resets the normal mode. A negative (greater than -1.) value of BOOM will cause an 'implosion'; for even lower values of BOOM the volumes' positions will be reflected respect to the origin. This command can be useful to improve the 3D effect for very complex detectors. The following commands will make explode the detector:

    EXAMPLE -
    dopt hide on
    satt * seen 1
    draw NAME 40 40 0 10 10 .01 .01
    bomb 1
    next
    draw NAME 40 40 0 10 10 .01 .01

DTREE [ name levmax iselt ]

  NAME       C    ``Volume name''  D=' '
  LEVMAX     I    ``Depth level''  D=3 R=0:15
  ISELT      I    ``Options ''  D=111

This command allows the drawing of the logical tree, displaying the name, the multiplicity and other information about the volumes, via a call to GDTREE(name,levmax,isel): if the third parameter is not given (default), the command will produce the drawing of the tree displaying, for each volume, the number of the following levels (red arrows) and of the preceeding levels (green arrows); then the control is automatically given to the mouse: clicking on the left button when the cursor is inside a volume's pave will perform a DSPEC for that volume; doing the same when the cursor is on a red arrow, will perform a DTREE for the relative volume (the number of levels displayed depending on the clicked arrow); doing the same for the 'i-th' green arrow of a given volume, will perform a DTREE for its mother-volume staying 'i' levels before. If running with X-windows, the drawing of the specification (DSPEC) is performed in a different window to speed up the scanning of the tree. Iterating this procedure it is possible to analyse very easily and quickly any kind of tree. Clicking the right button of the mouse will return the control to the command mode. If the ISELT parameter is given, then the TREE will work as in the previous version, with ISELT up to 10001. The following command will perform a drawing of the tree and give the control to the user via the mouse:

    EXAMPLE -
    dtree NAME 3

DSPEC name

  NAME       C    ``Volume name''

Trough a call to GDSPEC(name), this command allows one to show three views of the volume (two cut-views and a 3D view), together with its geometrical specifications. The 3D drawing will be performed according the current values of the options HIDE and SHAD and according the current CVOL clipping parameters for that volume.

DSPE3D name [ teta3 phi3 psi3 u03 v03 zm3 ]

  NAME       C    ``Volume name''
  TETA3      R    ``Theta angle''  D=40. R=0.:180.
  PHI3       R    ``Phi angle''  D=40. R=0.:360.
  PSI3       R    ``Psi angle''  D=0. R=0.:360.
  U03        R    ``U-coord. (horizontal) of volume origin''  D=10.
                  R=-40.:40.
  V03        R    ``V-coord. (vertical) of volume origin''  D=10. R=-40.:40.
  ZM3        R    ``Zoom factor for current size factors''  D=1.
                  R=0.00001:10.

Trough a call to GSPE3D, this command allows one to show the volume (3D views in real time), together with its geometrical specifications (if using MOTIF). The 3D drawing will be performed according the current values of the options HIDE and SHAD and according the current CVOL clipping parameters for that volume.

DFSPC name [ csort cinter ]

  NAME       C    ``Volume name''
  CSORT      C    ``Alphabetic sorting flag''  D='N' R='Y,N,0,1'
  CINTER     C    ``Interactive/Batch version''  D='I' R='I,B,0,1'

    CALL GDFSPC(name,isort,inter)

Same as DSPEC, but it will draw the specifications for all the volumes. If the alphabetic sorting flag is YES, all pictures will be drawn in ascending alphabetic order; isort is set to 1. If INTERACTIVE, (inter=1), the routine will prompt the user at each plot before doing a clear screen, otherwise it will clear automatically the screen before starting a new frame.

DTEXT x0 y0 text size angle lwid cent

  X0         R    ``X-coord. (horizontal) of text string''  D=10. R=0.:20.
  Y0         R    ``Y-coord. (vertical) of text string''  D=10. R=0.:20.
  TEXT       C    ``Text string''  D='GEANT'
  SIZE       R    ``Character size (cm)''  D=.5
  ANGLE      R    ``Rotation angle (deg)''  D=0. R=0.:360.
  LWID       I    ``Line width''  D=4
  CENT       C    ``Centering option''  D='CENT' R='CENT,LEFT,RIGH'

    CALL GDRAWT(x0,y0,text,size,angle,lwid,opt)

It allows one to draw some text in the current picture. Now more than 160 colours are available. The text colour must be set via the command IGSET. The size of the text will follow the zooming factors in the view banks.

DVECTOR xvect yvect npoint

  XVECT      C    ``Vector containing X-coord. (horizontal)''
  YVECT      C    ``Vector containing Y-coord. (vertical)''
  NPOINT     I    ``Number of coord.''

Draw a polyline of 'npoint' point via a call to GDRAWV(xvect,yvect,npoint) where xvect and yvect are two KUIP vectors

DSCALE u v

  U          R    ``U-coord. (horizontal) of the centre of scale''
  V          R    ``V-coord. (vertical) of the centre of scale''

    CALL GDSCAL(u,v)

It draws a scale centered in U,V.

DAXIS x0 y0 z0 dx

  X0         R    ``X-coord. of axis origin''
  Y0         R    ``Y-coord. of axis origin''
  Z0         R    ``Z-coord. of axis origin''
  DX         R    ``Axis size''

    CALL GDAXIS(x0,y0,z0,dx)

This commmand superimposes the axis of the MARS on the current picture. It is useful for finding immediately the orientation of the current drawing of the detector in the space.

DMAN u v type

  U          R    ``U-coord. (horizontal) of the centre of man''
  V          R    ``V-coord. (vertical) of the centre of man''
  TYPE       C    ``Man, Wm1, Wm2, Wm3''  D='MAN' R='MAN,WM1,WM2,WM3'

    CALL GDMAN(u,v),CALL GDWMN1(u,v),CALL GDWMN2(u,v),CALL GDWMN2(u,v)

It superimposes the picure of a man or of a woman, chosen among three different ones, with the same scale factors as the detector in the current drawing.

DHEAD [ isel name chrsiz ]

  ISEL       I    ``Option flag''  D=111110
  NAME       C    ``Title''  D=' '
  CHRSIZ     R    ``Character size (cm) of title NAME''  D=0.6

    CALL GDHEAD(isel,name,chrsiz)

ISEL =

    0      to have only the header lines
    xxxxx1 to add the text name centered on top of header
    xxxx1x to add global detector name (first volume) on left
    xxx1xx to add date on right
    xx1xxx to select thick characters for text on top of header
    x1xxxx to add the text 'EVENT NR x' on top of header
    1xxxxx to add the text 'RUN NR x' on top of header

NOTE that ISEL=x1xxx1 or ISEL=1xxxx1 are illegal choices, i.e. they generate overwritten text. NAME is the title and CHRSIZ the character size in cm of text name.

MEASURE

Position the cursor on the first point (u1,v1) and hit the space bar(GKS). Position the cursor on the second point (u2,v2) and hit the space bar(GKS). Clicking the left button of the mouse (X11) will have the same effect as hiting the space bar (GKS). The command will compute and print the distance in space separating the two points on the projection view. It can be useful to measure distances either between volumes or between tracks or hits.

PICK

Activates graphic input to identify detector elements in a cut view. Clicking on the left button of the mouse when the cursor is in a given point of the drawing and clicking again (outside the detector) will produce the following effect: a line joininig the two points will be drawn together with the name and the medium number of the volume picked with the first clicking close to the second point.

MOVE name [ nopt ]

  NAME       C    ``Volume name''  D=' '
  NOPT       C    ``S=sample mode,T=tracks,H=hits''  D=' '

Positioning some daughter volumes inside a 'mother', it can be important to check if overlaps between such volumes have occurred. Instead of putting the drawing in a view bank, zooming, and iterating the process for different viewing angles of the same detector, the MOVE facility has been developed (for machines running with X11): it is sufficient to draw a view of the volumes to be analysed (after setting the proper SEEN, COLO, etc. attributes) and then to enter 'MOVE' followed by the same 'NAME' used for the last command DRAW. The detector will appear in a panel with five buttons at the bottom: THETA, PHI, TRASL, ZOOM, OFF. Clicking on the left button of the mouse, when the cursor is inside the THETA area, will rotate the detector along the polar angle theta according to the backward-to-forward movement of the mouse (clicking up and down the left button if not in sample mode); clicking on the right button of the mouse will stop the rotation; clicking now on the left button of the mouse when inside the PHI area will activate a rotation along the polar angle phi. In the same way, activating the TRASL button, the detector can be translated in the u,v plane of the screen according to the 2D-movement of the mouse. Finally, activating the ZOOM button, the detector will be zoomed (or unzoomed) according to the backward-to-forward movement of the mouse. Clicking on the OFF button will return the control to the 'command mode'. The MOVE command will work also with hidden line removal and shading options (when SHAD is on the background will be black); moreover, if the volumes are clipped, exploded, shifted, etc., they will be 'MOVED' with these features as well. Tracks and hits of a previously stored physical event can be moved together with the detector, allowing a dynamical 3-D analysis of the simulated events. Clicking the central button of the mouse when a good view of the event is found, will stop any movement and the mouse will allow the normal picking capabilities first for the tracks and then for the hits. After clicking of the right button, the normal movement will restart to find another interesting view of the event and to iterate the process. The MOVE is also available in sample mode. The following commands will produce a drawing of a volume and then will give the control to the MOVE panel; try the following possibilities:

    EXAMPLE 1 -
    dopt hide off
    satt * seen -2
    draw NAME 40 40 0 10 10 .01 .01
    move NAME
    EXAMPLE 2 -
    dopt hide on
    satt * seen -2
    draw NAME 40 40 0 10 10 .01 .01
    move NAME
    EXAMPLE 3 -
    dopt shad on
    satt * colo 3
    satt * fill 2
    dopt edge off
    draw NAME 40 40 0 10 10 .01 .01
    move NAME

MOVE3D name [ theta phi psi u0 v0 su sv sz nopt ]

  NAME       C    ``Volume name''  D=' '
  THETA      R    ``Viewing angle theta (for 3D projection)''  D=40.
                  R=0.:180.
  PHI        R    ``Viewing angle phi (for 3D projection)''  D=40. R=0.:360.
  PSI        R    ``Viewing angle psi (for 2D rotation)''  D=0. R=0.:180.
  U0         R    ``U-coord. (horizontal) of volume origin''  D=10. R=0.:20.
  V0         R    ``V-coord. (vertical) of volume origin''  D=10. R=0.:20.
  SU         R    ``Scale factor for U-coord.''  D=0.01
  SV         R    ``Scale factor for V-coord.''  D=0.01
  SZ         R    ``Scale zoom factor''  D=1. R=0.1:10.
  NOPT       C    ``T=tracks,H=hits''  D=' ' R='T,H'

Same functionality of the command MOVE interfaced with MOTIF.

PERSP name distt [ samp ]

  NAME       C    ``Volume name''  D=' '
  DISTT      R    ``Volume distance from observer''  D=1000.
  SAMP       C    ``Control to the mouse''  D='OFF '

To control the perspective according to the variation of the distance between the observer and the object (if PROJ has the value PERS). If SAMP is ON the control of the distance is given via the mouse.

LENS knum [ ksam ]

  KNUM       I    ``View bank identifier''  D=1
  KSAM       C    ``Sample mode ''  D='OFF '

Interactive zooming for detectors and events when running with X-windows. Using this command, when showing the contents of a view bank, it is possible to click (left button) in two points of the drawing (which will represent the left upper corner and the right bottom corner of the part to be zoomed). After the second click a new 'window' will appear to fit the frame defined by the two clicks and it will show a zoomed view as seen from a lens with those dimensions. Clicking now the central button will translate the lens over the drawing, while clicking the right button will stop it. Moreover, clicking the left button of the mouse, the lens will increase (or decrease) its magnification power according to the backward-to-forward movement of the mouse. A click on the right button will stop this action and it is possible to restart the translation of the lens or, clicking on the right button again, to make the lens disappear. It is then possible to open another 'window-lens' with different dimensions. Thus, this command can be useful to scan detailed parts of a detector or to scan hits and showers for events. Clicking the right button when no lens is displayed will return the control to the 'command mode'. The LENS is also available in sample mode when KSAM is 'ON'. The following commands will fill a view bank and will allow to scan the detector and an event previously stored via the use of LENS (when running with X-windows):

    EXAMPLE -
    satt * seen 1
    dopen 1
    draw NAME 40 40 0 10 10 .01 .01
    dxyz 0
    dhits * * 0 0 .2
    dclose
    dsh 1
    lens 1 on

ZOOM [ zfu zfv isel uz0 vz0 u0 v0 ]

  ZFU        R    ``Zoom factor for U-coord. (horizontal)''  D=2.
  ZFV        R    ``Zoom factor for V-coord. (vertical)''  D=2.
  ISEL       I    ``Options''  D=1
  UZ0        R    ``U-coord. of the centre of zoom rectangle''  R=0.:20.
  VZ0        R    ``V-coord. of the centre of zoom rectangle''  R=0.:20.
  U0         R    ``U-coord. of the centre of resulting zoomed rectangle''
                  R=0.:20.
  V0         R    ``V-coord. of the centre of resulting zoomed rectangle''
                  R=0.:20.

    CALL GDZOOM(zfu,zfv,uz0,vz0,u0,v0)

This command sets the zoom parameters that will be used by subsequent calls to the drawing routines. Each zoom operation is always relative to the status of the current zoom parameters. The scale factors in u,v are respectively zfu,zfv. zfu=0 (or zfv=0) will act as a reset (i.e. unzoomed viewing). The zoom is computed around uz0,vz0 (user coordinates), and the resulting picture will be centered at u0,v0. The use of the space bar is replaced by the left button of the mouse running with X11: If isel=0 :

    1. position the cursor at (uz0,vz0)
    2. type the space bar (GKS)

(u0,v0 are chosen at centre of screen) If isel=1 :

    1. position the cursor at first corner of zoom rectangle
    2. type the space bar (GKS)
    3. position the cursor at second corner of zoom rectangle
    4. type the space bar (GKS)

(zfu,zfv are chosen according to the zoom rectangle; uz0,vz0 are chosen at the centre of the zoom rectangle; u0,v0 are chosen at centre of screen) If isel=2 :

    1. position the cursor at (uz0,vz0)
    2. type the space bar (GKS)
    3. position the cursor at (u0,v0)
    4. type the space bar (GKS)

If isel=1000+n and running with X-windows:

    1. n must be the identifier of an active view bank
    2. clicking on the left button of the mouse will display
       a zoomed view (computed around the cursor position) of
       the previous drawing in a new window
    3. it is now possible to iterate the zooming from the new window
    4. clicking on the right button will return the control to the
       main window
    5. clicking on the left button it is possible to open new windows
       zooming in other points of the detector
    6. clicking on the right button when the main window is active
       will return the control to the 'command mode'.

DXYZ [ itra ]

  ITRA       I    ``Track number''  D=0

    CALL GDXYZ(itra)

Draw tracks previously stored via GSXYZ.

KXYZ [ epsilo ]

  EPSILO     R    ``Delta angle''  D=0.25

    CALL GKXYZ(epsilo)

The picking of track points requires the JXYZ data structure and is repeated until the character typed is 'Q' or 'q' (GKS) or the right button of the mouse is clicked (X11). EPSILO is the delta angle used for picking; if EPSILO=0 there is no optimization performed and over all the track points the one nearest to the pick point is taken.

DPART [ itra isel size ]

  ITRA       I    ``Track number''  D=0
  ISEL       I    ``Option flag''  D=11
  SIZE       R    ``Character size (cm) for particle names''  D=0.25

    CALL GDPART(itra,isel,size)
    isel=x1 to draw the track number
    isel=1x to draw the particle name

DHITS [ iuset iudet itra isymb ssymb ]

  IUSET      C    ``User set identifier''  D='*'
  IUDET      C    ``User detector identifier''  D='*'
  ITRA       I    ``Number of the selected track''  D=0
  ISYMB      I    ``Character selection number''  D=0
  SSYMB      R    ``Size of characters (cm)''  D=0.1

CALL GDHITS(iuset,iudet,itra,isymb,ssymb). The character plotted at each hit point may be chosen by isymb :

         -1   (small) hardware points             (fast)
          0   software crosses                    (default)
      840,850   empty/full circles                  (slow)
      841,851   empty/full squares                  (slow)
      842,852   empty/full triangles (up)           (slow)
      843,853   empty diamond/full triangle (down)  (slow)
      844,854   empty/full stars                    (slow)

Except for isymb=-1, the size of the character on the screen can be chosen by SSYMB cm. The hit colour will follow the value of TXCI (text colour) for isymb>0, the value of PMCI (polymarkers colour) for isymb<0, the value of PLCI (polyline colour) for isymb=0.

KHITS [ iuset iudet epsilo ]

  IUSET      C    ``User set identifier''  D='*'
  IUDET      C    ``User detector identifier''  D='*'
  EPSILO     R    ``Pick aperture''  D=0.1

    CALL GKHITS(iuset,iudet,epsilo)

The picking of hit points requires the appropriate JSET data structure have been filled and is repeated until the character typed is 'Q' or 'q' (GKS) or the right button of the mouse is clicked (X11). If the character typed to pick is 'K' or 'k' then the kinematics of the corresponding track is also printed. The search is made of all the hits of all tracks in detector IUDET of set IUSET. EPSILO is the pick aperture; if EPSILO<0 its absolute value is taken and in addition the pick aperture is drawn; if EPSILO=0 there is an infinite pick aperture and over all the hits the one nearest to the pick point is taken.

DCHIT [ iuset iudet itra isymb sizmax ihit hitmin hitmax ]

  IUSET      C    ``User set identifier''  D='*'
  IUDET      C    ``User detector identifier''  D='*'
  ITRA       I    ``Number of the selected track''  D=0
  ISYMB      I    ``Character selection number''  D=0
  SIZMAX     R    ``Maximum character size (cm)''  D=1
  IHIT       I    ``Index of array HITS''  D=4
  HITMIN     R    ``Lower boundary of HITS(IHIT)''  D=0
  HITMAX     R    ``Upper boundary of HITS(IHIT)''  D=0

    CALL GDCHIT(iuset,iudet,itra,isymb,sizmax,ihit,hitmin,hitmax)

The character plotted at each hit point may be chosen via CSYMB; isymb is composed as:

         -1   (small) hardware points             (fast)
          0   software crosses                    (default)
    840,850   empty/full circles                  (slow)
    841,851   empty/full squares                  (slow)
    842,852   empty/full triangles (up)           (slow)
    843,853   empty diamond/full triangle (down)  (slow)
    844,854   empty/full stars                    (slow)

Except for isymb=-1 the SIZE of the character on the screen is a function of HITS(IHIT), the array containing the calorimeter quantity, with HITMIN and HITMAX defining its range. The maximum character size (used in overflow) is SIZMAX.

    SIZE = SIZMAX * ( HITS(IHIT) - HITMIN ) / HITMAX

DUVIEW name type cpxtyp [ iview ]

  NAME       C    ``Detector name''
  TYPE       C    ``View name''
  CPXTYP     C    ``Complexity name''
  IVIEW      I    ``View number where picture is stored''  D=0

    CALL GUVIEW(name,type,cpxtyp,iview)

GRAPHICSCONTROL

Graphics control commands.

METAFILE [ lun metafl chmeta ]

  LUN        I    ``Logical unit number''  D=0
  METAFL     I    ``Metafile ID''  D=0
  CHMETA     C    ``Metafile name''  D=' '

Set the metafile logical unit and metafile type. This command controls the destination of the subsequent graphics output. Example:

    LUN =-10 output only on metafile opened on unit 10;
    LUN =  0 output only on screen;
    LUN = 10 output on both screen and metafile opened on unit 10;

The procedure to open a metafile with a given name is dependent on the graphics package used. For packages using FORTRAN I/O the command FORTRAN/FILE to open a new file and FORTRAN/CLOSE to close it should be used. For the others, the metafile name should be given as third argument in the METAFILE command.

    METAFL=   4 Appendix E GKS.
    METAFL=-111 HIGZ/PostScript (Portrait).
    METAFL=-112 HIGZ/PostScript (Landscape).
    METAFL=-113 HIGZ/Encapsulated PostScript.
    METAFL=-114 HIGZ/PostScript Color (Portrait).
    METAFL=-115 HIGZ/PostScript Color (Landscape).
    METAFL=-777 HIGZ/LaTex Encapsulated.
    METAFL=-778 HIGZ/LaTex.

DOPEN iview

  IVIEW      I    ``View number''

    CALL GDOPEN(iview)

When a drawing is very complex and requires a long time to be executed, it can be useful to store it in a view bank: after a call to DOPEN and the execution of the drawing (nothing will appear on the screen), and after a necessary call to DCLOSE, the contents of the bank can be displayed in a very fast way through a call to DSHOW; therefore, the detector can be easily zoomed many times in different ways. Please note that the pictures with solid colours can now be stored in a view bank or in 'PICTURE FILES'.

DSHOW [ iview ]

  IVIEW      I    ``View number''

    CALL GDSHOW(iview)

It shows on the screen the contents of a view bank. It can be called after a view bank has been closed.

DELETE iview

  IVIEW      I    ``View number''

    CALL GDELET(iview)

It deletes a view bank from memory.

DCLOSE

    CALL GDCLOS

It closes the currently open view bank; it must be called after the end of the drawing to be stored.

CHANGEWK

CALL GCHNWK It open a new workstation (if not already opened) and activate it (deactivating the default one).

RESETWK

CALL GRESWK It deactivate the previosly activated workstation and reactivate the default one.

SSETAT iopt

  IOPT       C    ``Attribute name''

Set current attribute.

SSETVA [ rval ]

  RVAL       R    ``Attribute value''  D=1. R=-10.:10.

Set current attribute value.

SATT [ name iopt ival ]

  NAME       C    ``Volume name''  D='* '
  IOPT       C    ``Name of the attribute to be set''  D='DEFA'
  IVAL       I    ``Value to which the attribute is to be set''  D=10000

    CALL GSATT(name,iopt,ival)

name='*' stands for all the volumes. iopt can be chosen among the following :

    'WORK'   0=volume name is inactive for the tracking
             1=volume name is active for the tracking (default)
    'SEEN'   0=volume name is invisible
             1=volume name is visible (default)
            -1=volume invisible with all its descendants in the tree
            -2=volume visible but not its descendants in the tree
    'LSTY'   line style 1,2,3,... (default=1)
             LSTY=7 will produce a very precise approximation for
             revolution bodies.
    'LWID'   line width -7,...,1,2,3,..7 (default=1)
             LWID<0 will act as abs(LWID) was set for the volume
             and for all the levels below it. When SHAD is 'ON', LWID
             represent the linewidth of the scan lines filling the surfaces
             (whereas the FILL value represent their number). Therefore
             tuning this parameter will help to obtain the desired
             quality/performance ratio.
    'COLO'   colour code -166,...,1,2,..166 (default=1)
             n=1=black
             n=2=red;    n=17+m, m=0,25, increasing luminosity according to
   'm';
             n=3=green;  n=67+m, m=0,25, increasing luminosity according to
   'm';
             n=4=blue;   n=117+m, m=0,25, increasing luminosity according to
   'm';
             n=5=yellow; n=42+m, m=0,25, increasing luminosity according to
   'm';
             n=6=violet; n=142+m, m=0,25, increasing luminosity according to
   'm';
             n=7=lightblue; n=92+m, m=0,25, increasing luminosity according to
   'm';
             colour=n*10+m, m=1,2,...9, will produce the same colour
             as 'n', but with increasing luminosity according to 'm';
             COLO<0 will act as if abs(COLO) was set for the volume
             and for all the levels below it.
             When for a volume the attribute FILL is > 1 (and the
             option SHAD is on), the ABS of its colour code must be < 8
             because an automatic shading of its faces will be
             performed.
    'FILL'   (1992) fill area  -7,...,0,1,...7 (default=0)
             when option SHAD is 'on' the FILL attribute of any
             volume can be set different from 0 (normal drawing);
             if it is set to 1, the faces of such volume will be filled
             with solid colours; if ABS(FILL) is > 1, then a light
             source is placed along the observer line, and the faces of
             such volumes will be painted by colours whose luminosity
             will depend on the amount of light reflected;
             if ABS(FILL) = 1, then it is possible to use all the 166
             colours of the colour table, becouse the automatic shading
             is not performed;
             for increasing values of FILL the drawing will be performed
             with higher and higher resolution improving the quality (the
             number of scan lines used to fill the faces increases with FILL);
             it is possible to set different values of FILL
             for different volumes, in order to optimize at the same time
             the performance and the quality of the picture;
             FILL<0 will act as if abs(FILL) was set for the volume
             and for all the levels below it.
             This kind of drawing can be saved in 'picture files'
             or in view banks.
             0=drawing without fill area
             1=faces filled with solid colours and resolution = 6
             2=lowest resolution (very fast)
             3=default resolution
             4=.................
             5=.................
             6=.................
             7=max resolution
             Finally, if a coloured background is desired, the FILL
             attribute for the first volume of the tree must be set
             equal to -abs(colo), colo being >0 and <166.
    'SET '   set number associated to volume name
    'DET '   detector number associated to volume name
    'DTYP'   detector type (1,2)

SCALE gscu gscv

  GSCU       R    ``Scale factor for U-coord.''
  GSCV       R    ``Scale factor for V-coord.''

Change the scale factors GSCU and GSCV in /GCDRAW/.

COLOR icol

  ICOL       I    ``Colour code''  D=1

    CALL GDCOL(-abs(icol))

LWID lwidth

  LWIDTH     I    ``Line width code''  D=1

    CALL GDLW(-abs(lwidth))

NEXT

Clear screen (start a new picture on graphics file, if opened).

DOPT [ iopt ival ]

  IOPT       C    ``Option name''  D='*'
  IVAL       C    ``Option value''  D='*'

    CALL GDOPT(iopt,ival)
To set/modify the drawing options.

      IOPT   IVAL      Action
      THRZ    ON       Draw tracks in R vs Z
              OFF (D)  Draw tracks in X,Y,Z
              180
              360
      PROJ    PARA (D) Parallel projection
              PERS     Perspective
      TRAK    LINE (D) Trajectory drawn with lines
              POIN       " " with markers
      HIDE    ON       Hidden line removal using the CG package
              OFF (D)  No hidden line removal
      SHAD    ON       Fill area and shading of surfaces.
              OFF (D)  Normal hidden line removal.
      EDGE    OFF      Does not draw contours when shad is on.
              ON  (D)  Normal shading.

SIZE [ xsize ysize ]

  XSIZE      R    ``Size along X''  D=20.
  YSIZE      R    ``Size along Y''  D=20.

Set the size of the picture. On the terminal, the pictures will have the ratio YSIZE/XSIZE, and, if a metafile is produced, pictures will be YSIZE by XSIZE cm. This command sets the parameters for the normalisation transformation number 1 to [0-XSIZE], [0-YSIZE].

SPERS dpers

  DPERS      R    ``Distance from the origin''

Set the variable dpers in /GCDRAW/, representing the distance from the origin when using option PERSpective.

MAP_COLOR [ icadd icval ]

  ICADD      I    ``Colour table index''  D=0
  ICVAL      I    ``Colour table value''  D=0

Sets the color table LOOKTB(ICADD)=ICVAL. If ICADD=0 then LOOKTB(1:16) is taken. If ICVAL is omitted the current value of LOOKTB(ICADD) is shown.

GEOMETRY

Geometry commands.

SVOLU name shape numed npar par

  NAME       C    ``Volume name''
  SHAPE      C    ``Volume type''
  NUMED      I    ``Tracking medium number''
  NPAR       I    ``Number of shape parameters''
  PAR        C    ``Vector containing shape parameters''

    CALL GSVOLU(name,shape,numed,par,npar,ivolu)

where par is a KUIP vector. It creates a new volume in the JVOLUM data structure.

SPOS name number mother x0 y0 z0 irot only

  NAME       C    ``Volume name''
  NUMBER     I    ``Copy number of the volume''
  MOTHER     C    ``Mother volume name''
  X0         R    ``X coord. of the volume in mother ref. sys.''
  Y0         R    ``Y coord. of the volume in mother ref. sys.''
  Z0         R    ``Z coord. of the volume in mother ref. sys.''
  IROT       I    ``Rotation matrix number w.r.t. mother ref. sys.''
  ONLY       C    ``ONLY/MANY flag''

    CALL GSPOS(name,number,mother,x0,y0,z0,irot,only)

It positions a previously defined volume in the mother.

SDVN name mother ndiv caxis

  NAME       C    ``Volume name''
  MOTHER     C    ``Mother volume name''
  NDIV       I    ``Number of divisions''
  CAXIS      C    ``Axis value''  R='X,Y,Z,1,2,3'

    CALL GSDVN(name,mother,ndiv,iaxis)

X,Y,Z of CAXIS will be translated to 1,2,3 for IAXIS. It divides a previously defined volume.

PVOLU numb

  NUMB       I    ``Volume ID''

    CALL GPVOLU(numb)

Prints volumes' specifications.

SROTM irot theta1 phi1 theta2 phi2 theta3 phi3

  IROT       I    ``Rotation matrix number''
  THETA1     R    ``Polar angle for axis I''  R=0.,180.
  PHI1       R    ``Azimuthal angle for axis I''  R=0.:360.
  THETA2     R    ``Polar angle for axis II''  R=0.,180.
  PHI2       R    ``Azimuthal angle for axis II''  R=0.:360.
  THETA3     R    ``Polar angle for axis III''  R=0.,180.
  PHI3       R    ``Azimuthal angle for axis III''  R=0.:360.

    CALL GSROTM(irot,theta1,phi1,theta2,phi2,theta3,phi3)

It defines the rotation matrix number IROT.

PROTM numb

  NUMB       I    ``Matrix ID''

    CALL GPROTM(numb)

Print matrixes' specifications.

STMED ntmed name nmat isvol ifield fieldm tmaxfd stemax deemax epsil stmin

  NTMED      I    ``Tracking medium number''  D=1
  NAME       C    ``Tracking medium name''
  NMAT       I    ``Material number''  D=1
  ISVOL      I    ``Sensitive volume flag''  D=0
  IFIELD     I    ``Magnetic field''  D=0
  FIELDM     R    ``Max. field value (Kilogauss)''  D=0
  TMAXFD     R    ``Max. angle due to field (deg/step)''  D=0.01
  STEMAX     R    ``Max. step allowed''  D=1.E+10
  DEEMAX     R    ``Max. fraction of energy lost in a step''  D=0.01
  EPSIL      R    ``Tracking precision (cm)''  D=0.01
  STMIN      R    ``Min. step due to continuos processes (cm)''  D=0.1

         CALL GSTMED(ntmed,name,nmat,isvol,ifield,fieldm,tmaxfd,
        +            stemax,deemax,epsil,stmin,0,0)

IFIELD = 0 if no magnetic field; IFIELD = -1 if user decision in GUSWIM; IFIELD = 1 if tracking performed with GRKUTA; IFIELD = 2 if tracking performed with GHELIX; IFIELD = 3 if tracking performed with GHELX3.

PTMED numb

  NUMB       I    ``Medium ID''

    CALL GPTMED(numb)

Print tracking media's specifications.

EDITV [ isel name ]

  ISEL       I    ``Options''  D=0
  NAME       C    ``Volume name''  D=' '

    CALL GEDITV(isel,name)

When the routine prompts for input parameters that do not need to be changed, type return. ISEL is used to select the editing operation to be performed:

    ISEL=0, CALL GGCLOS
    ISEL=1, to modify shape parameters PAR given by GSVOLU
    ISEL=2, to modify NAME given by GSVOLU
    ISEL=3, to delete NAME given by GSVOLU
    ISEL=4, to unlink NAME,NR given by GSPOS/GSDVN/GSDV..
    ISEL=5, to modify X0,Y0,Z0 of NAME,NR given by GSPOS
    ISEL=6, to modify IROT of NAME,NR given by GSPOS
    ISEL=7, to modify NDIV given by GSDVN
    ISEL=8, to modify IAXIS given by GSDVN

CREATE

It creates volumes of the given shape interactively. CALL GSVOLU(name,shape,numed,par,npar,ivolu) where par is a KUIP vector

BOX name numed halfx halfy halfz [ yesno ]

  NAME       C    ``Volume name''
  NUMED      I    ``Tracking medium number''
  HALFX      R    ``Half X length''
  HALFY      R    ``Half Y length''
  HALFZ      R    ``Half Z length''
  YESNO      C    ``GSPOSP option''  D='NO' R='YES,NO'

TRD1 name numed hlfdwx hlfupx halfy halfz [ yesno ]

  NAME       C    ``Volume name''
  NUMED      I    ``Tracking medium number''
  HLFDWX     R    ``Half X length in Lower Z Surface''
  HLFUPX     R    ``Half X length in Upper Z Surface''
  HALFY      R    ``Half Y length''
  HALFZ      R    ``Half Z length''
  YESNO      C    ``GSPOSP option''  D='NO' R='YES,NO'

TRD2 name numed hlfdwx hlfupx hlfdwy hlfupy halfz [ yesno ]

  NAME       C    ``Volume name''
  NUMED      I    ``Tracking medium number''
  HLFDWX     R    ``Half X length in Lower Z Surface''
  HLFUPX     R    ``Half X length in Upper Z Surface''
  HLFDWY     R    ``Half Y length in Lower Z Surface''
  HLFUPY     R    ``Half Y length in Upper Z Surface''
  HALFZ      R    ``Half Z length''
  YESNO      C    ``GSPOSP option''  D='NO' R='YES,NO'

TUBE name numed inrad outrad halfz [ yesno ]

  NAME       C    ``Volume name''
  NUMED      I    ``Tracking medium number''
  INRAD      R    ``Inside Radius''
  OUTRAD     R    ``Outside Radius''
  HALFZ      R    ``Half Z length''
  YESNO      C    ``GSPOSP option''  D='NO' R='YES,NO'

TUBS name numed inrad outrad halfz sphi ephi [ yesno ]

  NAME       C    ``Volume name''
  NUMED      I    ``Tracking medium number''
  INRAD      R    ``Inside Radius''
  OUTRAD     R    ``Outside Radius''
  HALFZ      R    ``Half Z length''
  SPHI       R    ``Start of section PHI''  R=0.:360.
  EPHI       R    ``End of section PHI''  R=0.:360.
  YESNO      C    ``GSPOSP option''  D='NO' R='YES,NO'

CONE name numed inrdw outrdw inrup outrup halfz [ yesno ]

  NAME       C    ``Volume name''
  NUMED      I    ``Tracking medium number''
  INRDW      R    ``Inside Radius in Lower Z Surface''
  OUTRDW     R    ``Outside Radius in Lower Z Surface''
  INRUP      R    ``Inside Radius in Upper Z Surface''
  OUTRUP     R    ``Outside Radius in Upper Z Surface''
  HALFZ      R    ``Half Z length''
  YESNO      C    ``GSPOSP option''  D='NO' R='YES,NO'

CONS name numed inrdw outrdw inrup outrup halfz sphi ephi [ yesno ]

  NAME       C    ``Volume name''
  NUMED      I    ``Tracking medium number''
  INRDW      R    ``Inside Radius in Lower Z Surface''
  OUTRDW     R    ``Outside Radius in Lower Z Surface''
  INRUP      R    ``Inside Radius in Upper Z Surface''
  OUTRUP     R    ``Outside Radius in Upper Z Surface''
  HALFZ      R    ``Half Z length''
  SPHI       R    ``Start of section PHI''  R=0.:360.
  EPHI       R    ``End of section PHI''  R=0.:360.
  YESNO      C    ``GSPOSP option''  D='NO' R='YES,NO'

SPHE name numed inrad outrad sphi ephi stheta etheta [ yesno ]

  NAME       C    ``Volume name''
  NUMED      I    ``Tracking medium number''
  INRAD      R    ``Inside Radius''
  OUTRAD     R    ``Outside Radius''
  SPHI       R    ``Start of section PHI''  R=0.:360.
  EPHI       R    ``End of section PHI''  R=0.:360.
  STHETA     R    ``Start of section THETA''
  ETHETA     R    ``End of section THETA''
  YESNO      C    ``GSPOSP option''  D='NO' R='YES,NO'

PARA name numed halfx halfy halfz axis phi theta [ yesno ]

  NAME       C    ``Volume name''
  NUMED      I    ``Tracking medium number''
  HALFX      R    ``Half X length''
  HALFY      R    ``Half Y length''
  HALFZ      R    ``Half Z length''
  AXIS       R    ``Angle of Y mid-faces segment to Y axis''  R=0.:360.
  PHI        R    ``PHI angle of Low Z mid-face to High Z mid-face segment''
                  R=0.:360.
  THETA      R    ``THETA angle of mid-low-Z-face to mid-high-Z-face
                  segment''  R=0.:360.
  YESNO      C    ``GSPOSP option''  D='NO' R='YES,NO'

CONTROL

Control commands.

KINE ikine [ pkine1 pkine2 pkine3 pkine4 pkine5 pkine6 pkine7 pkine8 pkine9 pkine10 ]

  IKINE      I    ``IKINE''  D=1
  PKINE1     R    ``PKINE(1)''
  PKINE2     R    ``PKINE(2)''
  PKINE3     R    ``PKINE(3)''
  PKINE4     R    ``PKINE(4)''
  PKINE5     R    ``PKINE(5)''
  PKINE6     R    ``PKINE(6)''
  PKINE7     R    ``PKINE(7)''
  PKINE8     R    ``PKINE(8)''
  PKINE9     R    ``PKINE(9)''
  PKINE10    R    ``PKINE(10)''

Set the variables in /GCFLAG/ IKINE, PKINE(10)

PATR [ njtmax njtmin ]

  NJTMAX     I    ``NJTMAX''  D=2000
  NJTMIN     I    ``NJTMIN''  D=1900

To activate the option parallel tracking.

TRACK

Restart tracking, clearing the track and hit banks, but keeping the kinematics.

TRIGGER [ n ]

  N          I    ``Number of events''  D=1

Start one or more new events.

RNDM [ iseed1 iseed2 ]

  ISEED1     I    ``First seed for the random number generator''
  ISEED2     I    ``Second seed for the random number generator''

Set the seeds for the random number generator. If no numbers are given, the currents seeds are printed.

SWITCH iswi ival

  ISWI       I    ``Switch number''
  IVAL       I    ``New switch value''

Change one element of array ISWIT(10) in /GCFLAG/

MZLOGL level

  LEVEL      I    ``MZ log level''  D=0

Set the log level for the MZ package of ZEBRA: CALL MZLOGL(0,level)

    LEVEL = -3   no messages at all
            -2   error messages only
            -1   terse logging
             0   normal
            +1   log rare events
            +2   log calls to MZ routines

PRINT name number

  NAME       C    ``Name''
  NUMBER     I    ``Number''  D=0

    CALL GPRINT(name,number)

OUTPUT_LP lout

  LOUT       I    ``New output unit''

To change lout in /GCUNIT/ Note: unit numbers 5,11,12,13,14,15 are reserved and cannot be used.

PHITS [ iuset iudet ]

  IUSET      C    ``User set''  D='*'
  IUDET      C    ``User detector''  D='*'
    CALL GPHITS(iuset,iudet)

PDIGI [ iuset iudet ]

  IUSET      C    ``User set''  D='*'
  IUDET      C    ``User detector''  D='*'

    CALL GPDIGI(iuset,iudet)

SMATE imat namate a z dens radl absl ubuf nwbuf

  IMAT       I    ``Material number''
  NAMATE     C    ``Material name''
  A          R    ``Atomic weight''
  Z          R    ``Atomic number''
  DENS       R    ``Density''
  RADL       R    ``Radiation lenght''
  ABSL       R    ``Absorption lenght''
  UBUF       R    `` ''
  NWBUF      I    `` ''

    CALL GSMATE(imat,namate,a,z,dens,radl,absl,ubuf,nwbuf)

SMIXT imat namate a z dens nlmat wmat

  IMAT       I    ``Material number''
  NAMATE     C    ``Material name''
  A          R    ``Atomic weight''
  Z          R    ``Atomic number''
  DENS       R    ``Density''
  NLMAT      I    ``Flag for WMAT''
  WMAT       R    ``Relative weights or n. of atoms in molecule''

    CALL GSMIXT(imat,namate,a,z,dens,nlmat,wmat)

PMATE numb

  NUMB       I    ``Material number''

    CALL GPMATE(numb)

PRMAT imate ipart mecan

  IMATE      I    ``Material number''
  IPART      I    ``Particle number''
  MECAN      C    ``Mechanism''

    CALL GPRMAT(imate,ipart,mecan,nekbin,elow)

PLMAT imate ipart mecan [ idm ]

  IMATE      I    ``Material number''
  IPART      I    ``Particle number''
  MECAN      C    ``Mechanism''
  IDM        I    ``ID mode option''  D=0

CALL GPLMAT(imate,ipart,mecan,nekbin,elow,idm)

    If MECAN = 'ALLG' the graphical option is selected
    IDM convention for histogramming mode :
    IDM.gt.0  fill, print,   keep   histogram(s)
    IDM.eq.0  fill, print,   delete histogram(s)
    IDM.lt.0  fill, noprint, keep   histogram(s)

STPAR itmed chpar parval

  ITMED      I    ``Medium number''
  CHPAR      C    ``Cut or mechanism''
  PARVAL     R    ``Value''

CALL GSTPAR(itmed,chpar,parval)

SPART ipart napart itrtyp amass charge tlife ubuf nwbuf bratio mode

  IPART      I    ``Particle number''
  NAPART     C    ``Particle name''
  ITRTYP     I    `` ''
  AMASS      R    ``Mass''
  CHARGE     R    ``Charge''
  TLIFE      R    ``Lifetime''
  UBUF       R    `` ''
  NWBUF      I    `` ''
  BRATIO     R    ``Branching ratios''
  MODE       I    ``Decay mode''

CALL GSPART(ipart,napart,itrtyp,amass,charge,tlife,ubuf,nwbuf); CALL GSDK(ipart,bratio,mode)

PPART numb

  NUMB       I    ``Particle number''

CALL GPPART(numb)

PRKINE numb

  NUMB       I    ``Track number''

CALL GPKINE(numb)

DEBUG [ ideb ]

  IDEB       C    ``Debug option''  D='ON' R='ON,OFF'

If ideb='ON ' then :

    idebug=1, idemin=1, idemax=1000000, itime=1

else :

    idebug=0, idemin=0, idemax=0

RZ

ZEBRA/RZ commands.

PQUEST [ iq1 iq2 ]

  IQ1        I    ``Lower limit for IQ index''  D=1
  IQ2        I    ``Upper limit for IQ index''  D=20

Print the array IQUEST in /QUEST/.

FILE lun fname [ chopt ]

  LUN        I    ``Logical unit number''
  FNAME      C    ``File name''
  CHOPT      C    ``Options''  D=' '

Possible CHOPT values are:

  A
  N
  U

Open a GRZ file.

    CHOPT=' ' readonly mode
    CHOPT='U' update mode
    CHOPT='N' create new file
    CHOPT='I' Read all structures from existing file
    CHOPT='O' Write all structures on file

REND lunrz

  LUNRZ      I    ``Logical unit number''

Close an RZ file opened by GRFILE on logical unit LUNRZ.

    CALL GREND(LUNRZ)

MDIR chdir [ chopt ]

  CHDIR      C    ``Directory name''
  CHOPT      C    ``Options''  D=' '

To create a new RZ directory below the current directory. with

    RZTAGS(1)='Object'
    RZTAGS(2)='Idvers-NR '

CDIR [ chpath chopt ]

  CHPATH     C    ``Path name''  D=' '
  CHOPT      C    ``CHOPT''  D=' '

Change or print the current directory.

    Ex.  CD dir1         ; make DIR1 the new CWD
         CD //file1/dir2 ; make //FILE1/DIR2 the new CWD
         CD              ; print the name of the CWD

IN object [ idvers chopt ]

  OBJECT     C    ``Structure name''
  IDVERS     I    ``Version number''  D=1
  CHOPT      C    ``Option''  D=' '

Read data structure identified by OBJECT,IDVERS into memory.

     MATE read JMATE structure
     TMED read JTMED structure
     VOLU read JVOLUM structure
     ROTM read JROTM structure
     SETS read JSET  structure
     PART read JPART structure
     SCAN read LSCAN structure
     INIT read all above data structures

OUT object [ idvers chopt ]

  OBJECT     C    ``Structure name''
  IDVERS     I    ``Version number''  D=1
  CHOPT      C    ``Option''  D=' '
Write data structure identified by OBJECT,IDVERS to RZ file.

     MATE write JMATE structure
     TMED write JTMED structure
     VOLU write JVOLUM structure
     ROTM write JROTM structure
     SETS write JSET  structure
     PART write JPART structure
     SCAN write LSCAN structure
     INIT write all above data structures

LDIR [ chpath chopt ]

  CHPATH     C    ``Path name''  D=' '
  CHOPT      C    ``CHOPT''  D=' '

List the contents of a directory (memory or disk). To list all RZ files currently open, type 'LD //'.

PURGE [ nkeep ]

  NKEEP      I    ``Number of cycles to keep''  D=1

Purge an RZ directory.

SCR object [ idvers ]

  OBJECT     C    ``Structure name''
  IDVERS     I    ``Version number''  D=1

Delete entry identified by OBJECT,IDVERS on RZ file. OBJECT may be : MATE,TMED,VOLU,ROTM,SETS,PART,SCAN, * If OBJECT= * delete all entries with IDVERS.

LOCK chdir

  CHDIR      C    ``Lock identifier''  D='RZFILE'

Lock an RZ directory.

FREE chdir

  CHDIR      C    ``Lock identifier''  D='RZFILE'

Free an RZ directory.

FZ

ZEBRA/FZ commands

FZIN lun keysu [ ident ]

  LUN        I    ``Fortran unit of the FZ file''
  KEYSU      C    ``Name of the data structure to be retrieved''
  IDENT      I    ``Version of the data structure to be retrieved''  D=0

Equivalent to a call to:

          CALL GFIN(LUN,KEYSU,1,IDENT,' ',IER)

FZOPEN lun file luntyp len [ chopt ]

  LUN        I    ``Fortran unit with which to open the file''
  FILE       C    ``Name of the file to be opened''
  LUNTYP     C    ``Type of FZ file to be opened by GOPEN''  D='XI'
  LEN        I    ``Recordlenght of the file''  D=0
  CHOPT      C    ``Optional parameter to specify the action''  D=' '

Equivalent to a call to:

          CALL GOPEN(LUN,FILE,LUNTYP,LEN,IER)

If CHOPT = I then a call to GFIN or GFOUT will be performed in addition according to the value of LUNTYP, with the key INIT to save or retrieve the whole initialization data structure.

FZOUT lun keysu [ ident ]

  LUN        I    ``Fortran unit of the FZ file''
  KEYSU      C    ``Name of the data structure to be saved''
  IDENT      I    ``Version of the data structure to be saved''  D=1

Equivalent to a call to:

          CALL GFOUT(LUN,KEYSU,1,IDENT,' ',IER)

FZCLOSE lun

  LUN        I    ``Fortran unit of the FZ to close''

Equivalent to a call to:

          CALL GCLOSE(LUN,IER)

DZ

SURV name [ number ]

  NAME       C    ``Bank name''
  NUMBER     I    ``Bank number''  D=1

Print a survey of the structure identified by NAME, NUMBER.

SHOW name [ number chopt ]

  NAME       C    ``Bank name''
  NUMBER     I    ``Bank number''  D=1
  CHOPT      C    ``Options''  D='BSV'

Display the contents of a bank or a data structure identified by its NAME and NUMBER. The output format of the data part is controlled by the internal or external I/O characteristic.

    CHOPT='B' Print the bank.
    CHOPT='S' Print the bank contents from left to right Sideways
              with up to ten elements per line.
    CHOPT='V' Print the vertical (down) structure.
    CHOPT='D' Print the bank contents from top to bottom Downwards
              with five elements per line.
    CHOPT='L' Print the linear structure.
    CHOPT='Z' Print the data part of each bank in hexadecimal format

SNAP [ idiv chopt ]

  IDIV       I    ``Division number ''  D=2 R=0:24
  CHOPT      C    ``Options''  D='M'

Snap of one or more divisions. Provides a snapshot of one or more divisions in a ZEBRA store. The kind of information provided is controlled by CHOPT.

    CHOPT='M' Print Map entry for each bank
    CHOPT='E' Extend map entry to dump all links of each bank
              (otherwise only as many links as will fit on a line)
    CHOPT='F' Full. Dump all active banks, links and data
    CHOPT='K' Kill. Dropped banks to be treated as active
              (dropped banks are not normally dumped under D or F option)
    CHOPT='L' Dump all Link areas associated with the store
    CHOPT='W' Dump the Working space, links and data
    CHOPT='Z' Dump the information in hexadecimal.

VERIFY [ idiv chopt ]

  IDIV       I    ``Division number ''  D=0 R=0:24
  CHOPT      C    ``Options''  D='CLSU'

Check the structure of one or more ZEBRA divisions. The verification detail depends on the settings in CHOPT.

    CHOPT='C' Check chaining of banks only
    CHOPT='L' Check validity of the structural links (implies 'C')
    CHOPT='S' Check the store parameters
    CHOPT='U' Check the validity of the up and origin (implies 'C')
    CHOPT='F' Errors are considered fatal and generate a call to ZFATAL

STORE [ ixstor ]

  IXSTOR     I    ``Store number''  D=0 R=0:24

Display the structure of the ZEBRA store IXSTOR. Output the parameters characterizing the store, followed by a list of all divisions and all link areas associated with the store in question.

DDIV [ idiv path ]

  IDIV       I    ``Division number''  D=2
  PATH       C    ``Name of the doc file''  D=' '

Facility to display the layout of stores and divisions.

    CALL DZDDIV(idiv,LDUMMY,path,'IN',1,0,1,IWTYPE)

DISP bank [ path number ]

  BANK       C    ``Name of the bank''
  PATH       C    ``Name of the doc file''  D=' '
  NUMBER     I    ``Number of the bank''  D=1

Interactive bank display tool.

    CALL DZDISP(IXSTOR,LBANK,path,'N',1,0,1,IWTYPE)

DIRZ [ path ]

  PATH       C    ``Name of the RZ file''

Facility to display RZ directory trees.

    CALL DZDIRZ(0,LDUMMY,1,path,'AN',1,0,1)

SCAN

To define parameters for the SCAN geometry. If the routine GUSTEP and GUKINE are properly instrumented (see examples in GEANX), when the TRI command is entered NTETA Geantinos will be tracked through the real detector starting at the vertex position defined by the command vertex. A simplified version of the geometry is automatically generated in (ETA,PHI) or (THETA,PHI) following the option given in the command TETA. The data structure LSCAN generated may be saved on an RZ file for subsequent processing. This data structure may be used for fast parametrization techniques.

PHI nphi [ phimin phimax ]

  NPHI       I    ``Number of PHI divisions''  D=90
  PHIMIN     R    ``Minimum PHI in degrees''  D=0. R=0.:360.
  PHIMAX     R    ``Maximum PHI in degrees''  D=360. R=0.:360.

To specify number of divisions along PHI. If no parameter is given, the current values of the parameters are displayed.

TETA nteta [ tetmin tetmax divtyp ]

  NTETA      I    ``Number of TETA divisions''  D=90
  TETMIN     R    ``Minimum value of TETA''
  TETMAX     R    ``Maximum value of TETA''
  DIVTYP     I    ``Type of TETA division''  R=1:3

To specify number of divisions along TETA. If DIVTYP=1 divisions in pseudo-rapidity ETA. If DIVTYP=2 divisions in degrees following the THETA angle. If DIVTYP=3 divisions in cos(TETA). If no parameter is given, the current values of the parameters are displayed.

SLIST list

  LIST       C    ``List of master volumes''

Only boundary crossings of volumes given in LIST will be seen in the SCAN geometry. If no parameters are given, the current SCAN volumes will be listed. If a full stop (.) is given, the list of scan volumes will be erased.

VERTEX vx vy vz

  VX         R    ``Scan X-origin''  D=0.
  VY         R    ``Scan Y-origin''  D=0.
  VZ         R    ``Scan Z-origin''  D=0.

All Geantinos tracked will start from position VX,VY,VZ.

SFACTORS factx0 factl factr

  FACTX0     R    ``Scale factor for SX0''  D=100.
  FACTL      R    ``Scale factor for SL''  D=1000.
  FACTR      R    ``Scale factor for R''  D=100.

Set scale factors for SX0,SL and R. The given scale factors must be such that:

     SX0*FACTX0 < 2**15-1 (32767)
     SL*FACTL   < 2**10-1 (1023)
     SR*FACTR   < 2**17-1 (131071)

STURN chopt

  CHOPT      C    ``SCAN mode setting''

Possible CHOPT values are:

  ON
  OFF
  INIT

Switch on/off SCAN mode. If SCAN mode is on, SCAN geantinos are generated and tracked to fill (or complete) the current scan data structure. If SCAN mode is off, normal kinematics generation and tracking will take place. If INIT is given, the current SCAN data structure (if any) will be dropped and SCAN mode will be turned on.

PCUTS [ iparam pcutga pcutel pcutha pcutne pcutmu ]

  IPARAM     I    ``Parametrization Flag''  R=0:1
  PCUTGA     R    ``Parametrization Cut for gammas''
  PCUTEL     R    ``Parametrization Cut for electrons''
  PCUTHA     R    ``Parametrization Cut for charged hadrons''
  PCUTNE     R    ``Parametrization Cut for neutral hadrons''
  PCUTMU     R    ``Parametrization Cut for muons''

Control parametrization at tracking time.

        IPARAM=0       No parametrization is performed
        IPARAM=1       Parametrization is performed
If parametrization is active and a particle falls below its parametrization cut, then the particle will be replaced by a parametrized shower which will be tracked in the SCAN geometry.

LSCAN id [ volume chopt ]

  ID         I    ``Lego plot identifier''  D=2000
  VOLUME     C    ``Volume name''  D='XXXX'
  CHOPT      C    ``List of options''  D='OPX'

Possible CHOPT values are:

  O
  P
  I
  X
  L

Generates and plot a table of physics quantities such as the total number of radiation lengths or interaction lengths in function of the SCAN parameters TETA,PHI.

     CHOPT='O' table is generated at Exit  of VOLUME.
     CHOPT='I' table is generated at Entry of VOLUME.
     CHOPT='X' radiation lengths
     CHOPT='L' Interaction lengths
     CHOPT='P' Plot the table

If VOLUME='XXXX' Mother volume is used.

HSCAN idphi [ volume chopt ]

  IDPHI      I    ``Histogram/phi identifier''  D=1000
  VOLUME     C    ``Volume name''  D='XXXX'
  CHOPT      C    ``List of options''  D='OPX'

Possible CHOPT values are:

  O
  P
  I
  X
  L

Generates and plots an histogram of physics quantities such as the total number of radiation lengths or interaction lengths as a function of the SCAN parameter TETA for a given value of PHI.

     CHOPT='O' histogram is generated at Exit  of VOLUME.
     CHOPT='I' histogram is generated at Entry of VOLUME.
     CHOPT='X' radiation lengths
     CHOPT='L' Interaction lengths
     CHOPT='P' Plot the histogram

If VOLUME='XXXX' Mother volume is used. The histogram identifier IDPHI is used to also identify which PHI division to plot: IPHI=MOD(IDPHI,1000). If IPHI=0, then all PHI divisions are generated (not plotted) with histogram identifiers IDPHI+PHI division number.

PICTURE

Creation and manipulation of HIGZ pictures.

FILE lun fname [ lrecl chopt ]

  LUN        I    ``Logical unit number''  R=1:128
  FNAME      C    ``File name''
  LRECL      I    ``Record length in words''  D=1024
  CHOPT      C    ``Options''  D=' '

Possible CHOPT values are:

  A
  N
  U
  AN
  AU

Open a HIGZ direct access picture file.

     For CHOPT=' ', existing file is opened.
     For CHOPT='N', a new file is opened.
     For CHOPT='U', existing file is modified.

LIST

List all the HIGZ pictures currently stored in memory.

DELETE pname

  PNAME      C    ``Picture name''  D=' '

Delete the picture PNAME from memory. PNAME='*' means all pictures.

SCRATCH pname [ icycle ]

  PNAME      C    ``Picture name''  D=' '
  ICYCLE     I    ``Cycle number ''  D=9999

Delete the picture PNAME from current directory on disk.

PLOT [ pname ]

  PNAME      C    ``Picture name''  D=' '

Plot the picture PNAME. PNAME=' ' means the current picture. PNAME='*' means all pictures.

RENAME pname1 pname2

  PNAME1     C    ``Old picture name''
  PNAME2     C    ``New picture name''

Rename a picture.

IZOUT [ pname ]

  PNAME      C    ``Picture name''  D=' '

Write the picture PNAME to a direct access picture file (see command PICTURE/FILE). PNAME=' ' means the current picture. PNAME='*' means all pictures.

IZIN pname [ icycle ]

  PNAME      C    ``Picture name''
  ICYCLE     I    ``Cycle number ''  D=9999

Read picture into memory from a direct access picture file (see command PICTURE/FILE). PNAME='*' means all pictures.

IGSET [ chatt value ]

  CHATT      C    ``Attribute name''  D='SHOW'
  VALUE      R    ``Attribute value''  D=0.

Set a HIGZ attribute. If CHATT='SHOW' print default and current values for all attributes. If CHATT='*' restore default values for all attributes. If VALUE=0, the attribute is set to its default value.

FORTRAN

Interface to COMIS and FORTRAN Input/Output.

CALL urout

  UROUT      C    ``User routine''

Invoke the COMIS FORTRAN interpreter. COMIS allows to execute FORTRAN routines without recompiling and relinking. It communicates with GXINT commands through vectors and functions. Execute the routine UROUT. UROUT may be a routine compiled and linked with GEANT. For example : CALL GPRINT('KINE',0). UROUT may also be the name of a file which can be edited interactively with the command EDIT. For example if file UROUT.FOR contains:

        SUBROUTINE UROUT(N)
        SUM=0.
        DO 10 I=1,N
          SUM=SUM+I
     10 CONTINUE
        PRINT *,SUM
        END

Then one can type CALL UROUT.FOR(10). The routine UROUT may also contains references to some of the KERNLIB routines,HBOOK,ZEBRA and most of the GEANT routines.

FILE lun fname

  LUN        I    ``Logical unit number''  R=1:128
  FNAME      C    ``File name''

Open a FORTRAN formatted text file.

CLOSE lun

  LUN        I    ``Logical unit number''  R=1:128

Close the file on unit LUN. If the file has been opened with HISTO/FILE, PICTURE/FILE, etc, then before closing the unit, GXINT will close correctly the file with CALL HREND or RZEND,etc.

FORTRAN fname

  FNAME      C    ``File name''

The routines in the file FNAME will be compiled by COMIS. If routines with names: UGEOM,GUKINE,GUOUT,UGLAST are found, then they will be automatically called by GXINT instead of the routines with the same names compiled with the standard Fortran compiler and linked with the application. The user callable routines from the GEANT library as well as routines from PACKLIB (HBOOK,HPLOT,HIGZ,ZEBRA) may be called from these user routines. All GEANT common blocks may be referenced. In case where the routine UGEOM is called several times, it is important to DROP all the initialisation data structures JVOLUM,JMATE,JTMED,etc already in memory by using the routine GIDROP.

    Example of an interactive session where the routine UGEOM is modified:

      GEANT > Edit ugeom.for
      GEANT > Fortran ugeom.for
      GEANT > Call GIDROP
      GEANT > Call UGEOM
      GEANT > Dtree
      GEANT > Edit ugeom.for
      GEANT > Fortran ugeom.for
      GEANT > Call GIDROP
      GEANT > Call UGEOM
      GEANT > Dtree

If FNAME='-', calls to user routines is reset and standard routines called instead.

HISTOGRAM

Manipulation of histograms, Ntuples. Interface to the HBOOK package.

FILE lun fname [ lrecl chopt ]

  LUN        I    ``Logical unit number''  R=1:128
  FNAME      C    ``File name''
  LRECL      I    ``Record length in words''  D=1024
  CHOPT      C    ``Options''  D=' '

Possible CHOPT values are:

  N
  U

Open an HBOOK direct access file.

    For CHOPT=' ', existing file is opened (read mode only).
    For CHOPT='N', a new file is opened.
    For CHOPT='U', existing file is opened to be modified.

LIST [ chopt ]

  CHOPT      C    ``Options''  D=' '

Possible CHOPT values are:

  I

List histograms in the current directory.

DELETE id

  ID         I    ``Histogram Identifier''

Delete histogram/Ntuple ID in Current Directory (memory). If ID=0 delete all histograms and Ntuples. To delete histograms in disk files use command HIO/HSCRATCH.

PLOT id [ chopt ]

  ID         I    ``Histogram Identifier''
  CHOPT      C    ``Options''  D=' '

Possible CHOPT values are:

  C
  S
  +
  B
  L
  P
  *
  K
  U
  E
  A

Plot a single histogram or a 2-Dim projection. Each plotted histogram will start either a new picture or a new zone in the current picture. CHOPT may be a combination of the following characters:

    'C' Draw a smooth curve.
    'S' Superimpose plot on top of existing picture.
    '+' Add contents of ID to last plotted histogram.
    'B' Select Bar chart format.
    'L' Connect channels contents by a line.
    'P' Draw the current polymarker at each channel or cell.
    '*' Draw a * at each channel.
    'K' must be given if option 'U' is given later.
    'U' Update channels modified since last call.
    'E' Draw error bars and current marker.
    'A' Axis labels and tick marks are not drawn.
    'BOX'  draw 2-Dim with proportional boxes.
    'COL'  draw 2-Dim with a color table.
    'SURF' draw 2-Dim as a surface plot (angles are 30,30).
    'LEGO' draw 2-Dim as a lego plot (angles are 30,30).
    'CONT' draw 2-Dim as a contour plot (15 levels).
    'TEXT' draw 2-Dim as a table.
    'CHAR' draw 2-Dim with characters (a la HBOOK).
    'HIST' draw only histogram (no errors or associated function).
    'FUNC' draw only the associated function (not the histogram).

Note that this command provides only a subset of the equivalent command in PAW. It can only plot histograms already in memory. Use command HRIN to get an histogram from disk file.

LEGO id [ theta phi ]

  ID         I    ``Histogram Identifier''
  THETA      R    ``Angle THETA in degrees''  D=30. R=0:90
  PHI        R    ``Angle PHI in degrees''  D=30. R=0:90

Draw a lego plot from a 2-Dim histogram.

HRIN id

  ID         I    ``Histogram Identifier''

Read histogram ID from the current directory on direct access file to memory. If ID=0 read all histograms.

HROUT id [ chopt ]

  ID         I    ``Histogram Identifier''
  CHOPT      C    ``Options''  D=' '
Possible CHOPT values are:

  T

Write histo ID from memory to current directory. If ID=0 write all histograms.

PUT id fname [ chopt ]

  ID         I    ``Histogram Identifier''  D=0
  FNAME      C    ``Histogram file name''
  CHOPT      C    ``Options''  D='N'

Possible CHOPT values are:

  U
  N

Write histo ID from memory to file FNAME. If ID=0 write all histograms. If CHOPT='N' (default), create a new file. If CHOPT='U' update existing file.

ZONE [ nx ny ifirst chopt ]

  NX         I    ``Number of divisions along X''  D=1
  NY         I    ``Number of divisions along Y''  D=1
  IFIRST     I    ``First division number''  D=1
  CHOPT      C    ``Option''  D=' '
Possible CHOPT values are:

  S

Subdivide the picture into NX by NY zones, starting at zone IFIRST (count along X first). If CHOPT='S', redefine zones on current picture.

SET [ chatt value ]

  CHATT      C    ``Attribute name''  D='SHOW'
  VALUE      R    ``Attribute value''  D=0

Set a specific HPLOT attribute. If CHATT='SHOW', print defaults and current values for all attributes. If CHATT='*', restore default values for all attributes. If VALUE=0, the attribute is set to its default value.

OPTION [ choptn ]

  CHOPTN     C    ``Option name''  D='SHOW'

Set general plotting options for HPLOT. If CHOPTN='SHOW' print all current and default options. If CHOPTN='*', restore all default options.

NULL [ xmin xmax ymin ymax chopt ]

  XMIN       R    ``Low range in X''  D=0.
  XMAX       R    ``High range in X''  D=1.
  YMIN       R    ``Low range in Y''  D=0.
  YMAX       R    ``High range in Y''  D=1.
  CHOPT      C    ``Options''  D=' '

Possible CHOPT values are:

  S
  A

Draw a frame box only. If XMIN, XMAX, etc. are given, draw a frame box with the window coordinates set to XMIN, XMAX, YMIN, YMAX. Axis labels and tick marks are drawn by default. If option 'S' is also specified, this command is a convenient way to redefine the scale for the current zone. If the option 'A' is given then axis labels and tick marks are not drawn.

PHYSICS

Commands to set physics parameters.

ANNI [ ianni ]

  IANNI      I    ``Flag IANNI''  D=1 R=0,1,2

To control positron annihilation.

    IANNI=0 no annihilation
         =1 annihilation. Decays processed.
         =2 annihilation. No decay products stored.

BREM [ ibrem ]

  IBREM      I    ``Flag IBREM''  D=1 R=0,1,2

To control bremstrahlung.

    IBREM=0 no bremstrahlung
         =1 bremstrahlung. Photon processed.
         =2 bremstrahlung. No photon stored.

COMP [ icomp ]

  ICOMP      I    ``Flag ICOMP''  D=1 R=0,1,2

To control Compton scattering

    ICOMP=0 no Compton
         =1 Compton. Electron processed.
         =2 Compton. No electron stored.

DCAY [ idcay ]

  IDCAY      I    ``Flag IDCAY''  D=1 R=0,1,2

To control Decay mechanism.

    IDCAY=0 no decays.
         =1 Decays. secondaries processed.
         =2 Decays. No secondaries stored.

DRAY [ idray ]

  IDRAY      I    ``Flag IDRAY''  D=1 R=0,1,2

To control delta rays mechanism.

    IDRAY=0 no delta rays.
         =1 Delta rays. secondaries processed.
         =2 Delta rays. No secondaries stored.

HADR [ ihadr ]

  IHADR      I    ``Flag IHADR''  D=1
To control hadronic interactions.

    IHADR=0 no hadronic interactions.
         =1 Hadronic interactions. secondaries processed.
         =2 Hadronic interactions. No secondaries stored.

LOSS [ iloss ]

  ILOSS      I    ``Flag ILOSS''  D=2 R=0,1,2,3,4

To control energy loss.

    ILOSS=0 no energy loss.
         =1 Energy loss.
         =2 Landau only.
         =3 Energy loss + Landau.
         =4 Average energy loss and no fluctuations.

If the value ILOSS is changed, then cross-sections and energy loss tables must be recomputed via the command "PHYSI'.

MULS [ imuls ]

  IMULS      I    ``Flag IMULS''  D=1 R=0,1,2,3

To control multiple scattering.

    IMULS=0 no multiple scattering.
         =1 Moliere or Coulomb scattering.
         =2 Moliere or Coulomb scattering.
         =3 Gaussian scattering.

MUNU [ imunu ]

  IMUNU      I    ``Flag IMUNU''  D=1 R=0,1,2
To control muon nuclear interactions.

    IMUNU=0 no muon-nuclear interactions.
         =1 Nuclear interactions. Secondaries processed.
         =2 Nuclear interactions. Secondaries not processed.

PAIR [ ipair ]

  IPAIR      I    ``Flag IPAIR''  D=1 R=0,1,2

To control pair production mechanism.

    IPAIR=0 no pair production.
         =1 Pair production. secondaries processed.
         =2 Pair production. No secondaries stored.

PFIS [ ipfis ]

  IPFIS      I    ``Flag IPFIS''  D=1 R=0,1,2

To control photo fission mechanism.

    IPFIS=0 no photo fission.
         =1 Photo fission. secondaries processed.
         =2 Photo fission. No secondaries stored.

PHOT [ iphot ]

  IPHOT      I    ``Flag IPHOT''  D=1 R=0,1,2

To control Photo effect.

    IPHOT=0 no photo electric effect.
         =1 Photo effect. Electron processed.
         =2 Photo effect. No electron stored.

RAYL [ irayl ]

  IRAYL      I    ``Flag IRAYL''  D=1 R=0,1

To control Rayleigh scattering.

    IRAYL=0 no Rayleigh scattering.
         =1 Rayleigh.

CUTS [ cutgam cutele cuthad cutneu cutmuo bcute bcutm dcute dcutm ppcutm tofmax gcuts ]

  CUTGAM     R    ``Cut for gammas''  D=0.001
  CUTELE     R    ``Cut for electrons''  D=0.001
  CUTHAD     R    ``Cut for charged hadrons''  D=0.01
  CUTNEU     R    ``Cut for neutral hadrons''  D=0.01
  CUTMUO     R    ``Cut for muons''  D=0.01
  BCUTE      R    ``Cut for electron brems.''  D=-1.
  BCUTM      R    ``Cut for muon Brems.''  D=-1.
  DCUTE      R    ``Cut for electron delta-rays''  D=-1.
  DCUTM      R    ``Cut for muon delta-rays''  D=-1.
  PPCUTM     R    ``Cut for e+e- pairs by muons''  D=0.01
  TOFMAX     R    ``Time of flight cut''  D=1.E+10
  GCUTS      R    ``5 user words''  D=0.

To change physics cuts. If no parameter is given, the list of the current cuts is printed.

    If the default values (-1.) for       BCUTE ,BCUTM ,DCUTE ,DCUTM
    are not modified, they will be set to CUTGAM,CUTGAM,CUTELE,CUTELE
    respectively.

If one of the parameters from CUTGAM to PPCUTM included is modified, cross-sections and energy loss tables must be recomputed via the command 'PHYSI'.

PHYSI

Call the GEANT initialisation routine GPHYSI to recompute the tables of cross-sections and energy loss. This command must be invoked when CUTs or LOSS parameters are changed.

VECTOR

Vector Processor commands. Vectors are equivalent to FORTRAN 77 arrays and they use the same notation except when omitting indexes (see last line below). Up to 3 dimensions are supported. Examples:

    Vec(20) (mono-dimensional with 20 elements)

may be addressed by:

    Vec          for all elements
    Vec(13)      for element 13-th
    Vec(12:)     for elements 12-th to last
    Vec(:10)     for elements first to 10-th
    Vec(5:8)     for elements 5-th to 8-th

    Vec(3,100) (bi-dimensional with 3 columns by 100 rows):

may be addressed by:

    Vec(2,5:8)   for elements 5-th to 8-th in 2-nd column
    Vec(2:3,5:8) for elements 5-th to 8-th in 2-nd to 3-rd columns
    Vec(2,5)     for element 5-th in 2-nd column
    Vec(:,3)     for all elements in 3-rd row
    Vec(2)       for all elements in 2-nd column (SPECIAL CASE)

The latest line shows the special (and non-standard with FORTRAN 77) notation such that missing indexes are substituted to the right.

An 'invisible' vector called '?', mono-dimensional and of length 100, is always present. Is is used for communicating between user arrays and KUIP vectors, being equivalenced with the real array VECTOR(100) in the labelled common block /KCWORK/.

CREATE vname [ type values ]

  VNAME      C    ``Vector name(length)''
  TYPE       C    ``Vector type''  D='R' R='R,I'
  VALUES     C    ``Value list''  D=' '

Create a vector named VNAME (elements are set to zero). The dimensions are taken from the name, for example VEC(20), VEC(3,100), VEC(2,2,10). Up to 3 dimensions are supported. Dimensions which are not specified are taken to 1, for example VEC(10) ---> VEC(10,1,1) and VEC ---> VEC(1,1,1). The vector may be of type Real or Integer. A vector is filled at the same time if parameters are given after the TYPE:

    VEC/CREATE V(10) R 1 2 3 4 5 66 77 88 99 111
    VEC/CREATE W(20) R 1 2 3

In the last example only the first three elements are filled. Vector elements may be changed later with the command VECTOR/INPUT.

If many equal values have to be entered consecutively, one can specify just one value and precede it by a repetition factor and an asterisk. Example:

    VEC/CREATE Z(20) R 5*1 2 4*3   --->   VEC/CREATE Z(20) R 1 1 1 1 1 2 3 3 3
   3

Enter HELP VECTOR for more information on vector addressing.

LIST

List all vectors (name, dimensions, type).

DELETE vlist

  VLIST      C    ``Vector list''  D=' '

Delete from memory all vectors in the list VLIST. The vectors are separated in the list by a comma and imbedded blanks are not allowed. An asterisk at the end of VLIST acts as string placeholder:

    VEC/DEL AB*          --->  deletes all vectors starting by AB
    VEC/DEL *            --->  deletes all vectors

COPY vnam1 vnam2

  VNAM1      C    ``Source vector name''
  VNAM2      C    ``Destination vector name''

Copy a vector into another one. Mixed vector type copy is supported (e.g. Integer ---> Real and viceversa). If VNAM2 does not exist it is created with the required dimensions, not necessarily the same as the source vector if a sub-range was specified. For example, if A is a 3 x 100 vector and B does not exist, COPY A(2,11:60) B will create B as a 50 elements mono-dimensional vector; a special (and non-standard with FORTRAN 77) notation is used such that, still using the above vectors, COPY A(2,1:100) B and COPY A(2) B have the same effect.

Note that VECTOR/COPY does not allow a range for the destination vector not specifying consecutive elements (i.e. along the first dimension):

    VEC/COPY V(5)      W(3,4)     | O.K.
    VEC/COPY V1(2:3,5) V2(4:5,9)  | O.K.
    VEC/COPY V1(5,2:3) V2(4:5,9)  | O.K.
    VEC/COPY V1(3,3:4) V2(4,4:5)  | NOT allowed
    VEC/COPY V1(2:3,5) V2(2,4:5)  | NOT allowed

Enter HELP VECTOR for more information on vector addressing.

INPUT vname [ values ]

  VNAME      C    ``Vector name''
  VALUES     C    ``Value list''  D=' '

Enter values into a vector from the terminal. Example:

    VEC/INPUT V(6:10) 1.1 2.22 3.333 4.4444 5.55555

If many equal values have to be entered consecutively, one can specify just one value and precede it by a repetition factor and an asterisk. Example:

    VEC/INPUT V 5*1 2 4*3   --->   VEC/INPUT V 1 1 1 1 1 2 3 3 3 3

Enter HELP VECTOR for more information on vector addressing.

PRINT vname

  VNAME      C    ``Vector name''

Write to the terminal the content of a vector. Enter HELP VECTOR for more information on vector addressing.

READ vlist fname [ format opt match ]

  VLIST      C    ``Vector list''
  FNAME      C    ``File name''  D=' '
  FORMAT     C    ``Format''  D=' '
  OPT        C    ``Options''  D='OC' R='OC,O, ,C'
  MATCH      C    ``Matching pattern''  D=' '

Enter values into vector(s) from a file. A format can be specified, e.g. FORMAT='F10.5,2X,F10.5', or the free format is used if FORMAT is not supplied.

If vector(s) are not existing they will be created of the size as read from the file.

Vectors in the list VLIST are separated by a comma and imbedded blanks are not allowed. If subscripts are present in vector names, the smallest one is taken.

OPT is used to select between the following options:

    'OC'   file is Opened, read and then Closed (default case)
    'O'    file is Opened and then read (left open for further reading)
    ' '    file is read (already open, left so for further reading)
    'C'    file is read and then Closed (already open)

If the character 'Z' is present in OPT, the vector elements equal to zero after reading are set to the latest non-zero element value (for example reading 1 2 3 0 0 4 0 5 will give 1 2 3 3 3 4 4 5). MATCH is used to specify a pattern string, restricting the vector filling only to the records in the file which verify the pattern. Example of patterns:

     /string/      match a string (starting in column 1)
    -/string/      do not match a string (starting in column 1)
     /string/(n)   match a string, starting in column n
     /string/(*)   match a string, starting at any column

Enter HELP VECTOR for more information on vector addressing.

WRITE vlist [ fname format chopt ]

  VLIST      C    ``Vector list''
  FNAME      C    ``File name''  D=' '
  FORMAT     C    ``Format''  D='5(1X,G13.7)'
  CHOPT      C    ``Options''  D='OC'

Possible CHOPT values are:

  OC
  O
  C

Write to a file the content of vector(s). If FNAME=' ' the content is written to the terminal. A format can be specified, e.g. FORMAT='F10.5,2X,F10.5', or the default one is used if FORMAT is not supplied.

Vectors in the list VLIST are separated by a comma and imbedded blanks are not allowed. If subscripts are present in vector names, the smallest one is taken.

CHOPT is used to select between the following options:

    'OC'   file is Opened, written and then Closed (default case)
    'O'    file is Opened and then written (left open for further writing)
    ' '    file is written (already open, left so for further writing)
    'C'    file is written and then Closed (already open)

Enter HELP VECTOR for more information on vector addressing.

OPERATIONS

Simple arithmetic operations between vectors. In all the operations only the minimum vector length is considered, i.e. an operation between a vector A of dimension 10 and a vector B of dimension 5 will involve the first 5 elements in both vectors. If the destination vector does not exist, it is created with the same length as the source vector.

VBIAS vnam1 bias vnam2

  VNAM1      C    ``Source vector name''
  BIAS       R    ``Bias value''
  VNAM2      C    ``Destination vector name''

VNAM2(I) = BIAS + VNAM1(I)

VSCALE vnam1 scale vnam2

  VNAM1      C    ``Source vector name''
  SCALE      R    ``Scale factor''
  VNAM2      C    ``Destination vector name''

VNAM2(I) = SCALE * VNAM1(I)

VADD vnam1 vnam2 vnam3

  VNAM1      C    ``First source vector name''
  VNAM2      C    ``Second source vector name''
  VNAM3      C    ``Destination vector name''

VNAM3(I) = VNAM1(I) + VNAM2(I)

VMULTIPLY vnam1 vnam2 vnam3

  VNAM1      C    ``First source vector name''
  VNAM2      C    ``Second source vector name''
  VNAM3      C    ``Destination vector name''

VNAM3(I) = VNAM1(I) * VNAM2(I)

VSUBTRACT vnam1 vnam2 vnam3

  VNAM1      C    ``First source vector name''
  VNAM2      C    ``Second source vector name''
  VNAM3      C    ``Destination vector name''

VNAM3(I) = VNAM1(I) - VNAM2(I)

VDIVIDE vnam1 vnam2 vnam3

  VNAM1      C    ``First source vector name''
  VNAM2      C    ``Second source vector name''
  VNAM3      C    ``Destination vector name''

VNAM3(I) = VNAM1(I) / VNAM2(I) ( or 0 if VNAM2(I)=0 )