next up previous contents index
Next: Auxiliary routine for V0s Up: Kinematics and Track Operations Previous: Kinematic fitting   Contents   Index


Vertex fitting with YTOP

The following functions provide an interface to the YTOP package in ALEPHLIB. This package is described in the note ALEPH 91-132 , SOFTWR 91-005 . All these functions build a new vertex available in QVRT with its full error matrix .

None of the functions described below can work when reading a NANO-Dst ,

\fbox {IFIT = KVFITN (ND, ID, \lq part$-$name')}

Fit ND tracks stored in ID to a common vertex. IFIT is the number of new track coming into the vertex; this track is stored with the name 'part-name' and can be accessed with KPDIR, etc. The vertex number is the end vertex of track IFIT:

IVX = KENDV(IFIT).

IFIT = -1 if the fit fails.

\fbox {IFIT = KVFITV (IV,ND, ID, \lq part$-$name')}

Same as KVFITN except that vertex IV is used as an additional constraint in the fit.

Both functions refit the track parameters of the input tracks and calculate the 4-vector and error matrix of the new track (IFIT) at the fit vertex. The fit vertex position and error matrix are stored in the end vertex of IFIT: KENDV(IFIT). There can be any number of input tracks, but if NTR > 10, KVFITx will first vertex tracks 1-10 and then add the following tracks to this vertex. Input tracks can be either charged tracks, V0s previously refitted using KVFITN (otherwise the error matrix is not available), or ``tracks" resulting from a previous fit.

The $ \chi^{2}_{}$/NDF for the vertex fit may be accessed with the statement function QVCHIF(IVX), where IVX is the end vertex of IFIT. The number of degress of freedom for the routines are:

NDF = 2 * ND -3
for KVFITN
NDF = 2 * ND
for KVFITV

The following statement functions give the distance between two vertices IV1 and IV2.

DIST = QVDIF2(IV1,IV2)
distance in r - $ \phi$
DIST = QVDIF3(IV1,IV2)
distance in 3 dimensions

Example:

Assume that you have a D0$ \to$K$ \pi$ candidate (ID0) and a lepton (ILEP) from a B-meson decay. The following code finds the vertex of the B decay.


      CALL QVSETM(IPION,QPMASS('PI+'))      !pion mass
      CALL QVSETM(IKAON,QPMASS('K+'))       !kaon mass
      ITL(1) = IPION
      ITL(2) = IKAON
      ID0    = KVFITN(2,ITL,'D0Kp')
      IF(ID0.GT.0) THEN
        RMD0 = QM(ID0)            ! vertex refitted D0 mass
        IVD0 = KENDV(ID0)         ! D0 vertex
        CHI2 = QVCHIF(IVD0)       ! chi**2 of the D0 vertex
C
        ITL(1) = ILEP
        ITL(2) = ID0
        IB     = KVFITN(2,ITL,'Blep')    ! fit B vertex
        IF(IB.GT.0) THEN
          IVB = KENDV(IB)                ! B vertex
          CHI2 = QVCHIF(IVD0)            ! chi**2 of B vertex
          DIST = QVDIF3(IVB,IVD0)        ! distance between B and D0
                                         ! vertex
        ENDIF
      ENDIF

\fbox {IFIT = KVFITC (NTKD,ITKD,RMAS,DRMAS,\lq part$-$name')}

Fits NTKD tracks in array ITKD to a common vertex with mass constraint RMAS in the fit. The new track is stored with the name 'part-name' and can be accessed as described above for KVFITN or KVFITV : The vertex number is the end vertex of track IFIT:

IVX = KENDV(IFIT).

IFIT = -1 if the fit fails.

NTKD
Number of input tracks to be fitted
ITKD
Array of input ALPHA ``track'' numbers
RMAS
Mass to which the tracks are constrained ( in Gev )
DRMAS
Error on Mass**2 = 2*RMAS*Sigma(DMAS)
'part-name'
Name which will be given to the new track

All above quantities are input arguments to KVFITC .

This routine may give problems , or wrong results , if DRMAS is not properly tuned . It is strongly recommended to use KVFTMC instead ( described just below) which doesn't need any error on the mass as input .

\fbox {IFIT = KVFTMC (NTKD,ITKD,\lq part$-$name',USE,RMAS)}

Fits a subset of NTKD tracks in array ITKD to a common vertex with mass constraint RMAS in the fit. Same remarks as for KVFITC for the fitted vertex .

NTKD
Number of input tracks in array ITKD
ITKD
Array of input ALPHA ``track'' numbers
'part-name'
Name which will be given to the new track
USE
Array of logicals of size NTKD defining which tracks to use in the fit
RMAS
Mass to which the tracks are constrained

All above quantities are input arguments to KVFTMC .


next up previous contents index
Next: Auxiliary routine for V0s Up: Kinematics and Track Operations Previous: Kinematic fitting   Contents   Index
Joel Closier
2000-02-07