Skip to content

EventPlaneReco: Update sEPD channel selection and charge handling#4244

Merged
pinkenburg merged 2 commits intosPHENIX-Collaboration:masterfrom
Steepspace:EventPlaneReco
Apr 12, 2026
Merged

EventPlaneReco: Update sEPD channel selection and charge handling#4244
pinkenburg merged 2 commits intosPHENIX-Collaboration:masterfrom
Steepspace:EventPlaneReco

Conversation

@Steepspace
Copy link
Copy Markdown
Contributor

@Steepspace Steepspace commented Apr 11, 2026

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, ...)

Updated the sEPD event plane reconstruction strategy based on recent QA findings. Major changes include:

  • Removed isHot channel exclusion: QA determined no channels are consistently hot in sEPD; using all available channels instead.
  • Implemented charge clamping: Added a configurable threshold (default 50) to cap the maximum charge per channel, mitigating the impact of non-linearities or outliers.
  • Default Ring 0 exclusion: Added logic to skip the innermost ring (Ring 0) by default to avoid high-intensity beam background noise.
  • Updated noise floor: Increased default minimum channel charge from 0.2 to 0.5.
  • Added setters for the new charge threshold and ring-skipping toggle.

TODOs (if applicable)

sEPD Q Vector Calibration Generation: #4245

Links to other PRs in macros and calibration repositories (if applicable)

EventPlaneReco: Update sEPD channel selection and charge handling

Motivation / Context

QA showed no consistently "hot" sEPD channels, so excluding channels by an isHot flag was unnecessary and could remove useful information. At the same time, high-intensity beam background from the innermost ring and occasional large per-channel signals/non-linearities can bias Q-vector sums. This PR adjusts selection and per-channel charge handling to reduce those effects while allowing configurable control.

Key Changes

  • Removed isHot-based channel exclusion; all available sEPD channels are considered.
  • Implemented configurable per-channel charge clamping: charges above m_sEPD_charge_threshold are capped (default 50). The setter clamps negative inputs to 0 so threshold=0 disables clamping.
  • Default behavior now skips the innermost ring (Ring 0) when m_skipRing0 is true (default true); skipping is governed by the ring index derived from the tower key.
  • Increased the sEPD minimum channel charge (noise floor) from 0.2 → 0.5; channels with charge <= this value are suppressed.
  • Added runtime configuration setters: set_charge_threshold(double) and set_skipRing0(bool).

Potential Risk Areas

  • Reconstruction changes: removing hot-channel exclusion and introducing Ring 0 skipping, a higher noise floor, and charge clamping will change event-plane Q-vectors and potentially event-plane resolution — validate against physics benchmarks.
  • Bias from clamping: capping high charges (default 50) can bias harmonic sums for high-multiplicity or high-charge events; perform sensitivity studies across centrality/energy ranges.
  • Default-parameter impact: new defaults (skipRing0=true, charge_threshold=50, min_channel_charge=0.5) affect all users; ensure analyses expecting prior defaults are revalidated.
  • IO / API: new setters and default value changes are backward-compatible API additions, but behavior changes may affect reproducibility of prior results.
  • Thread-safety / performance: no explicit thread-safety changes observed; slight per-channel branching for clamping is unlikely to materially affect performance but should be profiled in high-rate workflows.

Possible Future Improvements

  • Expose per-ring or per-channel charge thresholds and clamping policies for finer control.
  • Add calibration-driven or run-dependent thresholds (e.g., per-run QA) instead of fixed defaults.
  • Instrument QA metrics and monitoring to detect transient hot channels and toggle exclusions dynamically.
  • Document recommended validation plots and benchmarks for physics groups to adopt after the change.

AI-generated summaries can be mistaken—please verify the technical details against the code diffs and tests during review.

Updated the sEPD event plane reconstruction strategy based on recent QA findings. Major changes include:
- Removed isHot channel exclusion: QA determined no channels are consistently hot in sEPD; using all available channels instead.
- Implemented charge clamping: Added a configurable threshold (default 50) to cap the maximum charge per channel, mitigating the impact of non-linearities or outliers.
- Default Ring 0 exclusion: Added logic to skip the innermost ring (Ring 0) by default to avoid high-intensity beam background noise.
- Updated noise floor: Increased default minimum channel charge from 0.2 to 0.5.
- Added setters for the new charge threshold and ring-skipping toggle.
Copilot AI review requested due to automatic review settings April 11, 2026 14:57
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 11, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 85f601e1-6981-4619-afbf-774419d96bfe

📥 Commits

Reviewing files that changed from the base of the PR and between 2d515ad and cd1e1bf.

📒 Files selected for processing (2)
  • offline/packages/eventplaneinfo/EventPlaneReco.cc
  • offline/packages/eventplaneinfo/EventPlaneReco.h
🚧 Files skipped from review as they are similar to previous changes (1)
  • offline/packages/eventplaneinfo/EventPlaneReco.h

📝 Walkthrough

Walkthrough

