Exemplo n.º 1
0
    def __init__(self, variations=[], doSystJEC=True):
        self.outVars = []
        self._MVAs   = []
        cats_3l =  ["predictions_ttH",  "predictions_rest", "predictions_tH"]
        varorder = ['lep1_conePt', 'lep1_eta', 'lep1_phi', 'lep2_conePt', 'lep2_eta', 'lep2_phi', 'lep3_conePt', 'lep3_eta', 'lep3_phi', 'mindr_lep1_jet', 'mindr_lep2_jet', 'mindr_lep3_jet', 'min_dr_Lep', 'avg_dr_jet', 'met_LD', 'mbb_loose',  'leadFwdJet_eta', 'leadFwdJet_pt', 'min_Deta_leadfwdJet_jet', 'jet1_pt', 'jet1_eta', 'jet1_phi', 'jet2_pt', 'jet2_eta', 'jet2_phi', 'jet3_pt', 'jet3_eta', 'jet3_phi', 'sum_Lep_charge', 'HadTop_pt', 'res_HTT', 'nJet',   'nBJetLoose', 'nBJetMedium', 'nJetForward', 'nElectron', 'has_SFOS' ]
        self.systsJEC = {0:"",\
                         1:"_jesTotalCorrUp"  , -1:"_jesTotalCorrDown",\
                         2:"_jesTotalUnCorrUp", -2: "_jesTotalUnCorrDown",\
                         3:"_jerUp", -3: "_jerDown",\
                     } if doSystJEC else {0:""}
        if len(variations): 
            self.systsJEC = {0:""}
            for i,var in enumerate(variations):
                self.systsJEC[i+1]   ="_%sUp"%var
                self.systsJEC[-(i+1)]="_%sDown"%var
                
        for var in self.systsJEC: 
            self._MVAs.append( TFTool('DNN_3l%s'%self.systsJEC[var], os.environ['CMSSW_BASE'] + '/src/CMGTools/TTHAnalysis/data/kinMVA/tth/test_sig_2_rest_2_th_2_withWZ_2.pb',
                                      self.getVarsForVariation(self.systsJEC[var]), cats_3l, varorder))

            self.outVars.extend( ['DNN_3l%s_'%self.systsJEC[var] + x for x in cats_3l])

        vars_3l_unclEnUp = deepcopy(self.getVarsForVariation(''))
        vars_3l_unclEnUp['met_LD'                 ] =  lambda ev : (ev.MET_pt_unclustEnUp if ev.year != 2017 else ev.METFixEE2017_pt_unclustEnUp) *0.6 + ev.mhtJet25_Recl*0.4

        vars_3l_unclEnDown = deepcopy(self.getVarsForVariation(''))
        vars_3l_unclEnDown['met_LD'                 ] =  lambda ev : (ev.MET_pt_unclustEnDown if ev.year != 2017 else ev.METFixEE2017_pt_unclustEnDown) *0.6 + ev.mhtJet25_Recl*0.4

        worker_3l_unclUp   = TFTool("DNN_3l_unclUp", os.environ['CMSSW_BASE'] + '/src/CMGTools/TTHAnalysis/data/kinMVA/tth/test_sig_2_rest_2_th_2_withWZ_2.pb', vars_3l_unclEnUp, cats_3l, varorder)
        worker_3l_unclDown = TFTool("DNN_3l_unclDown", os.environ['CMSSW_BASE'] + '/src/CMGTools/TTHAnalysis/data/kinMVA/tth/test_sig_2_rest_2_th_2_withWZ_2.pb', vars_3l_unclEnDown,cats_3l,  varorder)

        self._MVAs.extend( [ worker_3l_unclUp, worker_3l_unclDown])
        self.outVars.extend( ['DNN_3l_unclUp_' + x for x in cats_3l] +  ['DNN_3l_unclDown_' + x for x in cats_3l])
