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.
IPRP,IPZ : True values of Impact parameters in RPhi and z PHIIP : phi of perigee point of the track.
DSTR : track length from vertex to intersection with reference surface. IERR : error flag : 0 - no error 2 - track turns back before reference surface
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.
to /ZTTRJ/ : R(0),Z(0),PHI(0),BETA(0) : track parameters at intersection point; IREF : type of intersection (1 = cylinder, 2=plane)
(To bring angle In the range 0 to 2PI.)
(To bring angle IN the range 0 to PI.)
(To get Track intersection with CYLinder.)
(To get Track intersection with PLAne.)