sEPD Q Vector Calibration (Generation): Charge Clamping and Ring 0 Exclusion#4245
Conversation
- Use default sEPD node: `TOWERINFO_CALIB_SEPD` - Allow for changing it if needed on macro side
Updated the QVecCalib module to align with the new sEPD calibration strategy. Following QA analysis that indicated a lack of persistent hot channels, the per-channel status mapping has been deprecated. Key modifications: - Removed bad channel identification and `SEPD_HotMap` CDB generation. - Implemented mandatory Ring 0 exclusion to mitigate beam background interference. - Added charge clamping (default 50) to handle channel saturation or extreme outliers without discarding data. - Updated the noise floor to 0.5 and added setters for the new charge and noise thresholds. - Simplified `process_sEPD` to use global thresholds instead of individual channel status lookups.
📝 WalkthroughWalkthroughRemoved sEPD bad-channel detection and bad-towers CDB output; introduced configurable charge/noise thresholds for channel selection, clamp behavior, and skipping innermost ring; added per-harmonic event-plane resolution profiles computed from corrected Q-vectors; made TowerInfo node lookup configurable. Changes
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. Comment |
There was a problem hiding this comment.
Pull request overview
This PR adjusts the sEPD event-plane Q-vector calibration workflow to reduce sensitivity to problematic channel behavior by switching from channel exclusion to signal shaping (charge clamping), explicitly excluding Ring 0 contributions, and updating default noise handling. It also adds configurability for the input sEPD tower node.
Changes:
- Add configurable input node name for
sEPD_TreeGentower retrieval. - Remove status/Z-score based “bad channel” filtering and associated CDB payload output in
QVecCalib. - Introduce per-channel charge clamping, a higher default noise threshold, Ring 0 exclusion, and an additional EP resolution profile.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| calibrations/sepd/sepd_eventplanecalib/sEPD_TreeGen.h | Adds configurable input node member and setter for tower container lookup. |
| calibrations/sepd/sepd_eventplanecalib/sEPD_TreeGen.cc | Uses the configurable input node when fetching the sEPD tower container and updates the missing-node message. |
| calibrations/sepd/sepd_eventplanecalib/QVecCalib.h | Adds setters for clamping/noise thresholds; removes bad-channel state and related declarations; adds EP resolution profile pointer in flattening hist struct. |
| calibrations/sepd/sepd_eventplanecalib/QVecCalib.cc | Removes bad-channel processing and CDB hotmap writing; implements noise cut, clamping, Ring 0 exclusion, and EP resolution histogram fill/registration. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| unsigned int key = TowerInfoDefs::encode_epd(channel); | ||
| unsigned int arm = TowerInfoDefs::get_epd_arm(key); | ||
| int rbin = TowerInfoDefs::get_epd_rbin(key); | ||
|
|
||
| // Skip Innermost Ring | ||
| if (rbin == 0) | ||
| { | ||
| continue; | ||
| } |
There was a problem hiding this comment.
Ring 0 is excluded from the Q-vector accumulation here, but Ring 0 still contributes to EventPlaneData::sepd_totalcharge (set upstream) which is used by process_event_check() and the QA-derived charge thresholds. If the intent is to mitigate Ring 0 beam-background effects, the event-selection charge (and/or the QA histogram used to derive its bounds) should be computed with the same Ring 0 exclusion (and clamping/noise definition) as the Q-vector loop.
- Add <algorithm> to header for use of std::max so QVecCalib.h is self-contained.
- hEP_res_{n} histograms are only used during m_pass == Pass::ApplyFlattening
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: d1907aee-4416-4bc7-8854-142bcb151693
📒 Files selected for processing (2)
calibrations/sepd/sepd_eventplanecalib/QVecCalib.cccalibrations/sepd/sepd_eventplanecalib/QVecCalib.h
🚧 Files skipped from review as they are similar to previous changes (1)
- calibrations/sepd/sepd_eventplanecalib/QVecCalib.cc
Build & test reportReport for commit 19956d803ad99b9dee39d643e8aa2414aa7cffdd:
Automatically generated by sPHENIX Jenkins continuous integration |
Build & test reportReport for commit 169c06b61ed2537a2766eb213db8a5e0fb1c43e2:
Automatically generated by sPHENIX Jenkins continuous integration |



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)
sEPD Q-Vector Calibration Refactoring: Charge Clamping and Ring 0 Exclusion
Motivation
This PR refactors the sEPD event-plane calibration strategy to replace status-based per-channel filtering with a simpler, more robust approach that better handles detector imperfections and beam-background effects in the innermost detector region.
Key Changes
QVecCalib.cc/h:
process_bad_channels()function, per-channel status mapping, and SEPD_HotMap CDB generation. Channels are no longer classified as Dead/Hot/Cold based on charge thresholds and radial z-scores.rbin == 0) are explicitly skipped unconditionally to mitigate unreliable beam-background-affected data.charge ≤ m_sEPD_noise_thresholdare excluded.ApplyFlatteningpass, a newTProfile hEP_res_{n}histogram is created to measure per-harmonic resolution via normalized dot product of corrected Q-vectors from South and North detectors.set_charge_threshold(double)andset_noise_threshold(double)allow runtime customization of selection thresholds.write_cdb_EventPlane()is now called; bad-towers CDB is no longer produced.sEPD_TreeGen.cc/h:
set_inputNode(const std::string&)setter, replacing the hardcoded"TOWERINFO_CALIB_SEPD"string with am_inputNodemember (default:"TOWERINFO_CALIB_SEPD").Potential Risk Areas
IO Format Changes:
Reconstruction Behavior:
Configuration Sensitivity:
Notes for Reviewers