cms-L1TK / cmssw

Fork of CMSSW where improvements to L1 tracking code are developed.
http://cms-sw.github.io/
Apache License 2.0
4 stars 5 forks source link

Incorrect dof for chi2rphi and chi2rz in L1TrackNtuplePlot #210

Closed Chriisbrown closed 1 year ago

Chriisbrown commented 1 year ago

The degrees of freedom calculated to give chi2/dof is incorrect for chi2rz and chi2rphi, it should be nstub - 2 to match what is calculated in the track word.

https://github.com/cms-L1TK/cmssw/blob/791c901f9706b28216598c23bff4370ecee020fc/L1Trigger/TrackFindingTracklet/test/L1TrackNtuplePlot.C#L1054

tomalin commented 1 year ago

The equation given by Chris is correct in the case of a 4-param KF fit. If a 5-param KF fit is being used, then the number of degrees of freedom for chi2rphi should be nstub-3.

Jingyan95 commented 1 year ago

I created a PR fix this