subroutine kvtx_known_lifetime(ktrk, update_track, vtx0, Vvtx0, * vtx, ctau, sig_ctau, chisq, error) * * begin_doc * * Given a track and a starting point with a known covariance matrix, * do a vertex fit that forces the track to pass through the starting * point. The starting point is updated and c*tau (tau = proper time) * of the particle and its error are returned. * * Note 1: You can get the complete 4x4 error matrix of the starting * point + ctau together by calling kget_lifetime_covar. * * Note 2: If the track is not updated here, you can update it later by * calling kfit_update_tracks. * * Input Parameters: * ktrk integer variable * Track number to fit * * update_track integer variable * 0 ==> Calculate chisquare only (do not update track) * 1 ==> Calculate chisquare, update track * 2 ==> Calculate chisquare, update track & cov matrix * * vtx0(3) double precision array * Prior starting point (not updated) * * Vvtx0(3,3) double precision array * Covariance matrix of vtx0(1-3) * * Output Parameters: * vtx(3) double precision array * Updated starting point * * ctau double precision variable * c*tau of the particle * * sig_ctau double precision variable * Error on ctau * * chisq double precision variable * Chisquare of fit * * error integer variable * 0 ==> All OK * >0 ==> Error * * Other routines: * * Notes: * * >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> * The constraint is imposed by the method of Lagrange multipliers. For * this case I define the alpha vector as * * alpha = (w,z) * * i.e., the track and starting point coordinates, a total of 10 * components. * * I use the three equations of motion as the constraint equations from * which one unknown, ctau, must be determined, giving 2 degrees of * freedom. At the end I construct the 4x4 covariance matrix of * (z,ctau) and store it for future reference. * >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> * * Author: Paul Avery Created: Fri Aug 29 16:12:52 EDT 1997 * * Major revisions: * * * end_doc