Draft
feat(reco): make SecondaryVerticesHelix variadic and add far-forward-inclusive output#2928
Conversation
Co-authored-by: wdconinc <4656391+wdconinc@users.noreply.github.com>
for more information, see https://pre-commit.ci
Copilot
AI
changed the title
feat(reco): add far-forward-inclusive SecondaryVerticesHelix inputs
feat(reco): make SecondaryVerticesHelix variadic and add far-forward-inclusive output
Aug 31, 2026
Copilot created this pull request from a session on behalf of
wdconinc
August 31, 2026 17:36
View session
| const auto& p1 = candidates[i1].particle; | ||
| const auto& p2 = candidates[i2].particle; | ||
|
|
||
| if (!(m_cfg.unlikesign && p1.getCharge() + p2.getCharge() == 0)) |
Contributor
There was a problem hiding this comment.
boolean expression can be simplified by DeMorgan's theorem
Suggested change
| if (!(m_cfg.unlikesign && p1.getCharge() + p2.getCharge() == 0)) | |
| if (!m_cfg.unlikesign || p1.getCharge() + p2.getCharge() != 0) |
| @@ -110,8 +115,8 @@ | |||
| continue; | |||
| edm4hep::Vector3f pairPos = 0.5 * (h1AtDcaTo2 + h2AtDcaTo1); | |||
Contributor
There was a problem hiding this comment.
statement should be inside braces
Suggested change
| edm4hep::Vector3f pairPos = 0.5 * (h1AtDcaTo2 + h2AtDcaTo1); | |
| } | |
| edm4hep::Vector3f pairPos = 0.5 * (h1AtDcaTo2 + h2AtDcaTo1); |
wdconinc
reviewed
Aug 31, 2026
Comment on lines
55
to
58
| auto field = fieldObj.magneticField( | ||
| {pVtxPos4f.x / edm4eic::unit::mm * dd4hep::mm, pVtxPos4f.y / edm4eic::unit::mm * dd4hep::mm, | ||
| pVtxPos4f.z / edm4eic::unit::mm * dd4hep::mm}); // in unit of dd4hep::tesla | ||
| float b_field = field.z(); |
Contributor
There was a problem hiding this comment.
Hmm, I see, so this picks the field at the primary vertex, and uses that as an approximation for the field for the secondary vertex as well, not ideal, and certainly won't use the correct field at the far forward vertices without the index shenanigans below.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
for more information, see https://pre-commit.ci
| const auto& p2 = candidates[i2].particle; | ||
|
|
||
| if (!(m_cfg.unlikesign && p1.getCharge() + p2.getCharge() == 0)) | ||
| if (!(m_cfg.unlikesign && p1.getCharge() + p2.getCharge() == 0)) { |
Contributor
There was a problem hiding this comment.
boolean expression can be simplified by DeMorgan's theorem
Suggested change
| if (!(m_cfg.unlikesign && p1.getCharge() + p2.getCharge() == 0)) { | |
| if (!m_cfg.unlikesign || p1.getCharge() + p2.getCharge() != 0) { |
Contributor
Capybara summary for PR 2928
Last updated 2026-08-31T22:19-04:00 ed0622f |
…inclusive output (fix: iwyu) (#2929) This PR applies the include-what-you-use fixes as suggested by https://github.com/eic/EICrecon/actions/runs/33422690879. Please merge this PR into the branch `copilot/modify-secondaryverticeshelix-algorithm` to resolve failures in PR #2928. Auto-generated by [create-pull-request][1] [1]: https://github.com/peter-evans/create-pull-request Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.
Briefly, what does this PR introduce? Please link to any relevant presentations or discussions.
This updates
SecondaryVerticesHelixto consume a positional primary-vertex input plus a variadic set of reconstructed-particle collections, then addsSecondaryVerticesHelixInclFarForwardto include B0-adjacent forward detectors (Roman pot and off-momentum) with zero-field treatment in forward inputs.Algorithm contract
SecondaryVerticesHelixinput signature changed from one particle collection to variadic particle collections.Factory wiring
SecondaryVerticesHelix_factorynow uses variadic PODIO input for reconstructed particles.Forward-field handling
B=0to match forward-region conditions.New collection
SecondaryVerticesHelixInclFarForwardinsrc/global/reco/reco.ccwith inputs:PrimaryVerticesReconstructedParticlesForwardRomanPotRecParticlesForwardOffMRecParticlesWhat is the urgency of this PR?
What kind of change does this PR introduce?
Please check if any of the following apply
AI assistance was used to implement the factory/algorithm interface update and plugin wiring.