Previous: Rules
Up: Object Description Files
Previous Page: Rules
Next Page: DSPACK tools

Syntax

SET name value

name
alias name
value
replacement text
each occurrence of name in the rest of the file will be substituted by value. (similar to '#define' in cpp)

INCLUDE file

file
file name
include another description file here

DEFINE object object-type section
item-type name
item-type name
item-type name
...
END DEFINE [-CLASS class [-TYPE type]]

object
object name
object-type
object type (I,R,S,L,C - see DSDEF)
section
section - 1 for variables, 2 for constants
item-type
If object-type is S, then item-type must be a name of existing DSPACK object. Otherwise it may be any character string describing the item.
name
Item name. (max. 16 characters). If the item is a pointer, the name must start from a '*'. If the item is an array, the size is specified in brackets (name(n))
class
Object class name. The inheritance may be specified here in the following way: if the class is specified as class1.class2...classn then the object is assigned to class "classn" and the methods are inherited from all classes specified (in the reverse order - class(n-1) is the parent, class(n-2) is a grandparent etc.
type
sub-class - small integer passed to the all class drivers, ignored by DSPACK

or

DEFINE object section LIKE object1 [-CLASS class [-TYPE type]]

Defines DSPACK object. The second form uses object1 definition as a template. The template is used but not copied - this means that this form actually saves memory needed to store object definitions.

CREATE object number-of-entries creates a number entries of an object. All existing entries are destroyed.

name = value Assignment. name must be the full name of a specific DSPACK item, may contain index if necessary. value may have following forms:

literal
a number or character string
{name}
name of another DSPACK item
$name
name of environment variable

If an assignment is made to an object which has no data at that point - the object is created to contain the necessary number of (uninitialized) entries so that the assignment can be made. If the object exist but the number of entries is smaller than needed for the assignment, an error is reported and nothing is assigned. Therefore if a multi-entry object is to be initialised this way CREATE should be used (or the first assignment should be made of the highest entry needed).

INIT prefix [CREATE nent]
suffix = value
suffix = value
suffix = value
...
END INIT

Another form of assignment. Each item name is constructed by joining prefix and suffix into complete item name (prefix.suffix). All rules of a normal assignment apply.

object value value value... Yet another form of assignment. The whole object (single entry) if filled by this statement. Values have to be literal in this case. If character variables contain blanks they may be quoted.

CALC name = formula Definition of calculator object. Two forms are allowed:

formula is algebraic or inverse polish notation formula involving defined DSPACK objects. See page (calc).

RECLASS object -CLASS class -TYPE type Change class of an object - see DEFINE for details.

Object Description File - Example

######################### patrec parameter file ########################
# 
#   ********************************************************************
#   *                                                                  *
#$$ *   patrec.d  NA49 Vtpc2 pattern recognition constants.            *
#   *   This file contains definitions and values for PATREC constants *
#   *   The modifications should be commented and .PATREC_PAR_VER      *
#   *   should be modified to contain correct data and version number. *
#   *   DEFINE .PATREC_PAR_VER R 2                                     *
#   *                                                                  *
#   *   Ryszard Zybert    Jun 23 17:34:26 1994                         *
#   ********************************************************************
# 
DEFINE .PATREC_PAR_VER R 2
        Version       VERSION
        Date          DATE
END DEFINE

.PATREC_PAR_VER 1.200 940517.0

DEFINE POINT R 0 ! a template only 'X coordinate' X 'Y coordinate' Y 'Z coordinate' Z END DEFINE

DEFINE vt2_hit S 1 ! internal PATREC hits storage POINT pos .REAL4 ex .REAL4 ey .INT4 row END DEFINE

DEFINE vt2_hitp I 1 ! list of original hit pointers 'NASE pointer' pointer END DEFINE

DEFINE VTP2_SECTORS S 2 ! VTPC2 geometry .REAL4 DX .REAL4 DY .REAL4 DZ .REAL4 XC1 .REAL4 XC2 .REAL4 YC .REAL4 ZC1 .REAL4 ZC2 .REAL4 ZC3 .REAL4 ZBORDER .INT4 NROWS END DEFINE

VTP2_SECTORS.DX = 72.0 VTP2_SECTORS.DY = 70.0 VTP2_SECTORS.DZ = 72.0 VTP2_SECTORS.XC1 = -47.1 VTP2_SECTORS.XC2 = 47.1 VTP2_SECTORS.YC = 0.0 VTP2_SECTORS.ZC1 = -77.0 VTP2_SECTORS.ZC2 = 0.0 VTP2_SECTORS.ZC3 = 77.0 VTP2_SECTORS.ZBORDER = 2.00 VTP2_SECTORS.NROWS = 24

DEFINE VTP2_DIMS S 2 ! geometry the way we want it .REAL4 FIRST_ROW ! this is calculated from .REAL4 ROW_STEP ! VTP2_SECTORS .REAL4 YMAX .REAL4 XMAX .REAL4 XMIN END DEFINE

CALC VTP2_DIMS.FIRST_ROW = VTP2_SECTORS.ZC1-VTP2_SECTORS.DZ/2+VTP2_SECTORS.ZBORDER CALC VTP2_DIMS.ROW_STEP = (VTP2_SECTORS.DZ-2*VTP2_SECTORS.ZBORDER)/VTP2_SECTORS.NROWS CALC VTP2_DIMS.YMAX = VTP2_SECTORS.YC+VTP2_SECTORS.DY/2 CALC VTP2_DIMS.XMAX = VTP2_SECTORS.XC2+VTP2_SECTORS.DX/2 CALC VTP2_DIMS.XMIN = VTP2_SECTORS.XC2-VTP2_SECTORS.DX/2

DEFINE VTP2_L3_PAR R 2 ! Tolerances: - for 3 hits 'X tolerance' XTOL 'Y tolerance' YTOL END DEFINE DEFINE VTP2_L4_PAR 2 LIKE VTP2_L3_PAR ! for 4 hits DEFINE VTP2_L5_PAR 2 LIKE VTP2_L3_PAR ! for 5 hits

VTP2_L3_PAR 0.6 0.7 VTP2_L4_PAR 0.4 0.4 VTP2_L5_PAR 0.6 0.6

DEFINE VTP2_PR_PAR '2F 2I' 2 ! Tolerance for track projection 'X tolerance' XTOL 'Y tolerance' YTOL 'Allowed gap' GAP 'Minimum hits' MINHIT END DEFINE DEFINE VTP2_EX_PAR 2 LIKE VTP2_PR_PAR ! Tolerance for track extension

VTP2_PR_PAR 1.6 0.8 12 8 VTP2_EX_PAR 0.8 0.8 12 10

DEFINE VTP2_H_CUT R 2 ! Chisq probability cuts (1-P) 'Track following' PROBF 'Track extension' PROBE END DEFINE

VTP2_H_CUT 0.999 0.999

DEFINE VTP2_YBIN I 2 ! Number of slices in drift direction 'Number of Y bins' NBINS END DEFINE

VTP2_YBIN 20

# # ******************************************************************** # * * #$$ * patrec.d Primary vertex first guess. * # * The calculation is done on selected tracks using * # * simply the dip angle. * # * The parameters set the track selection criteria * # * and the final correction for effective magnetic field. * # * * # ******************************************************************** #

DEFINE VTP2_V1_PAR '1I 3F' 2 'Min. numb of hits' MINHIT 'Min. radius' MINRAD 'Min Y offset' YOFF 'Eff. field corr' ZFCORR END DEFINE

VTP2_V1_PAR 30 2000.0 10.0 -15.7

DEFINE pr_v1_guess '2F 1I' 1 'Primary vertex' z Error dz 'Error flag' flag END DEFINE

######################### end of patrec parameter file #################



Previous: Rules
Up: Object Description Files
Previous Page: Rules
Next Page: DSPACK tools

wwwd@na49
Fri Nov 4 01:19:29 MET 1994