next up previous contents
Next: 4.4.61 SUBROUTINE ZTFOL2(DSTR, INCR, Up: 4.4 Patch SGVTRKER : Previous: 4.4.59 SUBROUTINE ZTREF2(DSTR, IPRP,   Contents


4.4.60 SUBROUTINE ZTFOLW(DSTR, INCR, IERR) : FOLlow track to intersections with surfaces

This routine finds the point where the track stored in /ZTSTA/ and /ZTAUX/ intersects the detector surfaces stored in /ZTBAR/ and/or /ZTFWD/. How to treat each surface is indicated by values in /ZTSEL/. The intersection points are returned in /ZTTRJ/ together with status information. Uses fast, approximative tracking.

ARGUMENTS:
INPUT :
    DSTR : track length from vertex to intersection with reference surface.
    INCR : if TRUE, this call is done in the process of transporting a
           weight matrix, rather than calculating it from scratch.
OUTPUT :
    IERR : error flag :
             0 - no error
             2 - track turns back before reference surface
IMPLICIT INPUTS:
    from /ZTBAR/ : RAD,ZMX,ZMN : radius and z-extent of cylinders; NCYL :
                   number of cylinders; MEASB : measurement flag;
                   PH1B,PH2B,PH3B,PHTY1B,PHTY2B, and PHTY3B,
                   phi-segmentation; DENSB : No. of rad. lengths of
                   cylinders.
    from /ZTFWD/ : ZED,RMX,RMN : z position and radial extent of planes;
                   NPLA :number of planes ; MEASF : measurement flag;
                   PH1F,PH2F,PH3F,PHTY1F,PHTY2F, and PHTY3F,
                   phi-segmentation; DENSF : No. of rad. lengths of planes.
    from /ZTSEL/ : RREF and ZREF : radius of reference surface (for
                 cylinder) or Z-coordinate ( for plane);
                 NCY1 and NCY2 : innermost and outermost cylinders to
                 include in measurement; NPL1 and NPL2 : innermost and
                 outermost planes to include in measurement;
                 NCYLOW : pointer to first cylinder of the geometry
                 used (since /ZTBAR/ stores several different setups)
                 COMMENT :
                   This is how it goes :
                  All cylinders : NCYLOW -> NCY2
                    If RREF < Rad of cylinder NCY1 then NC1 is set to
                  first cylinder outside RREF, NC2 = NCY2 and the
                  cylinders between NC1 and NCY1 are included for
                  scattering, but not for measurement; those between
                  NCY1 and NCY2 are included fully, and those inside
                  NC1 are discarded.
                    If instead RREF > Rad of cylinder NCY2 then NC2 is set to
                  first cylinder inside RREF, NC1 = NCY1 and the
                  cylinders between NC2 and NCY2 are included for
                  scattering, but not for measurement; those between
                  NCY1 and NCY2 are included fully, and those outside
                  NC2 are discarded.

    from /ZTSTA/ : ZVRTX : z-position of vertex; PHI0 : phi-angle at
                 vertex.
    from /ZTAUX/ : COTTH,TANTH : Cot and tan (theta) of track;
                 RTRK : radius of track;
    from /ZTTRJ/ : IREF : the type of reference surface (1 = cylinder,
                  2 = plane).
IMPLICIT OUTPUTS:
    to /ZTTRJ/ : R,Z,PHI,BETA : track parameters at intersection of each
                detector element; NPT : number of intersected elements;
                IORD : pointer into R etc ordered in increasing track-
                length; DIST : track-length to each intersection;
                ITYP : cylinder/plane (1/2) and measurement/no measurement
                (+ve/-ve); ICYPL : number of the intersected element for
                each intersection point; JREF : the position of the
                reference surface intersection in rack-length ordering;
                X0 : No. of rad. lengths in layers.
CALLED BY :
ZTFOLL, FOLLow track through detector (see 4.4.56).

CALLED ROUTINE(S):
ZUI2PI (see 4.7.2)

(To bring angle In range between 0 and 2 PI.)

SORTZV :
(CERNLIB routine.)

SIDE EFFECTS:
none

AUTHORS:
P. Billoir , LPNHE

CREATION DATE:
27-jul-1992


next up previous contents
Next: 4.4.61 SUBROUTINE ZTFOL2(DSTR, INCR, Up: 4.4 Patch SGVTRKER : Previous: 4.4.59 SUBROUTINE ZTREF2(DSTR, IPRP,   Contents
Mikael Berggren 2003-03-27