Skip to content

Enable TT decay-mode stitching (#169) (#105) - #128

Open
aebid wants to merge 3 commits into
mainfrom
next_prod
Open

Enable TT decay-mode stitching (#169) (#105)#128
aebid wants to merge 3 commits into
mainfrom
next_prod

Conversation

@aebid

@aebid aebid commented Sep 11, 2026

Copy link
Copy Markdown
Contributor
  • #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

* #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
@kandrosov

Copy link
Copy Markdown
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>

Copilot AI commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

Resolved and pushed in merge commit a987f82, which merges main into next_prod and resolves all conflicts (config/processes.yaml, FLAF, Corrections).

Copilot AI requested a review from kandrosov September 13, 2026 02:36
@kandrosov kandrosov added enhancement New feature or request and removed enhancement New feature or request labels Sep 13, 2026
@kandrosov

Copy link
Copy Markdown
Contributor

@copilot merge main into next_prod

Co-authored-by: kandrosov <6347415+kandrosov@users.noreply.github.com>

Copilot AI commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

@copilot merge main into next_prod

Done in aa4ee2c: merged latest main into next_prod.

@kandrosov

Copy link
Copy Markdown
Contributor

@cms-flaf-bot please test

@cms-flaf-bot

Copy link
Copy Markdown

pipeline#15754232 started

@cms-flaf-bot

Copy link
Copy Markdown

pipeline#15754232 passed

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.

4 participants