Fix bugs in HYBRID_NEWKF hit pattern #346
Open
+115
−48
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR description:
@sarafiorendi reported that when running HYBRID_NEWKF, the code HitPatternHelper.cc wrote outside array boundaries. On investigating, I found that although HitPatternHelper is full of bugs, the real cause of this was:
This line incorrectly reversed the order of the hit pattern bits
cmssw/L1Trigger/TrackFindingTracklet/src/TrackQuality.cc
Line 103 in 9db4e13
With (1) fixed, it was also necessary to fix
cmssw/L1Trigger/TrackFindingTracklet/src/TrackFindingProcessor.cc
Line 84 in 9db4e13
ACTION: @tschuh should note that I believe the same bug exists in TrackerTFP, but this PR does not address that.
I've added these lines (disabled by default) https://github.com/cms-L1TK/cmssw/blob/ianFixHitPattern/L1Trigger/TrackFindingTracklet/test/L1TrackNtupleMaker.cc#L1213 to check the accuracy of the hit pattern. They confirmed the bug fix above, and also identified one other bug solved by this PR:
cmssw/L1Trigger/TrackerTFP/src/LayerEncoding.cc
Line 183 in 9db4e13