Skip to content

mbdvtxmap now being filled during calpass 2#4275

Merged
pinkenburg merged 1 commit into
sPHENIX-Collaboration:masterfrom
mchiu-bnl:mbd
May 27, 2026
Merged

mbdvtxmap now being filled during calpass 2#4275
pinkenburg merged 1 commit into
sPHENIX-Collaboration:masterfrom
mchiu-bnl:mbd

Conversation

@mchiu-bnl
Copy link
Copy Markdown
Contributor

@mchiu-bnl mchiu-bnl commented May 26, 2026

comment: needed to do vertex match to tracking vertex

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work for users)
  • Requiring change in macros repository (Please provide links to the macros pull request in the last section)
  • I am a member of GitHub organization of sPHENIX Collaboration, EIC, or ECCE (contact Chris Pinkenburg to join)

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)

MBD Vertex Map Population Extended to Calibration Pass 2

Motivation / Context

The MBD (Minimum Bias Detector) vertex reconstruction is critical for global vertex matching with the tracking system. Previously, the MbdVertexMap was only populated during calibration pass 0 (_calpass==0), limiting vertex matching availability during other processing stages. This change extends vertex map population to calibration pass 2 and other passes (except pass 1), enabling broader support for vertex matching workflows while maintaining compatibility with fits-only mode.

Key Changes

  • Reconstruction condition refactored: Changed from _calpass==0 to _calpass!=1, expanding vertex map population to calibration passes 0, 2, 3, and potentially higher, while explicitly excluding pass 1
  • Simplified logic: Integrated the !_fitsonly check from an inner conditional into the outer condition guard, removing nested logic and directly gating the entire vertex creation block
  • Unified vertex insertion: Removed the separate if (!_fitsonly) guard around m_mbdvtxmap->insert(vertex), now executed directly when the outer condition is satisfied

Potential Risk Areas

  • Reconstruction behavior change: Vertices will now be generated during calpass 2 and higher, which may affect downstream analyses that depend on the availability (or absence) of MBD vertices at specific processing stages
  • Pass 1 exclusion specificity: Pass 1 is explicitly excluded (_calpass!=1), likely because it serves a different role in calibration; any modifications to pass numbering conventions could inadvertently affect this logic
  • Consistency with fits-only mode: The condition now uniformly prevents vertex insertion when _fitsonly=true across all passes; verify that this aligns with intended behavior for all calibration configurations

Possible Future Improvements

  • Consider parameterizing the excluded calibration passes to improve configurability
  • Document the role and significance of each calibration pass in relation to vertex reconstruction and tracking
  • Evaluate whether additional safeguards are needed to handle corner cases during transitions between calibration passes

Note: AI-assisted analysis is used throughout this summary. Please validate the reconstruction logic against your collaboration's calibration workflow documentation and test the impact on downstream vertex matching algorithms.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 26, 2026

📝 Walkthrough

Walkthrough

The PR refines the vertex creation and recording logic in MbdReco::process_event. The outer guard condition now requires !_fitsonly and changes the calibration-pass check from _calpass == 0 to _calpass != 1, consolidating previously nested conditionals into a single coherent condition that determines when MbdVertexv3 objects are created and recorded.

Changes

MBD Vertex Recording

Layer / File(s) Summary
Vertex creation and recording condition refinement
offline/packages/mbd/MbdReco.cc
Outer guard condition is refined to require !_fitsonly and check _calpass != 1 instead of _calpass == 0. The nested if (!_fitsonly) wrapper around the vertex insertion is removed, making insertion execute directly when the updated outer condition is satisfied.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 2151bfd7-34a9-4eb1-99af-6d5e40b34530

📥 Commits

Reviewing files that changed from the base of the PR and between bffd018 and 97aeb59.

📒 Files selected for processing (1)
  • offline/packages/mbd/MbdReco.cc

Comment thread offline/packages/mbd/MbdReco.cc
@sphenix-jenkins-ci
Copy link
Copy Markdown

Build & test report

Report for commit 97aeb59b00060d4c4eadc6c025f8c6aeaee79583:
Jenkins passed


Automatically generated by sPHENIX Jenkins continuous integration
sPHENIX             jenkins.io

@pinkenburg pinkenburg merged commit c4dedbd into sPHENIX-Collaboration:master May 27, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants