This routine acts as an interface to the routines ZTFOLW/ZTFOL2, by loading the input track into the common block /ZTSTA/, and by setting NCY1 and NCY2 in /ZTSEL/ to the correct values to select the detector configuration to use when calculating the error matrix. The simpler and faster tracking routine ZTFOLW is called if the track passes close to the origin ( 5 cm), else the complete tracking in ZTFOL2 is called. NB. if ZTFOLW is called, the values in ZTTRJ are only approximate. For calculating the error-matrix they are good enough, but not to calulate the actual VALUES of the track parameters (at the origin or othervise). Use a direct call to ZTTCYL or ZTTPLA to get the parameters.
MOMENT : momentum of the track CHA : charge " " " POLANG : theta " " " (NB : reflected to positive z i.e. 0<POLANG<pi/2) IPRP,IPZ : True values of Impact parameters in RPhi and z PHIIP : phi of perigee point of the track. MASS : mass of the particle. RREFIN : radius of cylinder the parameters are requested on. RREFIN = 0 -> perigee parameters. RR,RV,REND : Selection of the part of the barrel to use : The active part is between RR and REND. Any detectors exactly at RR and/or REND are NOT included. In this range both measurements and scattering is included in the error calculation. If RREFIN is outside the range, the routine will extrapolate through the cylinders between the end of the measuring range and RREFIN, including scattering, but not measurements. Any material exactly at RREFIN IS included. If RREFIN is in the range, then interpolation is done, with no account whatsoever taken of the portion outside the range. RV is the radius of first cylinder to be included at all. Typically it is the radial distance to the production vertex. No measurements NOR scattering is ever included for cylinders inside this radius. (In contrast, cylinders inside RR excludes measurements but not scattering). Special values : REND =0 -> use all cylinders (i.e. REND=infinity) ZV : vertex z of the track ZEND : z-position of end of track (=0. if no end) IFLG : number of the detector geometry to use
TRACK : track parameters of the track IERR : error flag : 0 - no error
from /ZTGPT/ : LOCYL and HICYL : index of the first and last cylinder of this geometry; LOPLA and HIPLA : index of the first and last plane of this geometry; ROFF : radial offset. from /ZTBAR/ : RAD : radius of cylinders. from /PXCONS/ : BMAG : magnetic field [T]. from /ZTTRJ/ : R(0),Z(0),PHI(0),BETA(0) : track parameters at reference surface. (returned by ZTTRWT).
to /ZTSTA/ : PMOM, THETA, PHI0 and AMASS : momentum direction and mass of particle at vertex ; ZVRTX : z-position of vertex; BFIELD : magnetic field [T]. to /ZTBAR/ : NCYL : number of cylinders. to /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 . to /ZTAUX/ : COTTH,TANTH : Cot and tan (theta) of track; RTRK,RINV : radius of track, and it's inverse; BCONST : c*BFIELD; PINV : inverse of momentum;
(To bring angle In the range 0 to 2 PI.)
(To calculate TRacK WeiGhT matrix .)