Skip to content

Commit

Permalink
Fix ST_s-channel_4f factor of 2 mismatch.
Browse files Browse the repository at this point in the history
  • Loading branch information
bfonta committed Dec 12, 2024
1 parent 1276939 commit b35cd49
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions NtupleProducer/plugins/HTauTauNtuplizer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2140,8 +2140,19 @@ void HTauTauNtuplizer::analyze(const edm::Event& event, const edm::EventSetup& e
throw cms::Exception("InvalidOption") << "uncertainty scheme option is not valid";
}

// handle the factor of 2 error in the MINIAOD ST_s-channel_4f sample
double st_mult = 1.;
if (uncertScheme == "MadGraph9B_STlepton") {
st_mult = 2.;
}

for (unsigned pdf_idx = _MC_pdf_first_idx; pdf_idx <= _MC_pdf_first_idx+_MC_pdf_last_idx; ++pdf_idx) {
_MC_pdf[pdf_idx-_MC_pdf_first_idx] = lheweights[pdf_idx].wgt;
if (pdf_idx != _MC_pdf_first_idx) {
_MC_pdf[pdf_idx-_MC_pdf_first_idx] = st_mult * lheweights[pdf_idx].wgt;
}
else {
_MC_pdf[pdf_idx-_MC_pdf_first_idx] = lheweights[pdf_idx].wgt;
}
}

if (uncertScheme != "None")
Expand Down Expand Up @@ -2169,12 +2180,12 @@ void HTauTauNtuplizer::analyze(const edm::Event& event, const edm::EventSetup& e
uncertScheme.find("Powheg9") != std::string::npos)
{
_MC_QCDscale[0] = lheweights[0].wgt; // muF1p0_muR1p0
_MC_QCDscale[1] = lheweights[1].wgt;
_MC_QCDscale[2] = lheweights[2].wgt;
_MC_QCDscale[3] = lheweights[3].wgt;
_MC_QCDscale[4] = lheweights[4].wgt;
_MC_QCDscale[5] = lheweights[6].wgt;
_MC_QCDscale[6] = lheweights[8].wgt;
_MC_QCDscale[1] = st_mult * lheweights[1].wgt;
_MC_QCDscale[2] = st_mult * lheweights[2].wgt;
_MC_QCDscale[3] = st_mult * lheweights[3].wgt;
_MC_QCDscale[4] = st_mult * lheweights[4].wgt;
_MC_QCDscale[5] = st_mult * lheweights[6].wgt;
_MC_QCDscale[6] = st_mult * lheweights[8].wgt;
}
else {
_MC_QCDscale[0] = -99.f;
Expand Down Expand Up @@ -3976,6 +3987,7 @@ void HTauTauNtuplizer::beginRun(edm::Run const& iRun, edm::EventSetup const& iSe

void HTauTauNtuplizer::endRun(edm::Run const&, edm::EventSetup const&){
}

void HTauTauNtuplizer::beginLuminosityBlock(edm::LuminosityBlock const& iLumi, edm::EventSetup const& iSetup){
if (theisMC)
{
Expand Down

0 comments on commit b35cd49

Please sign in to comment.