subroutine kvtx_beam_lifetime(ktrk, update_track, vtx, * ctau, sig_ctau, chisq, error) * * begin_doc * * Given a track and using the beam spot as the starting point, * calculate the new starting point and c*tau (tau = proper time) * of the particle. The error of c*tau is also returned. * * Note: 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 * * 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: * * Author: Paul Avery Created: Fri Aug 29 16:12:52 EDT 1997 * * Major revisions: * * * end_doc