Exemplo n.º 2
0
    def __init__(self, variations=[], doSystJEC=False, fillInputs=False):
        self.outVars = []
        self._MVAs = []
        self.fillInputs = fillInputs
        varorder = [
            "lep1_pt", "lep1_eta", "lep1_phi", "lep1_charge", "lep2_pt",
            "lep2_eta", "lep2_phi", "maxeta", "Dilep_pdgId", "jet1_pt",
            "jet1_eta", "jet1_phi", "jet2_pt", "jet2_eta", "jet2_phi",
            "jet3_pt", "jet3_eta", "jet3_phi", "jetFwd1_pt", "jetFwd1_eta",
            "n_presel_jetFwd", "n_presel_jet", "nTopjet", "topjet1_pt",
            "topjet1_eta", "topjet1_phi", "topjet1_Ttag", "nBJetLoose",
            "nBJetMedium", "lep3_pt", "lep3_eta", "lep3_phi"
        ]
        cats_3l = ['predictions_tjvv', 'predictions_tt', 'predictions_other']

        if fillInputs:
            self.outVars.extend(varorder + ['nEvent'])
        self.inputHelper = self.getVarsForVariation('')
        self.inputHelper['nEvent'] = lambda ev: ev.event

        self.systsJEC = {0:"",\
                         1:"_jesTotalCorrUp"  , -1:"_jesTotalCorrDown",\
                         2:"_jesTotalUnCorrUp", -2: "_jesTotalUnCorrDown",\
                         3:"_jerUp", -3: "_jerDown",\
                     } if doSystJEC else {0:""}
        if len(variations):
            self.systsJEC = {0: ""}
            for i, var in enumerate(variations):
                self.systsJEC[i + 1] = "_%sUp" % var
                self.systsJEC[-(i + 1)] = "_%sDown" % var

        for var in self.systsJEC:
            self._MVAs.append(
                TFTool(
                    'DNN_3l%s' % self.systsJEC[var], os.environ['CMSSW_BASE'] +
                    '/src/CMGTools/TTHAnalysis/data/kinMVA/hwh/model_3l_3classes_tightpresel.pb',
                    self.getVarsForVariation(self.systsJEC[var]), cats_3l,
                    varorder))

            self.outVars.extend(
                ['DNN_3l%s_' % self.systsJEC[var] + x for x in cats_3l])

        vars_3l_unclUp = deepcopy(self.getVarsForVariation(''))
        vars_3l_unclUp["metLD"] = lambda ev: (
            ev.MET_pt_unclustEnUp if ev.year != 2017 else ev.
            METFixEE2017_pt_unclustEnUp) * 0.6 + ev.mhtJet25_Recl * 0.4
        vars_3l_unclUp["mT_lep1"] = lambda ev: ev.MT_met_lep1_unclustEnUp
        vars_3l_unclUp["mT_lep2"] = lambda ev: ev.MT_met_lep2_unclustEnUp
        self.outVars.extend(['DNN_3l_unclUp_' + x for x in cats_3l])

        vars_3l_unclDown = deepcopy(self.getVarsForVariation(''))
        vars_3l_unclDown["metLD"] = lambda ev: (
            ev.MET_pt_unclustEnDown if ev.year != 2017 else ev.
            METFixEE2017_pt_unclustEnDown) * 0.6 + ev.mhtJet25_Recl * 0.4
        vars_3l_unclDown["mT_lep1"] = lambda ev: ev.MT_met_lep1_unclustEnDown
        vars_3l_unclDown["mT_lep2"] = lambda ev: ev.MT_met_lep2_unclustEnDown
        self.outVars.extend(['DNN_3l_unclDown_' + x for x in cats_3l])

        worker_3l_unclUp = TFTool(
            'DNN_3l_unclUp', os.environ['CMSSW_BASE'] +
            '/src/CMGTools/TTHAnalysis/data/kinMVA/hwh/model_3l_3classes_tightpresel.pb',
            vars_3l_unclUp, cats_3l, varorder)
        worker_3l_unclDown = TFTool(
            'DNN_3l_unclDown', os.environ['CMSSW_BASE'] +
            '/src/CMGTools/TTHAnalysis/data/kinMVA/hwh/model_3l_3classes_tightpresel.pb',
            vars_3l_unclDown, cats_3l, varorder)

        self._MVAs.extend([worker_3l_unclUp, worker_3l_unclDown])
