KF Track Producer Algorithm

Complete: 5

Goal of the page

This page is intended to familiarize you with the TrackProducer. After a brief introduction, the list of configuration parameters and the description of the algorithm are provided. The KF Track Producer Algorithm is implemented in the RecoTracker/TrackProducer package. In this package the Gaussian Sum Filter Track Producer is also implemented: for more info on the Gsf, see: SWGuideGsfFitter



The track reconstruction process is divided in 3 steps:
  1. Seeding: few hits (usually pair or triplets) are chosen to get a rough estimate of track parameters and to seed the pattern recognition.
  2. Pattern Recognition: the hits belonging to the track are selected in the whole tracker.
  3. Final Fit: hits selected during the pattern recognition are fitted in order to find the best estimate of track parameters and errors.
The track fitter-smoother based on Kalman Filter formalism is responsible for the last step. It was originally implemented in ORCA and then ported to CMSSW.

The Kalman Filter is initialized at the location of the innermost hit with a rough estimate obtained during seeding. The fit then proceeds in an iterative way through the list of hits. The track parameters and their covariance matrix are updated with the measurement and the trajectory is propagated (taking into account energy loss and multiple scattering) to the surface associated with the next hit. This sequence is repeated until the last hit is included. This first filter is complemented with a smoothing stage: a second filter is initialized with the result of the first one and runs backwards. At each hit the updated parameters of this second filter are combined with the predicted parameters of the first filter. This procedure yields optimal estimates of the parameters at the surface associated with each hit.

An important additional feature is the TrackRefitter: some use-cases require performing a new final fit over already reconstructed Tracks. For examples, for alignment studies, you can refit Tracks after having modified the geometry of detectors.

Usage of the algorithm

The Final Fit is the last step of the track reconstruction process and therefore it is common to all tracking algorithms.

Default configuration files are included into:

The module to run is called ctfWithMaterialTracks. Its default parameters are:

  • string alias = "ctfWithMaterialTracks" - alias of the produced TrackCollection.
  • string Fitter = "KFFittingSmootherWithOutliersRejectionAndRK" - the name of the algorithm used to perform the fit.
  • string Propagator = "RungeKuttaTrackerPropagator" - the name of the propagator used to propagate track parameters from layer to layer during the fit (see SWGuidePropagatorsForTracking).
  • InputTag src = ckfTrackCandidates - name of the module that produced the input TrackCandidate Collection.
  • InputTag beamSpot = offlineBeamSpot - name of the module that produced the BeamSpot.
  • string TTRHBuilder = "WithTrackAngleAndTemplate" - label of the TransientTrackingRecHitBuilder used.
  • bool TrajectoryInEvent = true - flag to put also the fitted Trajectory in the event. For more info, see WorkBookTrackAnalysis#TrajLay.
  • bool useHitsSplitting = false - used to split strip matched hits after fitting/refitting the track.
  • InputTag clusterRemovalInfo = "" - Sets the information on cluster removal, and turns it on. "" means no need to do re-keying.
  • string AlgorithmName = "undefAlgorithm" name of the algorithm used.

Each algorithm imports the default parameters and, if needed, overwrites some of them. For example, Ctf uses RecoTracker/TrackProducer/TrackProducer/python/CTFFinalFitWithMaterial_cfi.py, while Road Search RecoTracker/TrackProducer/TrackProducer/python/RSFinalFitWithMaterial_cfi.py.

The products of the TrackProducer are listed in SWGuideDataFormatsRecoTrack.

Software architecture

There is a base, template class for all the producers: TrackProducerBase. It contains the implementation of some general purpose methods to retrieve services from the EventSetup or collections from the Event.

From this class two branches arise: KfTrackProducerBase and GsfTrackProducerBase. They contain the implementation of the method that puts the products in the Event.

Two classes inherit from KfTrackProducerBase: TrackProducer and TrackRefitter. They define the two producer modules: the produce method is implemented in this class. The heart of this method is the call to the methods of the TrackProducerAlgorithm, the class where they algorithm is actually implemented.

The TrackProducerAlgorithm implements six methods:

  • runWithCandidate: Run the Final Fit taking TrackCandidates as input (used by the TrackProducer class)
  • runWithTrack: Run the Final Fit taking Tracks as input (for Refitter)
  • runWithMomentum: Run the Final Fit taking TrackMomConstraintAssociation as input (Refitter with momentum constraint)
  • runWithVertex: Run the Final Fit taking TrackVtxConstraintAssociation as input (Refitter with vertex constraint)
  • buildTrack: Construct Tracks to be put in the event. This method is used by all the methods above.
  • getInitialState: returns the initial state used to refit tracks.

The logic of all the "run" methods is the following:

  1. Loop over the element of the input collection: TrackCandidates for the TrackProducer, Tracks for the TrackRefitter.
  2. For each Track(Candidate), convert the TrackingRecHits into TransientTrackingRecHits and compute the number of degrees of freedom.
  3. Apply vertex or momentum constraints (for runWithVertex and runWithMomentum only).
  4. Get the initial state for the fit.
  5. Perform the fit: if the fit succeeds, it returns a Trajectory.
  6. Compute the track parameters at the point of closest approach to the beam line
  7. Create the Track and return it.

Review status

Reviewer/Editor and Date (copy from screen) Comments
GiuseppeCerati - 29 Apr 2009 Documentation Review
GiuseppeCerati - 06 Feb 2008 First version
KatiLassilaPerini - 29 Jan 2008 created template page

Responsible: GiuseppeCerati
Last reviewed by: Most recent reviewer

Edit | Attach | Watch | Print version | History: r8 < r7 < r6 < r5 < r4 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r8 - 2009-04-29 - GiuseppeCerati
    • 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-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback