subroutine kvir_vertex_beam(ntrk, list_trk, opt_trk, * update_tracks, zv, chisq, kput, error) * * begin_doc * * Build a new particle by adding the 4-momenta of several particles using * a vertex constraint to the beam position, using its covariance matrix. * * Input Parameters: * ntrk integer variable * # of input tracks * * list_trk(*) integer array * List of KWFIT tracks. * * opt_trk(*) integer array * opt_trk(it) = 0 => Track has no position info * opt_trk(it) = 1 => Track is not used to determine vertex * but is constrained to pass through it * opt_trk(it) = 2 => Track is used to determine vertex * pizeros and photons probably should use opt_trk = 0 * * update_tracks integer variable * 0 ==> Calculate chisquare (do not update input tracks) * 1 ==> Calculate chisquare & update input tracks * * zv(3) double precision array * Initial guess of vertex (it is not updated) * * kput integer variable * Track number to put resulting virtual particle * * Output Parameters: * chisq double precision variable * Chisquare of fit. * * error integer variable * = 0 All OK * > 0 Error * * Other routines: * * Notes: The information is passed to kvir_vertex_known. * * Author: Paul Avery Created: Wed Aug 20 01:06:36 EDT 1997 * * Major revisions: * * * end_doc