Exemplo n.º 3
0
    def __init__(self, variations=[], doSystJEC=True, fillInputs=False):
        self.outVars = []
        self._MVAs = []
        fillInputs = True
        varorder = [
            "jet3_pt", "jet3_eta", "lep1_eta", "jet2_pt", "jet1_pt",
            "jetFwd1_eta", "mT_lep1", "mT_lep2", "jet4_phi", "lep2_conePt",
            "hadTop_BDT", "jet1_phi", "jet2_eta", "n_presel_jetFwd",
            "n_presel_jet", "lep1_charge", "avg_dr_jet", "lep1_phi",
            "Hj_tagger_hadTop", "nBJetLoose", "jet4_pt", "mindr_lep1_jet",
            "lep1_conePt", "jetFwd1_pt", "lep2_phi", "jet2_phi", "lep2_eta",
            "mbb", "mindr_lep2_jet", "jet4_eta", "nBJetMedium", "Dilep_pdgId",
            "metLD", "jet3_phi", "maxeta", "jet1_eta"
        ]
        cats_2lss = [
            'predictions_ttH', 'predictions_Rest', 'predictions_ttW',
            'predictions_tHQ'
        ]

        if fillInputs:
            self.outVars.extend(varorder + ['nEvent'])
            self.inputHelper = self.getVarsForVariation('')
            self.inputHelper['nEvent'] = lambda ev: ev.event

        self.systsJEC = {0:"",\
                         1:"_jesTotalCorrUp"  , -1:"_jesTotalCorrDown",\
                         2:"_jesTotalUnCorrUp", -2: "_jesTotalUnCorrDown",\
                         3:"_jerUp", -3: "_jerDown",\
                     } if doSystJEC else {0:""}
        if len(variations):
            self.systsJEC = {0: ""}
            for i, var in enumerate(variations):
                self.systsJEC[i + 1] = "_%sUp" % var
                self.systsJEC[-(i + 1)] = "_%sDown" % var

        for var in self.systsJEC:
            self._MVAs.append(
                TFTool(
                    'DNN_2lss%s' % self.systsJEC[var],
                    os.environ['CMSSW_BASE'] +
                    '/src/CMGTools/TTHAnalysis/data/kinMVA/tth/2017tautag2p1samples_xsecrwonly_oldvars_tH_selection.pb',
                    self.getVarsForVariation(self.systsJEC[var]), cats_2lss,
                    varorder))

            self.outVars.extend(
                ['DNN_2lss%s_' % self.systsJEC[var] + x for x in cats_2lss])

        vars_2lss_unclUp = deepcopy(self.getVarsForVariation(''))
        vars_2lss_unclUp["metLD"] = lambda ev: (
            ev.MET_pt_unclustEnUp if ev.year != 2017 else ev.
            METFixEE2017_pt_unclustEnUp) * 0.6 + ev.mhtJet25_Recl * 0.4
        vars_2lss_unclUp["mT_lep1"] = lambda ev: ev.MT_met_lep1_unclustEnUp
        vars_2lss_unclUp["mT_lep2"] = lambda ev: ev.MT_met_lep2_unclustEnUp
        self.outVars.extend(['DNN_2lss_unclUp_' + x for x in cats_2lss])

        vars_2lss_unclDown = deepcopy(self.getVarsForVariation(''))
        vars_2lss_unclDown["metLD"] = lambda ev: (
            ev.MET_pt_unclustEnDown if ev.year != 2017 else ev.
            METFixEE2017_pt_unclustEnDown) * 0.6 + ev.mhtJet25_Recl * 0.4
        vars_2lss_unclDown["mT_lep1"] = lambda ev: ev.MT_met_lep1_unclustEnDown
        vars_2lss_unclDown["mT_lep2"] = lambda ev: ev.MT_met_lep2_unclustEnDown
        self.outVars.extend(['DNN_2lss_unclDown_' + x for x in cats_2lss])

        worker_2lss_unclUp = TFTool(
            'DNN_2lss_unclUp', os.environ['CMSSW_BASE'] +
            '/src/CMGTools/TTHAnalysis/data/kinMVA/tth/2017tautag2p1samples_xsecrwonly_oldvars_tH_selection.pb',
            vars_2lss_unclUp, cats_2lss, varorder)
        worker_2lss_unclDown = TFTool(
            'DNN_2lss_unclDown', os.environ['CMSSW_BASE'] +
            '/src/CMGTools/TTHAnalysis/data/kinMVA/tth/2017tautag2p1samples_xsecrwonly_oldvars_tH_selection.pb',
            vars_2lss_unclDown, cats_2lss, varorder)

        self._MVAs.extend([worker_2lss_unclUp, worker_2lss_unclDown])
    def __init__(self, variations=[], doSystJEC=True):
        self.outVars = []
        self._MVAs = []
        cats_3l = ["predictions_ttH", "predictions_rest", "predictions_tH"]
        varorder = [
            "lep1_conePt", "lep1_eta", "lep1_phi", "mT_lep1", "lep2_conePt",
            "lep2_eta", "lep2_phi", "mT_lep2", "lep3_conePt", "lep3_eta",
            "lep3_phi", "mT_lep3", "mindr_lep1_jet", "mindr_lep2_jet",
            "mindr_lep3_jet", "min_dr_Lep", "avg_dr_jet", "met_LD",
            "mbb_loose", "leadFwdJet_eta", "leadFwdJet_pt",
            "min_Deta_leadfwdJet_jet", "jet1_pt", "jet1_eta", "jet1_phi",
            "jet2_pt", "jet2_eta", "jet2_phi", "jet3_pt", "jet3_eta",
            "jet3_phi", "sum_Lep_charge", "HadTop_pt", "res_HTT", "massL3",
            "nJet", "nBJetLoose", "nBJetMedium", "nJetForward", "nElectron",
            "has_SFOS"
        ]
        self.systsJEC = {0:"",\
                         1:"_jesTotalCorrUp"  , -1:"_jesTotalCorrDown",\
                         2:"_jesTotalUnCorrUp", -2: "_jesTotalUnCorrDown",\
                         3:"_jerUp", -3: "_jerDown",\
                     } if doSystJEC else {0:""}
        if len(variations):
            self.systsJEC = {0: ""}
            for i, var in enumerate(variations):
                self.systsJEC[i + 1] = "_%sUp" % var
                self.systsJEC[-(i + 1)] = "_%sDown" % var

        for var in self.systsJEC:
            self._MVAs.append(
                TFTool(
                    'DNN_3l%s' % self.systsJEC[var], os.environ['CMSSW_BASE'] +
                    '/src/CMGTools/TTHAnalysis/data/kinMVA/tth/3l_0tau_DNN_legacy.pb',
                    self.getVarsForVariation(self.systsJEC[var]), cats_3l,
                    varorder))

            self.outVars.extend(
                ['DNN_3l%s_' % self.systsJEC[var] + x for x in cats_3l])

        vars_3l_unclEnUp = deepcopy(self.getVarsForVariation(''))
        vars_3l_unclEnUp['met_LD'] = lambda ev: (
            ev.MET_pt_unclustEnUp if ev.year != 2017 else ev.
            METFixEE2017_pt_unclustEnUp) * 0.6 + ev.mhtJet25_Recl * 0.4
        vars_3l_unclEnUp["mT_lep1"] = lambda ev: ev.MT_met_lep1_unclustEnUp
        vars_3l_unclEnUp["mT_lep2"] = lambda ev: ev.MT_met_lep2_unclustEnUp
        vars_3l_unclEnUp["mT_lep3"] = lambda ev: ev.MT_met_lep3_unclustEnUp

        vars_3l_unclEnDown = deepcopy(self.getVarsForVariation(''))
        vars_3l_unclEnDown['met_LD'] = lambda ev: (
            ev.MET_pt_unclustEnDown if ev.year != 2017 else ev.
            METFixEE2017_pt_unclustEnDown) * 0.6 + ev.mhtJet25_Recl * 0.4
        vars_3l_unclEnDown["mT_lep1"] = lambda ev: ev.MT_met_lep1_unclustEnDown
        vars_3l_unclEnDown["mT_lep2"] = lambda ev: ev.MT_met_lep2_unclustEnDown
        vars_3l_unclEnDown["mT_lep3"] = lambda ev: ev.MT_met_lep3_unclustEnDown

        worker_3l_unclUp = TFTool(
            "DNN_3l_unclUp", os.environ['CMSSW_BASE'] +
            '/src/CMGTools/TTHAnalysis/data/kinMVA/tth/3l_0tau_DNN_legacy.pb',
            vars_3l_unclEnUp, cats_3l, varorder)
        worker_3l_unclDown = TFTool(
            "DNN_3l_unclDown", os.environ['CMSSW_BASE'] +
            '/src/CMGTools/TTHAnalysis/data/kinMVA/tth/3l_0tau_DNN_legacy.pb',
            vars_3l_unclEnDown, cats_3l, varorder)

        self._MVAs.extend([worker_3l_unclUp, worker_3l_unclDown])
        self.outVars.extend(['DNN_3l_unclUp_' + x for x in cats_3l] +
                            ['DNN_3l_unclDown_' + x for x in cats_3l])
