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

Stub list from TrackBuilder inconsistent #156

Closed tomalin closed 2 years ago

tomalin commented 2 years ago

Reported by @tschuh

The stub list the old KF gets differs from the stub list the TrackBuilder produces. The cause is that if one adds matches to the Tracklet object the best (smallest phi residual) will be kept, while if one adds matches to the Memories the last will be kept.

This affects the (current) KF vs (T.Schuh) newKF comparisons, since newKF gets stubs for KFin input from Tracklet::getL1Stubs(), whereas KF gets them from trackstublist that is loaded from FullMatch memory function getMatch().

MatchCalculator.cc calls addMatch() for both FullMatch memory and Tracklet objects when it finds a stub matching the helix extrapolation.

The addMatch() function of Tracklet(), if there are multiple stubs per layer, stores the one with the smallest phi residual (via Residual.cc). The addMatch() function of the FullMatch memory stores the last stub added.

tomalin commented 2 years ago

This issue is resolved by https://github.com/cms-L1TK/cmssw/pull/164