subroutine kvir_vertex_known(ntrk, list_trk, opt_trk, * update_tracks, zv, zv0, Vz0, * chisq, kput, error) * * begin_doc * * Build a new particle by adding the 4-momenta of several particles using * a vertex constraint. The vertex has an initial covariance matrix, * i.e. beam spot. The 4-momentum of the particle is evaluated at the new * vertex. * * 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) * * zv0(3) double precision array * (x,y,z) of prior vertex (it is not updated) * * Vz0(3,3) double precision array * 3x3 covariance matrix of zv0 * * 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 virtual particle has track parameters * * | P | * W = | | * | z | * * where P is the 4-momentum and z is the (x,y,z) vertex of its production * point. The covariance matrix of the virtual particle is * * | G + T*Vz*T(t) -T*Vz | * Vw = | | variable vertex * | -Vz*T(t) Vz | * * | G 0 | * Vw = | | fixed vertex * | 0 0 | * * G = sum[Ai*Vx0i*Ai(t)) - S1i*VDi*S1i(t)] * * S1i = Ai * Vx0i * Di * S2i = Ai * Vx0i * Di * VDi = S1i * VDi * S3i = Ai * Vx0i * Di * VDi * Ei = S2i * Ei = S1i * VDi * Ei * * T = -B + sum(S3i) * * |1 0 0 0 0 aiz -aiy| * |0 1 0 0 -aiz 0 aix| * Ai = |0 0 1 0 aiy -aix 0 | * |0 0 0 1 0 0 0 | * * | 0 -sum(aiz) sum(aiy)| * B = | sum(aiz) 0 -sum(aix)| * |-sum(aiy) sum(aix) 0 | * | 0 0 0 | * * where aix = -0.299792458 * Qi * Bx, with Qi = charge and (Bx,By,Bz) = * the components of the B field. * >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> * * Author: Paul Avery Created: Wed Aug 20 01:06:36 EDT 1997 * * Major revisions: * * * end_doc