Exemplo n.º 5
0
    def __init__(self):
        self.outVars = []
        vars_2lss = {
            'avg_dr_jet':
            lambda ev: ev.avg_dr_jet,
            'ptmiss':
            lambda ev: ev.MET_pt,
            'mbb_medium':
            lambda ev: ev.mbb,
            'jet1_pt':
            lambda ev: ev.JetSel_Recl_pt[0] if ev.nJetSel_Recl > 0 else 0,
            'jet2_pt':
            lambda ev: ev.JetSel_Recl_pt[1] if ev.nJetSel_Recl > 1 else 0,
            'jet3_pt':
            lambda ev: ev.JetSel_Recl_pt[2] if ev.nJetSel_Recl > 2 else 0,
            'jet4_pt':
            lambda ev: ev.JetSel_Recl_pt[3] if ev.nJetSel_Recl > 3 else 0,
            'max_lep_eta':
            lambda ev: max(abs(ev.LepGood_eta[int(ev.iLepFO_Recl[0])]),
                           abs(ev.LepGood_eta[int(ev.iLepFO_Recl[1])]))
            if ev.nLepFO_Recl > 1 else 0,
            'lep1_mT':
            lambda ev: ev.MT_met_lep1,
            'lep1_conept':
            lambda ev: ev.LepGood_conePt[int(ev.iLepFO_Recl[0])],
            'lep1_min_dr_jet':
            lambda ev: ev.mindr_lep1_jet,
            'lep2_mT':
            lambda ev: ev.MT_met_lep2,
            'lep2_conept':
            lambda ev: ev.LepGood_conePt[int(ev.iLepFO_Recl[1])],
            'lep2_min_dr_jet':
            lambda ev: ev.mindr_lep2_jet,
            'nJetForward':
            lambda ev: ev.nFwdJet_Recl,
            'jetForward1_pt':
            lambda ev: ev.FwdJet1_pt_Recl,
            'jetForward1_eta_abs':
            lambda ev: abs(ev.FwdJet1_eta_Recl),
            'res-HTT_CSVsort4rd':
            lambda ev: ev.BDThttTT_eventReco_mvaValue,
            'HadTop_pt_CSVsort4rd':
            lambda ev: ev.BDThttTT_eventReco_HadTop_pt,
            'nJet':
            lambda ev: ev.nJet25_Recl,
            'nBJetLoose':
            lambda ev: ev.nBJetLoose25_Recl,
            'nBJetMedium':
            lambda ev: ev.nBJetMedium25_Recl,
            'nElectron':
            lambda ev: abs(ev.LepGood_pdgId[int(ev.iLepFO_Recl[0])]) == 11 +
            abs(ev.LepGood_pdgId[int(ev.iLepFO_Recl[1])]) == 11
            if ev.nLepFO_Recl > 1 else 0,
            'sum_lep_charge':
            lambda ev: ev.LepGood_charge[int(ev.iLepFO_Recl[
                0])] + ev.LepGood_charge[int(ev.iLepFO_Recl[1])]
            if ev.nLepFO_Recl > 1 else 0,
            'mvaOutput_Hj_tagger':
            lambda ev: ev.BDThttTT_eventReco_Hj_score,
        }

        cats_2lss = [
            'predictions_ttH', 'predictions_ttW', 'predictions_rest',
            'predictions_tH'
        ]
        self.outVars.extend(['DNN_2lss_' + x for x in cats_2lss])

        vars_2lss_jesTotalUp = vars_2lss
        vars_2lss_jesTotalUp[
            'avg_dr_jet'] = lambda ev: ev.avg_dr_jet_jesTotalUp
        vars_2lss_jesTotalUp['ptmiss'] = lambda ev: ev.MET_pt_jesTotalUp
        vars_2lss_jesTotalUp['mbb_medium'] = lambda ev: ev.mbb_jesTotalUp
        vars_2lss_jesTotalUp['jet1_pt'] = lambda ev: ev.JetSel_Recl_pt[
            0] if ev.nJetSel_Recl > 0 else 0
        vars_2lss_jesTotalUp['jet2_pt'] = lambda ev: ev.JetSel_Recl_pt[
            1] if ev.nJetSel_Recl > 1 else 0
        vars_2lss_jesTotalUp['jet3_pt'] = lambda ev: ev.JetSel_Recl_pt[
            2] if ev.nJetSel_Recl > 2 else 0
        vars_2lss_jesTotalUp['jet4_pt'] = lambda ev: ev.JetSel_Recl_pt[
            3] if ev.nJetSel_Recl > 3 else 0
        vars_2lss_jesTotalUp['lep1_mT'] = lambda ev: ev.MT_met_lep1_jesTotalUp
        vars_2lss_jesTotalUp[
            'lep1_min_dr_jet'] = lambda ev: ev.mindr_lep1_jet_jesTotalUp
        vars_2lss_jesTotalUp['lep2_mT'] = lambda ev: ev.MT_met_lep2_jesTotalUp
        vars_2lss_jesTotalUp[
            'lep2_min_dr_jet'] = lambda ev: ev.mindr_lep2_jet_jesTotalUp
        vars_2lss_jesTotalUp['nJetForward'] = lambda ev: ev.nFwdJet_jecUp_Recl
        vars_2lss_jesTotalUp[
            'jetForward1_pt'] = lambda ev: ev.FwdJet1_pt_jecUp_Recl
        vars_2lss_jesTotalUp['jetForward1_eta_abs'] = lambda ev: abs(
            ev.FwdJet1_eta_jecUp_Recl)
        vars_2lss_jesTotalUp[
            'res-HTT_CSVsort4rd'] = lambda ev: ev.BDThttTT_eventReco_mvaValue_jesTotalUp
        vars_2lss_jesTotalUp[
            'HadTop_pt_CSVsort4rd'] = lambda ev: ev.BDThttTT_eventReco_HadTop_pt_jesTotalUp
        vars_2lss_jesTotalUp['nJet'] = lambda ev: ev.nJet25_jecUp_Recl
        vars_2lss_jesTotalUp[
            'nBJetLoose'] = lambda ev: ev.nBJetLoose25_jecUp_Recl
        vars_2lss_jesTotalUp[
            'nBJetMedium'] = lambda ev: ev.nBJetMedium25_jecUp_Recl
        vars_2lss_jesTotalUp[
            'mvaOutput_Hj_tagger'] = lambda ev: ev.BDThttTT_eventReco_Hj_score_jesTotalUp
        self.outVars.extend(['DNN_2lss_jesTotalUp_' + x for x in cats_2lss])

        vars_2lss_jesTotalDown = vars_2lss
        vars_2lss_jesTotalDown[
            'avg_dr_jet'] = lambda ev: ev.avg_dr_jet_jesTotalDown
        vars_2lss_jesTotalDown['ptmiss'] = lambda ev: ev.MET_pt_jesTotalDown
        vars_2lss_jesTotalDown['mbb_medium'] = lambda ev: ev.mbb_jesTotalDown
        vars_2lss_jesTotalDown['jet1_pt'] = lambda ev: ev.JetSel_Recl_pt[
            0] if ev.nJetSel_Recl > 0 else 0
        vars_2lss_jesTotalDown['jet2_pt'] = lambda ev: ev.JetSel_Recl_pt[
            1] if ev.nJetSel_Recl > 1 else 0
        vars_2lss_jesTotalDown['jet3_pt'] = lambda ev: ev.JetSel_Recl_pt[
            2] if ev.nJetSel_Recl > 2 else 0
        vars_2lss_jesTotalDown['jet4_pt'] = lambda ev: ev.JetSel_Recl_pt[
            3] if ev.nJetSel_Recl > 3 else 0
        vars_2lss_jesTotalDown[
            'lep1_mT'] = lambda ev: ev.MT_met_lep1_jesTotalDown
        vars_2lss_jesTotalDown[
            'lep1_min_dr_jet'] = lambda ev: ev.mindr_lep1_jet_jesTotalDown
        vars_2lss_jesTotalDown[
            'lep2_mT'] = lambda ev: ev.MT_met_lep2_jesTotalDown
        vars_2lss_jesTotalDown[
            'lep2_min_dr_jet'] = lambda ev: ev.mindr_lep2_jet_jesTotalDown
        vars_2lss_jesTotalDown[
            'nJetForward'] = lambda ev: ev.nFwdJet_jecDown_Recl
        vars_2lss_jesTotalDown[
            'jetForward1_pt'] = lambda ev: ev.FwdJet1_pt_jecDown_Recl
        vars_2lss_jesTotalDown['jetForward1_eta_abs'] = lambda ev: abs(
            ev.FwdJet1_eta_jecDown_Recl)
        vars_2lss_jesTotalDown[
            'res-HTT_CSVsort4rd'] = lambda ev: ev.BDThttTT_eventReco_mvaValue_jesTotalDown
        vars_2lss_jesTotalDown[
            'HadTop_pt_CSVsort4rd'] = lambda ev: ev.BDThttTT_eventReco_HadTop_pt_jesTotalDown
        vars_2lss_jesTotalDown['nJet'] = lambda ev: ev.nJet25_jecDown_Recl
        vars_2lss_jesTotalDown[
            'nBJetLoose'] = lambda ev: ev.nBJetLoose25_jecDown_Recl
        vars_2lss_jesTotalDown[
            'nBJetMedium'] = lambda ev: ev.nBJetMedium25_jecDown_Recl
        vars_2lss_jesTotalDown[
            'mvaOutput_Hj_tagger'] = lambda ev: ev.BDThttTT_eventReco_Hj_score_jesTotalDown
        self.outVars.extend(['DNN_2lss_jesTotalDown_' + x for x in cats_2lss])

        worker_2lss = TFTool(
            'DNN_2lss', os.environ['CMSSW_BASE'] +
            '/src/CMGTools/TTHAnalysis/data/kinMVA/tth/test_model_2lss_ttH_tH_4cat_onlyTHQ_notEnrich_v4.pb',
            vars_2lss, cats_2lss)
        worker_2lss_jesTotalUp = TFTool(
            'DNN_2lss_jesTotalUp', os.environ['CMSSW_BASE'] +
            '/src/CMGTools/TTHAnalysis/data/kinMVA/tth/test_model_2lss_ttH_tH_4cat_onlyTHQ_notEnrich_v4.pb',
            vars_2lss_jesTotalUp, cats_2lss)
        worker_2lss_jesTotalDown = TFTool(
            'DNN_2lss_jesTotalDown', os.environ['CMSSW_BASE'] +
            '/src/CMGTools/TTHAnalysis/data/kinMVA/tth/test_model_2lss_ttH_tH_4cat_onlyTHQ_notEnrich_v4.pb',
            vars_2lss_jesTotalDown, cats_2lss)
        self._MVAs = [
            worker_2lss, worker_2lss_jesTotalUp, worker_2lss_jesTotalDown
        ]