fix: improved charge sign determination#4130
Merged
osbornjd merged 1 commit intosPHENIX-Collaboration:masterfrom Jan 21, 2026
Merged
fix: improved charge sign determination#4130osbornjd merged 1 commit intosPHENIX-Collaboration:masterfrom
osbornjd merged 1 commit intosPHENIX-Collaboration:masterfrom
Conversation
Contributor
📝 WalkthroughWalkthroughThe Changes
✨ Finishing touches
Comment |
Build & test reportReport for commit 7c3201954d3f506ad240cb3af4004d9e3e31be08:
Automatically generated by sPHENIX Jenkins continuous integration |
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.



This PR changes the charge sign determination in the track seed track parameter determination by taking the first and last cluster in the seed instead of the first and second cluster. That maximizes the lever arm and decreases the wrong charge sign assignment.
Types of changes
What kind of change does this PR introduce? (Bug fix, feature, ...)
TODOs (if applicable)
Links to other PRs in macros and calibration repositories (if applicable)
Pull Request Summary: Improved Charge Sign Determination
Motivation / Context
This PR addresses a bug in the charge sign determination logic for track seed parameter estimation. The original implementation used the first and second clusters in a seed to determine the charge sign. However, this approach has a limited lever arm and can lead to incorrect charge sign assignments, particularly for seeds with limited spatial resolution or close cluster separations. By using the first and last clusters instead, the implementation maximizes the lever arm and improves the robustness of charge sign determination.
Key Changes
TrackSeedHelper::circleFitByTaubin(), replaced the selection of the first two clusters with the first and last clusters from the seed trajectory*(positions_2d.begin() + 1)*(positions_2d.rbegin())firstphiandsecondphi) based on the radial position vectors from the circle centerdphi) computation between first and last cluster angles now has maximum separation, improving charge sign determination accuracyLines changed: +2/-2
Potential Risk Areas
Possible Future Improvements
Note: AI summary analysis is provided as reference. Please review the actual code changes and conduct appropriate physics validation given the critical nature of charge sign determination in track reconstruction.