Skip to content

Control-region closure + control-plot transforms, SR cut - #94

Merged
billy000400 merged 1 commit into
mainfrom
dev-CR
Jul 30, 2026
Merged

Control-region closure + control-plot transforms, SR cut#94
billy000400 merged 1 commit into
mainfrom
dev-CR

Conversation

@ludovicomori

Copy link
Copy Markdown
Collaborator

Postprocessing / control plots:

  • singleVarHist: optional transform callable applied to raw values before filling (axis must already span the transformed range).
  • control_plots: display flagged discriminator-score vars under x -> -log(1 - x + eps) (TRANSFORM_VARS / TRANSFORM_EPS), stretching the pile-up near 1. ratioHistPlot just renders the hist's axis, so the transform is done at fill time.
  • --sr flag for the --control-plots pipeline: apply the signal-region pass cut (resolved from --bmin / --sensitivity-dir via Regions.get_selection_regions) before plotting. Control-region closure (new control_region_closure.py):
  • Closure test for the data-driven QCD+DY estimate using the --control-region templates; now renders each MC background as its own stacked sample (reusing plotting.ratioHistPlot) plus the data-driven QCD+DY and a data/pred ratio.
  • Includes the --control-region template plumbing it depends on (control_region kwarg through main/get_templates/parse_args, "control" template subdir). Notebook fix:
  • bdt_utils only forces the Agg backend when an interactive (module://...) backend is not already active, so importing it from a notebook no longer silently breaks plt.show(). Cleanup:
  • Move personal scratch (notes/, paper helpers, inspector.ipynb, etc.) into untracked_utils/ and gitignore it.

…ckend fix

Postprocessing / control plots:
- singleVarHist: optional `transform` callable applied to raw values before
  filling (axis must already span the transformed range).
- control_plots: display flagged discriminator-score vars under
  x -> -log(1 - x + eps) (TRANSFORM_VARS / TRANSFORM_EPS), stretching the
  pile-up near 1. ratioHistPlot just renders the hist's axis, so the transform
  is done at fill time.
- --sr flag for the --control-plots pipeline: apply the signal-region pass cut
  (resolved from --bmin / --sensitivity-dir via Regions.get_selection_regions)
  before plotting.
Control-region closure (new control_region_closure.py):
- Closure test for the data-driven QCD+DY estimate using the --control-region
  templates; now renders each MC background as its own stacked sample (reusing
  plotting.ratioHistPlot) plus the data-driven QCD+DY and a data/pred ratio.
- Includes the --control-region template plumbing it depends on
  (control_region kwarg through main/get_templates/parse_args, "control"
  template subdir).
Notebook fix:
- bdt_utils only forces the Agg backend when an interactive (module://...)
  backend is not already active, so importing it from a notebook no longer
  silently breaks plt.show().
Cleanup:
- Move personal scratch (notes/, paper helpers, inspector.ipynb, etc.) into
  untracked_utils/ and gitignore it.
@ludovicomori ludovicomori mentioned this pull request Jul 14, 2026
@ludovicomori

Copy link
Copy Markdown
Collaborator Author

WARNING this PR is outdated and its commits are part of #95. Please review #95 directly.

@billy000400
billy000400 merged commit 949c8d3 into main Jul 30, 2026
3 checks passed
@ludovicomori
ludovicomori deleted the dev-CR branch August 25, 2026 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants