next up previous contents
Next: 4.6.3 SUBROUTINE ZAURST(FORCE_REJECT) : Up: 4.6 Patch SGVANAUTL : Previous: 4.6.1 SUBROUTINE ZAUVF1(FRCREJ, ERROR)   Contents


4.6.2 SUBROUTINE ZAUVF2(TYPE, MTRK, PAR, WGT, INVTX, PCUT, XYZ, VCOV, VCOVS, TRWT, SFACT, NSIGM, CHI2VX, NVTRK, ERROR) : Vertex FIT 2

This routine fits the primary vertex by calling PXFVTX and checking the $\chi^2$ probability of the fit. If it is bellow PCUT, the worst track is removed from the fit and a new attempt is done. The routine returns the $\chi^2$ of the fit, the position of the vertex with covariance matrix, and a list of tracks used in the fit.

ARGUMENTS:
INPUT :
    TYPE : CHARACTER type of fit :
             'BSPOT' : Just return the beamspot (cov-mat is diagonal,
                        with beamspot uncertainties)
             'BSCONSTR' : Full fit with beam-spot constraint
             anything else : Full fit without beam-spot constraint
    MTRK : total number of tracks
    PAR & WGT : TKR parameters with weight matrix at the perigee
                 for each track
    INVTX : LOGICAL array flagging which tracks should initially
              be considered in the fit
    PCUT : Xi^2 probability when track rejection should stop
    NSIGM : SFACT, the scale factor for observed errors (rather
            than calculated) is such that the probability contents
            inside +-SFACT*NSIGM is the same as that inside +-NSIGM
            if the errors would have been gaussian.
OUTPUT :
    XYZ    : position of primary vertex.
    VCOV   : Covariance matrix of XYZ calculated from track errors.
    VCOVS  :    "         "    "   "       "     from observed spread
             of tracks around XYZ.
    TRWT   : Contribution of each track to the fit (makes 'de-fitting'
             possible.
    SFACT : number to scale the diagonal elements of VCOVS with so
            that the probability contents inside
            W +- SFACT*NSIGN*sqrt(VCOVS_w,w) ( where w is x,y, or z)
            the same as within +-NSIGN for a standardized Gaussian
    CHI2VX : Xi^2 of the fit.
    INVTX : LOGICAL array flagging which tracks were used in the fit
    NVTRK : Number of tracks used in the fit
    ERROR : error flag.
IMPLICIT INPUTS:
     From  /PXCPRO/ : BEAMOY average beam position, and SIGBE beam-spread
IMPLICIT OUTPUTS:
    none
CALLED BY :
ZAUVF1, Vertex Fit 1 (or directly by ZAUSER) (see 4.6.1).

CALLED ROUTINE(S):
PXFVX2
(To call a slightly hacked version of DELPHI PXDST routine PXFVT for vertex fitting.
FKMI5
(To do matrix invert.)
UCOPY,VZERO,LVMAX,PROB,VADD,STUDIN,TRQSQ
(CERNLIB routines)

SIDE EFFECTS:
none

AUTHORS:
M. Berggren, LAL

CREATION DATE:
27-jul-1992


next up previous contents
Next: 4.6.3 SUBROUTINE ZAURST(FORCE_REJECT) : Up: 4.6 Patch SGVANAUTL : Previous: 4.6.1 SUBROUTINE ZAUVF1(FRCREJ, ERROR)   Contents
Mikael Berggren 2003-03-27