예제 #1
0
from CMGTools.TTHAnalysis.tools.nanoAOD.yearTagger import yearTag
from CMGTools.TTHAnalysis.tools.nanoAOD.xsecTagger import xsecTag
from CMGTools.TTHAnalysis.tools.nanoAOD.lepJetBTagAdder import lepJetBTagCSV, lepJetBTagDeepCSV, lepJetBTagDeepFlav, lepJetBTagDeepFlavC

ttH_sequence_step1 = [
    lepSkim, lepMerge, autoPuWeight, yearTag, xsecTag, lepJetBTagCSV,
    lepJetBTagDeepCSV, lepJetBTagDeepFlav, lepMasses
]

#====
from PhysicsTools.NanoAODTools.postprocessing.tools import deltaR
from CMGTools.TTHAnalysis.tools.nanoAOD.ttHLepQCDFakeRateAnalyzer import ttHLepQCDFakeRateAnalyzer
centralJetSel = lambda j: j.pt > 25 and abs(j.eta) < 2.4 and j.jetId > 0
lepFR = ttHLepQCDFakeRateAnalyzer(
    jetSel=centralJetSel,
    pairSel=lambda pair: deltaR(pair[0].eta, pair[0].phi, pair[1].eta, pair[1].
                                phi) > 0.7,
    maxLeptons=1,
    requirePair=True)
from CMGTools.TTHAnalysis.tools.nanoAOD.nBJetCounter import nBJetCounter
nBJetDeepCSV25NoRecl = lambda: nBJetCounter("DeepCSV25", "btagDeepB",
                                            centralJetSel)
nBJetDeepFlav25NoRecl = lambda: nBJetCounter("DeepFlav25", "btagDeepFlavB",
                                             centralJetSel)

ttH_sequence_step1_FR = [m for m in ttH_sequence_step1 if m != lepSkim] + [
    lepFR, nBJetDeepCSV25NoRecl, nBJetDeepFlav25NoRecl
]
ttH_skim_cut_FR = (
    "nMuon + nElectron >= 1 && nJet >= 1 && Sum$(Jet_pt > 25 && abs(Jet_eta)<2.4) >= 1 &&"
    +
    "Sum$(Muon_pt > {muPt} && Muon_miniPFRelIso_all < {miniRelIso} && Muon_sip3d < {sip3d}) +"
예제 #2
0
from CMGTools.TTHAnalysis.tools.nanoAOD.autoPuWeight import autoPuWeight
from CMGTools.TTHAnalysis.tools.nanoAOD.yearTagger import yearTag
from CMGTools.TTHAnalysis.tools.nanoAOD.xsecTagger import xsecTag
from CMGTools.TTHAnalysis.tools.nanoAOD.lepJetBTagAdder import lepJetBTagCSV, lepJetBTagDeepCSV

ttH_sequence_step1 = [
    lepSkim, lepMerge, autoPuWeight, yearTag, xsecTag, lepJetBTagCSV,
    lepJetBTagDeepCSV, lepMasses
]

#====
from PhysicsTools.NanoAODTools.postprocessing.tools import deltaR
from CMGTools.TTHAnalysis.tools.nanoAOD.ttHLepQCDFakeRateAnalyzer import ttHLepQCDFakeRateAnalyzer
lepFR = ttHLepQCDFakeRateAnalyzer(
    jetSel=lambda j: j.pt > 25 and abs(j.eta) < 2.4,
    pairSel=lambda pair: deltaR(pair[0].eta, pair[0].phi, pair[1].eta, pair[1].
                                phi) > 0.7,
    maxLeptons=1,
    requirePair=True)

ttH_sequence_step1_FR = [m for m in ttH_sequence_step1 if m != lepSkim
                         ] + [lepFR]
ttH_skim_cut_FR = (
    "nMuon + nElectron >= 1 && nJet >= 1 && Sum$(Jet_pt > 25 && abs(Jet_eta)<2.4) >= 1 &&"
    +
    "Sum$(Muon_pt > {muPt} && Muon_miniPFRelIso_all < {miniRelIso} && Muon_sip3d < {sip3d}) +"
    "Sum$(Electron_pt > {muPt} && Electron_miniPFRelIso_all < {miniRelIso} && Electron_sip3d < {sip3d} && Electron_{eleId}) >= 1"
).format(**conf)

#==== items below are normally run as friends ====