subroutine kutl_vertex_same(z1, Vz1, z2, Vz2, chisq) * * begin_doc * * Finds the chisquare for 2 vertices to be the same. * * Note: chisq is set to -1 if the routine cannot evaluate the combined * covariance matrix. * * Input Parameters: * z1 double precision array * (x,y,z) of first vertex * * Vz1 double precision array * 3x3 covariance matrix of first vertex * * z2 double precision array * (x,y,z) of second vertex * * Vz2 double precision array * 3x3 covariance matrix of second vertex * * Output Parameters: * chisq double precision variable * chisquare of fit * * Other routines: * * Notes: * * >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> * The method used is the standard constrained fit with 3 constraints. * See the discussion in CBX 91-71 for a derivation of the solution. * The constraints can be written z1 + z2 = 0 or Dx + d = 0, with * * |1 0 0 -1 0 0| | z1 | * D = |0 1 0 0 -1 0| d = 0 x = | z2 | * |0 0 1 0 0 -1| * * The chisquare can be written * * chisq = (z1 - z2)(t) * VD * (z1 - z2) * * where * * VD = (D * Vx0 * D(t))(inv) = (Vz1 + Vz2)(inv) * * The chisquare is the same as that obtained by finding the average * the vertices as in kutl_vertex_average. * >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> * * Author: Paul Avery Created: Tue Sep 23 21:28:38 EDT 1997 * * Major revisions: * * end_doc