The Adaptive Vertex Fitter (AVF)

Complete: 5

The Adaptive fitter (AVF) is an iterative re-weighted Kalman filter which down-weights tracks according to their chi2 distance to the vertex. A detailed description can be found in note CMS AN 2006/104. This algorithm has the advantage that the weights can be fractional (soft assignment) and that they vary from one iteration to the next, until the fit converges. No prior estimate of the weights of the tracks or of the fraction of outliers is thus needed.

The fitter is implemented in the package RecoVertex/AdaptiveVertexFit

An easy way to use the AVF is through the AdaptiveVertexFitter, which defines reasonable defaults. It is a VertexFitter. Example:

AdaptiveVertexFitter fitter;
TransientVertex myVertex = fitter.vertex(vectorOfRecTracks);

If you want more control, you can do:

              double maxshift =0.0001,
              unsigned int maxstep = 30,
              double maxlpshift = 0.1,
              double weightThreshold = 0.001;
              double sigmacut = 5.;
              double Tini = 256.;
              double ratio = 0.25;
              static AdaptiveVertexFitter fitter(
                 GeometricAnnealing ( sigmacut, Tini, ratio ), 
                 KalmanVertexSmoother() );
              fitter.setParameters ( maxshift, maxlpshift, maxstep, weightThreshold );

Alternatively, you can use it via the ConfigurableVertexFitter.


To change the parameters, use = setParameters= methods, giving either the full list of values, or a PSet as above:

GSFParameters = cms.PSet(
        maxshift = cms.double(0.0001),
        maxstep = cms.int32(30),
        maxlpshift = cms.double(0.1),
        weightthreshold = cms.double(0.001)

The parameters are the following:

Parameter Name Description Default
maxshift Convergence criterion (maximum transverse distance between vertex computed in the previous and the current iterations) 0.0001
maxlpshift Criterion for the relinearization of the tracks 0.1
maxNbrOfIterations Maximum number of iterations to perform 30
weightthreshold Minimum track weight for a track to be considered "significant". If fewer than two tracks are significant, an invalid vertex is returned. 0.001

Other parameters can be passed via the GeometricAnnealing argument (see above). Of these sigmacut is particularly important. Tracks this number of sigma from the vertex are given a weight of 0.5. Increasing it will find tracks further from the vertex. This parameter can be easily set if using the ConfigurableVertexFitter.


The output is returned as a TransientVertex. Note that:

  • Atlhough TransientVertex::originalTracks().size() will tell you the number of tracks in the vertex, many of these may have very small weights, meaning that they are unlikely to belong to it. Therefore you should check the individual tracks weights using TransientVertex::trackWeight(trk).
  • TransientVertex::degreesOfFreedom() is defined as twice the sum of the tracks weights minus 3. If many of the track weights are small, this can be negative ! Similarly, the vertex chi2 is calculated including the weights. It can therefore be very different from that obtained using a KalmanVertexFit. There is no good reason why it should have a chi2 distribution.
  • Vertices will only be kept if at least two tracks have weights exceeding parameter weightthreshold. Note that some of the found vertices may therefore have many/all tracks with very small weights. These should be treated with some distrust.

Vertex validity and exceptions

The vertex returned may not be valid in some cases. The user had to check the validity of the vertex with the method isValid(). In each case, an error message is put into the log:

  • The maximum number of iterations is exceeded
  • The fitted position is out of the tracker bounds
  • Too many tracks have been downweighted, and fewer than two significant tracks remain.

Review status

Reviewer/Editor and Date Comments
Main.speer -14 Feb 2007 new page
JennyWilliams - 10 Apr 2007 edited for swguide inclusion
ThomasSpeer - 27 Feb 2009 Review and update
IanTomalin - 27 July 2009 Updated

Responsible: Main.speer (Thomas Speer)
Last reviewed by:

Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r7 - 2009-07-22 - IanTomalin

    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    CMSPublic All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback