next up previous contents
Next: 4.4.60 SUBROUTINE ZTFOLW(DSTR, INCR, Up: 4.4 Patch SGVTRKER : Previous: 4.4.58 SUBROUTINE ZTREFE(DSTR, IERR)   Contents


4.4.59 SUBROUTINE ZTREF2(DSTR, IPRP, IPZ, PHIIP, IERR) : intersection with REFErence surface

This routine finds the point where the track stored in /ZTSTA/ and /ZTAUX/ intersects the reference surface stored in /ZTSEL/. The intersection point is stored in /ZTTRJ/. Uses exact tracking routines.

ARGUMENTS:
INPUT :
    IPRP,IPZ : True values of Impact parameters in RPhi and z
    PHIIP  : phi of perigee point of the track.
OUTPUT :
    DSTR : track length from vertex to intersection with reference surface.
    IERR : error flag :
             0 - no error
             2 - track turns back before reference surface
IMPLICIT INPUTS:
    from /ZTAUX/ : TANTH, RTRK, RINV : tan(theta), radius and 1/radius
                 of track (calculated elsewhere from values in /ZTSTA/)
    from /ZTSEL/ : RREF and ZREF : radius of reference surface (for
                 cylinder) or Z-coordinate ( for plane).
    from /ZTSTA/ : ZVRTX : z-position of vertex.
IMPLICIT OUTPUTS:
    to /ZTTRJ/ : R(0),Z(0),PHI(0),BETA(0) : track parameters at intersection
                point; IREF : type of intersection (1 = cylinder, 2=plane)
CALLED BY :
ZTFOLL, FOLLow track through detector. (see 4.4.56).

CALLED ROUTINE(S):
ZUI2PI (see 4.7.2)

(To bring angle In the range 0 to 2PI.)

ZUINPI (see 4.7.3)

(To bring angle IN the range 0 to PI.)

ZTTCYL (see 4.4.6)

(To get Track intersection with CYLinder.)

ZTTPLA (see 4.4.8)

(To get Track intersection with PLAne.)

SIDE EFFECTS:
none

AUTHORS:
M. Berggren, UFRJ.

CREATION DATE:
06-may-1996


next up previous contents
Next: 4.4.60 SUBROUTINE ZTFOLW(DSTR, INCR, Up: 4.4 Patch SGVTRKER : Previous: 4.4.58 SUBROUTINE ZTREFE(DSTR, IERR)   Contents
Mikael Berggren 2003-03-27