Update yr5#1255
Conversation
📝 WalkthroughWalkthroughThis PR updates README metadata for YR5, refactors makeSMtables.py to a new column schema and persistent output with OpenPyXL fallback, changes makeAllSMSplines.C to accept string sqrts and add 13.6 TeV (splitting tH into schan/tchan and adding tHW), and replaces SM cross-section tables across energies with the new schema. ChangesYR5 Cross-Section Data Migration and 13.6TeV Support
🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs:
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Infer (1.2.0)data/lhc-hxswg/sm/makeAllSMSplines.Cdata/lhc-hxswg/sm/makeAllSMSplines.C:2:7: error: use of undeclared identifier 'std' ... [truncated 2200 characters] ... s.C:26:26: error: subscripted value is not an array, pointer, or vector 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1255 +/- ##
=======================================
Coverage 20.90% 20.90%
=======================================
Files 195 195
Lines 26316 26316
Branches 3947 3947
=======================================
Hits 5502 5502
Misses 20814 20814 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 6
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
data/lhc-hxswg/makeSMtables.py (1)
277-299:⚠️ Potential issue | 🟠 Major | ⚡ Quick win
--savefilesis ignored, so the script always overwrites the txt outputs.Line 278 always passes a path into
print_table, which makes-s/--savefilesineffective and turns every run into a write-back run. That is a risky CLI contract change for a generator that rewrites checked-in reference data.Suggested fix
- file_name=find_filename(s.name,group) - print_table(table, save_file=file_name) + file_name = find_filename(s.name, group) if o.savefiles else None + print_table(table, save_file=file_name)🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@data/lhc-hxswg/makeSMtables.py` around lines 277 - 299, The CLI flag handling currently always writes outputs because the code unconditionally computes file_name (via find_filename) and passes it to print_table; update the __main__ flow so that after parsing options you check options.savefiles and only compute/find and pass save_file to print_table when options.savefiles is True (otherwise call print_table without the save_file argument or pass None), referencing the existing symbols parser/options, options.savefiles, find_filename, file_name and print_table to locate the change; ensure the default behavior leaves files untouched unless -s/--savefiles is provided.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@data/lhc-hxswg/README.md`:
- Around line 15-18: Update the README note that references removed tHW inputs:
remove or revise the sentence stating "The tHW cross-sections given are
repeated..." and any YR4-specific guidance that points readers to tHW, and
instead reference the current tH channel names (tH_schan and tH_tchan) and the
updated spline-generation source (makeAllSMSplines.C) so readers are directed to
the YR5 inputs and correct spline creation; ensure the example
datacard/rateParams guidance remains accurate for using the tH_schan/tH_tchan
splines.
In `@data/lhc-hxswg/sm/makeAllSMSplines.C`:
- Around line 45-57: The xs list in makeAllSMSplines.C (std::string xs[]) omits
the tH channels, so add "tH_schan" and "tH_tchan" to the xs array and
construct/import RooSpline1D objects for them just like the other modes (using
the same Form(...) patterns and ws.import calls); ensure you create splines
named Form("%s_%sTeV",name.c_str(),sqrts.c_str()) and pass the correct file path
Form("%s/xs/%sTeV/%sTeV-%s.txt",location.c_str(),sqrts.c_str(),sqrts.c_str(),name.c_str())
so both tH_schan and tH_tchan are included in the workspace (and handle any
special x/y indices if those channels need different indices similar to WH's
separate plus/minus handling).
In `@data/lhc-hxswg/sm/xs/14TeV/14TeV-tH_schan.txt`:
- Around line 1-15: The Sca_Lo column currently uses positive values (+1.8) but
must be negative to match the project's uncertainty sign convention; update
every Sca_Lo entry in the table under the header "mH_GeV XS_pb Sca_Hi
Sca_Lo Pdf_alpha_s Total_pos Total_neg XS_tH_pb XS_tbarH_pb" from +1.8 to
-1.8 (preserving spacing/format), ensuring Sca_Hi remains positive and Sca_Lo
negative so downstream uncertainty calculations use the correct sign.
In `@data/lhc-hxswg/sm/xs/14TeV/14TeV-tH_tchan.txt`:
- Around line 2-15: The Sca_Lo column in the tH_tchan table uses a positive sign
while the project convention is negative; update the Sca_Lo entries in the
tH_tchan data block (rows showing +15.0, etc.) to use the negative sign (e.g.,
change +15.0 → -15.0) so Sca_Lo values match the established sign convention
used by other production-mode tables.
In `@data/lhc-hxswg/sm/xs/7TeV/7TeV-bbH.txt`:
- Line 4: The Sca_Lo value in the row "124.0 +0.176 +9.6 +9.6 +3.6
+10.2 -10.2" is incorrectly positive; change the Sca_Lo entry from +9.6 to
-9.6 so the line reads "124.0 +0.176 -9.6 +9.6 +3.6 +10.2
-10.2" to match the negative downward scale uncertainty pattern used by Sca_Lo
in the other rows.
In `@data/lhc-hxswg/sm/xs/8TeV/8TeV-bbH.txt`:
- Line 8: The Sca_Lo value in the row starting with "125.09" is incorrectly
positive; change the third uncertainty column labeled Sca_Lo from "+9.3" to
"-9.3" so it matches the negative scale-down sign convention and remains
consistent with the Total_neg = -9.9; update only the sign for Sca_Lo in that
row (the other columns and Total_neg stay as-is).
---
Outside diff comments:
In `@data/lhc-hxswg/makeSMtables.py`:
- Around line 277-299: The CLI flag handling currently always writes outputs
because the code unconditionally computes file_name (via find_filename) and
passes it to print_table; update the __main__ flow so that after parsing options
you check options.savefiles and only compute/find and pass save_file to
print_table when options.savefiles is True (otherwise call print_table without
the save_file argument or pass None), referencing the existing symbols
parser/options, options.savefiles, find_filename, file_name and print_table to
locate the change; ensure the default behavior leaves files untouched unless
-s/--savefiles is provided.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 773d9e3b-470c-418e-be4b-40ad9f0755d5
📒 Files selected for processing (57)
data/lhc-hxswg/README.mddata/lhc-hxswg/makeSMtables.pydata/lhc-hxswg/sm/makeAllSMSplines.Cdata/lhc-hxswg/sm/sm_yr5_13.6TeV.rootdata/lhc-hxswg/sm/sm_yr5_13TeV.rootdata/lhc-hxswg/sm/sm_yr5_14TeV.rootdata/lhc-hxswg/sm/sm_yr5_7TeV.rootdata/lhc-hxswg/sm/sm_yr5_8TeV.rootdata/lhc-hxswg/sm/xs/13.6TeV/13.6TeV-WH.txtdata/lhc-hxswg/sm/xs/13.6TeV/13.6TeV-ZH.txtdata/lhc-hxswg/sm/xs/13.6TeV/13.6TeV-bbH.txtdata/lhc-hxswg/sm/xs/13.6TeV/13.6TeV-ggH.txtdata/lhc-hxswg/sm/xs/13.6TeV/13.6TeV-ggZH.txtdata/lhc-hxswg/sm/xs/13.6TeV/13.6TeV-tH_schan.txtdata/lhc-hxswg/sm/xs/13.6TeV/13.6TeV-tH_tchan.txtdata/lhc-hxswg/sm/xs/13.6TeV/13.6TeV-ttH.txtdata/lhc-hxswg/sm/xs/13.6TeV/13.6TeV-vbfH.txtdata/lhc-hxswg/sm/xs/13TeV/13TeV-WH.txtdata/lhc-hxswg/sm/xs/13TeV/13TeV-ZH.txtdata/lhc-hxswg/sm/xs/13TeV/13TeV-bbH.txtdata/lhc-hxswg/sm/xs/13TeV/13TeV-ggH.txtdata/lhc-hxswg/sm/xs/13TeV/13TeV-ggZH.txtdata/lhc-hxswg/sm/xs/13TeV/13TeV-tH_schan.txtdata/lhc-hxswg/sm/xs/13TeV/13TeV-tH_tchan.txtdata/lhc-hxswg/sm/xs/13TeV/13TeV-ttH.txtdata/lhc-hxswg/sm/xs/13TeV/13TeV-vbfH.txtdata/lhc-hxswg/sm/xs/13TeV/README.txtdata/lhc-hxswg/sm/xs/14TeV/14TeV-WH.txtdata/lhc-hxswg/sm/xs/14TeV/14TeV-ZH.txtdata/lhc-hxswg/sm/xs/14TeV/14TeV-bbH.txtdata/lhc-hxswg/sm/xs/14TeV/14TeV-ggH.txtdata/lhc-hxswg/sm/xs/14TeV/14TeV-ggZH.txtdata/lhc-hxswg/sm/xs/14TeV/14TeV-tH_schan.txtdata/lhc-hxswg/sm/xs/14TeV/14TeV-tH_tchan.txtdata/lhc-hxswg/sm/xs/14TeV/14TeV-ttH.txtdata/lhc-hxswg/sm/xs/14TeV/14TeV-vbfH.txtdata/lhc-hxswg/sm/xs/14TeV/README.txtdata/lhc-hxswg/sm/xs/7TeV/7TeV-WH.txtdata/lhc-hxswg/sm/xs/7TeV/7TeV-ZH.txtdata/lhc-hxswg/sm/xs/7TeV/7TeV-bbH.txtdata/lhc-hxswg/sm/xs/7TeV/7TeV-ggH.txtdata/lhc-hxswg/sm/xs/7TeV/7TeV-ggZH.txtdata/lhc-hxswg/sm/xs/7TeV/7TeV-tH_schan.txtdata/lhc-hxswg/sm/xs/7TeV/7TeV-tH_tchan.txtdata/lhc-hxswg/sm/xs/7TeV/7TeV-ttH.txtdata/lhc-hxswg/sm/xs/7TeV/7TeV-vbfH.txtdata/lhc-hxswg/sm/xs/7TeV/README.txtdata/lhc-hxswg/sm/xs/8TeV/8TeV-WH.txtdata/lhc-hxswg/sm/xs/8TeV/8TeV-ZH.txtdata/lhc-hxswg/sm/xs/8TeV/8TeV-bbH.txtdata/lhc-hxswg/sm/xs/8TeV/8TeV-ggH.txtdata/lhc-hxswg/sm/xs/8TeV/8TeV-ggZH.txtdata/lhc-hxswg/sm/xs/8TeV/8TeV-tH_schan.txtdata/lhc-hxswg/sm/xs/8TeV/8TeV-tH_tchan.txtdata/lhc-hxswg/sm/xs/8TeV/8TeV-ttH.txtdata/lhc-hxswg/sm/xs/8TeV/8TeV-vbfH.txtdata/lhc-hxswg/sm/xs/8TeV/README.txt
💤 Files with no reviewable changes (4)
- data/lhc-hxswg/sm/xs/13TeV/README.txt
- data/lhc-hxswg/sm/xs/14TeV/README.txt
- data/lhc-hxswg/sm/xs/7TeV/README.txt
- data/lhc-hxswg/sm/xs/8TeV/README.txt
| - The tHW cross-sections given are repeated from the value at 125.0 GeV. This is only to allow bulding a spline. These numbers are from YR4 | ||
| - The cross-sections and branching ratios are also provided inside `RooWorkspaces` as splines for your convenience as a function of `MH`. You can use these inside your datacards using `rateParams` to normalise the different Higgs processes. An example datacard is provided in `data/tutorials/rate_params/simple_sm_datacard.txt`. | ||
|
|
||
| Please see the full set of notes from [here](https://gitlab.cern.ch/LHCHIGGSXS/LHCHXSWG1/crosssections) for all details. |
There was a problem hiding this comment.
The notes still describe removed tHW inputs.
This migration switches the supported tH channels to tH_schan/tH_tchan, and data/lhc-hxswg/sm/makeAllSMSplines.C no longer builds tHW. Keeping this YR4-specific note here will send readers to the wrong inputs for YR5.
🧰 Tools
🪛 LanguageTool
[grammar] ~15-~15: Ensure spelling is correct
Context: ...lue at 125.0 GeV. This is only to allow bulding a spline. These numbers are from YR4 - ...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
🪛 markdownlint-cli2 (0.22.1)
[warning] 18-18: Link text should be descriptive
(MD059, descriptive-link-text)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@data/lhc-hxswg/README.md` around lines 15 - 18, Update the README note that
references removed tHW inputs: remove or revise the sentence stating "The tHW
cross-sections given are repeated..." and any YR4-specific guidance that points
readers to tHW, and instead reference the current tH channel names (tH_schan and
tH_tchan) and the updated spline-generation source (makeAllSMSplines.C) so
readers are directed to the YR5 inputs and correct spline creation; ensure the
example datacard/rateParams guidance remains accurate for using the
tH_schan/tH_tchan splines.
| mH_GeV XS_pb Sca_Hi Sca_Lo Pdf_alpha_s Total_pos Total_neg XS_tH_pb XS_tbarH_pb | ||
| +120.0 +0.0036 +2.4 +1.8 +2.3 +3.3242 -2.9206 +0.0024 +0.0013 | ||
| +122.0 +0.0035 +2.4 +1.8 +2.3 +3.3242 -2.9206 +0.0023 +0.0012 | ||
| +124.0 +0.0034 +2.4 +1.8 +2.3 +3.3242 -2.9206 +0.0022 +0.0012 | ||
| +124.6 +0.0033 +2.4 +1.8 +2.3 +3.3242 -2.9206 +0.0022 +0.0012 | ||
| +124.8 +0.0033 +2.4 +1.8 +2.3 +3.3242 -2.9206 +0.0022 +0.0012 | ||
| +125.0 +0.0033 +2.4 +1.8 +2.3 +3.3242 -2.9206 +0.0022 +0.0011 | ||
| +125.09 +0.0033 +2.4 +1.8 +2.3 +3.3242 -2.9206 +0.0022 +0.0011 | ||
| +125.2 +0.0033 +2.4 +1.8 +2.3 +3.3242 -2.9206 +0.0021 +0.0011 | ||
| +125.3 +0.0033 +2.4 +1.8 +2.3 +3.3242 -2.9206 +0.0021 +0.0011 | ||
| +125.38 +0.0033 +2.4 +1.8 +2.3 +3.3242 -2.9206 +0.0021 +0.0011 | ||
| +125.6 +0.0033 +2.4 +1.8 +2.3 +3.3242 -2.9206 +0.0021 +0.0011 | ||
| +126.0 +0.0032 +2.4 +1.8 +2.3 +3.3242 -2.9206 +0.0021 +0.0011 | ||
| +128.0 +0.0031 +2.4 +1.8 +2.3 +3.3242 -2.9206 +0.002 +0.0011 | ||
| +130.0 +0.003 +2.4 +1.8 +2.3 +3.3242 -2.9206 +0.0019 +0.001 |
There was a problem hiding this comment.
Incorrect sign convention for Sca_Lo column.
The Sca_Lo column has positive values (+1.8) throughout the table, but based on the naming convention and all other files in this PR, Sca_Lo should contain negative values representing the downward scale uncertainty. All other production modes use negative values for Sca_Lo:
- 13TeV-ttH.txt: Sca_Lo ranges from -2.47 to -2.28
- 13TeV-vbfH.txt: Sca_Lo ranges from -1.11 to -1.03
- 14TeV-WH.txt: Sca_Lo ranges from -0.74 to -0.71
- 14TeV-ZH.txt: Sca_Lo ranges from -2.8 to -2.6
- 14TeV-bbH.txt: Sca_Lo = -8.2 to -8.3
- 14TeV-ggH.txt: Sca_Lo = -4.6 to -4.7
The sign should be changed from +1.8 to -1.8 to maintain consistency with the schema and ensure correct downstream uncertainty calculations.
🔧 Proposed fix
-mH_GeV XS_pb Sca_Hi Sca_Lo Pdf_alpha_s Total_pos Total_neg XS_tH_pb XS_tbarH_pb
-+120.0 +0.0036 +2.4 +1.8 +2.3 +3.3242 -2.9206 +0.0024 +0.0013
-+122.0 +0.0035 +2.4 +1.8 +2.3 +3.3242 -2.9206 +0.0023 +0.0012
-+124.0 +0.0034 +2.4 +1.8 +2.3 +3.3242 -2.9206 +0.0022 +0.0012
-+124.6 +0.0033 +2.4 +1.8 +2.3 +3.3242 -2.9206 +0.0022 +0.0012
-+124.8 +0.0033 +2.4 +1.8 +2.3 +3.3242 -2.9206 +0.0022 +0.0012
-+125.0 +0.0033 +2.4 +1.8 +2.3 +3.3242 -2.9206 +0.0022 +0.0011
-+125.09 +0.0033 +2.4 +1.8 +2.3 +3.3242 -2.9206 +0.0022 +0.0011
-+125.2 +0.0033 +2.4 +1.8 +2.3 +3.3242 -2.9206 +0.0021 +0.0011
-+125.3 +0.0033 +2.4 +1.8 +2.3 +3.3242 -2.9206 +0.0021 +0.0011
-+125.38 +0.0033 +2.4 +1.8 +2.3 +3.3242 -2.9206 +0.0021 +0.0011
-+125.6 +0.0033 +2.4 +1.8 +2.3 +3.3242 -2.9206 +0.0021 +0.0011
-+126.0 +0.0032 +2.4 +1.8 +2.3 +3.3242 -2.9206 +0.0021 +0.0011
-+128.0 +0.0031 +2.4 +1.8 +2.3 +3.3242 -2.9206 +0.002 +0.0011
-+130.0 +0.003 +2.4 +1.8 +2.3 +3.3242 -2.9206 +0.0019 +0.001
+mH_GeV XS_pb Sca_Hi Sca_Lo Pdf_alpha_s Total_pos Total_neg XS_tH_pb XS_tbarH_pb
++120.0 +0.0036 +2.4 -1.8 +2.3 +3.3242 -2.9206 +0.0024 +0.0013
++122.0 +0.0035 +2.4 -1.8 +2.3 +3.3242 -2.9206 +0.0023 +0.0012
++124.0 +0.0034 +2.4 -1.8 +2.3 +3.3242 -2.9206 +0.0022 +0.0012
++124.6 +0.0033 +2.4 -1.8 +2.3 +3.3242 -2.9206 +0.0022 +0.0012
++124.8 +0.0033 +2.4 -1.8 +2.3 +3.3242 -2.9206 +0.0022 +0.0012
++125.0 +0.0033 +2.4 -1.8 +2.3 +3.3242 -2.9206 +0.0022 +0.0011
++125.09 +0.0033 +2.4 -1.8 +2.3 +3.3242 -2.9206 +0.0022 +0.0011
++125.2 +0.0033 +2.4 -1.8 +2.3 +3.3242 -2.9206 +0.0021 +0.0011
++125.3 +0.0033 +2.4 -1.8 +2.3 +3.3242 -2.9206 +0.0021 +0.0011
++125.38 +0.0033 +2.4 -1.8 +2.3 +3.3242 -2.9206 +0.0021 +0.0011
++125.6 +0.0033 +2.4 -1.8 +2.3 +3.3242 -2.9206 +0.0021 +0.0011
++126.0 +0.0032 +2.4 -1.8 +2.3 +3.3242 -2.9206 +0.0021 +0.0011
++128.0 +0.0031 +2.4 -1.8 +2.3 +3.3242 -2.9206 +0.002 +0.0011
++130.0 +0.003 +2.4 -1.8 +2.3 +3.3242 -2.9206 +0.0019 +0.001 📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| mH_GeV XS_pb Sca_Hi Sca_Lo Pdf_alpha_s Total_pos Total_neg XS_tH_pb XS_tbarH_pb | |
| +120.0 +0.0036 +2.4 +1.8 +2.3 +3.3242 -2.9206 +0.0024 +0.0013 | |
| +122.0 +0.0035 +2.4 +1.8 +2.3 +3.3242 -2.9206 +0.0023 +0.0012 | |
| +124.0 +0.0034 +2.4 +1.8 +2.3 +3.3242 -2.9206 +0.0022 +0.0012 | |
| +124.6 +0.0033 +2.4 +1.8 +2.3 +3.3242 -2.9206 +0.0022 +0.0012 | |
| +124.8 +0.0033 +2.4 +1.8 +2.3 +3.3242 -2.9206 +0.0022 +0.0012 | |
| +125.0 +0.0033 +2.4 +1.8 +2.3 +3.3242 -2.9206 +0.0022 +0.0011 | |
| +125.09 +0.0033 +2.4 +1.8 +2.3 +3.3242 -2.9206 +0.0022 +0.0011 | |
| +125.2 +0.0033 +2.4 +1.8 +2.3 +3.3242 -2.9206 +0.0021 +0.0011 | |
| +125.3 +0.0033 +2.4 +1.8 +2.3 +3.3242 -2.9206 +0.0021 +0.0011 | |
| +125.38 +0.0033 +2.4 +1.8 +2.3 +3.3242 -2.9206 +0.0021 +0.0011 | |
| +125.6 +0.0033 +2.4 +1.8 +2.3 +3.3242 -2.9206 +0.0021 +0.0011 | |
| +126.0 +0.0032 +2.4 +1.8 +2.3 +3.3242 -2.9206 +0.0021 +0.0011 | |
| +128.0 +0.0031 +2.4 +1.8 +2.3 +3.3242 -2.9206 +0.002 +0.0011 | |
| +130.0 +0.003 +2.4 +1.8 +2.3 +3.3242 -2.9206 +0.0019 +0.001 | |
| mH_GeV XS_pb Sca_Hi Sca_Lo Pdf_alpha_s Total_pos Total_neg XS_tH_pb XS_tbarH_pb | |
| 120.0 +0.0036 +2.4 -1.8 +2.3 +3.3242 -2.9206 +0.0024 +0.0013 | |
| 122.0 +0.0035 +2.4 -1.8 +2.3 +3.3242 -2.9206 +0.0023 +0.0012 | |
| 124.0 +0.0034 +2.4 -1.8 +2.3 +3.3242 -2.9206 +0.0022 +0.0012 | |
| 124.6 +0.0033 +2.4 -1.8 +2.3 +3.3242 -2.9206 +0.0022 +0.0012 | |
| 124.8 +0.0033 +2.4 -1.8 +2.3 +3.3242 -2.9206 +0.0022 +0.0012 | |
| 125.0 +0.0033 +2.4 -1.8 +2.3 +3.3242 -2.9206 +0.0022 +0.0011 | |
| 125.09 +0.0033 +2.4 -1.8 +2.3 +3.3242 -2.9206 +0.0022 +0.0011 | |
| 125.2 +0.0033 +2.4 -1.8 +2.3 +3.3242 -2.9206 +0.0021 +0.0011 | |
| 125.3 +0.0033 +2.4 -1.8 +2.3 +3.3242 -2.9206 +0.0021 +0.0011 | |
| 125.38 +0.0033 +2.4 -1.8 +2.3 +3.3242 -2.9206 +0.0021 +0.0011 | |
| 125.6 +0.0033 +2.4 -1.8 +2.3 +3.3242 -2.9206 +0.0021 +0.0011 | |
| 126.0 +0.0032 +2.4 -1.8 +2.3 +3.3242 -2.9206 +0.0021 +0.0011 | |
| 128.0 +0.0031 +2.4 -1.8 +2.3 +3.3242 -2.9206 +0.002 +0.0011 | |
| 130.0 +0.003 +2.4 -1.8 +2.3 +3.3242 -2.9206 +0.0019 +0.001 |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@data/lhc-hxswg/sm/xs/14TeV/14TeV-tH_schan.txt` around lines 1 - 15, The
Sca_Lo column currently uses positive values (+1.8) but must be negative to
match the project's uncertainty sign convention; update every Sca_Lo entry in
the table under the header "mH_GeV XS_pb Sca_Hi Sca_Lo Pdf_alpha_s
Total_pos Total_neg XS_tH_pb XS_tbarH_pb" from +1.8 to -1.8 (preserving
spacing/format), ensuring Sca_Hi remains positive and Sca_Lo negative so
downstream uncertainty calculations use the correct sign.
| +120.0 +0.0952 +6.3 +15.0 +2.1 +6.6408 -15.1463 +0.0622 +0.0329 | ||
| +122.0 +0.0939 +6.3 +15.0 +2.1 +6.6408 -15.1463 +0.0614 +0.0325 | ||
| +124.0 +0.0926 +6.3 +15.0 +2.1 +6.6408 -15.1463 +0.0605 +0.0321 | ||
| +124.6 +0.0922 +6.3 +15.0 +2.1 +6.6408 -15.1463 +0.0602 +0.032 | ||
| +124.8 +0.0921 +6.3 +15.0 +2.1 +6.6408 -15.1463 +0.0602 +0.0319 | ||
| +125.0 +0.092 +6.3 +15.0 +2.1 +6.6408 -15.1463 +0.0601 +0.0319 | ||
| +125.09 +0.0919 +6.3 +15.0 +2.1 +6.6408 -15.1463 +0.06 +0.0319 | ||
| +125.2 +0.0918 +6.3 +15.0 +2.1 +6.6408 -15.1463 +0.0602 +0.0316 | ||
| +125.3 +0.0918 +6.3 +15.0 +2.1 +6.6408 -15.1463 +0.0602 +0.0315 | ||
| +125.38 +0.0917 +6.3 +15.0 +2.1 +6.6408 -15.1463 +0.0599 +0.0318 | ||
| +125.6 +0.0917 +6.3 +15.0 +2.1 +6.6408 -15.1463 +0.06 +0.0317 | ||
| +126.0 +0.0913 +6.3 +15.0 +2.1 +6.6408 -15.1463 +0.0596 +0.0317 | ||
| +128.0 +0.09 +6.3 +15.0 +2.1 +6.6408 -15.1463 +0.0588 +0.0313 | ||
| +130.0 +0.0887 +6.3 +15.0 +2.1 +6.6408 -15.1463 +0.0579 +0.0309 |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Check Sca_Lo column signs in all tH_tchan files
echo "=== Checking Sca_Lo signs in tH_tchan files ==="
fd -e txt 'tH_tchan' data/lhc-hxswg/sm/xs/ --exec sh -c 'echo "File: {}"; head -3 {}'Repository: cms-analysis/HiggsAnalysis-CombinedLimit
Length of output: 1757
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Compare Sca_Lo / Total_neg sign conventions across a few other production modes
# (same file naming pattern: <energy>TeV-<mode>.txt)
echo "=== Comparing Sca_Lo/Total_neg signs across modes ==="
for f in \
data/lhc-hxswg/sm/xs/14TeV/14TeV-ttH.txt \
data/lhc-hxswg/sm/xs/14TeV/14TeV-vbfH.txt \
data/lhc-hxswg/sm/xs/8TeV/8TeV-WH.txt \
data/lhc-hxswg/sm/xs/8TeV/8TeV-WH-ZZ.txt \
data/lhc-hxswg/sm/xs/14TeV/14TeV-tH_tchan.txt
do
if [ -f "$f" ]; then
echo "File: $f"
head -3 "$f" | tail -2
else
echo "File missing (skip): $f"
fi
doneRepository: cms-analysis/HiggsAnalysis-CombinedLimit
Length of output: 1047
Fix sign convention for Sca_Lo in tH_tchan tables
data/lhc-hxswg/sm/xs/14TeV/14TeV-tH_tchan.txt has Sca_Lo values with a leading + (e.g., +15.0 for mH=120–130) while other production-mode tables encode the scale-down term with a leading - (e.g., 14TeV-ttH.txt Sca_Lo=-2.0125, 14TeV-vbfH.txt Sca_Lo=-1.0911, 8TeV-WH.txt Sca_Lo=-0.859), making tH_tchan inconsistent with the established convention.
🔧 Proposed fix
Update the Sca_Lo column in 14TeV-tH_tchan.txt to be negative (e.g. +15.0 → -15.0).
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@data/lhc-hxswg/sm/xs/14TeV/14TeV-tH_tchan.txt` around lines 2 - 15, The
Sca_Lo column in the tH_tchan table uses a positive sign while the project
convention is negative; update the Sca_Lo entries in the tH_tchan data block
(rows showing +15.0, etc.) to use the negative sign (e.g., change +15.0 → -15.0)
so Sca_Lo values match the established sign convention used by other
production-mode tables.
| mH_GeV XS_pb Sca_Hi Sca_Lo Pdf_as_mb Total_pos Total_neg | ||
| +120.0 +0.197 +9.7 -9.7 +3.7 +10.4 -10.4 | ||
| +122.0 +0.186 +9.6 -9.6 +3.7 +10.3 -10.3 | ||
| +124.0 +0.176 +9.6 +9.6 +3.6 +10.2 -10.2 |
There was a problem hiding this comment.
Critical sign error in Sca_Lo value.
Line 4 shows Sca_Lo as +9.6, but this should be -9.6 to match the pattern in all other rows (lines 2-3, 5-15 all have negative Sca_Lo values ranging from -9.4 to -9.7). The Sca_Lo column represents the downward scale uncertainty and must be negative. This sign error will corrupt uncertainty calculations.
🐛 Proposed fix
-+124.0 +0.176 +9.6 +9.6 +3.6 +10.2 -10.2
++124.0 +0.176 +9.6 -9.6 +3.6 +10.2 -10.2 📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| +124.0 +0.176 +9.6 +9.6 +3.6 +10.2 -10.2 | |
| 124.0 +0.176 +9.6 -9.6 +3.6 +10.2 -10.2 |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@data/lhc-hxswg/sm/xs/7TeV/7TeV-bbH.txt` at line 4, The Sca_Lo value in the
row "124.0 +0.176 +9.6 +9.6 +3.6 +10.2 -10.2" is incorrectly
positive; change the Sca_Lo entry from +9.6 to -9.6 so the line reads "124.0
+0.176 -9.6 +9.6 +3.6 +10.2 -10.2" to match the negative
downward scale uncertainty pattern used by Sca_Lo in the other rows.
| +124.6 +0.224 +9.3 -9.3 +3.4 +9.9 -9.9 | ||
| +124.8 +0.223 +9.3 -9.3 +3.4 +9.9 -9.9 | ||
| +125.0 +0.221 +9.3 -9.3 +3.4 +9.9 -9.9 | ||
| +125.09 +0.221 +9.3 +9.3 +3.4 +9.9 -9.9 |
There was a problem hiding this comment.
Critical: Missing minus sign in Sca_Lo column.
Line 8 shows Sca_Lo = +9.3, but all other rows correctly use negative values (e.g., line 2: -9.5, line 7: -9.3, line 9: -9.3). The Total_neg value of -9.9 confirms the scale-down uncertainty should be negative.
🔧 Proposed fix
-+125.09 +0.221 +9.3 +9.3 +3.4 +9.9 -9.9
++125.09 +0.221 +9.3 -9.3 +3.4 +9.9 -9.9 📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| +125.09 +0.221 +9.3 +9.3 +3.4 +9.9 -9.9 | |
| 125.09 +0.221 +9.3 -9.3 +3.4 +9.9 -9.9 |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@data/lhc-hxswg/sm/xs/8TeV/8TeV-bbH.txt` at line 8, The Sca_Lo value in the
row starting with "125.09" is incorrectly positive; change the third uncertainty
column labeled Sca_Lo from "+9.3" to "-9.3" so it matches the negative
scale-down sign convention and remains consistent with the Total_neg = -9.9;
update only the sign for Sca_Lo in that row (the other columns and Total_neg
stay as-is).
|
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
data/lhc-hxswg/makeSMtables.py (1)
220-232:⚠️ Potential issue | 🟡 Minor | ⚡ Quick win
filenamemay be undefined if no match is found.If no spec key matches
sheet_nameor no group key matchesgroup_name, the loop completes without assigningfilename, causing anUnboundLocalErroron the return statement.🛡️ Proposed fix
def find_filename(sheet_name, group_name): # given the sheet name and group name, find which of the dictionary keys match # and return the filename in the format sm/xs/{sheet_name}/{group_name}.txt + filename = None for key in specs.keys(): if key in sheet_name: for group_key in specs[key]["groups"].keys(): if group_key in group_name: if "BR" in group_key: filename = f"sm/br/{group_name}.txt" else: xsfoldername = sheet_name.replace(" ", "") filename = f"sm/xs/{xsfoldername}/{xsfoldername}-{group_name}.txt" + if filename is None: + raise ValueError(f"No matching spec found for sheet '{sheet_name}' and group '{group_name}'") return filename🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@data/lhc-hxswg/makeSMtables.py` around lines 220 - 232, The function find_filename can return an uninitialized filename if no spec/group matches; initialize filename to None at start (or explicitly return early when a match is found) and ensure you either return a sensible default or raise a clear exception when no match is found. Update find_filename to set filename when matching and break out of loops (or return immediately) to avoid accidental overwrites, and at the end check if filename is still None and raise ValueError with context including sheet_name and group_name (or return an explicit fallback path) so callers never hit an UnboundLocalError.
🧹 Nitpick comments (1)
data/lhc-hxswg/makeSMtables.py (1)
332-337: 💤 Low value
--savefilesoption is defined but never used.The
-s/--savefilesflag is added to the argument parser buto.savefilesis never checked. Tables are always saved unconditionally at line 316. Either gate the save behavior on this flag or remove the unused option.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@data/lhc-hxswg/makeSMtables.py` around lines 332 - 337, The --savefiles/-s option is defined via parser.add_option but never used (o.savefiles), so update the save logic to honor this flag: locate the block that unconditionally writes tables to the "sm" directory (the code that currently saves tables) and wrap it in a conditional checking o.savefiles (or conversely remove the parser.add_option if you prefer disabling the feature). Ensure you reference o.savefiles in the main flow (where tables are written) so saving only happens when the flag is set, and keep existing filenames/paths unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@data/lhc-hxswg/makeSMtables.py`:
- Around line 277-280: The bare except should be replaced with specific
exception handling: call xlrd.open_workbook(o.input) in a try and catch only
ImportError to fall back to open_workbook (openpyxl), while letting xlrd parsing
errors bubble up (catch xlrd.XLRDError if you need to handle them explicitly)
and not silently swallow KeyboardInterrupt/SystemExit; e.g. import xlrd and
catch ImportError to assign f = open_workbook(o.input), and otherwise re-raise
or handle xlrd.XLRDError/FileNotFoundError explicitly so failures aren’t masked.
In `@data/lhc-hxswg/sm/xs/7TeV/7TeV-tHW.txt`:
- Around line 2-4: The table shows identical XS_pb and identical uncertainty
columns (Sca_Hi, Sca_Lo, Pdf_alpha_s, Total_pos, Total_neg) for mH=120/125/130
in data/lhc-hxswg/sm/xs/7TeV/7TeV-tHW.txt which likely produces an artificially
flat spline; verify the original upstream/source numbers for these mass points
and, if they differ, update the three rows so XS_pb and the uncertainty columns
reflect the true per-mass values (or restore the original higher-resolution
points), otherwise annotate the file header (or replace the repeated rows) to
indicate these masses were merged/rounded by the source so downstream code can
treat them specially; ensure Total_pos/Total_neg are recomputed as quadrature of
Sca and Pdf components if you change any component to keep consistency.
---
Outside diff comments:
In `@data/lhc-hxswg/makeSMtables.py`:
- Around line 220-232: The function find_filename can return an uninitialized
filename if no spec/group matches; initialize filename to None at start (or
explicitly return early when a match is found) and ensure you either return a
sensible default or raise a clear exception when no match is found. Update
find_filename to set filename when matching and break out of loops (or return
immediately) to avoid accidental overwrites, and at the end check if filename is
still None and raise ValueError with context including sheet_name and group_name
(or return an explicit fallback path) so callers never hit an UnboundLocalError.
---
Nitpick comments:
In `@data/lhc-hxswg/makeSMtables.py`:
- Around line 332-337: The --savefiles/-s option is defined via
parser.add_option but never used (o.savefiles), so update the save logic to
honor this flag: locate the block that unconditionally writes tables to the "sm"
directory (the code that currently saves tables) and wrap it in a conditional
checking o.savefiles (or conversely remove the parser.add_option if you prefer
disabling the feature). Ensure you reference o.savefiles in the main flow (where
tables are written) so saving only happens when the flag is set, and keep
existing filenames/paths unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 8f8ddacb-1a1e-42c7-8af8-f982eaa7ae68
⛔ Files ignored due to path filters (1)
data/lhc-hxswg/Higgs_cross_sections_YR5.xlsxis excluded by!**/*.xlsx
📒 Files selected for processing (12)
data/lhc-hxswg/makeSMtables.pydata/lhc-hxswg/sm/makeAllSMSplines.Cdata/lhc-hxswg/sm/sm_yr5_13.6TeV.rootdata/lhc-hxswg/sm/sm_yr5_13TeV.rootdata/lhc-hxswg/sm/sm_yr5_14TeV.rootdata/lhc-hxswg/sm/sm_yr5_7TeV.rootdata/lhc-hxswg/sm/sm_yr5_8TeV.rootdata/lhc-hxswg/sm/xs/13.6TeV/13.6TeV-tHW.txtdata/lhc-hxswg/sm/xs/13TeV/13TeV-tHW.txtdata/lhc-hxswg/sm/xs/14TeV/14TeV-tHW.txtdata/lhc-hxswg/sm/xs/7TeV/7TeV-tHW.txtdata/lhc-hxswg/sm/xs/8TeV/8TeV-tHW.txt
✅ Files skipped from review due to trivial changes (2)
- data/lhc-hxswg/sm/xs/14TeV/14TeV-tHW.txt
- data/lhc-hxswg/sm/xs/13TeV/13TeV-tHW.txt
| try: | ||
| f = xlrd.open_workbook(o.input) | ||
| except: | ||
| f = open_workbook(o.input) ## openpyxl |
There was a problem hiding this comment.
Bare except catches all exceptions including unexpected errors.
The bare except: catches everything including KeyboardInterrupt, SystemExit, and actual bugs in xlrd parsing. If xlrd opens a corrupt file and raises a parsing error, it silently falls back to openpyxl (which will also likely fail with a confusing error).
🐛 Proposed fix to catch specific exceptions
try:
f = xlrd.open_workbook(o.input)
- except:
+ except (xlrd.XLRDError, FileNotFoundError, PermissionError):
f = open_workbook(o.input) ## openpyxlOr if xlrd may not be installed:
try:
f = xlrd.open_workbook(o.input)
- except:
+ except Exception as e:
+ logging.debug("xlrd failed (%s), trying openpyxl", e)
f = open_workbook(o.input) ## openpyxl🧰 Tools
🪛 Ruff (0.15.15)
[error] 279-279: Do not use bare except
(E722)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@data/lhc-hxswg/makeSMtables.py` around lines 277 - 280, The bare except
should be replaced with specific exception handling: call
xlrd.open_workbook(o.input) in a try and catch only ImportError to fall back to
open_workbook (openpyxl), while letting xlrd parsing errors bubble up (catch
xlrd.XLRDError if you need to handle them explicitly) and not silently swallow
KeyboardInterrupt/SystemExit; e.g. import xlrd and catch ImportError to assign f
= open_workbook(o.input), and otherwise re-raise or handle
xlrd.XLRDError/FileNotFoundError explicitly so failures aren’t masked.
| +120 +0.0022 +4.2 -5.5 +8.4 +9.3915 -10.0404 | ||
| +125 +0.0022 +4.2 -5.5 +8.4 +9.3915 -10.0404 | ||
| +130 +0.0022 +4.2 -5.5 +8.4 +9.3915 -10.0404 |
There was a problem hiding this comment.
❓ Verification inconclusive
🏁 Script executed:
#!/bin/bash
# Description: Check if identical-row pattern appears in other tHW tables and compare with other processes
echo "=== Checking tHW tables across energies ==="
for energy in 7TeV 8TeV 13TeV 13.6TeV 14TeV; do
file="data/lhc-hxswg/sm/xs/${energy}/${energy}-tHW.txt"
if [ -f "$file" ]; then
echo -e "\n--- $energy tHW ---"
# Show data rows (skip header)
tail -n +2 "$file" | head -5
# Check for duplicate rows
dups=$(tail -n +2 "$file" | grep -v '^$' | sort | uniq -d | wc -l)
echo "Duplicate rows: $dups"
fi
done
echo -e "\n=== Comparing with ttH at 7TeV (reference) ==="
if [ -f "data/lhc-hxswg/sm/xs/7TeV/7TeV-ttH.txt" ]; then
echo "--- 7TeV ttH (first 5 data rows) ---"
tail -n +2 "data/lhc-hxswg/sm/xs/7TeV/7TeV-ttH.txt" | head -5
fiRepository: cms-analysis/HiggsAnalysis-CombinedLimit
Length of output: 2160
🏁 Script executed:
#!/bin/bash
set -euo pipefail
target="data/lhc-hxswg/sm/xs/7TeV/7TeV-tHW.txt"
echo "=== Line counts ==="
wc -l "$target"
echo
echo "=== Unique values per column for 7TeV-tHW (excluding header) ==="
python3 - <<'PY'
from collections import defaultdict
import re, sys
path="data/lhc-hxswg/sm/xs/7TeV/7TeV-tHW.txt"
rows=[]
with open(path,'r',encoding='utf-8') as f:
header=next(f).strip()
for line in f:
line=line.strip()
if not line:
continue
parts=line.split()
rows.append(parts)
# columns: 0 mH_GeV, 1 XS_pb, 2 Sca_Hi, 3 Sca_Lo, 4 Pdf_alpha_s, 5 Total_pos, 6 Total_neg
cols=defaultdict(list)
for r in rows:
for i,v in enumerate(r[:7]):
cols[i].append(v)
print("Header:", header)
for i in range(7):
uniq=sorted(set(cols[i]))
print(f"col {i} ({'mH_GeV XS_pb Sca_Hi Sca_Lo Pdf_alpha_s Total_pos Total_neg'.split()[i]}): unique={len(uniq)}")
if len(uniq)<=10:
print(" values:", " | ".join(uniq))
else:
print(" sample:", " | ".join(uniq[:5]), "...", " | ".join(uniq[-3:]))
PY
echo
echo "=== Same uniqueness summary for all available tHW tables across energies ==="
python3 - <<'PY'
from pathlib import Path
from collections import defaultdict
import re
base=Path("data/lhc-hxswg/sm/xs")
energies=["7TeV","8TeV","13TeV","13.6TeV","14TeV"]
cols_names=["mH_GeV","XS_pb","Sca_Hi","Sca_Lo","Pdf_alpha_s","Total_pos","Total_neg"]
for energy in energies:
file=base/energy/f"{energy}-tHW.txt"
if not file.exists():
continue
rows=[]
with file.open('r',encoding='utf-8') as f:
header=f.readline().strip()
for line in f:
line=line.strip()
if not line:
continue
parts=line.split()
if len(parts)>=7:
rows.append(parts[:7])
cols=defaultdict(list)
for r in rows:
for i,v in enumerate(r):
cols[i].append(v)
print("\n---", file, "---")
print("rows:", len(rows), "header_ok:", " ".join(header.split()[:7]).count("mH_GeV")>0 or True)
for i,name in enumerate(cols_names):
uniq=set(cols[i])
print(f"{name}: unique={len(uniq)}")
PYRepository: cms-analysis/HiggsAnalysis-CombinedLimit
Length of output: 1701
🏁 Script executed:
#!/bin/bash
set -euo pipefail
python3 - <<'PY'
from pathlib import Path
import math
base=Path("data/lhc-hxswg/sm/xs")
energies=["7TeV","8TeV","13TeV","13.6TeV","14TeV"]
def parse_rows(path):
rows=[]
with path.open() as f:
header=f.readline()
for line in f:
line=line.strip()
if not line:
continue
parts=line.split()
if len(parts)<7:
continue
mH, XS, Sca_Hi, Sca_Lo, Pdf, Tot_pos, Tot_neg = parts[:7]
rows.append((float(mH), float(Sca_Hi), float(Sca_Lo), float(Pdf), float(Tot_pos), float(Tot_neg)))
return header, rows
for energy in energies:
path=base/energy/f"{energy}-tHW.txt"
if not path.exists():
continue
header, rows=parse_rows(path)
# since uncertainty columns are constant within each file (per earlier result),
# just compare using the first row
mH, Sca_Hi, Sca_Lo, Pdf, Tot_pos, Tot_neg = rows[0]
quad_pos=math.sqrt(Sca_Hi**2 + Pdf**2)
quad_neg=math.sqrt(Sca_Lo**2 + Pdf**2)
# also check across all rows for consistency
ok_pos=True
ok_neg=True
for mH, Sca_Hi, Sca_Lo, Pdf, Tot_pos, Tot_neg in rows:
if abs(math.sqrt(Sca_Hi**2 + Pdf**2) - Tot_pos) > 1e-6:
ok_pos=False
break
for mH, Sca_Hi, Sca_Lo, Pdf, Tot_pos, Tot_neg in rows:
if abs(math.sqrt(Sca_Lo**2 + Pdf**2) - Tot_neg) > 1e-6:
ok_neg=False
break
print(f"{path}")
print(f" Sca_Hi={rows[0][1]} Pdf={rows[0][3]} => quad_pos={quad_pos} table Total_pos={rows[0][4]} ok={ok_pos}")
print(f" Sca_Lo={rows[0][2]} Pdf={rows[0][3]} => quad_neg={quad_neg} table Total_neg={rows[0][5]} ok={ok_neg}")
print(f" rows={len(rows)}")
PYRepository: cms-analysis/HiggsAnalysis-CombinedLimit
Length of output: 1158
🏁 Script executed:
#!/bin/bash
set -euo pipefail
ls -1 data/lhc-hxswg/sm/xs/7TeV | sort | sed -n '1,120p'
echo "----"
ls -1 data/lhc-hxswg/sm/xs/8TeV | sort | sed -n '1,120p'
echo "----"
for f in data/lhc-hxswg/sm/xs/7TeV/*tH*.txt; do
echo "== $f =="
wc -l "$f"
head -n 1 "$f"
tail -n +2 "$f" | head -n 5
doneRepository: cms-analysis/HiggsAnalysis-CombinedLimit
Length of output: 2930
Flag potential flat tHW XS_pb at 7/8 TeV (needs upstream/source confirmation)
In data/lhc-hxswg/sm/xs/7TeV/7TeV-tHW.txt, XS_pb is identical (+0.0022 pb) for mH=120/125/130, with all uncertainty columns (Sca_Hi/Sca_Lo/Pdf_alpha_s/Total_pos/Total_neg) also constant across those masses. The same flat XS_pb behavior is present in data/lhc-hxswg/sm/xs/8TeV/8TeV-tHW.txt; for 13–14TeV tables, XS_pb varies with mH while the uncertainty columns remain constant within each file.
Total_pos/Total_neg are consistent with quadrature of the scale/PDF pieces within the table’s rounding. Constant uncertainty columns also show up in other related single-top Higgs tables at 7TeV (e.g., 7TeV-tH_schan.txt, 7TeV-tH_tchan.txt), so the main question is whether tHW’s exactly-flat XS_pb at 7/8 TeV over this grid is intended (rounding vs missing/mass-merged points) to avoid producing an overly-flat spline.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@data/lhc-hxswg/sm/xs/7TeV/7TeV-tHW.txt` around lines 2 - 4, The table shows
identical XS_pb and identical uncertainty columns (Sca_Hi, Sca_Lo, Pdf_alpha_s,
Total_pos, Total_neg) for mH=120/125/130 in
data/lhc-hxswg/sm/xs/7TeV/7TeV-tHW.txt which likely produces an artificially
flat spline; verify the original upstream/source numbers for these mass points
and, if they differ, update the three rows so XS_pb and the uncertainty columns
reflect the true per-mass values (or restore the original higher-resolution
points), otherwise annotate the file header (or replace the repeated rows) to
indicate these masses were merged/rounded by the source so downstream code can
treat them specially; ensure Total_pos/Total_neg are recomputed as quadrature of
Sca and Pdf components if you change any component to keep consistency.
Updating scripts and numbers from latest from LHC HXSWG
Using https://gitlab.cern.ch/LHCHIGGSXS/LHCHXSWG1/crosssections
Summary by CodeRabbit
New Features
Updates
Documentation