SSDReco/TrackReco: fix X1 cluster check, const-ref digit list, range-for copies - #306
Draft
gavinsdavies wants to merge 1 commit into
Draft
SSDReco/TrackReco: fix X1 cluster check, const-ref digit list, range-for copies#306gavinsdavies wants to merge 1 commit into
gavinsdavies wants to merge 1 commit into
Conversation
…-for copies - SSDRecUpstreamTgtAutre.cxx: third guard was mySSDClsPtrsY1 (copy-paste bug); corrected to mySSDClsPtrsX1 so all four views X0/Y0/X1/Y1 are actually checked before attempting the upstream-target track fit. - MakeSSDClusters_module.cc: FormClusters takes sensDigits by value, causing a full PtrVector copy on every sensor per event; function body is read-only on the container, so change signature to const reference in both declaration and definition. - MakeTrackSegments_module.cc: three range-for loops over rb::SpacePoint, rb::TrackSegment, and std::pair<...> containers copied non-trivial objects unnecessarily; changed to const auto&. Three tstmp1/2/3 loops that mutate the loop variable (i.region = ...) are left unchanged.
4 tasks
Collaborator
|
✔️ CI build for EMPHATIC Succeeded on slf7 for maxopt -- details available through the CI dashboard |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Part of #303.
Fixes
SSDReco/experimental/SSDRecUpstreamTgtAutre.cxx: the "at least one cluster in each of the 2×2 views" requirement checkedmySSDClsPtrsY1twice andmySSDClsPtrsX1never (copy-paste). Now checks X0, Y0, X1, Y1 as the comment intends. (Empty X1 previously fell through to produce zero candidates downstream, so physics output should be unchanged; the intended early return is restored.)SSDReco/MakeSSDClusters_module.cc:FormClusterstook itsart::PtrVector<SSDRawDigit>by value, called per sensor per event. The body is read-only with respect to the digit list (sorting happens in the caller beforehand) — now passed by const reference.TrackReco/MakeTrackSegments_module.cc: three range-for loops copied non-trivial objects (SpacePoint,TrackSegment, map pairs) per iteration — nowconst auto&. Three similar-looking loops were deliberately not converted because their bodies mutate the loop copy (i.region = kRegionNbeforepush_back).Verification
Behavior-preserving by construction. No local build environment and no repo CI — a collaborator build before undrafting would be appreciated.
🤖 Assisted by Claude Code (claude-fable-5)