Skip to content

Conversation

@anigamova
Copy link
Collaborator

@anigamova anigamova commented Dec 2, 2025

Summary by CodeRabbit

  • New Features

    • Added channel-mask support to CMSHistFunc and CMSHistSum analysis flows.
    • Added a combined multi-region datacard for the Higgs→ττ analysis.
  • Chores

    • Expanded fit parameter range from r=-1,1 to r=-5,5 across CI workflows and test commands.
  • Tests

    • Added tests covering CMSHistFunc, CMSHistFunc with channel masks, and shapeN variants.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 2, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Expanded MultiDimFit parameter ranges from r=-1,1 to r=-5,5 across CI and test steps, added CI workflow jobs that run text2workspace with channel masks and MultiDimFit on a new multi-region htt datacard, and enabled three CMSHistFunc-related tests in CMake.

Changes

Cohort / File(s) Summary
CI workflow
/.github/workflows/cvmfs-ci.yml
Replaced --setParameterRanges r=-1,1 with r=-5,5 across MultiDimFit steps; added "CMSHistFunc with channel masks" and "CMSHistSum with channel masks" workflow blocks that run text2workspace.py --channel-masks and MultiDimFit with mask parameters (e.g., mask_htt_tt_2_8TeV=1).
Analysis datacard
data/ci/htt_multiple_regions.txt
Added a combined Higgs→ττ datacard declaring three bins (htt_tt_0_8TeV, htt_tt_1_8TeV, htt_tt_2_8TeV) with per-bin processes, rates, observations, shapes pointing to htt_multiple_regions.input.root, and numerous nuisance parameters (lnN and shape entries).
Test suite (CMake)
test/CMakeLists.txt
Updated test commands to use --setParameterRanges r=-5,5; added/activated ADD_COMBINE_TEST entries: cmshistfunc, cmshistfunc_channel_masks, cmshistfunc_shapeN; enabled CMSHistSum/CMSHistFunc variants and preserved --X-rtd FAST_VERTICAL_MORPH where present.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Inspect data/ci/htt_multiple_regions.txt for datacard syntax correctness, per-bin process-to-bin mappings, and nuisance formatting (lnN vs shape).
  • Verify .github/workflows/cvmfs-ci.yml arguments: text2workspace.py --channel-masks usage, exact mask parameter names, and consistent --setParameterRanges r=-5,5.
  • Confirm test/CMakeLists.txt ADD_COMBINE_TEST entries copy correct inputs and run the intended MultiDimFit commands (range and X-rtd flags).

Possibly related PRs

Suggested reviewers

  • guitargeek

Poem

🐰 I hopped through datacards, masks snug and spry,

I widened my range so fits reach the sky,
text2workspace hummed, MultiDimFit waved hi,
Tests lined their tunnels and CI gave a try,
A carrot-coded cheer — merge on, little guy! 🎉

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'Add channel masks tests and CMSHistFunc test to the CMake configuration' directly and accurately describes the main changes: adding new test cases for channel masks and CMSHistFunc to the CMake test configuration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0b33143 and 76920ac.

⛔ Files ignored due to path filters (1)
  • test/references/cmshistsum_channel_masks.out is excluded by !**/*.out
📒 Files selected for processing (2)
  • .github/workflows/cvmfs-ci.yml (4 hunks)
  • test/CMakeLists.txt (4 hunks)

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
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 details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a58a232 and 6d7361a.

⛔ Files ignored due to path filters (3)
  • test/references/cmshistfunc.out is excluded by !**/*.out
  • test/references/cmshistfunc_channel_masks.out is excluded by !**/*.out
  • test/references/cmshistfunc_shapeN.out is excluded by !**/*.out
📒 Files selected for processing (3)
  • .github/workflows/cvmfs-ci.yml (1 hunks)
  • data/ci/htt_multiple_regions.txt (1 hunks)
  • test/CMakeLists.txt (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: guitargeek
Repo: cms-analysis/HiggsAnalysis-CombinedLimit PR: 1163
File: test/CMakeLists.txt:270-277
Timestamp: 2025-11-05T10:16:10.042Z
Learning: In PR #1163, the file test/references/LHC-Higgs-coupling-models-text2workspace.out was present and correctly included in the repository, despite an earlier incorrect comment flagging it as missing.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
  • GitHub Check: Compile (py3.12, root6.34.4)
  • GitHub Check: Compile (py3.10, root6.26.4)
  • GitHub Check: Compile (py3.10, root6.32.2)
  • GitHub Check: CMSSW_14_0_0_pre1 - ROOT 6.26.11
  • GitHub Check: CMSSW_11_3_4 - ROOT 6.22.09
  • GitHub Check: dev3/latest - ROOT LCG master
  • GitHub Check: LCG_108 - ROOT 6.36.02
  • GitHub Check: LCG_102 - ROOT 6.26.04
  • GitHub Check: LCG_106 - ROOT 6.32.02
  • GitHub Check: CMSSW_14_1_0_pre4 - ROOT 6.30.07
🔇 Additional comments (6)
.github/workflows/cvmfs-ci.yml (1)

222-227: Verify that the required input ROOT file is available in the workflow environment.

The datacard file htt_multiple_regions.txt typically requires a corresponding ROOT file (htt_multiple_regions.input.root) containing the histogram shapes. The test suite correctly copies both files (test/CMakeLists.txt lines 193–194), but this workflow step does not explicitly stage the input ROOT file. Verify that this file is either:

  1. Pre-staged in the Docker environment, or
  2. Should be explicitly copied/downloaded in this workflow step.
data/ci/htt_multiple_regions.txt (2)

1-95: Datacard structure and syntax are sound.

The multi-region datacard is properly formatted with correct Combine syntax, comprehensive nuisance parameter definitions, and proper process/bin mappings across three regions.


1-10: The required input ROOT file is already committed to the repository.

data/ci/htt_multiple_regions.input.root exists in the repository (242K, committed Dec 2 15:28). No action needed.

test/CMakeLists.txt (3)

182-189: CMSHistFunc test case is properly configured.

The cmshistfunc test follows established patterns and correctly stages required input files.


192-199: CMSHistFunc with channel masks test is properly configured.

The cmshistfunc_channel_masks test correctly:

  • Stages both the datacard and input ROOT file
  • Passes --channel-masks flag to text2workspace.py (line 196)
  • Sets the channel mask parameter in MultiDimFit (line 198)
  • Outputs to a distinct workspace file for clarity

Note: The filename used here (htt_multiple_regions.txt) is correct, unlike the typo in the workflow file.


202-209: CMSHistFunc shapeN test case is properly configured.

The cmshistfunc_shapeN test follows the established pattern and correctly stages required files.

@codecov
Copy link

codecov bot commented Dec 2, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 20.69%. Comparing base (a58a232) to head (76920ac).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1187      +/-   ##
==========================================
- Coverage   22.25%   20.69%   -1.56%     
==========================================
  Files         195      195              
  Lines       26154    26154              
  Branches     3884     3923      +39     
==========================================
- Hits         5820     5412     -408     
- Misses      20334    20742     +408     

see 9 files with indirect coverage changes
see 9 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@anigamova
Copy link
Collaborator Author

anigamova commented Dec 2, 2025

Thanks to codecov report from #1137 I realized that we don't have tests with channel masks, hence this PR. But it looks like something change between 6.26 and 6.30, and with channel masking we arrive to different fit results. Everything with ROOT>=6.30 is consistent. TBU

@anigamova anigamova merged commit 61aa0b6 into main Dec 4, 2025
12 of 13 checks passed
@anigamova anigamova deleted the ci_updates branch December 4, 2025 10:09
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