Conversation
* #169: enable TT decay-mode stitching (merge inclusive into TT background) * advance FLAF and Corrections to main after #289/#124 merge
aebid
added a commit
to aebid/HH_bbWW
that referenced
this pull request
Sep 12, 2026
The top pT spectrum in data is softer than POWHEG+PYTHIA8 predicts. Applies the correction centrally and exposes a shape nuisance for it, which is the CMS convention (arXiv:2105.03977: "the analysis in CMS would correct the nominal sample to the best available fixed-order prediction by default"). Pairs with the Corrections change (Add_TopPt_Reweighting), which holds TopPtCorrProducer. anaTupleDef gains defineGenTopVariables. The reweighting needs the isLastCopy parton-level top -- after radiation and before decay -- and the TWiki is explicit that a reco- or particle-level proxy makes the reweighting invalid. That means GenPart, which is available during production but is not written to the anaTuple, so the pT has to be reduced and saved now. The LHEPart collection that MCObservables already saves is taken before radiation and is not a substitute. This is what makes the change need an anaTuple reproduction rather than only new histTuples. Saved as one vector branch of every last-copy top in the event rather than a t/tbar pair of scalars, so the weight is defined for whatever multiplicity a sample has -- TopPtCorrProducer takes the geometric mean over it, which for the ttbar pair is the sqrt(SF(t) * SF(tbar)) the TWiki prescribes. This is what the review of Corrections cms-flaf#128 asked for; the producer reads it through `top_pt_branches`, which global.yaml now sets. Defined for every MC sample rather than for ttbar alone: it is a short vector per event, and deciding which samples are ttbar belongs in the correction config. Where no last-copy top exists the branch is empty and the producer returns a weight of 1. The last-copy test is a bitwise mask rather than GenStatusFlags::isLastCopy. A ROOT::VecOps::Map over a generic lambda deduces to void in the JIT context -- verified, it fails with "cannot form a reference to 'void'" -- and a lambda with an explicit parameter type would pin the NanoAOD storage type of GenPart_statusFlags, which varies between versions. Scoped to TT and TT_Inclusive in global.yaml, which is what lets `requires: top_pt` keep the weights.yaml entry a no-op elsewhere. The nuisance carries no era suffix and the datacard entry no `eras:` field: it is one correction for every era and stays correlated. Added to all three cards. Verified: the gen top selection picks the last copy when several copies are present, returns -1 for tops that are not last copies and for samples with no tops, and handles single top. The datacard name plus _Up matches the histogram name weights.yaml builds, the expression names branches the producer actually defines, and the scoped process names resolve in all four era configs. black and yamllint clean. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011t4wkv5deBQHyYkAf5KzHV
Contributor
|
@copilot resolve the merge conflicts in this pull request |
# Conflicts: # Corrections # FLAF # config/processes.yaml Co-authored-by: kandrosov <6347415+kandrosov@users.noreply.github.com>
Contributor
Resolved and pushed in merge commit |
Contributor
|
@copilot merge main into next_prod |
Co-authored-by: kandrosov <6347415+kandrosov@users.noreply.github.com>
Contributor
Done in |
Contributor
|
@cms-flaf-bot please test |
|
pipeline#15754232 started |
|
pipeline#15754232 passed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#169: enable TT decay-mode stitching (merge inclusive into TT background)
advance FLAF and Corrections to main after #289/Add lead fat b jet object #124 merge