SUBROUTINE KVTXLN(NTRK, ITRK, UPDATE, LUSEZ, LINE, Z, VZ, CHISQ, * LERROR) C C >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> C Performs a vertex fit to several KN tracks where the vertex point is C required to satisfy the equation of a line C C x = x0 + s*eta C C where x0 = starting point of line C eta = direction cosines of line C s = parameter tracing out line C C NTRK integer variable (read) C # of tracks to fit (length of ITRK) C C ITRK integer array (read) C list of tracks to fit (length = NTRK) C C UPDATE integer variable (read) C 0 ==> do not update input track parameters (just calculate chisq) C 1 ==> update input track parameters only C 2 ==> update input track parameters & covariance matrices and C replace the original unconstrainted parameters by the C new ones. ****** This is a dangerous option. ****** C C LUSEZ logical variable (read) C TRUE ==> use the value of Z as the starting value C FALSE ==> compute the starting value with a straight line approx. C C LINE real array (read) C Contains x0(1), x0(2), x0(3), eta(1), eta(2), eta(3). You can C also use the format of the N representation of the helix. C C *Z real array (read/write) C On input, initial values of (x,y,z) C On output, updated values of (x,y,z) C C *VZ real array (write) C 3x3 covariance matrix of z(1-3) C C *CHISQ real variable (write) C Chisquare of fit C C *LERROR logical variable (write) C TRUE if error during vertex finding C >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>