EventPlaneReco updates sEPD processing: ring-indexed skipping of ring 0 (configurable), replaces hot-channel gating with noise suppression (charge <= threshold), and adds optional charge clamping when charge exceeds a configurable threshold; also bumps default per-channel noise threshold.

Changes

Cohort / File(s) Summary
sEPD processing implementation
offline/packages/eventplaneinfo/EventPlaneReco.cc
Derive rbin from tower key; apply m_skipRing0 only when rbin == 0; replace previous hot-channel / charge-gate with (a) noise suppression when charge <= m_sepd_min_channel_charge and (b) optional clamping to m_sEPD_charge_threshold when >0 and charge exceeds it; Q-vector accumulation uses the filtered/clamped charge.
Configuration & defaults
offline/packages/eventplaneinfo/EventPlaneReco.h
Add setters set_charge_threshold(double) and set_skipRing0(bool) and members m_sEPD_charge_threshold (default 50) and m_skipRing0 (default true); change default m_sepd_min_channel_charge from 0.2 → 0.5.

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

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the sEPD contribution to event plane reconstruction in EventPlaneReco based on recent QA, adjusting channel selection and charge preprocessing before building Q-vectors.

Changes:

  • Add configurable sEPD charge clamping (default threshold 50) and a toggle to skip Ring 0 by default.
  • Remove isHot channel exclusion and increase the default sEPD noise floor (min channel charge) to 0.5.
  • Extend the public interface with setters for the new threshold and Ring 0 skipping behavior.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
offline/packages/eventplaneinfo/EventPlaneReco.h Adds new configuration knobs (skip Ring 0, charge clamp threshold) and updates default noise floor.
offline/packages/eventplaneinfo/EventPlaneReco.cc Applies Ring 0 skipping, updated noise cut, and charge clamping in the sEPD per-channel loop before Q-vector accumulation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +68 to +72
void set_charge_threshold(double threshold)
{
m_sEPD_charge_threshold = threshold;
}

Copy link

Copilot AI Apr 11, 2026

Choose a reason for hiding this comment

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

set_charge_threshold is ambiguous in this class (threshold for which detector/quantity?). Since this setter configures sEPD-specific charge clamping, consider renaming it (and the backing member) to something like set_sepd_charge_threshold/m_sepd_charge_threshold to match the existing set_sepd_min_channel_charge naming and avoid confusion if other detectors get thresholds later.

Suggested change
void set_charge_threshold(double threshold)
{
m_sEPD_charge_threshold = threshold;
}
void set_sepd_charge_threshold(double threshold)
{
m_sEPD_charge_threshold = threshold;
}
void set_charge_threshold(double threshold)
{
set_sepd_charge_threshold(threshold);
}

Copilot uses AI. Check for mistakes.
Comment thread offline/packages/eventplaneinfo/EventPlaneReco.cc Outdated
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: 2


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 83b21111-a0b7-42f7-963a-2c0cfed4646b

📥 Commits

Reviewing files that changed from the base of the PR and between 107c1d4 and 2d515ad.

📒 Files selected for processing (2)
  • offline/packages/eventplaneinfo/EventPlaneReco.cc
  • offline/packages/eventplaneinfo/EventPlaneReco.h

Comment thread offline/packages/eventplaneinfo/EventPlaneReco.cc
Comment on lines +68 to +76
void set_charge_threshold(double threshold)
{
m_sEPD_charge_threshold = threshold;
}

void set_skipRing0(bool skip)
{
m_skipRing0 = skip;
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Couple these new reconstruction knobs to calibration validity.

set_charge_threshold() / set_skipRing0() and the new defaults all change the raw sEPD Q-vector definition, but calibration selection is still independent of those settings. That makes it easy to apply recentering/flattening constants from a different channel/charge model and silently bias the corrected event planes. Please require a configuration-matched calibration payload for non-default settings (or disable calibration when the payload does not match) and spell out the reprocessing scope for existing productions.

Based on learnings, "If the PR changes reconstruction outputs, calibration constants, or simulation behavior, ensure the description states expected analysis impact and whether reprocessing is required".

Also applies to: 104-109

- Ensure during the setting that the threshold is at minimum 0.
- Thus, if user does not wish to use a channel threshold then it can be disabled by setting a threshold of zero.
@sphenix-jenkins-ci
Copy link
Copy Markdown

Build & test report

Report for commit 2d515ad605fea4d21699db65b98af8a8f414d943:
Jenkins passed


Automatically generated by sPHENIX Jenkins continuous integration
sPHENIX             jenkins.io

@sphenix-jenkins-ci
Copy link
Copy Markdown

Build & test report

Report for commit cd1e1bf9d35c73815938b8399bd691bc28a76008:
Jenkins passed


Automatically generated by sPHENIX Jenkins continuous integration
sPHENIX             jenkins.io

@pinkenburg pinkenburg merged commit a1e339e into sPHENIX-Collaboration:master Apr 12, 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.

3 participants