Refitting tracks with TwoBodyDecay constraints

Complete: 1


Description of the TwoBodyDecay algorithm

Related documents

Author of TwoBodyDecay package : Edmund Widl, R. Fruhwirth. Reference document : CMS NOTE-2007/032

Implementation and validation of the refitting using TwoBodyDecay constraint (ongoing) : Jeremy Andrea, Eric Conte, Christophe Goetzmann. Main talks :

Installation of the package

The current package has been developed and validated on CMSSW release 4.4.X.

scramv1 project CMSSW CMSSW_4_4_2
cd CMSSW_4_4_2/src
cvs co UserCode/IPHCalignment/
source UserCode/IPHCalignment/

Directories called 'Alignement/TwoBodyDecay' and 'RecoTracker/TrackProducer' will be created in 'CMSSW_4_4_2/src'. To compile, use the classical CMSSW command 'scramv1 b -jX' with X the number of cores.

Details about the installator script '' can be found here :

The available recipes

There is a python 'cff' file dedicated to each kind of constraint in the directory 'RecoTrack/TrackProducer/python'.

  • '' for vertex constraint (3 parameters)
  • '' for momentum magnitude constraint (1 parameter)
  • '' for trajectory state constraint (5 parameters)

The module sequences of these files are based on the same sketch :

  • selecting the tracks with a TrackSelector
  • refitting the tracks according to the alignment and calibration configuration
  • constructing a constraint with TwoBodyDecay from the selected tracks. The constraint is calculated from the estimation of the parameters of a model describing the Z to mu mu kinematics. A threshold on the quality of the fit is applied.
  • refitting the selected track with the constraint produced by TwoBodyDecay If TwoBodyDecay does not manage to produce the constraint (or if the constraint is rejected by the chi2 cut), the refit is done without constraint.

In order to use these files, you have just to include in your main python script the following line (in this example case : the momentum constraint) :


A complete example of main python script can be found here :

Nota Bene :

  • The collection of tracks to give in input of the sequence is by default 'generalTracks'. This statement can be changed by adding the simple line in your main script :
AlignmentTrackSelector.src = cms.InputTag( "generalTracks" )
  • The sequence will return a collection of 'reco::Track' with the label 'TrackRefitterTBDConstraint'.

Advanced use : change recipe settings

Track selection


Several parts in the configuration.

Parameters DescriptionSorted ascending
'beamSpot' InputTag of the beamSpot
'secondaryMass' mean value of the muon mass
'primaryMass' mean value of the Z mass
'primaryWidth' width of the Z boson = weight to the Z mass in the chi2 estimation

Parameters Description
'MaxIterationDifference' parameter specifying the end of the iteration (chi2 difference between n et n-1)
'RobustificationConstant' parameter related to outlier rejection
'MaxIterations' limit for avoiding infinite loop
'UseInvariantMass' do you want to use the mass constraint in the fit ?

  • cut

Parameters Description
'chi2cut' chi2 max value allowed for the TwoBodyDecay fit quality

  • error propagation to the constraint

Parameters Description Comments
'isErrorPrpgated' if True, errors from TwoBodyDecay fit are propagated and used in the constraint building available for momentum magnitude constraint only!
'fixedError' if 'isErrorPrpgated' is set to False, the value of this parameter is used as constraint uncertainty available for momentum magnitude constraint only!
'rescaleError' This parameter is a multiplying factor applied on the TrajectoryState error. Set to 1 for no rescale. available for trajectory state constraint only!

Note : In the case of vertex position constraint, the error on X, Y and Z (coordinates of the primary vertex) are propagated as the covariance matrix of those parameters, calculated by TwoBodyDecay.

-- EricConte - 14-Feb-2012 -- ChristopheGoetzmann - 15-Feb-2012

Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r5 - 2012-03-01 - ChristopheGoetzmann
    • 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-2022 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