CaloTowerStatus: Z-Score Patch#4314
Conversation
- Modified `CaloTowerStatus::LoadCalib` to calculate `need_z_score` based on whether `z_score_threshold` deviates from its default. - Wrapped the `GetFloatValue` call for the z_score field in a conditional check, eliminating the slowdowns for EMCal Hot Map CDB TTree that do not have the "CEMC_sigma" field.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthrough
ChangesCalo tower z_score load gating
Possibly related PRs
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 |
Build & test reportReport for commit 638d7c59520864d50529ca72ebbd219b07d56f52:
Automatically generated by sPHENIX Jenkins continuous integration |
There was a problem hiding this comment.
Pull request overview
This PR reduces overhead in CaloTowerStatus::LoadCalib by avoiding per-tower z-score lookups from the hot map CDB unless a non-default z_score_threshold makes z-score–based masking necessary, which prevents slow behavior when the hot map CDB payload does not contain the <DET>_sigma field.
Changes:
- Compute a
need_z_scoreflag based on whetherz_score_thresholddiffers from its default. - Conditionally call
CDBTTree::GetFloatValue(..., m_fieldname_z_score)only when z-score evaluation is needed.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
replacing the boolean by a direct comparison makes this more readable for the occasional browsing. There is no speed advantage to calculating the boolean ahead of the loop. |
Build & test reportReport for commit 95f03f62fa98103cd65afea377eca0033773bc75:
Automatically generated by sPHENIX Jenkins continuous integration |



Types of changes
What kind of change does this PR introduce? (Bug fix, feature, ...)
CaloTowerStatus::LoadCalibto calculateneed_z_scorebased on whetherz_score_thresholddeviates from its default.GetFloatValuecall for the z_score field in a conditional check, eliminating the slowdowns for EMCal Hot Map CDB TTree that do not have the "CEMC_sigma" field.TODOs (if applicable)
Links to other PRs in macros and calibration repositories (if applicable)
This PR improves the robustness and performance of
CaloTowerStatus::LoadCalibfor EMCal hot-tower CDB TTrees, particularly when the tree schema does not include theCEMC_sigma(z-score) field.Key changes
need_z_scorebehavior is replaced by a direct condition: z-score (GetFloatValueof the sigma field) is fetched only whenz_score_thresholddiffers fromz_score_threshold_default.cdbttree_hotMapis now guarded, avoiding repeated access to a potentially missing CDB field for every tower.statuscodes whenz_score_threshold == z_score_threshold_default.Potential risk areas
z_score_thresholdequals the configured default; unusual configurations should be checked for intended behavior.Possible future improvements
z_score_thresholdsettings.z_score_thresholdis non-default but the sigma field is absent.AI can make mistakes—please use best judgment when reviewing the change.