YR5 XS update#1254
Conversation
📝 WalkthroughWalkthroughThis PR extends the HXSWG Higgs cross-section infrastructure to support Year 5 (YR5) data. It refactors the Python script to read modern Excel files via openpyxl, introduces YR5 schema definitions, adds file-writing capabilities, updates the C++ spline generation macro to accommodate more processes, and refreshes all downstream cross-section lookup tables across seven collision energies with new uncertainty column layouts while preserving YR4 data as historical archive. ChangesYR5 Higgs cross-section updates
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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 |
There was a problem hiding this comment.
Actionable comments posted: 8
Note
Due to the large number of review comments, Critical, Major severity comments were prioritized as inline comments.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
data/lhc-hxswg/sm/xs/yr4-8TeV/8TeV-tHW.txt (1)
1-5:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winSparse and mass-independent data for tHW process.
This table contains only 3 mass points (120, 125, 130 GeV) with identical cross-section values (3.510E-03 pb) and uncertainties, showing no mass dependence. This is significantly sparser and simpler than other processes in the archive. While unusual, this reflects the historical YR4 state where tHW calculations may have been limited or approximated as mass-independent. Users interpolating this data should be aware of these limitations.
🤖 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/yr4-8TeV/8TeV-tHW.txt` around lines 1 - 5, This table for the tHW process only contains three identical mass points and is effectively mass-independent; add an explicit data-quality note/metadata above the table (referencing the tHW entry and the header line "mH_GeV XS_pb") stating that the dataset is sparse (120,125,130 GeV), cross-sections are identical, and users should treat the values as mass-independent and exercise caution when interpolating (or set a flag like "mass_independent: true" / "notes: limited YR4 approximation") so downstream consumers know to handle interpolation differently.data/lhc-hxswg/sm/makeAllSMSplines.C (1)
80-92:⚠️ Potential issue | 🔴 Critical | ⚡ Quick winMissing spline generation for 13.6 TeV.
The PR introduces 13.6 TeV cross-section data files (layer 6 in the stack), and
formatSqrtS(13.6)correctly formats it as"13p6TeV", butmakeAllSMSplines()does not callmakeXSSplines(13.6). Without this call, the 13.6 TeV data will lack corresponding spline ROOT files, breaking any analysis that attempts to use 13.6 TeV cross-sections.🐛 Proposed fix
// Make XS makeXSSplines(14); + makeXSSplines(13.6); makeXSSplines(13); makeXSSplines(8); makeXSSplines(7);🤖 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/makeAllSMSplines.C` around lines 80 - 92, The makeAllSMSplines function is missing the call to generate 13.6 TeV cross-section splines; update makeAllSMSplines to invoke makeXSSplines(13.6) alongside the existing calls (makeXSSplines(14), makeXSSplines(13), makeXSSplines(8), makeXSSplines(7)) so that the 13.6 TeV layer (formatted by formatSqrtS(13.6) as "13p6TeV") produces its ROOT spline files; ensure the call uses the same pattern as the others and keep makeBRSplines() unchanged.
🟡 Minor comments (13)
data/lhc-hxswg/README.md-4-4 (1)
4-4:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winTypo: "YC5" should be "YR5".
The text says "YC5" but the PR title, description, and entire codebase refer to "YR5" (Year 5). This appears to be a typo.
📝 Proposed fix
-YC5 cross-sections and citation in the spreadsheet [here](https://gitlab.cern.ch/LHCHIGGSXS/LHCHXSWG1/crosssections/-/blob/master/Higgs_cross_sections.xlsx?ref_type=heads) +YR5 cross-sections and citation in the spreadsheet [here](https://gitlab.cern.ch/LHCHIGGSXS/LHCHXSWG1/crosssections/-/blob/master/Higgs_cross_sections.xlsx?ref_type=heads)🤖 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` at line 4, Replace the typo "YC5" with "YR5" in the README entry that currently reads "YC5 cross-sections and citation in the spreadsheet..." so the sentence matches the PR and codebase naming; update the text string in the README.md (the line containing "YC5 cross-sections and citation in the spreadsheet") to "YR5 cross-sections and citation in the spreadsheet..." ensuring no other occurrences of "YC5" remain.data/lhc-hxswg/sm/xs/yr4-14TeV/14TeV-bbH.txt-23-23 (1)
23-23:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winVerify another outlier uncertainty value.
The
Scale_PDF_alpha_S_posvalue of+23.0at mH=125.20 GeV is another outlier compared to neighboring values (~+20.1). Please verify this is correct from the source data.🤖 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/yr4-14TeV/14TeV-bbH.txt` at line 23, At mH = 125.20 (line showing "125.20 5.501E-01 +23.0 -24.0") the Scale_PDF_alpha_S_pos value "+23.0" appears as an outlier versus neighboring entries (~+20.1); verify the original source table for the Scale_PDF_alpha_S_pos value and if it was a transcription error replace "+23.0" with the correct value (likely "+20.1") in this file, ensuring the entry format "125.20\t5.501E-01\t<pos>\t<neg>" is preserved and update any related metadata/comments if present.data/lhc-hxswg/sm/xs/yr4-14TeV/14TeV-vbfH.txt-1-1 (1)
1-1:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winColumn name contains space instead of underscore.
The header uses
PDF alpha_Swith a space, while other columns use underscores. This inconsistency may cause parsing issues.📝 Proposed fix
-mH_GeV XS_pb Scale_pos Scale_neg PDF_plus_alpha_s PDF alpha_S +mH_GeV XS_pb Scale_pos Scale_neg PDF_plus_alpha_s PDF_alpha_S🤖 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/yr4-14TeV/14TeV-vbfH.txt` at line 1, The header row uses "PDF alpha_S" with a space which breaks the underscore naming convention; update the header to "PDF_alpha_S" (matching other columns like PDF_plus_alpha_s) so the first line becomes: mH_GeV XS_pb Scale_pos Scale_neg PDF_plus_alpha_s PDF_alpha_S, ensuring you preserve the original spacing/separators so downstream parsers continue to split columns correctly.data/lhc-hxswg/sm/xs/yr4-14TeV/14TeV-tHW.txt-1-1 (1)
1-1:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winColumn name contains space instead of underscore.
The header uses
PDF alpha_Swith a space, while other columns use underscores. This inconsistency may cause parsing issues and should match the convention used in other columns.📝 Proposed fix
-mH_GeV XS_pb Scale_pos Scale_neg PDF_plus_alpha_s PDF alpha_S +mH_GeV XS_pb Scale_pos Scale_neg PDF_plus_alpha_s PDF_alpha_S🤖 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/yr4-14TeV/14TeV-tHW.txt` at line 1, The header has an inconsistent column name "PDF alpha_S" containing a space; change it to use an underscore to match the other columns (e.g., rename "PDF alpha_S" to "PDF_alpha_S") so parsing is consistent with existing headers like "mH_GeV", "XS_pb", "Scale_pos", "Scale_neg", and "PDF_plus_alpha_s".data/lhc-hxswg/sm/xs/yr4-14TeV/14TeV-ttH.txt-1-1 (1)
1-1:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winColumn name contains space instead of underscore.
The header uses
PDF alpha_Swith a space, while other columns use underscores. This is inconsistent with naming conventions and may cause parsing issues.📝 Proposed fix
-mH_GeV XS_pb Scale_pos Scale_neg PDF_plus_alpha_s PDF alpha_S +mH_GeV XS_pb Scale_pos Scale_neg PDF_plus_alpha_s PDF_alpha_S🤖 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/yr4-14TeV/14TeV-ttH.txt` at line 1, The header has an inconsistent column name "PDF alpha_S" with a space; change it to "PDF_alpha_S" to match the underscore convention used by "mH_GeV", "XS_pb", "Scale_pos", "Scale_neg", and "PDF_plus_alpha_s" so parsers won't break; update the header string in the file (look for the header line containing mH_GeV XS_pb Scale_pos Scale_neg PDF_plus_alpha_s PDF alpha_S) to replace the space with an underscore.data/lhc-hxswg/sm/xs/yr4-14TeV/14TeV-WH.txt-1-1 (1)
1-1:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winColumn name contains space instead of underscore.
The header uses
PDF alpha_Swith a space, while other columns use underscores (e.g.,PDF_plus_alpha_s). This inconsistency may cause parsing issues.📝 Proposed fix for consistent column naming
-mH_GeV XS_pb Scale_pos Scale_neg PDF_plus_alpha_s PDF alpha_S XS_W_plus_pb XS_W_minus_pb +mH_GeV XS_pb Scale_pos Scale_neg PDF_plus_alpha_s PDF_alpha_S XS_W_plus_pb XS_W_minus_pb🤖 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/yr4-14TeV/14TeV-WH.txt` at line 1, The header has an inconsistent column name "PDF alpha_S" (contains a space and different casing) which will break parsers; update that header token to use underscores and match the existing style by replacing "PDF alpha_S" with "PDF_alpha_s" (consistent with "PDF_plus_alpha_s") in the header line so all column names use underscores and consistent casing.data/lhc-hxswg/sm/xs/yr4-14TeV/14TeV-ggH.txt-1-1 (1)
1-1:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winClarify ambiguous column header.
The header text
Gauss PDF_plus_alpha_s PDF alpha_Sis ambiguous. The data rows contain 8 columns, but it's unclear whether the header defines:
GaussPDF_plus_alpha_salpha_S(4 separate columns), orGauss_PDF_plus_alpha_sPDF_alpha_S(2 columns)Additionally,
PDF alpha_Suses a space instead of an underscore, inconsistent with other column names.📝 Proposed fix for clearer header
If the intended columns are separate uncertainty components:
-mH_GeV XS_pb Scale_pos Scale_neg Gauss PDF_plus_alpha_s PDF alpha_S +mH_GeV XS_pb Scale_pos Scale_neg Gauss PDF_plus_alpha_s PDF alpha_S🤖 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/yr4-14TeV/14TeV-ggH.txt` at line 1, The header is ambiguous about the last columns and uses a space in "PDF alpha_S"; update the header to explicitly list all eight columns and use underscores for consistency — e.g. change the header line to: mH_GeV XS_pb Scale_pos Scale_neg Gauss PDF_plus_alpha_s PDF PDF_alpha_S so each data column maps unambiguously to a header (adjust the exact names if "PDF" should be more descriptive).data/lhc-hxswg/sm/xs/yr4-14TeV/14TeV-bbH.txt-10-10 (1)
10-10:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winVerify
Scale_PDF_alpha_S_posoutlier at mH=124.00 GeVIn
data/lhc-hxswg/sm/xs/yr4-14TeV/14TeV-bbH.txt, this row hasScale_PDF_alpha_S_pos=+23.4:124.00 5.672E-01 +23.4 -24.2Adjacent points in the same table are ~
+20.0to+20.3, and other bbH tables atmH=124.00are much closer to+20(13TeV:+20.1, 8TeV:+20.6, 7TeV:+20.8). Please confirm the+23.4entry matches the source data (or correct if erroneous).🤖 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/yr4-14TeV/14TeV-bbH.txt` at line 10, The Scale_PDF_alpha_S_pos value "+23.4" in the row "124.00 5.672E-01 +23.4 -24.2" of data/lhc-hxswg/sm/xs/yr4-14TeV/14TeV-bbH.txt appears to be an outlier; verify the original HXSWG source (or generation script) for the mH=124.00 bbH entry and, if the source shows a different value (likely near +20.0–+20.3 as in adjacent points), replace "+23.4" with the correct Scale_PDF_alpha_S_pos value in that row (keeping the rest of the row intact) and save the corrected file. Ensure the corrected numeric format (sign and precision) matches surrounding entries.data/lhc-hxswg/sm/xs/yr4-7TeV/7TeV-ggH.txt-1-1 (1)
1-1:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winHeader has inconsistent naming convention.
The header uses "PDF alpha_S" with a space separator, while other columns use underscores (e.g.,
PDF_plus_alpha_s). This inconsistency could cause parsing issues if the reader expects uniform naming conventions.🤖 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/yr4-7TeV/7TeV-ggH.txt` at line 1, The header contains an inconsistent column name "PDF alpha_S" (with a space) that breaks the underscore naming convention used by other columns like mH_GeV, XS_pb, Scale_pos, Gauss, and PDF_plus_alpha_s; change "PDF alpha_S" to "PDF_alpha_S" so all column names use underscores consistently to avoid parser failures and to match the existing naming pattern.data/lhc-hxswg/sm/xs/yr4-7TeV/7TeV-WH.txt-1-1 (1)
1-1:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winHeader has inconsistent delimiter and naming convention.
The header mixes tabs and spaces as delimiters, and "PDF alpha_S" uses a space instead of an underscore (unlike
PDF_plus_alpha_s). This inconsistency could cause parsing issues if the reader expects uniform delimiters or naming conventions.🤖 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/yr4-7TeV/7TeV-WH.txt` at line 1, The header line "mH_GeV XS_pb Scale_pos Scale_neg PDF_plus_alpha_s PDF alpha_S XS_W_plus_pb XS_W_minus_pb" uses mixed tabs/spaces and an inconsistent column name; change it to use a single delimiter style (e.g., all tabs or all single spaces) and rename "PDF alpha_S" to "PDF_alpha_S" to match the naming of "PDF_plus_alpha_s"; update the header so column names are consistently formatted (for example: mH_GeV<TAB>XS_pb<TAB>Scale_pos<TAB>Scale_neg<TAB>PDF_plus_alpha_s<TAB>PDF_alpha_S<TAB>XS_W_plus_pb<TAB>XS_W_minus_pb).data/lhc-hxswg/sm/xs/yr4-7TeV/7TeV-ZH.txt-1-1 (1)
1-1:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winHeader has trailing tab creating an empty column.
The header line ends with a trailing tab after "alpha_S", creating an implicit empty column. This could cause parsing issues or confusion about the expected column count.
🤖 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/yr4-7TeV/7TeV-ZH.txt` at line 1, The header line currently ends with a trailing tab after the "alpha_S" column causing an empty implicit column; edit the header string (the line containing "mH_GeV XS_pb Scale_pos Scale_neg PDF_plus_alpha_s PDF alpha_S") to remove the trailing tab so the header ends exactly with "alpha_S" and no extra delimiter, ensuring the column count matches the data rows.data/lhc-hxswg/sm/xs/7TeV/7TeV-tHW.txt-2-4 (1)
2-4:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winInconsistent number formatting for mH_GeV.
Line 2 formats mH_GeV as
+125(with explicit + sign), while lines 3-4 use120and130(without + sign). For consistency with the header comment and other rows throughout the file set, all values should use the+prefix.✨ Proposed fix
+125 +0.00223 +4.2 -5.5 +8.4 +9.39148550549912 -10.0404183179786 -120 +0.00223 +4.2 -5.5 +8.4 +9.39148550549912 -10.0404183179786 -130 +0.00223 +4.2 -5.5 +8.4 +9.39148550549912 -10.0404183179786 ++120 +0.00223 +4.2 -5.5 +8.4 +9.39148550549912 -10.0404183179786 ++130 +0.00223 +4.2 -5.5 +8.4 +9.39148550549912 -10.0404183179786🤖 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 mH_GeV column values are inconsistently formatted: the first row shows "+125" while the next rows show "120" and "130" without a leading plus; update those entries so every mH_GeV value uses a leading '+' (e.g., change "120" to "+120" and "130" to "+130") to match the header and other rows and ensure consistent formatting for the mH_GeV field.data/lhc-hxswg/sm/xs/8TeV/8TeV-vbfH.txt-12-12 (1)
12-12:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winMinor: Inconsistent precision in Total_Hi value.
Line 12 (mH=125.6) has Total_Hi rounded to +2.55, while all other rows maintain full precision (e.g., +2.54360531529559). This inconsistency in formatting should be corrected for uniformity.
Suggested fix
The exact value should match the precision of other rows. Please verify the source data and update to full precision.
🤖 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-vbfH.txt` at line 12, The row for mH=125.6 has an inconsistent Total_Hi value ("+2.55")—replace that truncated value with the full-precision Total_Hi from the source data so it matches the precision of other rows (i.e., update the 125.6 row: "125.6 +1.603502046 +1.08 -1.061 +2.31 +2.55 -2.54201121161965" by restoring the full-precision Total_Hi), verifying the exact digits from the original dataset before committing.
🧹 Nitpick comments (7)
data/lhc-hxswg/README.md (1)
4-4: ⚡ Quick winImprove grammar and use descriptive link text.
The sentence is grammatically incomplete (missing a verb), and the link text "here" is not descriptive per markdown best practices.
♻️ Proposed fix
-YC5 cross-sections and citation in the spreadsheet [here](https://gitlab.cern.ch/LHCHIGGSXS/LHCHXSWG1/crosssections/-/blob/master/Higgs_cross_sections.xlsx?ref_type=heads) +YR5 cross-sections and citations are available in the [YR5 cross-sections spreadsheet](https://gitlab.cern.ch/LHCHIGGSXS/LHCHXSWG1/crosssections/-/blob/master/Higgs_cross_sections.xlsx?ref_type=heads).🤖 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` at line 4, The sentence in README.md is missing a verb and uses non-descriptive link text; update it to a complete sentence that names the resource and replaces "here" with descriptive link text (e.g., "Higgs cross sections spreadsheet on GitLab") so it reads like "YC5 cross-sections and citation are available in the Higgs cross sections spreadsheet on GitLab" and make the link target the provided URL.data/lhc-hxswg/makeSMtables.py (2)
243-251: ⚡ Quick winDebug
Multiple
logging.debug()for consistency with the rest of the codebase.♻️ Proposed fix: Convert to logging
- print(vals) + logging.debug("Row values: %s", vals) for key in ['ggF', 'VBF', 'WH', 'ZH', 'ttH', 'bbH', 'tH (s-ch', 'tH (t-ch', 'tH (W-ass']: col = find_col_by_substring(vals, cols, offset, key) if col is not None: startings[key] = col - print('------------------------------------------------------------') - print(s.name, startings) - print('------------------------------------------------------------') - print("==============================================================") + logging.info("Sheet [%s] starting columns: %s", s.name, startings)🤖 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 243 - 251, The code contains leftover debug print calls (print(vals), print('------------------------------------------------------------'), print(s.name, startings), and the final print("==============================================================")) within the loop that builds startings; replace these with appropriate logging.debug calls (or remove them) to avoid excessive console output and match the project's logging practice, e.g., use logging.debug with context including s.name, startings and avoid printing full row data unless debug-level logging is enabled; update imports if needed and ensure the logic around find_col_by_substring, vals, cols, offset, key remains unchanged.
356-368: 💤 Low valueRedundant conditional and assignment.
- Line 356:
if True:is always true and can be removed.- Line 367:
line2[1] = table[1][1]is redundant sinceline2is already a copy oftable[1], soline2[1]already equalstable[1][1].♻️ Proposed cleanup
- if True: ## thisi is the default behaviour - os.makedirs(f"sm/xs/{sqrtS}", exist_ok=True) - outname = f"sm/xs/{sqrtS}/{sqrtS}-{procname}.txt" - with open(outname, "w") as out: - for line in table: - out.write(" ".join(line) + "\n") - if group == 'tH_Wassoc' and sqrtS in ["7TeV", "8TeV"]: - ## add 120 and 130 as duplicate of 125 - for mh in [120, 130]: - line2 = list(table[1][:]) - line2[0] = str(mh) - line2[1] = table[1][1] ## tHW XS_pb - out.write(" ".join(line2) + "\n") + os.makedirs(f"sm/xs/{sqrtS}", exist_ok=True) + outname = f"sm/xs/{sqrtS}/{sqrtS}-{procname}.txt" + with open(outname, "w") as out: + for line in table: + out.write(" ".join(line) + "\n") + if group == 'tH_Wassoc' and sqrtS in ["7TeV", "8TeV"]: + # add 120 and 130 as duplicate of 125 + for mh in [120, 130]: + line2 = list(table[1][:]) + line2[0] = str(mh) + out.write(" ".join(line2) + "\n")🤖 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 356 - 368, Remove the no-op "if True:" wrapper and dedent its body so the directory creation, file open, and write loop run directly; inside the special-case block for group == 'tH_Wassoc' and sqrtS in ["7TeV","8TeV"], remove the redundant assignment line2[1] = table[1][1] (since line2 is already a shallow copy of table[1]) and only overwrite line2[0] = str(mh) before writing; keep using variables outname, table, group, sqrtS, procname and the existing out.write calls.data/lhc-hxswg/sm/xs/yr4-13TeV/13TeV-vbfH.txt (1)
1-40: 💤 Low valueInconsistent whitespace could affect parsing.
The table uses inconsistent spacing with a mix of tabs and spaces, particularly in the
PDF_plus_alpha_sandPDF alpha_Scolumns. While flexible whitespace-based parsers will likely handle this, fixed-column parsers might fail.Consider standardizing to consistent tab separation for robustness.
🤖 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/yr4-13TeV/13TeV-vbfH.txt` around lines 1 - 40, The file's whitespace is inconsistent across rows in the table (headers: mH_GeV, XS_pb, Scale_pos, Scale_neg, PDF_plus_alpha_s, PDF alpha_S) which can break fixed-column parsers; fix by normalizing each line to use a single delimiter (prefer tabs) between all six columns, ensure the header row and every data row have exactly six tab-separated fields and remove extra spaces/tabs within fields so values like "PDF_plus_alpha_s" and "PDF alpha_S" align consistently across all lines.data/lhc-hxswg/sm/xs/yr4-8TeV/8TeV-ZH.txt (1)
2-39: ⚡ Quick winTrailing tabs after the last column.
Each data row has trailing tab character(s) after the alpha_S column. While this may not break parsing, it creates inconsistency and could cause issues with whitespace-sensitive parsers.
🧹 Remove trailing tabs
Strip trailing whitespace from all data rows to ensure clean formatting.
🤖 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/yr4-8TeV/8TeV-ZH.txt` around lines 2 - 39, Rows in the data block contain trailing tab characters after the last column (alpha_S) — e.g. lines starting with "120.00" through "130.00" end with extra tabs — remove those trailing whitespace characters from every data row so each line ends immediately after the last numeric column; update the data-generation/export step or run a whitespace trim on each line to ensure no tabs/spaces remain at line ends.data/lhc-hxswg/sm/makeAllSMSplines.C (1)
38-41: 💤 Low valueConsider returning
const char*to indicate the pointer's limited lifetime.The
Form()function in ROOT returns a pointer to a static buffer that rotates. While safe for immediate use, returningchar*(non-const) suggests the caller might modify or own the memory, which is not the case. Returningconst char*better reflects the semantics.♻️ Proposed refactor
-char* formatSqrtS(float sqrts){ +const char* formatSqrtS(float sqrts){ if (fabs(sqrts - 13.6)<0.001) return Form("13p6TeV"); return Form("%dTeV",(int)sqrts); }🤖 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/makeAllSMSplines.C` around lines 38 - 41, Change the function signature of formatSqrtS from returning char* to const char* (i.e., const char* formatSqrtS(float sqrts)), leaving the return expressions using Form(...) unchanged; update any declarations/prototypes and call sites that expect a non-const char* to accept const char* (or add explicit copies where caller needs ownership) so the function accurately reflects the static/immutable lifetime of the Form() buffer.data/lhc-hxswg/sm/xs/8TeV/8TeV-tHW.txt (1)
2-4: 💤 Low valueConsider sorting mass points in ascending order.
The mass points are listed in non-standard order (125, 120, 130) rather than ascending order. While functionally correct, sorting them (120, 125, 130) would improve readability and consistency with other data files.
🤖 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-tHW.txt` around lines 2 - 4, The mass-point block containing the lines with masses "125 +0.00351...", "120 +0.00351...", "130 +0.00351..." should be reordered so mass values are ascending; reorder those three rows to "120", "125", "130" while preserving each row's full columns and formatting to keep values aligned and 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 1-4: The code calls xlrd when handling legacy .xls workbooks but
never imports it, causing a NameError; add a conditional (lazy) import of xlrd
right before the .xls handling path so xlrd is only required for legacy files,
e.g., in the branch that decides between load_workbook and xlrd (the logic
around the .xls/.xlsx handling where xlrd is referenced) import xlrd inside a
try/except ImportError and raise a clear error instructing the user to install
xlrd if missing; ensure the import name is exactly xlrd so the existing
references resolve.
In `@data/lhc-hxswg/sm/xs/7TeV/7TeV-bbH.txt`:
- Line 4: Replace the incorrect positive scale-low entry on the row "124 +0.176
+9.6 +9.6 +3.6 +10.2 -10.2": the Sca_Lo column (currently "+9.6" immediately
after "+0.176") must be "-9.6" to reflect a downward scale variation; update
that token to "-9.6" so the row reads "124 +0.176 -9.6 +9.6 +3.6 +10.2
-10.2".
In `@data/lhc-hxswg/sm/xs/7TeV/7TeV-tH_schan.txt`:
- Around line 2-15: The Sca_Lo column entries (the fourth whitespace-separated
field in each row, currently values like +16.6, +17.0, etc.) use the wrong sign;
change each of those values to its negative (e.g. +16.6 -> -16.6) throughout the
file so Sca_Lo follows the downward-uncertainty convention referenced as Sca_Lo
in this diff and appears negative for every mass row (entries starting with 120,
122, 124, 124.6, ... 130).
In `@data/lhc-hxswg/sm/xs/7TeV/7TeV-tH_tchan.txt`:
- Around line 2-15: The Sca_Lo column (the entries showing +2.5 / +2.6 in each
row) is using the wrong sign; change every Sca_Lo value to negative (e.g., +2.5
-> -2.5, +2.6 -> -2.6) across all rows in this file while preserving the
existing spacing and plus signs for other columns so the file formatting remains
unchanged.
In `@data/lhc-hxswg/sm/xs/7TeV/7TeV-ttH.txt`:
- Around line 3-15: The Sca_Lo column values in the provided diff are using the
wrong sign (they are +9.2 but should be negative); update each Sca_Lo entry in
these rows (the field showing +9.2) to be negative (e.g., change +9.2 to -9.2,
and any other positive Sca_Lo values to their negative equivalents) so the
Sca_Lo column follows the downward-uncertainty convention consistent with the
-9.3 example.
In `@data/lhc-hxswg/sm/xs/8TeV/8TeV-bbH.txt`:
- Line 8: The Sca_Lo value in the row "+125.09 +0.221 +9.3 +9.3 +3.4 +9.9
-9.9" is signed incorrectly; change the third column (Sca_Lo) from "+9.3" to
"-9.3" so the row reads "+125.09 +0.221 -9.3 +9.3 +3.4 +9.9 -9.9".
In `@data/lhc-hxswg/sm/xs/8TeV/8TeV-tH_schan.txt`:
- Around line 2-15: The Sca_Lo column in this data block is using positive signs
but should be negative; update every Sca_Lo entry (e.g., values currently "+16",
"+16.1", "+16.4", "+16.5", etc.) to have a leading minus sign (e.g., "-16",
"-16.1", "-16.4", "-16.5") across all rows in the diff so the lower scale
uncertainty follows the same negative convention as Total_Lo.
In `@data/lhc-hxswg/sm/xs/8TeV/8TeV-tH_tchan.txt`:
- Around line 2-15: The Total_Hi/Total_Lo values in the 8TeV tH_tchan table are
inconsistent across the mH grid (notably at mH=124.0 vs 124.6) while
Sca_Hi/Sca_Lo change, so inspect the source calculation that produces Total_Hi
and Total_Lo for entries around mH=124/124.6 (the rows with mH=124.0, 124.6 and
the repeated value +3.95979797464467 / -3.68781778291715), verify whether
Total_* should be constant across the grid, and either (a) recompute
Total_Hi/Total_Lo for mH=124.6 from the same component contributions used for
other rows (fixing any spreadsheet formula or script bug), or (b) apply
consistent rounding/propagation rules so the totals match the pattern seen in
other energies; update the data row(s) so Total_Hi/Total_Lo align with the
intended computation for the mH grid.
---
Outside diff comments:
In `@data/lhc-hxswg/sm/makeAllSMSplines.C`:
- Around line 80-92: The makeAllSMSplines function is missing the call to
generate 13.6 TeV cross-section splines; update makeAllSMSplines to invoke
makeXSSplines(13.6) alongside the existing calls (makeXSSplines(14),
makeXSSplines(13), makeXSSplines(8), makeXSSplines(7)) so that the 13.6 TeV
layer (formatted by formatSqrtS(13.6) as "13p6TeV") produces its ROOT spline
files; ensure the call uses the same pattern as the others and keep
makeBRSplines() unchanged.
In `@data/lhc-hxswg/sm/xs/yr4-8TeV/8TeV-tHW.txt`:
- Around line 1-5: This table for the tHW process only contains three identical
mass points and is effectively mass-independent; add an explicit data-quality
note/metadata above the table (referencing the tHW entry and the header line
"mH_GeV XS_pb") stating that the dataset is sparse (120,125,130 GeV),
cross-sections are identical, and users should treat the values as
mass-independent and exercise caution when interpolating (or set a flag like
"mass_independent: true" / "notes: limited YR4 approximation") so downstream
consumers know to handle interpolation differently.
---
Minor comments:
In `@data/lhc-hxswg/README.md`:
- Line 4: Replace the typo "YC5" with "YR5" in the README entry that currently
reads "YC5 cross-sections and citation in the spreadsheet..." so the sentence
matches the PR and codebase naming; update the text string in the README.md (the
line containing "YC5 cross-sections and citation in the spreadsheet") to "YR5
cross-sections and citation in the spreadsheet..." ensuring no other occurrences
of "YC5" remain.
In `@data/lhc-hxswg/sm/xs/7TeV/7TeV-tHW.txt`:
- Around line 2-4: The mH_GeV column values are inconsistently formatted: the
first row shows "+125" while the next rows show "120" and "130" without a
leading plus; update those entries so every mH_GeV value uses a leading '+'
(e.g., change "120" to "+120" and "130" to "+130") to match the header and other
rows and ensure consistent formatting for the mH_GeV field.
In `@data/lhc-hxswg/sm/xs/8TeV/8TeV-vbfH.txt`:
- Line 12: The row for mH=125.6 has an inconsistent Total_Hi value
("+2.55")—replace that truncated value with the full-precision Total_Hi from the
source data so it matches the precision of other rows (i.e., update the 125.6
row: "125.6 +1.603502046 +1.08 -1.061 +2.31 +2.55 -2.54201121161965" by
restoring the full-precision Total_Hi), verifying the exact digits from the
original dataset before committing.
In `@data/lhc-hxswg/sm/xs/yr4-14TeV/14TeV-bbH.txt`:
- Line 23: At mH = 125.20 (line showing "125.20 5.501E-01 +23.0 -24.0") the
Scale_PDF_alpha_S_pos value "+23.0" appears as an outlier versus neighboring
entries (~+20.1); verify the original source table for the Scale_PDF_alpha_S_pos
value and if it was a transcription error replace "+23.0" with the correct value
(likely "+20.1") in this file, ensuring the entry format
"125.20\t5.501E-01\t<pos>\t<neg>" is preserved and update any related
metadata/comments if present.
- Line 10: The Scale_PDF_alpha_S_pos value "+23.4" in the row
"124.00 5.672E-01 +23.4 -24.2" of data/lhc-hxswg/sm/xs/yr4-14TeV/14TeV-bbH.txt
appears to be an outlier; verify the original HXSWG source (or generation
script) for the mH=124.00 bbH entry and, if the source shows a different value
(likely near +20.0–+20.3 as in adjacent points), replace "+23.4" with the
correct Scale_PDF_alpha_S_pos value in that row (keeping the rest of the row
intact) and save the corrected file. Ensure the corrected numeric format (sign
and precision) matches surrounding entries.
In `@data/lhc-hxswg/sm/xs/yr4-14TeV/14TeV-ggH.txt`:
- Line 1: The header is ambiguous about the last columns and uses a space in
"PDF alpha_S"; update the header to explicitly list all eight columns and use
underscores for consistency — e.g. change the header line to: mH_GeV XS_pb
Scale_pos Scale_neg Gauss PDF_plus_alpha_s PDF PDF_alpha_S so each data column
maps unambiguously to a header (adjust the exact names if "PDF" should be more
descriptive).
In `@data/lhc-hxswg/sm/xs/yr4-14TeV/14TeV-tHW.txt`:
- Line 1: The header has an inconsistent column name "PDF alpha_S" containing a
space; change it to use an underscore to match the other columns (e.g., rename
"PDF alpha_S" to "PDF_alpha_S") so parsing is consistent with existing headers
like "mH_GeV", "XS_pb", "Scale_pos", "Scale_neg", and "PDF_plus_alpha_s".
In `@data/lhc-hxswg/sm/xs/yr4-14TeV/14TeV-ttH.txt`:
- Line 1: The header has an inconsistent column name "PDF alpha_S" with a space;
change it to "PDF_alpha_S" to match the underscore convention used by "mH_GeV",
"XS_pb", "Scale_pos", "Scale_neg", and "PDF_plus_alpha_s" so parsers won't
break; update the header string in the file (look for the header line containing
mH_GeV XS_pb Scale_pos Scale_neg PDF_plus_alpha_s PDF alpha_S) to replace the
space with an underscore.
In `@data/lhc-hxswg/sm/xs/yr4-14TeV/14TeV-vbfH.txt`:
- Line 1: The header row uses "PDF alpha_S" with a space which breaks the
underscore naming convention; update the header to "PDF_alpha_S" (matching other
columns like PDF_plus_alpha_s) so the first line becomes: mH_GeV XS_pb
Scale_pos Scale_neg PDF_plus_alpha_s PDF_alpha_S, ensuring you preserve the
original spacing/separators so downstream parsers continue to split columns
correctly.
In `@data/lhc-hxswg/sm/xs/yr4-14TeV/14TeV-WH.txt`:
- Line 1: The header has an inconsistent column name "PDF alpha_S" (contains a
space and different casing) which will break parsers; update that header token
to use underscores and match the existing style by replacing "PDF alpha_S" with
"PDF_alpha_s" (consistent with "PDF_plus_alpha_s") in the header line so all
column names use underscores and consistent casing.
In `@data/lhc-hxswg/sm/xs/yr4-7TeV/7TeV-ggH.txt`:
- Line 1: The header contains an inconsistent column name "PDF alpha_S" (with a
space) that breaks the underscore naming convention used by other columns like
mH_GeV, XS_pb, Scale_pos, Gauss, and PDF_plus_alpha_s; change "PDF alpha_S" to
"PDF_alpha_S" so all column names use underscores consistently to avoid parser
failures and to match the existing naming pattern.
In `@data/lhc-hxswg/sm/xs/yr4-7TeV/7TeV-WH.txt`:
- Line 1: The header line "mH_GeV XS_pb Scale_pos Scale_neg
PDF_plus_alpha_s PDF alpha_S XS_W_plus_pb XS_W_minus_pb" uses mixed tabs/spaces
and an inconsistent column name; change it to use a single delimiter style
(e.g., all tabs or all single spaces) and rename "PDF alpha_S" to "PDF_alpha_S"
to match the naming of "PDF_plus_alpha_s"; update the header so column names are
consistently formatted (for example:
mH_GeV<TAB>XS_pb<TAB>Scale_pos<TAB>Scale_neg<TAB>PDF_plus_alpha_s<TAB>PDF_alpha_S<TAB>XS_W_plus_pb<TAB>XS_W_minus_pb).
In `@data/lhc-hxswg/sm/xs/yr4-7TeV/7TeV-ZH.txt`:
- Line 1: The header line currently ends with a trailing tab after the "alpha_S"
column causing an empty implicit column; edit the header string (the line
containing "mH_GeV XS_pb Scale_pos Scale_neg PDF_plus_alpha_s PDF
alpha_S") to remove the trailing tab so the header ends exactly with "alpha_S"
and no extra delimiter, ensuring the column count matches the data rows.
---
Nitpick comments:
In `@data/lhc-hxswg/makeSMtables.py`:
- Around line 243-251: The code contains leftover debug print calls
(print(vals),
print('------------------------------------------------------------'),
print(s.name, startings), and the final
print("==============================================================")) within
the loop that builds startings; replace these with appropriate logging.debug
calls (or remove them) to avoid excessive console output and match the project's
logging practice, e.g., use logging.debug with context including s.name,
startings and avoid printing full row data unless debug-level logging is
enabled; update imports if needed and ensure the logic around
find_col_by_substring, vals, cols, offset, key remains unchanged.
- Around line 356-368: Remove the no-op "if True:" wrapper and dedent its body
so the directory creation, file open, and write loop run directly; inside the
special-case block for group == 'tH_Wassoc' and sqrtS in ["7TeV","8TeV"], remove
the redundant assignment line2[1] = table[1][1] (since line2 is already a
shallow copy of table[1]) and only overwrite line2[0] = str(mh) before writing;
keep using variables outname, table, group, sqrtS, procname and the existing
out.write calls.
In `@data/lhc-hxswg/README.md`:
- Line 4: The sentence in README.md is missing a verb and uses non-descriptive
link text; update it to a complete sentence that names the resource and replaces
"here" with descriptive link text (e.g., "Higgs cross sections spreadsheet on
GitLab") so it reads like "YC5 cross-sections and citation are available in the
Higgs cross sections spreadsheet on GitLab" and make the link target the
provided URL.
In `@data/lhc-hxswg/sm/makeAllSMSplines.C`:
- Around line 38-41: Change the function signature of formatSqrtS from returning
char* to const char* (i.e., const char* formatSqrtS(float sqrts)), leaving the
return expressions using Form(...) unchanged; update any declarations/prototypes
and call sites that expect a non-const char* to accept const char* (or add
explicit copies where caller needs ownership) so the function accurately
reflects the static/immutable lifetime of the Form() buffer.
In `@data/lhc-hxswg/sm/xs/8TeV/8TeV-tHW.txt`:
- Around line 2-4: The mass-point block containing the lines with masses "125
+0.00351...", "120 +0.00351...", "130 +0.00351..." should be reordered so mass
values are ascending; reorder those three rows to "120", "125", "130" while
preserving each row's full columns and formatting to keep values aligned and
unchanged.
In `@data/lhc-hxswg/sm/xs/yr4-13TeV/13TeV-vbfH.txt`:
- Around line 1-40: The file's whitespace is inconsistent across rows in the
table (headers: mH_GeV, XS_pb, Scale_pos, Scale_neg, PDF_plus_alpha_s, PDF
alpha_S) which can break fixed-column parsers; fix by normalizing each line to
use a single delimiter (prefer tabs) between all six columns, ensure the header
row and every data row have exactly six tab-separated fields and remove extra
spaces/tabs within fields so values like "PDF_plus_alpha_s" and "PDF alpha_S"
align consistently across all lines.
In `@data/lhc-hxswg/sm/xs/yr4-8TeV/8TeV-ZH.txt`:
- Around line 2-39: Rows in the data block contain trailing tab characters after
the last column (alpha_S) — e.g. lines starting with "120.00" through "130.00"
end with extra tabs — remove those trailing whitespace characters from every
data row so each line ends immediately after the last numeric column; update the
data-generation/export step or run a whitespace trim on each line to ensure no
tabs/spaces remain at line ends.
🪄 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: bd2cb9f0-e9f0-4a5f-8dcf-8ea79605bd28
⛔ Files ignored due to path filters (1)
data/lhc-hxswg/Higgs_cross_sections_YR5.xlsxis excluded by!**/*.xlsx
📒 Files selected for processing (101)
data/lhc-hxswg/README.mddata/lhc-hxswg/makeSMtables.pydata/lhc-hxswg/sm/makeAllSMSplines.Cdata/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/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-tHW.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/13p6TeV/13p6TeV-WH.txtdata/lhc-hxswg/sm/xs/13p6TeV/13p6TeV-ZH.txtdata/lhc-hxswg/sm/xs/13p6TeV/13p6TeV-bbH.txtdata/lhc-hxswg/sm/xs/13p6TeV/13p6TeV-ggH.txtdata/lhc-hxswg/sm/xs/13p6TeV/13p6TeV-ggZH.txtdata/lhc-hxswg/sm/xs/13p6TeV/13p6TeV-tHW.txtdata/lhc-hxswg/sm/xs/13p6TeV/13p6TeV-tH_schan.txtdata/lhc-hxswg/sm/xs/13p6TeV/13p6TeV-tH_tchan.txtdata/lhc-hxswg/sm/xs/13p6TeV/13p6TeV-ttH.txtdata/lhc-hxswg/sm/xs/13p6TeV/13p6TeV-vbfH.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-tHW.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/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-tHW.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/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-tHW.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/yr4-13TeV/13TeV-WH.txtdata/lhc-hxswg/sm/xs/yr4-13TeV/13TeV-ZH.txtdata/lhc-hxswg/sm/xs/yr4-13TeV/13TeV-bbH.txtdata/lhc-hxswg/sm/xs/yr4-13TeV/13TeV-ggH-NNLO-NLL.txtdata/lhc-hxswg/sm/xs/yr4-13TeV/13TeV-ggH.txtdata/lhc-hxswg/sm/xs/yr4-13TeV/13TeV-ggZH.txtdata/lhc-hxswg/sm/xs/yr4-13TeV/13TeV-tHW.txtdata/lhc-hxswg/sm/xs/yr4-13TeV/13TeV-tHq.txtdata/lhc-hxswg/sm/xs/yr4-13TeV/13TeV-ttH.txtdata/lhc-hxswg/sm/xs/yr4-13TeV/13TeV-vbfH.txtdata/lhc-hxswg/sm/xs/yr4-13TeV/README.txtdata/lhc-hxswg/sm/xs/yr4-14TeV/14TeV-WH.txtdata/lhc-hxswg/sm/xs/yr4-14TeV/14TeV-ZH.txtdata/lhc-hxswg/sm/xs/yr4-14TeV/14TeV-bbH.txtdata/lhc-hxswg/sm/xs/yr4-14TeV/14TeV-ggH-NNLO-NLL.txtdata/lhc-hxswg/sm/xs/yr4-14TeV/14TeV-ggH.txtdata/lhc-hxswg/sm/xs/yr4-14TeV/14TeV-ggZH.txtdata/lhc-hxswg/sm/xs/yr4-14TeV/14TeV-tHW.txtdata/lhc-hxswg/sm/xs/yr4-14TeV/14TeV-tHq.txtdata/lhc-hxswg/sm/xs/yr4-14TeV/14TeV-ttH.txtdata/lhc-hxswg/sm/xs/yr4-14TeV/14TeV-vbfH.txtdata/lhc-hxswg/sm/xs/yr4-14TeV/README.txtdata/lhc-hxswg/sm/xs/yr4-7TeV/7TeV-WH.txtdata/lhc-hxswg/sm/xs/yr4-7TeV/7TeV-ZH.txtdata/lhc-hxswg/sm/xs/yr4-7TeV/7TeV-bbH.txtdata/lhc-hxswg/sm/xs/yr4-7TeV/7TeV-ggH-NNLO-NLL.txtdata/lhc-hxswg/sm/xs/yr4-7TeV/7TeV-ggH.txtdata/lhc-hxswg/sm/xs/yr4-7TeV/7TeV-ggZH.txtdata/lhc-hxswg/sm/xs/yr4-7TeV/7TeV-tHW.txtdata/lhc-hxswg/sm/xs/yr4-7TeV/7TeV-tHq.txtdata/lhc-hxswg/sm/xs/yr4-7TeV/7TeV-ttH.txtdata/lhc-hxswg/sm/xs/yr4-7TeV/7TeV-vbfH.txtdata/lhc-hxswg/sm/xs/yr4-7TeV/README.txtdata/lhc-hxswg/sm/xs/yr4-8TeV/8TeV-WH.txtdata/lhc-hxswg/sm/xs/yr4-8TeV/8TeV-ZH.txtdata/lhc-hxswg/sm/xs/yr4-8TeV/8TeV-bbH.txtdata/lhc-hxswg/sm/xs/yr4-8TeV/8TeV-ggH-NNLO-NLL.txtdata/lhc-hxswg/sm/xs/yr4-8TeV/8TeV-ggH.txtdata/lhc-hxswg/sm/xs/yr4-8TeV/8TeV-ggZH.txtdata/lhc-hxswg/sm/xs/yr4-8TeV/8TeV-tHW.txtdata/lhc-hxswg/sm/xs/yr4-8TeV/8TeV-tHq.txtdata/lhc-hxswg/sm/xs/yr4-8TeV/8TeV-ttH.txtdata/lhc-hxswg/sm/xs/yr4-8TeV/8TeV-vbfH.txtdata/lhc-hxswg/sm/xs/yr4-8TeV/README.txt
| import logging | ||
| import sys | ||
| import os, sys | ||
|
|
||
| from openpyxl import load_workbook |
There was a problem hiding this comment.
Missing xlrd import causes NameError for legacy .xls files.
The code references xlrd at lines 301 and 304, but it is never imported. This will raise a NameError at runtime when attempting to open a non-.xlsx file.
🐛 Proposed fix: Add conditional import for xlrd
import logging
import os, sys
from openpyxl import load_workbook
+
+try:
+ import xlrd
+except ImportError:
+ xlrd = None📝 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.
| import logging | |
| import sys | |
| import os, sys | |
| from openpyxl import load_workbook | |
| import logging | |
| import os, sys | |
| from openpyxl import load_workbook | |
| try: | |
| import xlrd | |
| except ImportError: | |
| xlrd = None |
🤖 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 1 - 4, The code calls xlrd when
handling legacy .xls workbooks but never imports it, causing a NameError; add a
conditional (lazy) import of xlrd right before the .xls handling path so xlrd is
only required for legacy files, e.g., in the branch that decides between
load_workbook and xlrd (the logic around the .xls/.xlsx handling where xlrd is
referenced) import xlrd inside a try/except ImportError and raise a clear error
instructing the user to install xlrd if missing; ensure the import name is
exactly xlrd so the existing references resolve.
| mH_GeV XS_pb Sca_Hi Sca_Lo Pdf_alpha_S Total_Hi Total_Lo | ||
| +120 +0.197 +9.7 -9.7 +3.7 +10.4 -10.4 | ||
| +122 +0.186 +9.6 -9.6 +3.7 +10.3 -10.3 | ||
| +124 +0.176 +9.6 +9.6 +3.6 +10.2 -10.2 |
There was a problem hiding this comment.
Sign error in Sca_Lo column.
Line 4 has Sca_Lo = +9.6, but based on the convention established in all other rows (and the column name), this should be -9.6. Scale "Lo" uncertainties are downward variations and should be negative.
🐛 Proposed fix
-+124 +0.176 +9.6 +9.6 +3.6 +10.2 -10.2
++124 +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.176 +9.6 +9.6 +3.6 +10.2 -10.2 | |
| 124 +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, Replace the incorrect
positive scale-low entry on the row "124 +0.176 +9.6 +9.6 +3.6 +10.2
-10.2": the Sca_Lo column (currently "+9.6" immediately after "+0.176") must be
"-9.6" to reflect a downward scale variation; update that token to "-9.6" so the
row reads "124 +0.176 -9.6 +9.6 +3.6 +10.2 -10.2".
| +120 +0.01289 +7.6 +16.6 +4.9 +9.04267659490264 -17.3080905937079 +0.00888 +0.004 | ||
| +122 +0.0126 +7.5 +16.6 +4.9 +8.95879456177002 -17.3080905937079 +0.00869 +0.00392 | ||
| +124 +0.01236 +7.4 +17 +4.9 +8.8752464754507 -17.6920886274063 +0.00851 +0.00384 | ||
| +124.6 +0.01228 +7.4 +16.8 +4.9 +8.8752464754507 -17.5 +0.00847 +0.00382 | ||
| +124.8 +0.01225 +7.4 +16.8 +4.9 +8.8752464754507 -17.5 +0.00844 +0.00381 | ||
| +125 +0.01226 +7.3 +17.2 +4.9 +8.79204185613331 -17.8843507011018 +0.00843 +0.0038 | ||
| +125.09 +0.01223 +7.4 +17 +5 +8.93084542470644 -17.7200451466694 +0.00842 +0.0038 | ||
| +125.2 +0.01222 +7.3 +16.9 +5 +8.84816365128946 -17.6241311842598 +0.00841 +0.0038 | ||
| +125.3 +0.01221 +7.4 +16.9 +5 +8.93084542470644 -17.6241311842598 +0.00841 +0.00379 | ||
| +125.38 +0.01217 +7.4 +16.8 +5 +8.93084542470644 -17.5282628916844 +0.0084 +0.00379 | ||
| +125.6 +0.01218 +7.3 +17.1 +5 +8.84816365128946 -17.8160040413107 +0.00839 +0.00378 | ||
| +126 +0.01213 +7.3 +17 +5 +8.84816365128946 -17.7200451466694 +0.00834 +0.00377 | ||
| +128 +0.0119 +7.2 +17.2 +5 +8.76584280032445 -17.9120071460459 +0.0082 +0.0037 | ||
| +130 +0.01167 +7.2 +17.4 +5 +8.76584280032445 -18.1041431722134 +0.00804 +0.00365 |
There was a problem hiding this comment.
Sign convention error in Sca_Lo column throughout the file.
All rows have positive values for Sca_Lo (e.g., +16.6, +17.0, +16.8), but this column should represent downward scale uncertainties and should be negative, consistent with the convention in all other cross-section files in this PR.
🐛 Proposed fix
-+120 +0.01289 +7.6 +16.6 +4.9 +9.04267659490264 -17.3080905937079 +0.00888 +0.004
-+122 +0.0126 +7.5 +16.6 +4.9 +8.95879456177002 -17.3080905937079 +0.00869 +0.00392
-+124 +0.01236 +7.4 +17 +4.9 +8.8752464754507 -17.6920886274063 +0.00851 +0.00384
-+124.6 +0.01228 +7.4 +16.8 +4.9 +8.8752464754507 -17.5 +0.00847 +0.00382
-+124.8 +0.01225 +7.4 +16.8 +4.9 +8.8752464754507 -17.5 +0.00844 +0.00381
-+125 +0.01226 +7.3 +17.2 +4.9 +8.79204185613331 -17.8843507011018 +0.00843 +0.0038
-+125.09 +0.01223 +7.4 +17 +5 +8.93084542470644 -17.7200451466694 +0.00842 +0.0038
-+125.2 +0.01222 +7.3 +16.9 +5 +8.84816365128946 -17.6241311842598 +0.00841 +0.0038
-+125.3 +0.01221 +7.4 +16.9 +5 +8.93084542470644 -17.6241311842598 +0.00841 +0.00379
-+125.38 +0.01217 +7.4 +16.8 +5 +8.93084542470644 -17.5282628916844 +0.0084 +0.00379
-+125.6 +0.01218 +7.3 +17.1 +5 +8.84816365128946 -17.8160040413107 +0.00839 +0.00378
-+126 +0.01213 +7.3 +17 +5 +8.84816365128946 -17.7200451466694 +0.00834 +0.00377
-+128 +0.0119 +7.2 +17.2 +5 +8.76584280032445 -17.9120071460459 +0.0082 +0.0037
-+130 +0.01167 +7.2 +17.4 +5 +8.76584280032445 -18.1041431722134 +0.00804 +0.00365
++120 +0.01289 +7.6 -16.6 +4.9 +9.04267659490264 -17.3080905937079 +0.00888 +0.004
++122 +0.0126 +7.5 -16.6 +4.9 +8.95879456177002 -17.3080905937079 +0.00869 +0.00392
++124 +0.01236 +7.4 -17 +4.9 +8.8752464754507 -17.6920886274063 +0.00851 +0.00384
++124.6 +0.01228 +7.4 -16.8 +4.9 +8.8752464754507 -17.5 +0.00847 +0.00382
++124.8 +0.01225 +7.4 -16.8 +4.9 +8.8752464754507 -17.5 +0.00844 +0.00381
++125 +0.01226 +7.3 -17.2 +4.9 +8.79204185613331 -17.8843507011018 +0.00843 +0.0038
++125.09 +0.01223 +7.4 -17 +5 +8.93084542470644 -17.7200451466694 +0.00842 +0.0038
++125.2 +0.01222 +7.3 -16.9 +5 +8.84816365128946 -17.6241311842598 +0.00841 +0.0038
++125.3 +0.01221 +7.4 -16.9 +5 +8.93084542470644 -17.6241311842598 +0.00841 +0.00379
++125.38 +0.01217 +7.4 -16.8 +5 +8.93084542470644 -17.5282628916844 +0.0084 +0.00379
++125.6 +0.01218 +7.3 -17.1 +5 +8.84816365128946 -17.8160040413107 +0.00839 +0.00378
++126 +0.01213 +7.3 -17 +5 +8.84816365128946 -17.7200451466694 +0.00834 +0.00377
++128 +0.0119 +7.2 -17.2 +5 +8.76584280032445 -17.9120071460459 +0.0082 +0.0037
++130 +0.01167 +7.2 -17.4 +5 +8.76584280032445 -18.1041431722134 +0.00804 +0.00365📝 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.
| +120 +0.01289 +7.6 +16.6 +4.9 +9.04267659490264 -17.3080905937079 +0.00888 +0.004 | |
| +122 +0.0126 +7.5 +16.6 +4.9 +8.95879456177002 -17.3080905937079 +0.00869 +0.00392 | |
| +124 +0.01236 +7.4 +17 +4.9 +8.8752464754507 -17.6920886274063 +0.00851 +0.00384 | |
| +124.6 +0.01228 +7.4 +16.8 +4.9 +8.8752464754507 -17.5 +0.00847 +0.00382 | |
| +124.8 +0.01225 +7.4 +16.8 +4.9 +8.8752464754507 -17.5 +0.00844 +0.00381 | |
| +125 +0.01226 +7.3 +17.2 +4.9 +8.79204185613331 -17.8843507011018 +0.00843 +0.0038 | |
| +125.09 +0.01223 +7.4 +17 +5 +8.93084542470644 -17.7200451466694 +0.00842 +0.0038 | |
| +125.2 +0.01222 +7.3 +16.9 +5 +8.84816365128946 -17.6241311842598 +0.00841 +0.0038 | |
| +125.3 +0.01221 +7.4 +16.9 +5 +8.93084542470644 -17.6241311842598 +0.00841 +0.00379 | |
| +125.38 +0.01217 +7.4 +16.8 +5 +8.93084542470644 -17.5282628916844 +0.0084 +0.00379 | |
| +125.6 +0.01218 +7.3 +17.1 +5 +8.84816365128946 -17.8160040413107 +0.00839 +0.00378 | |
| +126 +0.01213 +7.3 +17 +5 +8.84816365128946 -17.7200451466694 +0.00834 +0.00377 | |
| +128 +0.0119 +7.2 +17.2 +5 +8.76584280032445 -17.9120071460459 +0.0082 +0.0037 | |
| +130 +0.01167 +7.2 +17.4 +5 +8.76584280032445 -18.1041431722134 +0.00804 +0.00365 | |
| 120 +0.01289 +7.6 -16.6 +4.9 +9.04267659490264 -17.3080905937079 +0.00888 +0.004 | |
| 122 +0.0126 +7.5 -16.6 +4.9 +8.95879456177002 -17.3080905937079 +0.00869 +0.00392 | |
| 124 +0.01236 +7.4 -17 +4.9 +8.8752464754507 -17.6920886274063 +0.00851 +0.00384 | |
| 124.6 +0.01228 +7.4 -16.8 +4.9 +8.8752464754507 -17.5 +0.00847 +0.00382 | |
| 124.8 +0.01225 +7.4 -16.8 +4.9 +8.8752464754507 -17.5 +0.00844 +0.00381 | |
| 125 +0.01226 +7.3 -17.2 +4.9 +8.79204185613331 -17.8843507011018 +0.00843 +0.0038 | |
| 125.09 +0.01223 +7.4 -17 +5 +8.93084542470644 -17.7200451466694 +0.00842 +0.0038 | |
| 125.2 +0.01222 +7.3 -16.9 +5 +8.84816365128946 -17.6241311842598 +0.00841 +0.0038 | |
| 125.3 +0.01221 +7.4 -16.9 +5 +8.93084542470644 -17.6241311842598 +0.00841 +0.00379 | |
| 125.38 +0.01217 +7.4 -16.8 +5 +8.93084542470644 -17.5282628916844 +0.0084 +0.00379 | |
| 125.6 +0.01218 +7.3 -17.1 +5 +8.84816365128946 -17.8160040413107 +0.00839 +0.00378 | |
| 126 +0.01213 +7.3 -17 +5 +8.84816365128946 -17.7200451466694 +0.00834 +0.00377 | |
| 128 +0.0119 +7.2 -17.2 +5 +8.76584280032445 -17.9120071460459 +0.0082 +0.0037 | |
| 130 +0.01167 +7.2 -17.4 +5 +8.76584280032445 -18.1041431722134 +0.00804 +0.00365 |
🤖 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-tH_schan.txt` around lines 2 - 15, The Sca_Lo
column entries (the fourth whitespace-separated field in each row, currently
values like +16.6, +17.0, etc.) use the wrong sign; change each of those values
to its negative (e.g. +16.6 -> -16.6) throughout the file so Sca_Lo follows the
downward-uncertainty convention referenced as Sca_Lo in this diff and appears
negative for every mass row (entries starting with 120, 122, 124, 124.6, ...
130).
| +120 +0.001028 +2.9 +2.5 +3 +4.17252920900501 -3.90512483795333 +0.000709 +0.000319 | ||
| +122 +0.000987 +2.9 +2.5 +3 +4.17252920900501 -3.90512483795333 +0.000682 +0.000305 | ||
| +124 +0.000949 +2.9 +2.5 +3 +4.17252920900501 -3.90512483795333 +0.000655 +0.000293 | ||
| +124.6 +0.000937 +2.9 +2.5 +3 +4.17252920900501 -3.90512483795333 +0.000648 +0.000289 | ||
| +124.8 +0.000934 +2.9 +2.5 +3 +4.17252920900501 -3.90512483795333 +0.000645 +0.000288 | ||
| +125 +0.00093 +2.9 +2.5 +3 +4.17252920900501 -3.90512483795333 +0.000642 +0.000287 | ||
| +125.09 +0.000929 +2.9 +2.6 +3 +4.17252920900501 -3.96988664825584 +0.000642 +0.000286 | ||
| +125.2 +0.000925 +2.8 +2.5 +3 +4.10365690573664 -3.90512483795333 +0.000641 +0.000285 | ||
| +125.3 +0.000925 +2.9 +2.6 +3 +4.17252920900501 -3.96988664825584 +0.00064 +0.000285 | ||
| +125.38 +0.000922 +2.9 +2.6 +3 +4.17252920900501 -3.96988664825584 +0.000638 +0.000284 | ||
| +125.6 +0.000919 +2.9 +2.6 +3 +4.17252920900501 -3.96988664825584 +0.000636 +0.000283 | ||
| +126 +0.000912 +2.9 +2.5 +3 +4.17252920900501 -3.90512483795333 +0.00063 +0.00028 | ||
| +128 +0.000875 +2.9 +2.5 +3.1 +4.24499705535823 -3.98246155034798 +0.000607 +0.00027 | ||
| +130 +0.000843 +2.9 +2.6 +3.1 +4.24499705535823 -4.04598566482878 +0.000585 +0.000259 |
There was a problem hiding this comment.
Sign convention error in Sca_Lo column throughout the file.
All rows have positive values for Sca_Lo (consistently +2.5 or +2.6), but this column should represent downward scale uncertainties and should be negative, consistent with the convention in all other cross-section files in this PR.
🐛 Proposed fix
-+120 +0.001028 +2.9 +2.5 +3 +4.17252920900501 -3.90512483795333 +0.000709 +0.000319
-+122 +0.000987 +2.9 +2.5 +3 +4.17252920900501 -3.90512483795333 +0.000682 +0.000305
-+124 +0.000949 +2.9 +2.5 +3 +4.17252920900501 -3.90512483795333 +0.000655 +0.000293
-+124.6 +0.000937 +2.9 +2.5 +3 +4.17252920900501 -3.90512483795333 +0.000648 +0.000289
-+124.8 +0.000934 +2.9 +2.5 +3 +4.17252920900501 -3.90512483795333 +0.000645 +0.000288
-+125 +0.00093 +2.9 +2.5 +3 +4.17252920900501 -3.90512483795333 +0.000642 +0.000287
-+125.09 +0.000929 +2.9 +2.6 +3 +4.17252920900501 -3.96988664825584 +0.000642 +0.000286
-+125.2 +0.000925 +2.8 +2.5 +3 +4.10365690573664 -3.90512483795333 +0.000641 +0.000285
-+125.3 +0.000925 +2.9 +2.6 +3 +4.17252920900501 -3.96988664825584 +0.00064 +0.000285
-+125.38 +0.000922 +2.9 +2.6 +3 +4.17252920900501 -3.96988664825584 +0.000638 +0.000284
-+125.6 +0.000919 +2.9 +2.6 +3 +4.17252920900501 -3.96988664825584 +0.000636 +0.000283
-+126 +0.000912 +2.9 +2.5 +3 +4.17252920900501 -3.90512483795333 +0.00063 +0.00028
-+128 +0.000875 +2.9 +2.5 +3.1 +4.24499705535823 -3.98246155034798 +0.000607 +0.00027
-+130 +0.000843 +2.9 +2.6 +3.1 +4.24499705535823 -4.04598566482878 +0.000585 +0.000259
++120 +0.001028 +2.9 -2.5 +3 +4.17252920900501 -3.90512483795333 +0.000709 +0.000319
++122 +0.000987 +2.9 -2.5 +3 +4.17252920900501 -3.90512483795333 +0.000682 +0.000305
++124 +0.000949 +2.9 -2.5 +3 +4.17252920900501 -3.90512483795333 +0.000655 +0.000293
++124.6 +0.000937 +2.9 -2.5 +3 +4.17252920900501 -3.90512483795333 +0.000648 +0.000289
++124.8 +0.000934 +2.9 -2.5 +3 +4.17252920900501 -3.90512483795333 +0.000645 +0.000288
++125 +0.00093 +2.9 -2.5 +3 +4.17252920900501 -3.90512483795333 +0.000642 +0.000287
++125.09 +0.000929 +2.9 -2.6 +3 +4.17252920900501 -3.96988664825584 +0.000642 +0.000286
++125.2 +0.000925 +2.8 -2.5 +3 +4.10365690573664 -3.90512483795333 +0.000641 +0.000285
++125.3 +0.000925 +2.9 -2.6 +3 +4.17252920900501 -3.96988664825584 +0.00064 +0.000285
++125.38 +0.000922 +2.9 -2.6 +3 +4.17252920900501 -3.96988664825584 +0.000638 +0.000284
++125.6 +0.000919 +2.9 -2.6 +3 +4.17252920900501 -3.96988664825584 +0.000636 +0.000283
++126 +0.000912 +2.9 -2.5 +3 +4.17252920900501 -3.90512483795333 +0.00063 +0.00028
++128 +0.000875 +2.9 -2.5 +3.1 +4.24499705535823 -3.98246155034798 +0.000607 +0.00027
++130 +0.000843 +2.9 -2.6 +3.1 +4.24499705535823 -4.04598566482878 +0.000585 +0.000259📝 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.
| +120 +0.001028 +2.9 +2.5 +3 +4.17252920900501 -3.90512483795333 +0.000709 +0.000319 | |
| +122 +0.000987 +2.9 +2.5 +3 +4.17252920900501 -3.90512483795333 +0.000682 +0.000305 | |
| +124 +0.000949 +2.9 +2.5 +3 +4.17252920900501 -3.90512483795333 +0.000655 +0.000293 | |
| +124.6 +0.000937 +2.9 +2.5 +3 +4.17252920900501 -3.90512483795333 +0.000648 +0.000289 | |
| +124.8 +0.000934 +2.9 +2.5 +3 +4.17252920900501 -3.90512483795333 +0.000645 +0.000288 | |
| +125 +0.00093 +2.9 +2.5 +3 +4.17252920900501 -3.90512483795333 +0.000642 +0.000287 | |
| +125.09 +0.000929 +2.9 +2.6 +3 +4.17252920900501 -3.96988664825584 +0.000642 +0.000286 | |
| +125.2 +0.000925 +2.8 +2.5 +3 +4.10365690573664 -3.90512483795333 +0.000641 +0.000285 | |
| +125.3 +0.000925 +2.9 +2.6 +3 +4.17252920900501 -3.96988664825584 +0.00064 +0.000285 | |
| +125.38 +0.000922 +2.9 +2.6 +3 +4.17252920900501 -3.96988664825584 +0.000638 +0.000284 | |
| +125.6 +0.000919 +2.9 +2.6 +3 +4.17252920900501 -3.96988664825584 +0.000636 +0.000283 | |
| +126 +0.000912 +2.9 +2.5 +3 +4.17252920900501 -3.90512483795333 +0.00063 +0.00028 | |
| +128 +0.000875 +2.9 +2.5 +3.1 +4.24499705535823 -3.98246155034798 +0.000607 +0.00027 | |
| +130 +0.000843 +2.9 +2.6 +3.1 +4.24499705535823 -4.04598566482878 +0.000585 +0.000259 | |
| 120 +0.001028 +2.9 -2.5 +3 +4.17252920900501 -3.90512483795333 +0.000709 +0.000319 | |
| 122 +0.000987 +2.9 -2.5 +3 +4.17252920900501 -3.90512483795333 +0.000682 +0.000305 | |
| 124 +0.000949 +2.9 -2.5 +3 +4.17252920900501 -3.90512483795333 +0.000655 +0.000293 | |
| 124.6 +0.000937 +2.9 -2.5 +3 +4.17252920900501 -3.90512483795333 +0.000648 +0.000289 | |
| 124.8 +0.000934 +2.9 -2.5 +3 +4.17252920900501 -3.90512483795333 +0.000645 +0.000288 | |
| 125 +0.00093 +2.9 -2.5 +3 +4.17252920900501 -3.90512483795333 +0.000642 +0.000287 | |
| 125.09 +0.000929 +2.9 -2.6 +3 +4.17252920900501 -3.96988664825584 +0.000642 +0.000286 | |
| 125.2 +0.000925 +2.8 -2.5 +3 +4.10365690573664 -3.90512483795333 +0.000641 +0.000285 | |
| 125.3 +0.000925 +2.9 -2.6 +3 +4.17252920900501 -3.96988664825584 +0.00064 +0.000285 | |
| 125.38 +0.000922 +2.9 -2.6 +3 +4.17252920900501 -3.96988664825584 +0.000638 +0.000284 | |
| 125.6 +0.000919 +2.9 -2.6 +3 +4.17252920900501 -3.96988664825584 +0.000636 +0.000283 | |
| 126 +0.000912 +2.9 -2.5 +3 +4.17252920900501 -3.90512483795333 +0.00063 +0.00028 | |
| 128 +0.000875 +2.9 -2.5 +3.1 +4.24499705535823 -3.98246155034798 +0.000607 +0.00027 | |
| 130 +0.000843 +2.9 -2.6 +3.1 +4.24499705535823 -4.04598566482878 +0.000585 +0.000259 |
🤖 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-tH_tchan.txt` around lines 2 - 15, The Sca_Lo
column (the entries showing +2.5 / +2.6 in each row) is using the wrong sign;
change every Sca_Lo value to negative (e.g., +2.5 -> -2.5, +2.6 -> -2.6) across
all rows in this file while preserving the existing spacing and plus signs for
other columns so the file formatting remains unchanged.
| +122 +0.09572 +3.5 +9.2 +4.5 +5.70087712549569 -10.2415819090607 | ||
| +124 +0.09107 +3.5 +9.2 +4.5 +5.70087712549569 -10.2415819090607 | ||
| +124.6 +0.08972 +3.5 +9.2 +4.5 +5.70087712549569 -10.2415819090607 | ||
| +124.8 +0.0893 +3.5 +9.2 +4.5 +5.70087712549569 -10.2415819090607 | ||
| +125 +0.08878 +3.4 +9.2 +4.5 +5.64003546088143 -10.2415819090607 | ||
| +125.09 +0.08864 +3.5 +9.2 +4.5 +5.70087712549569 -10.2415819090607 | ||
| +125.2 +0.08841 +3.5 +9.2 +4.5 +5.70087712549569 -10.2415819090607 | ||
| +125.3 +0.08825 +3.4 +9.2 +4.5 +5.64003546088143 -10.2415819090607 | ||
| +125.38 +0.08794 +3.5 +9.2 +4.5 +5.70087712549569 -10.2415819090607 | ||
| +125.6 +0.08761 +3.5 +9.2 +4.5 +5.70087712549569 -10.2415819090607 | ||
| +126 +0.08674 +3.5 +9.2 +4.5 +5.70087712549569 -10.2415819090607 | ||
| +128 +0.08262 +3.5 +9.2 +4.5 +5.70087712549569 -10.2415819090607 | ||
| +130 +0.07882 +3.4 +9.2 +4.5 +5.64003546088143 -10.2415819090607 |
There was a problem hiding this comment.
Sign convention error in Sca_Lo column for most rows.
Lines 3-15 have positive values for Sca_Lo (consistently +9.2), but this column should represent downward scale uncertainties and should be negative. Line 2 correctly uses -9.3 for this column, establishing the expected convention.
🐛 Proposed fix
-+122 +0.09572 +3.5 +9.2 +4.5 +5.70087712549569 -10.2415819090607
-+124 +0.09107 +3.5 +9.2 +4.5 +5.70087712549569 -10.2415819090607
-+124.6 +0.08972 +3.5 +9.2 +4.5 +5.70087712549569 -10.2415819090607
-+124.8 +0.0893 +3.5 +9.2 +4.5 +5.70087712549569 -10.2415819090607
-+125 +0.08878 +3.4 +9.2 +4.5 +5.64003546088143 -10.2415819090607
-+125.09 +0.08864 +3.5 +9.2 +4.5 +5.70087712549569 -10.2415819090607
-+125.2 +0.08841 +3.5 +9.2 +4.5 +5.70087712549569 -10.2415819090607
-+125.3 +0.08825 +3.4 +9.2 +4.5 +5.64003546088143 -10.2415819090607
-+125.38 +0.08794 +3.5 +9.2 +4.5 +5.70087712549569 -10.2415819090607
-+125.6 +0.08761 +3.5 +9.2 +4.5 +5.70087712549569 -10.2415819090607
-+126 +0.08674 +3.5 +9.2 +4.5 +5.70087712549569 -10.2415819090607
-+128 +0.08262 +3.5 +9.2 +4.5 +5.70087712549569 -10.2415819090607
-+130 +0.07882 +3.4 +9.2 +4.5 +5.64003546088143 -10.2415819090607
++122 +0.09572 +3.5 -9.2 +4.5 +5.70087712549569 -10.2415819090607
++124 +0.09107 +3.5 -9.2 +4.5 +5.70087712549569 -10.2415819090607
++124.6 +0.08972 +3.5 -9.2 +4.5 +5.70087712549569 -10.2415819090607
++124.8 +0.0893 +3.5 -9.2 +4.5 +5.70087712549569 -10.2415819090607
++125 +0.08878 +3.4 -9.2 +4.5 +5.64003546088143 -10.2415819090607
++125.09 +0.08864 +3.5 -9.2 +4.5 +5.70087712549569 -10.2415819090607
++125.2 +0.08841 +3.5 -9.2 +4.5 +5.70087712549569 -10.2415819090607
++125.3 +0.08825 +3.4 -9.2 +4.5 +5.64003546088143 -10.2415819090607
++125.38 +0.08794 +3.5 -9.2 +4.5 +5.70087712549569 -10.2415819090607
++125.6 +0.08761 +3.5 -9.2 +4.5 +5.70087712549569 -10.2415819090607
++126 +0.08674 +3.5 -9.2 +4.5 +5.70087712549569 -10.2415819090607
++128 +0.08262 +3.5 -9.2 +4.5 +5.70087712549569 -10.2415819090607
++130 +0.07882 +3.4 -9.2 +4.5 +5.64003546088143 -10.2415819090607📝 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.
| +122 +0.09572 +3.5 +9.2 +4.5 +5.70087712549569 -10.2415819090607 | |
| +124 +0.09107 +3.5 +9.2 +4.5 +5.70087712549569 -10.2415819090607 | |
| +124.6 +0.08972 +3.5 +9.2 +4.5 +5.70087712549569 -10.2415819090607 | |
| +124.8 +0.0893 +3.5 +9.2 +4.5 +5.70087712549569 -10.2415819090607 | |
| +125 +0.08878 +3.4 +9.2 +4.5 +5.64003546088143 -10.2415819090607 | |
| +125.09 +0.08864 +3.5 +9.2 +4.5 +5.70087712549569 -10.2415819090607 | |
| +125.2 +0.08841 +3.5 +9.2 +4.5 +5.70087712549569 -10.2415819090607 | |
| +125.3 +0.08825 +3.4 +9.2 +4.5 +5.64003546088143 -10.2415819090607 | |
| +125.38 +0.08794 +3.5 +9.2 +4.5 +5.70087712549569 -10.2415819090607 | |
| +125.6 +0.08761 +3.5 +9.2 +4.5 +5.70087712549569 -10.2415819090607 | |
| +126 +0.08674 +3.5 +9.2 +4.5 +5.70087712549569 -10.2415819090607 | |
| +128 +0.08262 +3.5 +9.2 +4.5 +5.70087712549569 -10.2415819090607 | |
| +130 +0.07882 +3.4 +9.2 +4.5 +5.64003546088143 -10.2415819090607 | |
| 122 +0.09572 +3.5 -9.2 +4.5 +5.70087712549569 -10.2415819090607 | |
| 124 +0.09107 +3.5 -9.2 +4.5 +5.70087712549569 -10.2415819090607 | |
| 124.6 +0.08972 +3.5 -9.2 +4.5 +5.70087712549569 -10.2415819090607 | |
| 124.8 +0.0893 +3.5 -9.2 +4.5 +5.70087712549569 -10.2415819090607 | |
| 125 +0.08878 +3.4 -9.2 +4.5 +5.64003546088143 -10.2415819090607 | |
| 125.09 +0.08864 +3.5 -9.2 +4.5 +5.70087712549569 -10.2415819090607 | |
| 125.2 +0.08841 +3.5 -9.2 +4.5 +5.70087712549569 -10.2415819090607 | |
| 125.3 +0.08825 +3.4 -9.2 +4.5 +5.64003546088143 -10.2415819090607 | |
| 125.38 +0.08794 +3.5 -9.2 +4.5 +5.70087712549569 -10.2415819090607 | |
| 125.6 +0.08761 +3.5 -9.2 +4.5 +5.70087712549569 -10.2415819090607 | |
| 126 +0.08674 +3.5 -9.2 +4.5 +5.70087712549569 -10.2415819090607 | |
| 128 +0.08262 +3.5 -9.2 +4.5 +5.70087712549569 -10.2415819090607 | |
| 130 +0.07882 +3.4 -9.2 +4.5 +5.64003546088143 -10.2415819090607 |
🤖 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-ttH.txt` around lines 3 - 15, The Sca_Lo
column values in the provided diff are using the wrong sign (they are +9.2 but
should be negative); update each Sca_Lo entry in these rows (the field showing
+9.2) to be negative (e.g., change +9.2 to -9.2, and any other positive Sca_Lo
values to their negative equivalents) so the Sca_Lo column follows the
downward-uncertainty convention consistent with the -9.3 example.
| +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.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.
Fix sign error in Sca_Lo column.
The Sca_Lo value at line 8 is incorrectly positive (+9.3). Based on the schema convention and all other rows in this file and related files, Sca_Lo 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 "+125.09 +0.221 +9.3 +9.3 +3.4 +9.9 -9.9" is signed incorrectly;
change the third column (Sca_Lo) from "+9.3" to "-9.3" so the row reads "+125.09
+0.221 -9.3 +9.3 +3.4 +9.9 -9.9".
| +120 +0.01959 +7.4 +16 +4.6 +8.71320836431679 -16.6481230173254 +0.01337 +0.00622 | ||
| +122 +0.01921 +7.4 +16.1 +4.6 +8.71320836431679 -16.7442527453452 +0.0131 +0.00611 | ||
| +124 +0.01887 +7.3 +16.4 +4.6 +8.62844134244418 -17.0329093228374 +0.01286 +0.00599 | ||
| +124.6 +0.01875 +7.3 +16.4 +4.6 +8.62844134244418 -17.0329093228374 +0.01278 +0.00597 | ||
| +124.8 +0.01871 +7.2 +16.5 +4.6 +8.54400374531753 -17.1292148097921 +0.01276 +0.00595 | ||
| +125 +0.01869 +7.3 +16.5 +4.6 +8.62844134244418 -17.1292148097921 +0.01273 +0.00595 | ||
| +125.09 +0.01866 +7.3 +16.6 +4.6 +8.62844134244418 -17.2255624001076 +0.01272 +0.00595 | ||
| +125.2 +0.01866 +7.3 +16.6 +4.6 +8.62844134244418 -17.2255624001076 +0.01274 +0.00594 | ||
| +125.3 +0.01864 +7.2 +16.5 +4.6 +8.54400374531753 -17.1292148097921 +0.0127 +0.00592 | ||
| +125.38 +0.01862 +7.2 +16.5 +4.6 +8.54400374531753 -17.1292148097921 +0.01269 +0.00593 | ||
| +125.6 +0.01857 +7.2 +16.6 +4.6 +8.54400374531753 -17.2255624001076 +0.01266 +0.00592 | ||
| +126 +0.01852 +7.2 +16.6 +4.7 +8.59825563704639 -17.252536045463 +0.01262 +0.0059 | ||
| +128 +0.0182 +7.1 +16.8 +4.7 +8.5146931829632 -17.4450566063857 +0.01242 +0.00579 | ||
| +130 +0.01787 +7.1 +16.9 +4.7 +8.5146931829632 -17.541379649275 +0.01219 +0.00571 |
There was a problem hiding this comment.
Fix sign error in Sca_Lo column throughout the file.
All Sca_Lo values in this file are incorrectly positive (e.g., +16, +16.1, +16.4, etc.). Based on the schema convention used in all other cross-section files, Sca_Lo represents the lower scale uncertainty and should be negative. The Total_Lo values are correctly negative, confirming that the lower uncertainties follow the negative sign convention.
🐛 Proposed fix for first few rows (apply pattern to all rows)
-+120 +0.01959 +7.4 +16 +4.6 +8.71320836431679 -16.6481230173254 +0.01337 +0.00622
++120 +0.01959 +7.4 -16 +4.6 +8.71320836431679 -16.6481230173254 +0.01337 +0.00622
-+122 +0.01921 +7.4 +16.1 +4.6 +8.71320836431679 -16.7442527453452 +0.0131 +0.00611
++122 +0.01921 +7.4 -16.1 +4.6 +8.71320836431679 -16.7442527453452 +0.0131 +0.00611
-+124 +0.01887 +7.3 +16.4 +4.6 +8.62844134244418 -17.0329093228374 +0.01286 +0.00599
++124 +0.01887 +7.3 -16.4 +4.6 +8.62844134244418 -17.0329093228374 +0.01286 +0.00599Apply the same sign correction to all remaining rows (lines 5-15).
🤖 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-tH_schan.txt` around lines 2 - 15, The Sca_Lo
column in this data block is using positive signs but should be negative; update
every Sca_Lo entry (e.g., values currently "+16", "+16.1", "+16.4", "+16.5",
etc.) to have a leading minus sign (e.g., "-16", "-16.1", "-16.4", "-16.5")
across all rows in the diff so the lower scale uncertainty follows the same
negative convention as Total_Lo.
| +120 +0.001339 +2.8 +2.4 +2.8 +3.95979797464467 -3.68781778291715 +0.000913 +0.000426 | ||
| +122 +0.001287 +2.8 +2.4 +2.8 +3.95979797464467 -3.68781778291715 +0.000878 +0.000409 | ||
| +124 +0.001238 +2.7 +2.3 +2.8 +3.88973006775534 -3.62353418639869 +0.000845 +0.000393 | ||
| +124.6 +0.001224 +2.7 +2.4 +2.8 +3.88973006775534 -3.68781778291715 +0.000836 +0.000388 | ||
| +124.8 +0.001219 +2.8 +2.4 +2.8 +3.95979797464467 -3.68781778291715 +0.000832 +0.000386 | ||
| +125 +0.001214 +2.8 +2.4 +2.8 +3.95979797464467 -3.68781778291715 +0.000829 +0.000385 | ||
| +125.09 +0.001211 +2.8 +2.4 +2.8 +3.95979797464467 -3.68781778291715 +0.000828 +0.000384 | ||
| +125.2 +0.001209 +2.8 +2.4 +2.8 +3.95979797464467 -3.68781778291715 +0.000827 +0.000383 | ||
| +125.3 +0.001208 +2.8 +2.4 +2.8 +3.95979797464467 -3.68781778291715 +0.000825 +0.000383 | ||
| +125.38 +0.001204 +2.8 +2.4 +2.8 +3.95979797464467 -3.68781778291715 +0.000824 +0.000381 | ||
| +125.6 +0.0012 +2.8 +2.4 +2.8 +3.95979797464467 -3.68781778291715 +0.00082 +0.00038 | ||
| +126 +0.001191 +2.8 +2.4 +2.8 +3.95979797464467 -3.68781778291715 +0.000814 +0.000377 | ||
| +128 +0.001146 +2.8 +2.4 +2.8 +3.95979797464467 -3.68781778291715 +0.000784 +0.000363 | ||
| +130 +0.001103 +2.8 +2.4 +2.8 +3.95979797464467 -3.68781778291715 +0.000755 +0.000348 |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Check if other 8 TeV files show similar patterns
echo "=== Checking tH_schan for comparison ==="
if [ -f data/lhc-hxswg/sm/xs/8TeV/8TeV-tH_schan.txt ]; then
head -6 data/lhc-hxswg/sm/xs/8TeV/8TeV-tH_schan.txt | tail -5
else
echo "tH_schan file not found"
fi
echo -e "\n=== Checking if pattern exists in other energies ==="
fd -e txt 'tH_tchan' data/lhc-hxswg/sm/xs/ --exec grep -H "^+124 " {} \; 2>/dev/null || echo "No other tH_tchan files found"Repository: cms-analysis/HiggsAnalysis-CombinedLimit
Length of output: 1437
🏁 Script executed:
#!/bin/bash
set -euo pipefail
python3 - <<'PY'
import glob, re, os, math
paths = sorted(glob.glob("data/lhc-hxswg/sm/xs/*/*tH_tchan.txt"))
print(f"Found {len(paths)} tH_tchan files")
for p in paths:
with open(p, "r", encoding="utf-8") as f:
header = f.readline().strip()
lines = [ln.strip() for ln in f if ln.strip()]
rows=[]
for ln in lines:
# split on whitespace; keep scientific-friendly tokens
parts = ln.split()
if len(parts) != 10:
print(f"[WARN] {p}: line token count {len(parts)} != 10: {ln}")
continue
# Columns: mH_GeV XS_pb Sca_Hi Sca_Lo Pdf_alpha_S Total_Hi Total_Lo XS_tH_pb XS_tbarH_pb
mH=float(parts[0])
Total_Hi=float(parts[5])
Total_Lo=float(parts[6])
Sca_Hi=float(parts[2])
rows.append((mH,Sca_Hi,Total_Hi,Total_Lo))
if not rows:
print(f"[WARN] {p}: no parsed rows")
continue
total_hi_vals = {round(x[2], 14) for x in rows}
total_lo_vals = {round(x[3], 14) for x in rows}
print("\n==", p, "==")
print("rows:", len(rows))
print("unique Total_Hi (rounded 14dp):", len(total_hi_vals))
print("unique Total_Lo (rounded 14dp):", len(total_lo_vals))
# focus around 124-126
focus = [r for r in rows if 123.5 <= r[0] <= 126.5]
if focus:
focus_sorted = sorted(focus)
print("mH, Sca_Hi, Total_Hi, Total_Lo in [123.5,126.5]:")
for mH,sca_hi,tot_hi,tot_lo in focus_sorted:
print(f" {mH:>6} Sca_Hi={sca_hi} Total_Hi={tot_hi} Total_Lo={tot_lo}")
PY
echo "=== Quick token-count sanity for the specific 8TeV file ==="
awk 'NR==1{print "HEADER:",$0; next}
{
n=NF
if (n!=10) {print "BAD NF at line",NR, "NF=",n,":",$0}
}' data/lhc-hxswg/sm/xs/8TeV/8TeV-tH_tchan.txtRepository: cms-analysis/HiggsAnalysis-CombinedLimit
Length of output: 15146
🏁 Script executed:
#!/bin/bash
set -euo pipefail
python3 - <<'PY'
import glob, math
paths = sorted(glob.glob("data/lhc-hxswg/sm/xs/*/*tH_tchan.txt"))
print(f"Found {len(paths)} tH_tchan files")
def parse_file(p):
rows=[]
with open(p, "r", encoding="utf-8") as f:
header=f.readline().strip()
for ln in f:
ln=ln.strip()
if not ln:
continue
parts=ln.split()
# expected 9 columns per header:
# mH_GeV XS_pb Sca_Hi Sca_Lo Pdf_alpha_S Total_Hi Total_Lo XS_tH_pb XS_tbarH_pb
if len(parts)!=9:
return None, f"unexpected token count {len(parts)}: {ln}"
mH=float(parts[0])
Sca_Hi=float(parts[2])
Total_Hi=float(parts[5])
Total_Lo=float(parts[6])
rows.append((mH,Sca_Hi,Total_Hi,Total_Lo))
return rows, None
for p in paths:
rows, err = parse_file(p)
print("\n==", p, "==")
if err:
print("[ERROR]", err)
continue
# stats
hi_vals=set(round(r[2],14) for r in rows)
lo_vals=set(round(r[3],14) for r in rows)
print("rows:", len(rows))
print("unique Total_Hi (14dp):", len(hi_vals))
print("unique Total_Lo (14dp):", len(lo_vals))
# dominant values
from collections import Counter
hi_c=Counter(round(r[2],14) for r in rows)
lo_c=Counter(round(r[3],14) for r in rows)
hi_dom=hi_c.most_common(1)[0]
lo_dom=lo_c.most_common(1)[0]
print("dominant Total_Hi:", hi_dom)
print("dominant Total_Lo:", lo_dom)
# list rows that differ from dominant values
diffs=[]
for mH,sca_hi,tot_hi,tot_lo in rows:
if round(tot_hi,14)!=hi_dom[0] or round(tot_lo,14)!=lo_dom[0]:
diffs.append((mH,sca_hi,tot_hi,tot_lo))
print("rows differing from dominant Total_Hi/Total_Lo:", len(diffs))
for r in sorted(diffs):
mH,sca_hi,tot_hi,tot_lo=r
print(f" mH={mH} Sca_Hi={sca_hi} Total_Hi={tot_hi} Total_Lo={tot_lo}")
# specifically show 124.0-126.5 region
focus=[r for r in rows if 123.9<=r[0]<=126.6]
print("\nFocus 123.9-126.6:")
for mH,sca_hi,tot_hi,tot_lo in sorted(focus):
print(f" mH={mH} Sca_Hi={sca_hi} Total_Hi={tot_hi} Total_Lo={tot_lo}")
PYRepository: cms-analysis/HiggsAnalysis-CombinedLimit
Length of output: 5888
Check 8TeV tH_tchan uncertainty discontinuity at mH=124–124.6
In data/lhc-hxswg/sm/xs/8TeV/8TeV-tH_tchan.txt, 12/14 points share Total_Hi=+3.95979797464467 and Total_Lo=-3.68781778291715, but:
- mH=124.0: Total_Hi=+3.88973006775534 and Total_Lo=-3.62353418639869 (Sca_Hi=2.7, Sca_Lo=2.3)
- mH=124.6: Total_Hi=+3.88973006775534 while Total_Lo stays -3.68781778291715 (Sca_Hi=2.7, Sca_Lo=2.4)
13/13p6/14 TeV tH_tchan tables keep Total_Hi/Total_Lo constant across the same grid, so the 8 TeV splice behavior should be traced to the source spreadsheet / computation to confirm it’s intentional (or fix the data generation/rounding).
🤖 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-tH_tchan.txt` around lines 2 - 15, The
Total_Hi/Total_Lo values in the 8TeV tH_tchan table are inconsistent across the
mH grid (notably at mH=124.0 vs 124.6) while Sca_Hi/Sca_Lo change, so inspect
the source calculation that produces Total_Hi and Total_Lo for entries around
mH=124/124.6 (the rows with mH=124.0, 124.6 and the repeated value
+3.95979797464467 / -3.68781778291715), verify whether Total_* should be
constant across the grid, and either (a) recompute Total_Hi/Total_Lo for
mH=124.6 from the same component contributions used for other rows (fixing any
spreadsheet formula or script bug), or (b) apply consistent rounding/propagation
rules so the totals match the pattern seen in other energies; update the data
row(s) so Total_Hi/Total_Lo align with the intended computation for the mH grid.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1254 +/- ##
==========================================
+ Coverage 20.89% 20.90% +0.01%
==========================================
Files 195 195
Lines 26310 26316 +6
Branches 3947 3947
==========================================
+ Hits 5498 5502 +4
- Misses 20812 20814 +2 see 2 files with indirect coverage changes 🚀 New features to boost your workflow:
|
|
Closing this as it is duplicated. We will work on #1255 |
Starting but still have to verify that nothing breaks.
Summary by CodeRabbit
New Features
tH_schan,tH_tchan)..xlsxHXSWG tables).Data Updates