diff --git a/.gitmodules b/.gitmodules index 2c089996..66a2b154 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "PlotKit"] path = PlotKit - url = git@github.com:kandrosov/PlotKit.git + url = git@github.com:cms-flaf/PlotKit.git diff --git a/PlotKit b/PlotKit index 0f2706e5..93c63b82 160000 --- a/PlotKit +++ b/PlotKit @@ -1 +1 @@ -Subproject commit 0f2706e55d31f789ad6d005dca08f5133c928760 +Subproject commit 93c63b826f6681a7e6329dc2be32ee114cddc245 diff --git a/docs/ci/integration-pipeline.md b/docs/ci/integration-pipeline.md index 915b60e9..e01ae1a0 100644 --- a/docs/ci/integration-pipeline.md +++ b/docs/ci/integration-pipeline.md @@ -29,9 +29,12 @@ Repos with the trigger enabled: HH_bbtautau, HH_bbWW, H_mumu, FLAF, Corrections, ```text @cms-flaf-bot please test - https://github.com/cms-flaf/FLAF/pull/272 + - https://github.com/cms-flaf/PlotKit/pull/2 ``` Shorthands include `- _version=PR_`, a `…/pull/` URL, a `…/tree/` URL, and - `- gitlab_branch=` to run a non-default `flaf_integration` branch. + `- gitlab_branch=` to run a non-default `flaf_integration` branch. `PlotKit_version` + pins the `FLAF/PlotKit` sub-sub-module, which is switched after `FLAF` (so it overrides whatever + commit the requested `FLAF` pins). ## `integration_cfg.yaml` @@ -73,7 +76,9 @@ The shared trigger logic distinguishes: - **root packages** — repos with an `_active` variable (the analyses: HH_bbtautau, HH_bbWW, H_mumu); -- **packages** — repos with a `_version` but no `_active` (FLAF, Corrections, StatInference). +- **packages** — repos with a `_version` but no `_active` (FLAF, PlotKit, Corrections, + StatInference). `PlotKit` is a sub-sub-module (`FLAF/PlotKit`); the build switches it after + `FLAF`. Both may trigger the pipeline; the distinction matters only when editing the trigger logic. diff --git a/docs/concepts/architecture.md b/docs/concepts/architecture.md index 7847c0d6..c34554bd 100644 --- a/docs/concepts/architecture.md +++ b/docs/concepts/architecture.md @@ -27,7 +27,7 @@ tools with it. For example, HH→bb̄ττ looks like this: ```text HH_bbtautau/ ← the analysis repository (you clone this) ├── FLAF/ ← shared framework (submodule) -│ ├── PlotKit/ ← plotting helpers (submodule of FLAF) +│ ├── PlotKit/ ← plotting toolkit: matplotlib/mplhep (+ROOT/cmsstyle); submodule │ └── RunKit/ ← workflow utilities (vendored directory, not a submodule) ├── Corrections/ ← shared corrections (submodule) ├── StatInference/ ← shared stat tooling (submodule; HH analyses only) diff --git a/docs/glossary.md b/docs/glossary.md index 0366ce9a..94ff111e 100644 --- a/docs/glossary.md +++ b/docs/glossary.md @@ -85,7 +85,10 @@ Framework and CMS-computing vocabulary, in plain terms. For the quick on-ramp ve testing set; production uses the full model. Defined in `phys_models.yaml`. **PlotKit** -: FLAF's plotting-helpers submodule. +: FLAF's plotting toolkit (a submodule of FLAF, [cms-flaf/PlotKit](https://github.com/cms-flaf/PlotKit)). + Renders the stacked CMS plots with **matplotlib + mplhep** by default (no ROOT required) and can + optionally render through **ROOT + cmsstyle**. It reads the analysis `config/plot/*.yaml` files and + can also run standalone (`python -m PlotKit.cli`). **Process** : A physics object built from one or more datasets (e.g. "TT", "DY", "signal") — what you plot and diff --git a/docs/reference/tasks.md b/docs/reference/tasks.md index 32ac7804..17d99525 100644 --- a/docs/reference/tasks.md +++ b/docs/reference/tasks.md @@ -67,10 +67,19 @@ consume. - **Parameter:** `--producer-to-aggregate`. ### `HistPlotTask` -Produces the final **plots**. **Branches over variables** (one branch per variable). +Produces the final **plots** via the [PlotKit](https://github.com/cms-flaf/PlotKit) submodule +(matplotlib + mplhep by default; optional ROOT + cmsstyle). **Branches over variables** (one branch +per variable). - **Parameter:** `--variables` (string; restrict which variables). +Plot styling comes from the analysis `config/plot/*.yaml` files (`cms_stacked.yaml`, +`histograms.yaml`, `.yaml`) — unchanged from the legacy renderer. Signal overlays are scaled by +`signal_plot_scale` in `global.yaml`: a fixed factor (e.g. `100`) **or** `bkg` to normalise each +signal's integral to the summed background (shape comparison; the legend then reads +`… (norm. to bkg)`). PlotKit can also render outside FLAF; see its README for the standalone +`python -m PlotKit.cli` entry point. + ## Statistical-inference tasks The limit/fit tasks (e.g. `PlotResonantLimits`, `PlotPullsAndImpacts`) come from the diff --git a/run_tools/mk_flaf_env.sh b/run_tools/mk_flaf_env.sh index 0d4d8cad..77329012 100755 --- a/run_tools/mk_flaf_env.sh +++ b/run_tools/mk_flaf_env.sh @@ -34,6 +34,7 @@ install() { run_cmd pip install bayesian-optimization run_cmd pip install yamllint run_cmd pip install black + run_cmd pip install cmsstyle # optional PlotKit backend (ROOT/cmsstyle); mplhep comes from LCG } install_gh_cli() {