The fix in this PR is to simply disable sample_incl.xsec=xsec_incl_corrected. The inclusive sample will still be normalized via the wIncl weight below:
xsec_incl_initial = sample_incl.xsec
if kfactor:
xsec_incl_corrected = kfactor*xsec_incl_initial
elif cme==13: # assume 13 TeV for Run 2
...
else: # assume 13.6 TeV for Run 3
xsec_incl_corrected = xsec_incl_initial
kfactor = 1.
...
#sample_incl.xsec = xsec_incl_corrected
wIncl = sample_incl.lumi * kfactor * sample_incl.xsec * 1000. / sample_incl.sumweights
Side note:
The stitching has proven quite error prone. The k-factor is one of the major sources and we should factorize this like was done for Run 3, such that it is consistent and more transparent to users wether or not a k-factor is applied.
The other major source is the normalization and computation of stitching weight (e.g. if the weights, the number of MC events, or sum-of-weights are hardcoded, etc.). This should hopefully be addressed in a coming overthrow of the TauFW configuration, see https://gitlab.cern.ch/cms-tau-pog/tau-pog-coordination/-/issues/35
This PR fixes an unfortunate bug where the k-factor was applied twice for Run 2 (cme=13).
The fix in this PR is to simply disable
sample_incl.xsec=xsec_incl_corrected
. The inclusive sample will still be normalized via thewIncl
weight below:Run 3
It should not affect Run 3, because:
Side note:
The stitching has proven quite error prone. The k-factor is one of the major sources and we should factorize this like was done for Run 3, such that it is consistent and more transparent to users wether or not a k-factor is applied.
The other major source is the normalization and computation of stitching weight (e.g. if the weights, the number of MC events, or sum-of-weights are hardcoded, etc.). This should hopefully be addressed in a coming overthrow of the TauFW configuration, see https://gitlab.cern.ch/cms-tau-pog/tau-pog-coordination/-/issues/35