next up previous contents
Next: 4.4.3 SUBROUTINE ZTFOLN(IGEOM, PP, Up: 4.4 Patch SGVTRKER : Previous: 4.4.1 SUBROUTINE ZTTRAK( FIRST,   Contents


4.4.2 SUBROUTINE ZTERRM(TYPSUR, LAYLIS, RELOAD, INCR, WGTINT, ERRARR, ERROR) : calculate ERRor Matrix

This routine calculates the covariance or weight matrix of the TKR parameters, as implied by the list of detector layers the particle goes through.

ARGUMENTS:
INPUT :
    TYPSUR : CHARACTER - type of surface to wich track should be propagated
            'CYL' : Cylinder
            'PLANE' : Plane
            'PERI' : To perigee
    LAYLIS : List of detector layers hit by particle :
              LAYLIS(1,i) = number of the i:th hit layer.
                            LAYLIS(2,i) tells if it is a  plane
                            or a cylinder, if it measures or not,
                            and if it is the reference layer.
              LAYLIS(2,i) = 0  : mathematical layer : no material,
                                 no measurement. Ignored in all
                                 calculations
                            1  : seen by a cylinder
                            2  : seen by a plane
                            -1 : particle went through a cylinder, but
                                 was not seen by the detector.
                            -2 : particle went through a plane, but
                                 was not seen by the detector.
                            10 : the layer is a reference cylinder
                            20 : the layer is a reference plane
              LAYLIS(3,i) = No. of radiation lengths in layer.
              LAYLIS(1,i) = -1 -> end of list.
    INCR : transport the weight matrix WGTINT
    RELOAD : if TRUE, reload ZTTRJ from LAYLIS
    WGTINT : Internal weight-matrix, read if INCR is true.
             NB ! Over-written by the resulting matrix.
OUTPUT :
    WGTINT : Internal weight-matrix.
    ERRARR : Error matrix on track parameters (weight matrix if
                   parameters are at the perigee, else covariance matrix)
    ERROR : error flag :
             0 - no error
             1 - intersection with cylinder just outside the
                 requested one in z. Parameters on this cylinder
                 returned instead.
             2 - no intersection, perigee parameters returned
             3 - other error, no parameters returned
             4 - Tan(theta) = 0.0 to machine precission, no
                 error matrix calculated.
IMPLICIT INPUTS:
    from /ZTAUX/ : COSTH,TANTH : Cos and tan (theta) of track;
                 RTRK,RINV : radius of track, and it's inverse;
                 BCONST : c*BFIELD.
IMPLICIT OUTPUTS:
    to /ZTTRJ/ : NPT, number of detector elements intersected;
                   ICYPL, list of ditto; ITYP, status of ditto.
CALLED BY :
ZDETSI, DETector SImulation (see 4.3.1).

CALLED ROUTINE(S):
ZTTRWT (see 4.4.57)

(To calculate TRacK Weight matrix.)

ZTINVM (see 4.4.11)

(To invert a matrix (5X5))

VSCALE,VZERO,UCOPY
(CERNLIB routines)

SIDE EFFECTS:
none

AUTHORS:
M. Berggren, LAL

CREATION DATE:
27-jul-1992


next up previous contents
Next: 4.4.3 SUBROUTINE ZTFOLN(IGEOM, PP, Up: 4.4 Patch SGVTRKER : Previous: 4.4.1 SUBROUTINE ZTTRAK( FIRST,   Contents
Mikael Berggren 2003-03-27