-
Notifications
You must be signed in to change notification settings - Fork 21
Description
While re-checking the sample normalization applied in the skimmers for the EFT studies of the non-resonant Run 2 analysis
I noticed a possible bug in the skimmers.
More precisely, in this line (which is used in the numerator when the samples are normalized)
KLUBAnalysis/test/skimNtuple2016_HHbtag.cpp
Line 2263 in a5742e5
| theSmallTree.m_MC_weight = (isMC ? theBigTree.aMCatNLOweight * XS * stitchWeight * HHweight : 1) ; |
the weight
topPtReweight is missing.This same weight is instead added in the denominator in these lines:
KLUBAnalysis/test/skimNtuple2016_HHbtag.cpp
Lines 1494 to 1497 in a5742e5
| if (theBigTree.npu >= 0 && theBigTree.npu <= 99) // good PU weights | |
| EvtW = isMC ? (theBigTree.aMCatNLOweight * reweight.weight(PUReweight_MC,PUReweight_target,theBigTree.npu,PUreweightFile) * topPtReweight * HHweight * stitchWeight) : 1.0; | |
| else if (theBigTree.npu >= 100) // use the last available bin for the PU weight | |
| EvtW = isMC ? (theBigTree.aMCatNLOweight * reweight.weight(PUReweight_MC,PUReweight_target,99, PUreweightFile) * topPtReweight * HHweight * stitchWeight) : 1.0; |
The topPtReweight is computed in the gen-section of the skimmers and it's different from 1 only for TT samples.
Even though the branches containing the topPtReweight weight are never used later on in the analysis, as shown above, this weight is actually included in the denominator (totalEvents), but not in the numerator.
I quickly looked at the TTtopPtreweight_up branch of the skims (which is actually filled with topPtReweight, as shown here) for a skim file of the TT_semiLep sample and I can confirm the value is != 1:

@portalesHEP @dzuolo @jonamotta this is most probably a bug that we missed in the past, but further checks (i.e. including re-skimming the TT samples with the addition of this weight in the numerator) are in order.