Dataset stitching: W, TT, DY flavor+m_ll, DY→ττ (#169) - #289
Conversation
…e decay-mode bins
… as separate axes)
There was a problem hiding this comment.
🔵 Human review recommended
It introduces multiple new stitching axes implemented via runtime-compiled C++ helpers plus large binning configurations, where subtle physics/selection edge cases could materially affect normalization if not manually validated in-repo.
Pull request overview
This pull request extends FLAF’s dataset-stitching infrastructure by adding new MCStitcher subclasses and corresponding processor YAML configurations to support W stitching, TT decay-mode stitching, DY flavor+mll stitching, and DY→ττ filter stitching (as described in #169). These components provide the generator-/LHE-level derived variables and bin definitions needed to compute consistent per-event weight_xs / denominators during the AnaTuple and AnaTupleMerge stages, with per-analysis wiring intended to land in follow-up PRs.
Changes:
- Add three new
MCStitchersubclasses that define derived stitching axes (TT_n_leptonic_W,DY_tautau_filter,LHE_dilep_flavor+LHE_mll) viaROOT.gInterpreter.Declarehelpers. - Add new processor stitching YAMLs for W (Vpt/NpNLO), TT decay mode, DY Vpt/NpNLO + ττ filter, and DY Vpt/NpNLO + (flavor × mll) binning.
- Keep the stitching implementation consistent with the existing
MCStitcherconfig schema (bins, optionaltotalCrossSectioncheck, andtotalCrossSectionScaling).
File summaries
| File | Description |
|---|---|
Processors/MCStitchingTT.py |
Adds TTStitcher deriving TT_n_leptonic_W from GenPart ancestry for decay-mode stitching. |
Processors/MCStitchingDYtautau.py |
Adds DYtautauStitcher deriving a DY→ττ gen-filter pass/fail flag using GenLepton. |
Processors/MCStitchingDYMll.py |
Adds DYMllStitcher deriving LHE dilepton flavor and mass for DY flavor × mll stitching. |
config/Processors/stitching_W_amcatnlo_Vpt_NpNLO.yaml |
Defines W stitching bins in (LHE_Vpt, LHE_NpNLO) with a normalization scaling to NNLO(+EW). |
config/Processors/stitching_TT_decayMode.yaml |
Defines three TT decay-mode bins keyed off TT_n_leptonic_W. |
config/Processors/stitching_DY_amcatnlo_Vpt_NpNLO_ttFilter.yaml |
Defines DY stitching bins split by DY_tautau_filter to stitch filtered DY→ττ samples. |
config/Processors/stitching_DY_amcatnlo_Vpt_NpNLO_flavor_mll.yaml |
Defines DY stitching bins split by LHE flavor and μμ mass window to stitch DYto2Mu_MLL_105to160. |
Review details
- Files reviewed: 7/7 changed files
- Comments generated: 0
- Review effort level: Lite
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
…n config applies to every step
…; wire subclasses to GenProcess headers; drop GenProcess.h
…lassification (robust to shower taus/conversions)
…ust on full-gen HLepRare skims); test_DY reads Events+EventsNotSelected
…r efficiency (self-consistent stitching f; fixes 1J ~10% high)
…tching # Conflicts: # Analysis/HistPlotter.py # Analysis/tasks.py
…w xsec lives only in _allFlavors; singleFlavor/Filtered reference it)
…es (ttau filter is single-flavor only); filtered singleFlavor references DYto2L singleFlavor directly
…um), addressing PR review
|
pipeline#15489733 started |
|
pipeline#15489733 failed |
|
pipeline#15489963 started |
|
pipeline#15489963 passed |
Implements four of the remaining dataset-stitching items from #169 on top of the generic
MCStitcher. Each new item is a smallMCStitchersubclass that defines onegenerator-level variable plus a bin config; the per-analysis wiring lives in the analysis
processes.yaml(separate PRs).New stitchers / configs
config/Processors/stitching_W_amcatnlo_Vpt_NpNLO.yaml, a direct analog of the DYconfig on native
LHE_Vpt/LHE_NpNLO. Validated: bins positive, k-factor 0.9216, stitchedtotal = the 3-flavor NNLO cross-section exactly.
MCStitchingTT.TTStitchercounts leptonically-decaying W's fromGenPart(TT_n_leptonic_W, direct W-daughter to avoid copy double-counting); 3 exhaustivebins with cross-sections
TTto2L2Nu/TTtoLNu2Q/TTto4Q(sum = inclusiveTT).MCStitchingDYMll.DYMllStitchercomputes the LHE dileptonflavor and mass; the all-flavor DY is split into e/μ/τ and the μμ bins by the 105–160 window
so
DYto2Mu_MLL_105to160is stitched in as a single DY background (52 bins, sum = all-flavor total).MCStitchingDYtautau.DYtautauStitcherreproduces thesample's gen filter (ElHad/ElMu/HadHad/MuHad, |η|<3) via
GenLepton; DYto2Tau bins are splitby filter pass with the per-n-jet efficiency (15.7/20.7/21.6%).
Testing
AnaTupleFileTask, Run3_2022):the stitcher defines
weight_xsand the full event loop completes with no unmatched bins.subclass compiles under cling (incl. the
GenLepton-based ττ filter);test_setup_loading.pypasses for all wired eras.
Dependency
Requires cms-flaf/Corrections#124 (adds
prepareStitchingVariables— the anaTuple-stagecross-section/denominator expressions need the stitcher's derived variables defined first;
only native-branch DY worked before). Merge together.