Пример #1
0
def createAnalyzer(dataVersion,era):
    a = Analyzer("L1Study",
        usePileupWeights = True,
        L1TauPt        = 0,
        L1ETM          = 120,
        L1JetPt        = 0,
        TransverseMass = 0
    )
    a.runMin  = runmin
    a.runMax  = runmax
    return a
Пример #2
0
def createAnalyzer(dataVersion, era):
    a = Analyzer(
        "TriggerEfficiency",
        name=era,
        Trigger=PSet(triggerOR=[], triggerOR2=[]),
        usePileupWeights=True,
        offlineSelection=leg,
        MuonSelection=PSet(
            #            discriminators = ["muIDMedium"],
            #            discriminators = ["TrgMatch_IsoMu20_eta2p1"],
            #            discriminators = ["Muons_TrgMatch_IsoMu16_eta2p1"],
        ),
        TauSelection=PSet(
            discriminators=[
                "byLooseCombinedIsolationDeltaBetaCorr3Hits",  #"byMediumIsolationMVA3newDMwLT",
                "againstMuonTight3",
                "againstElectronMediumMVA6"
            ],
            nprongs=1,
            relaxedOfflineSelection=False,
        ),
        binning=binning,
        xLabel=xLabel,
        yLabel=yLabel,
    )

    if isData(dataVersion):
        if "2016" in era:
            a.Trigger.triggerOR = ["HLT_IsoMu22_eta2p1_vx"]
            a.Trigger.triggerOR2 = [
                "HLT_VLooseIsoPFTau" + tauThreshold + "_Trk50_eta2p1_vx"
            ]
            if tauThreshold == "50":
                a.Trigger.triggerOR2 = ["HLT_LooseIsoPFTau50_Trk30_eta2p1_vx"]

        a.runMin = runmin
        a.runMax = runmax
    else:
        if "2016" in era:
            a.Trigger.triggerOR = ["HLT_IsoMu22_eta2p1_vx"]
            a.Trigger.triggerOR2 = [
                "HLT_VLooseIsoPFTau" + tauThreshold + "_Trk50_eta2p1_vx"
            ]
            if tauThreshold == "50":
                a.Trigger.triggerOR2 = ["HLT_LooseIsoPFTau50_Trk30_eta2p1_vx"]

    return a
def createAnalyzer(dataVersion,era):
    a = Analyzer("TriggerEfficiency",
        name = era,
        Trigger = PSet(
            triggerOR  = [],
            triggerOR2 = []
        ),
        usePileupWeights = True,
        offlineSelection = leg,
        MuonSelection = PSet(
#            discriminators = ["muIDMedium"],
#            discriminators = ["TrgMatch_IsoMu20_eta2p1"],
#            discriminators = ["Muons_TrgMatch_IsoMu16_eta2p1"],
        ),
        TauSelection = PSet(
            discriminators = ["byLooseCombinedIsolationDeltaBetaCorr3Hits",#"byMediumIsolationMVA3newDMwLT",
                              "againstMuonTight3",
                              "againstElectronMediumMVA6"],
            nprongs = 1,
            relaxedOfflineSelection = False,
        ),
        binning = binning,
        xLabel  = xLabel,
        yLabel  = yLabel,
    )

    if isData(dataVersion):
        if "2016" in era:
            a.Trigger.triggerOR = ["HLT_IsoMu22_eta2p1_vx"]
            a.Trigger.triggerOR2= ["HLT_VLooseIsoPFTau"+tauThreshold+"_Trk50_eta2p1_vx"]
            if tauThreshold == "50":
                a.Trigger.triggerOR2= ["HLT_LooseIsoPFTau50_Trk30_eta2p1_vx"]

        a.runMin  = runmin
        a.runMax  = runmax
    else:
        if "2016" in era:
            a.Trigger.triggerOR = ["HLT_IsoMu22_eta2p1_vx"]
            a.Trigger.triggerOR2= ["HLT_VLooseIsoPFTau"+tauThreshold+"_Trk50_eta2p1_vx"]
            if tauThreshold == "50":
                a.Trigger.triggerOR2= ["HLT_LooseIsoPFTau50_Trk30_eta2p1_vx"]

    return a
def createAnalyzer(dataVersion,era,onlineSelection = "MET80"):
    useCaloMET = False
    if "CaloMET" in era:
        useCaloMET = True
        era = era[:-8]

    a = Analyzer("TriggerEfficiency",
        name = era,
        Trigger = PSet(
            triggerOR  = [],
            triggerOR2 = []
        ),
        METFilter = signalAnalysis.metFilter,
        usePileupWeights = True,
#        usePileupWeights = False,
        onlineSelection = onlineSelection,
        offlineSelection = leg,
        TauSelection      = TauSelection,
        ElectronSelection = signalAnalysis.eVeto,
        MuonSelection     = signalAnalysis.muVeto,
        JetSelection      = signalAnalysis.jetSelection,
        BJetSelection     = signalAnalysis.bjetSelection,
        binning = binning,
        xLabel  = xLabel,
        yLabel  = yLabel,
    )
#    a.TauSelection.applyTriggerMatching = False
    a.JetSelection.numberOfJetsCutValue = 3
#    a.BJetSelection.bjetDiscrWorkingPoint = "Medium"
    a.BJetSelection.numberOfBJetsCutValue = 1

    if dataVersion.isData():
        a.Trigger.triggerOR = ["HLT_LooseIsoPFTau35_Trk20_Prong1_v2",
                               "HLT_LooseIsoPFTau35_Trk20_Prong1_v3",
                               "HLT_LooseIsoPFTau35_Trk20_Prong1_v4",
                               "HLT_LooseIsoPFTau35_Trk20_Prong1_v6",
                               "HLT_LooseIsoPFTau35_Trk20_Prong1_v7",
                               "HLT_LooseIsoPFTau35_Trk20_Prong1_v9",
                               "HLT_LooseIsoPFTau35_Trk20_Prong1_v10"]
        a.Trigger.triggerOR2 = ["HLT_LooseIsoPFTau35_Trk20_Prong1_MET70_v2",
                                "HLT_LooseIsoPFTau35_Trk20_Prong1_MET70_v3",
                                "HLT_LooseIsoPFTau35_Trk20_Prong1_MET70_v4",
                                "HLT_LooseIsoPFTau35_Trk20_Prong1_MET70_v6",
                                "HLT_LooseIsoPFTau35_Trk20_Prong1_MET70_v7",
                                "HLT_LooseIsoPFTau35_Trk20_Prong1_MET70_v9",
                                "HLT_LooseIsoPFTau35_Trk20_Prong1_MET70_v10"]
        if era == "2015C" or era == "2015D" or era == "2015CD":
            a.Trigger.triggerOR = ["HLT_LooseIsoPFTau50_Trk30_eta2p1_v1",
                                   "HLT_LooseIsoPFTau50_Trk30_eta2p1_v2",
                                   "HLT_LooseIsoPFTau50_Trk30_eta2p1_v3",
                                   "HLT_LooseIsoPFTau50_Trk30_eta2p1_vx"]
            a.Trigger.triggerOR2 = ["HLT_LooseIsoPFTau50_Trk30_eta2p1_"+onlineSelection+"_JetIdCleaned_v1",
                                    "HLT_LooseIsoPFTau50_Trk30_eta2p1_"+onlineSelection+"_JetIdCleaned_v2",
                                    "HLT_LooseIsoPFTau50_Trk30_eta2p1_"+onlineSelection+"_v1",
                                    "HLT_LooseIsoPFTau50_Trk30_eta2p1_"+onlineSelection+"_JetIdCleaned_vx",
                                    "HLT_LooseIsoPFTau50_Trk30_eta2p1_"+onlineSelection+"_vx"]
        if "2016" in era:
            a.Trigger.triggerOR = ["HLT_LooseIsoPFTau50_Trk30_eta2p1_vx"]
            a.Trigger.triggerOR2 = ["HLT_LooseIsoPFTau50_Trk30_eta2p1_"+onlineSelection+"_vx"]


#        lumi,runmin,runmax = runRange(era)
#        a.lumi    = lumi
        a.runMin  = runmin
        a.runMax  = runmax
    else:
        a.Trigger.triggerOR = ["HLT_LooseIsoPFTau35_Trk20_Prong1_v6"]
        a.Trigger.triggerOR2 = ["HLT_LooseIsoPFTau35_Trk20_Prong1_MET70_v6"]
        if era == "2015C" or era == "2015D" or era == "2015CD" or "2016" in era:
            a.Trigger.triggerOR = ["HLT_LooseIsoPFTau50_Trk30_eta2p1_v1",
                                   "HLT_LooseIsoPFTau50_Trk30_eta2p1_vx"]
            a.Trigger.triggerOR2 = ["HLT_LooseIsoPFTau50_Trk30_eta2p1_"+onlineSelection+"_v1",
                                    "HLT_LooseIsoPFTau50_Trk30_eta2p1_"+onlineSelection+"_vx"]

    if useCaloMET:
        a.Trigger.triggerOR2 = []

    return a
Пример #5
0
def createAnalyzer(dataVersion, era):
    a = Analyzer(
        "TriggerEfficiency",
        name=era,
        Trigger=PSet(triggerOR=[], triggerOR2=[]),
        usePileupWeights=True,
        offlineSelection=leg,
        MuonSelection=PSet(
            #            discriminators = ["muIDMedium"],
            #            discriminators = ["TrgMatch_IsoMu20_eta2p1"],
            discriminators=["Muons_TrgMatch_IsoMu16_eta2p1"], ),
        TauSelection=PSet(discriminators=[
            "byLooseCombinedIsolationDeltaBetaCorr3Hits", "againstMuonTight3",
            "againstElectronMediumMVA5"
        ], ),
        binning=binning,
        xLabel=xLabel,
        yLabel=yLabel,
    )

    if isData(dataVersion):
        a.Trigger.triggerOR = [
            "HLT_IsoMu15_eta2p1_L1ETM20_v3", "HLT_IsoMu15_eta2p1_L1ETM20_v4",
            "HLT_IsoMu15_eta2p1_L1ETM20_v5", "HLT_IsoMu15_eta2p1_L1ETM20_v6",
            "HLT_IsoMu15_eta2p1_L1ETM20_v7"
        ]
        a.Trigger.triggerOR2 = [
            "HLT_IsoMu15_eta2p1_LooseIsoPFTau35_Trk20_Prong1_L1ETM20_v2",
            "HLT_IsoMu15_eta2p1_LooseIsoPFTau35_Trk20_Prong1_L1ETM20_v4",
            "HLT_IsoMu15_eta2p1_LooseIsoPFTau35_Trk20_Prong1_L1ETM20_v6",
            "HLT_IsoMu15_eta2p1_LooseIsoPFTau35_Trk20_Prong1_L1ETM20_v7",
            "HLT_IsoMu15_eta2p1_LooseIsoPFTau35_Trk20_Prong1_L1ETM20_v9",
            "HLT_IsoMu15_eta2p1_LooseIsoPFTau35_Trk20_Prong1_L1ETM20_v10"
        ]
        if era == "2015C":
            #            a.Trigger.triggerOR = ["HLT_IsoMu16_eta2p1_CaloMET30_v1",
            #                                   "HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_v1"]
            #            a.Trigger.triggerOR2 = ["HLT_IsoMu16_eta2p1_CaloMET30_LooseIsoPFTau50_Trk30_eta2p1_v1",
            #                                    "HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_LooseIsoPFTau50_Trk30_eta2p1_v1"]
            a.Trigger.triggerOR = [
                "HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_v1",
                "HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_vx"
            ]
            a.Trigger.triggerOR2 = [
                "HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_LooseIsoPFTau50_Trk30_eta2p1_v1",
                "HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_LooseIsoPFTau50_Trk30_eta2p1_vx"
            ]
#            a.Trigger.triggerOR = ["HLT_IsoMu20_eta2p1_v2"]
#            a.Trigger.triggerOR2 = ["HLT_IsoMu17_eta2p1_LooseIsoPFTau20_v2"]
        if era == "2015D":
            a.Trigger.triggerOR = [
                "HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_v2",
                "HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_v3",
                "HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_vx",
                "HLT_IsoMu16_eta2p1_MET30_v1", "HLT_IsoMu16_eta2p1_MET30_vx"
            ]
            a.Trigger.triggerOR2 = [
                "HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_LooseIsoPFTau50_Trk30_eta2p1_v2",
                "HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_LooseIsoPFTau50_Trk30_eta2p1_v3",
                "HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_LooseIsoPFTau50_Trk30_eta2p1_vx",
                "HLT_IsoMu16_eta2p1_MET30_LooseIsoPFTau50_Trk30_eta2p1_v1",
                "HLT_IsoMu16_eta2p1_MET30_LooseIsoPFTau50_Trk30_eta2p1_vx"
            ]
        if era == "2015CD":
            a.Trigger.triggerOR = [
                "HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_v1",
                "HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_v2",
                "HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_v3",
                "HLT_IsoMu16_eta2p1_MET30_v1"
            ]
            a.Trigger.triggerOR2 = [
                "HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_LooseIsoPFTau50_Trk30_eta2p1_v1",
                "HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_LooseIsoPFTau50_Trk30_eta2p1_v2",
                "HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_LooseIsoPFTau50_Trk30_eta2p1_v3",
                "HLT_IsoMu16_eta2p1_MET30_LooseIsoPFTau50_Trk30_eta2p1_v1"
            ]
#            a.Trigger.triggerOR = ["HLT_IsoMu20_eta2p1_v1",
#                                   "HLT_IsoMu20_eta2p1_v2",
#                                   "HLT_IsoMu17_eta2p1_v2"]
#            a.Trigger.triggerOR2= ["HLT_IsoMu17_eta2p1_LooseIsoPFTau20_v1",
#                                   "HLT_IsoMu17_eta2p1_LooseIsoPFTau20_v2"]

        lumi, runmin, runmax = runRange(era)
        a.lumi = lumi
        a.runMin = runmin
        a.runMax = runmax
    else:
        a.Trigger.triggerOR = ["HLT_IsoMu15_eta2p1_L1ETM20_v5"]
        a.Trigger.triggerOR2 = [
            "HLT_IsoMu15_eta2p1_LooseIsoPFTau35_Trk20_Prong1_L1ETM20_v6"
        ]
        if era == "2015C" or era == "2015D" or era == "2015CD":
            a.Trigger.triggerOR = [
                "HLT_IsoMu16_eta2p1_CaloMET30_v1",
                "HLT_IsoMu16_eta2p1_MET30_vx",
                "HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_vx"
            ]
            a.Trigger.triggerOR2 = [
                "HLT_IsoMu16_eta2p1_CaloMET30_LooseIsoPFTau50_Trk30_eta2p1_v1",
                "HLT_IsoMu16_eta2p1_MET30_LooseIsoPFTau50_Trk30_eta2p1_vx",
                "HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_LooseIsoPFTau50_Trk30_eta2p1_vx"
            ]


#            a.Trigger.triggerOR = ["HLT_IsoMu20_eta2p1_v1"]
#            a.Trigger.triggerOR2 = ["HLT_IsoMu17_eta2p1_LooseIsoPFTau20_v1"]

#print "check triggerOR",a.Trigger.triggerOR
    return a
Пример #6
0
def createAnalyzer(dataVersion,era):
    a = Analyzer("TriggerEfficiency",
        name = era,
        Trigger = PSet(
            triggerOR  = [],
            triggerOR2 = []
        ),
        usePileupWeights = True,
        offlineSelection = leg,
        MuonSelection = PSet(
#            discriminators = ["muIDMedium"],
#            discriminators = ["TrgMatch_IsoMu20_eta2p1"],
            discriminators = ["Muons_TrgMatch_IsoMu16_eta2p1"],
        ),
        TauSelection = PSet(
            discriminators = ["byLooseCombinedIsolationDeltaBetaCorr3Hits",#"byMediumIsolationMVA3newDMwLT",
                              "againstMuonTight3",
                              "againstElectronMediumMVA6"],
            nprongs = 1,
        ),
        binning = binning,
        xLabel  = xLabel,
        yLabel  = yLabel,
    )

    if isData(dataVersion):
        a.Trigger.triggerOR = ["HLT_IsoMu15_eta2p1_L1ETM20_v3",
                               "HLT_IsoMu15_eta2p1_L1ETM20_v4",
                               "HLT_IsoMu15_eta2p1_L1ETM20_v5",
                               "HLT_IsoMu15_eta2p1_L1ETM20_v6",
                               "HLT_IsoMu15_eta2p1_L1ETM20_v7"]
        a.Trigger.triggerOR2 = ["HLT_IsoMu15_eta2p1_LooseIsoPFTau35_Trk20_Prong1_L1ETM20_v2",
                                "HLT_IsoMu15_eta2p1_LooseIsoPFTau35_Trk20_Prong1_L1ETM20_v4",
                                "HLT_IsoMu15_eta2p1_LooseIsoPFTau35_Trk20_Prong1_L1ETM20_v6",
                                "HLT_IsoMu15_eta2p1_LooseIsoPFTau35_Trk20_Prong1_L1ETM20_v7",
                                "HLT_IsoMu15_eta2p1_LooseIsoPFTau35_Trk20_Prong1_L1ETM20_v9",
                                "HLT_IsoMu15_eta2p1_LooseIsoPFTau35_Trk20_Prong1_L1ETM20_v10"]
        if era == "2015C":
#            a.Trigger.triggerOR = ["HLT_IsoMu16_eta2p1_CaloMET30_v1",
#                                   "HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_v1"]
#            a.Trigger.triggerOR2 = ["HLT_IsoMu16_eta2p1_CaloMET30_LooseIsoPFTau50_Trk30_eta2p1_v1",
#                                    "HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_LooseIsoPFTau50_Trk30_eta2p1_v1"]
            a.Trigger.triggerOR = ["HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_v1","HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_vx"]
            a.Trigger.triggerOR2= ["HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_LooseIsoPFTau50_Trk30_eta2p1_v1","HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_LooseIsoPFTau50_Trk30_eta2p1_vx"]
#            a.Trigger.triggerOR = ["HLT_IsoMu20_eta2p1_v2"]
#            a.Trigger.triggerOR2 = ["HLT_IsoMu17_eta2p1_LooseIsoPFTau20_v2"]
        if era == "2015D":
            a.Trigger.triggerOR = ["HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_v2",
                                   "HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_v3",
                                   "HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_vx",
                                   "HLT_IsoMu16_eta2p1_MET30_v1",
                                   "HLT_IsoMu16_eta2p1_MET30_vx"]
            a.Trigger.triggerOR2= ["HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_LooseIsoPFTau50_Trk30_eta2p1_v2",
                                   "HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_LooseIsoPFTau50_Trk30_eta2p1_v3",
                                   "HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_LooseIsoPFTau50_Trk30_eta2p1_vx",
                                   "HLT_IsoMu16_eta2p1_MET30_LooseIsoPFTau50_Trk30_eta2p1_v1",
                                   "HLT_IsoMu16_eta2p1_MET30_LooseIsoPFTau50_Trk30_eta2p1_vx"]
        if era == "2015CD":
            a.Trigger.triggerOR = ["HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_v1",
                                   "HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_v2",
                                   "HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_v3",
                                   "HLT_IsoMu16_eta2p1_MET30_v1"]
            a.Trigger.triggerOR2= ["HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_LooseIsoPFTau50_Trk30_eta2p1_v1",
                                   "HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_LooseIsoPFTau50_Trk30_eta2p1_v2",
                                   "HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_LooseIsoPFTau50_Trk30_eta2p1_v3",
                                   "HLT_IsoMu16_eta2p1_MET30_LooseIsoPFTau50_Trk30_eta2p1_v1"]
        if "2016" in era:
            a.Trigger.triggerOR = ["HLT_IsoMu16_eta2p1_MET30_vx","HLT_IsoMu22_eta2p1_vx"]
            a.Trigger.triggerOR2= ["HLT_IsoMu16_eta2p1_MET30_LooseIsoPFTau50_Trk30_eta2p1_vx","HLT_IsoMu21_eta2p1_LooseIsoPFTau50_Trk30_eta2p1_SingleL1_vx"]

        if era == "2016ICHEP":
            a.Trigger.triggerOR = ["HLT_IsoMu16_eta2p1_MET30_vx"]
            a.Trigger.triggerOR2= ["HLT_IsoMu16_eta2p1_MET30_LooseIsoPFTau50_Trk30_eta2p1_vx"]

        if era == "2016HIPFIXED":
            a.Trigger.triggerOR = ["HLT_IsoMu22_eta2p1_vx"]
            a.Trigger.triggerOR2= ["HLT_IsoMu21_eta2p1_LooseIsoPFTau50_Trk30_eta2p1_SingleL1_vx"]
                                    
#            a.Trigger.triggerOR = ["HLT_IsoMu20_eta2p1_v1",
#                                   "HLT_IsoMu20_eta2p1_v2",
#                                   "HLT_IsoMu17_eta2p1_v2"]
#            a.Trigger.triggerOR2= ["HLT_IsoMu17_eta2p1_LooseIsoPFTau20_v1",
#                                   "HLT_IsoMu17_eta2p1_LooseIsoPFTau20_v2"]

#        runmin,runmax = process.getRuns()
#        a.lumi    = lumi
        a.runMin  = runmin
        a.runMax  = runmax
    else:
        a.Trigger.triggerOR = ["HLT_IsoMu15_eta2p1_L1ETM20_v5"]
        a.Trigger.triggerOR2 = ["HLT_IsoMu15_eta2p1_LooseIsoPFTau35_Trk20_Prong1_L1ETM20_v6"]
        if era == "2015C" or era == "2015D" or era == "2015CD" or "2016" in era:
            a.Trigger.triggerOR = ["HLT_IsoMu16_eta2p1_CaloMET30_v1",
                                   "HLT_IsoMu16_eta2p1_MET30_vx",
                                   "HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_vx"]
            a.Trigger.triggerOR2 = ["HLT_IsoMu16_eta2p1_CaloMET30_LooseIsoPFTau50_Trk30_eta2p1_v1",
                                    "HLT_IsoMu16_eta2p1_MET30_LooseIsoPFTau50_Trk30_eta2p1_vx",
                                    "HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_LooseIsoPFTau50_Trk30_eta2p1_vx"]
#            a.Trigger.triggerOR = ["HLT_IsoMu20_eta2p1_v1"]
#            a.Trigger.triggerOR2 = ["HLT_IsoMu17_eta2p1_LooseIsoPFTau20_v1"]

    #print "check triggerOR",a.Trigger.triggerOR
    return a
Пример #7
0
def createAnalyzer(dataVersion, era, onlineSelection="MET80"):
    useCaloMET = False
    if "CaloMET" in era:
        useCaloMET = True
        era = era[:-8]

    a = Analyzer(
        "TriggerEfficiency",
        name=era,
        Trigger=PSet(triggerOR=[], triggerOR2=[]),
        usePileupWeights=True,
        #        usePileupWeights = False,
        onlineSelection=onlineSelection,
        offlineSelection=leg,
        TauSelection=signalAnalysis.tauSelection,
        #        TauSelection = PSet(
        #            discriminators = ["byLooseCombinedIsolationDeltaBetaCorr3Hits",
        #                             "againstMuonTight3",
        #                             "againstElectronMediumMVA5"],
        #        ),
        ElectronSelection=signalAnalysis.eVeto,
        MuonSelection=signalAnalysis.muVeto,
        JetSelection=signalAnalysis.jetSelection,
        BJetSelection=signalAnalysis.bjetSelection,
        binning=binning,
        xLabel=xLabel,
        yLabel=yLabel,
    )
    #    a.TauSelection.applyTriggerMatching = False
    a.JetSelection.numberOfJetsCutValue = 3
    #    a.BJetSelection.bjetDiscrWorkingPoint = "Medium"
    a.BJetSelection.numberOfBJetsCutValue = 1

    if dataVersion.isData():
        a.Trigger.triggerOR = [
            "HLT_LooseIsoPFTau35_Trk20_Prong1_v2",
            "HLT_LooseIsoPFTau35_Trk20_Prong1_v3",
            "HLT_LooseIsoPFTau35_Trk20_Prong1_v4",
            "HLT_LooseIsoPFTau35_Trk20_Prong1_v6",
            "HLT_LooseIsoPFTau35_Trk20_Prong1_v7",
            "HLT_LooseIsoPFTau35_Trk20_Prong1_v9",
            "HLT_LooseIsoPFTau35_Trk20_Prong1_v10"
        ]
        a.Trigger.triggerOR2 = [
            "HLT_LooseIsoPFTau35_Trk20_Prong1_MET70_v2",
            "HLT_LooseIsoPFTau35_Trk20_Prong1_MET70_v3",
            "HLT_LooseIsoPFTau35_Trk20_Prong1_MET70_v4",
            "HLT_LooseIsoPFTau35_Trk20_Prong1_MET70_v6",
            "HLT_LooseIsoPFTau35_Trk20_Prong1_MET70_v7",
            "HLT_LooseIsoPFTau35_Trk20_Prong1_MET70_v9",
            "HLT_LooseIsoPFTau35_Trk20_Prong1_MET70_v10"
        ]
        if era == "2015C" or era == "2015D" or era == "2015CD":
            a.Trigger.triggerOR = [
                "HLT_LooseIsoPFTau50_Trk30_eta2p1_v1",
                "HLT_LooseIsoPFTau50_Trk30_eta2p1_v2",
                "HLT_LooseIsoPFTau50_Trk30_eta2p1_v3",
                "HLT_LooseIsoPFTau50_Trk30_eta2p1_vx"
            ]
            a.Trigger.triggerOR2 = [
                "HLT_LooseIsoPFTau50_Trk30_eta2p1_" + onlineSelection +
                "_JetIdCleaned_v1", "HLT_LooseIsoPFTau50_Trk30_eta2p1_" +
                onlineSelection + "_JetIdCleaned_v2",
                "HLT_LooseIsoPFTau50_Trk30_eta2p1_" + onlineSelection + "_v1",
                "HLT_LooseIsoPFTau50_Trk30_eta2p1_" + onlineSelection +
                "_JetIdCleaned_vx",
                "HLT_LooseIsoPFTau50_Trk30_eta2p1_" + onlineSelection + "_vx"
            ]

        lumi, runmin, runmax = runRange(era)
        a.lumi = lumi
        a.runMin = runmin
        a.runMax = runmax
    else:
        a.Trigger.triggerOR = ["HLT_LooseIsoPFTau35_Trk20_Prong1_v6"]
        a.Trigger.triggerOR2 = ["HLT_LooseIsoPFTau35_Trk20_Prong1_MET70_v6"]
        if era == "2015C" or era == "2015D" or era == "2015CD":
            a.Trigger.triggerOR = [
                "HLT_LooseIsoPFTau50_Trk30_eta2p1_v1",
                "HLT_LooseIsoPFTau50_Trk30_eta2p1_vx"
            ]
            a.Trigger.triggerOR2 = [
                "HLT_LooseIsoPFTau50_Trk30_eta2p1_" + onlineSelection + "_v1",
                "HLT_LooseIsoPFTau50_Trk30_eta2p1_" + onlineSelection + "_vx"
            ]

    if useCaloMET:
        a.Trigger.triggerOR2 = []

    return a
def createAnalyzer(dataVersion, era):
    a = Analyzer(
        "TriggerEfficiency",
        name=era,
        Trigger=PSet(triggerOR=[], triggerOR2=[]),
        METFilter=metFilter,
        usePileupWeights=True,
        offlineSelection=leg,
        MuonSelection=PSet(
            #            discriminators = ["muIDMedium"],
            #            discriminators = ["TrgMatch_IsoMu20_eta2p1"],
            discriminators=["Muons_TrgMatch_IsoMu16_eta2p1"], ),
        TauSelection=PSet(
            discriminators=[
                "byLooseCombinedIsolationDeltaBetaCorr3Hits",  #"byMediumIsolationMVA3newDMwLT",
                "againstMuonTight3",
                "againstElectronMediumMVA6"
            ],
            nprongs=1,
            relaxedOfflineSelection=False),
        binning=binning,
        xLabel=xLabel,
        yLabel=yLabel,
    )

    if isData(dataVersion):
        a.Trigger.triggerOR = [
            "HLT_IsoMu15_eta2p1_L1ETM20_v3", "HLT_IsoMu15_eta2p1_L1ETM20_v4",
            "HLT_IsoMu15_eta2p1_L1ETM20_v5", "HLT_IsoMu15_eta2p1_L1ETM20_v6",
            "HLT_IsoMu15_eta2p1_L1ETM20_v7"
        ]
        a.Trigger.triggerOR2 = [
            "HLT_IsoMu15_eta2p1_LooseIsoPFTau35_Trk20_Prong1_L1ETM20_v2",
            "HLT_IsoMu15_eta2p1_LooseIsoPFTau35_Trk20_Prong1_L1ETM20_v4",
            "HLT_IsoMu15_eta2p1_LooseIsoPFTau35_Trk20_Prong1_L1ETM20_v6",
            "HLT_IsoMu15_eta2p1_LooseIsoPFTau35_Trk20_Prong1_L1ETM20_v7",
            "HLT_IsoMu15_eta2p1_LooseIsoPFTau35_Trk20_Prong1_L1ETM20_v9",
            "HLT_IsoMu15_eta2p1_LooseIsoPFTau35_Trk20_Prong1_L1ETM20_v10"
        ]
        if era == "2015C":
            #            a.Trigger.triggerOR = ["HLT_IsoMu16_eta2p1_CaloMET30_v1",
            #                                   "HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_v1"]
            #            a.Trigger.triggerOR2 = ["HLT_IsoMu16_eta2p1_CaloMET30_LooseIsoPFTau50_Trk30_eta2p1_v1",
            #                                    "HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_LooseIsoPFTau50_Trk30_eta2p1_v1"]
            a.Trigger.triggerOR = [
                "HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_v1",
                "HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_vx"
            ]
            a.Trigger.triggerOR2 = [
                "HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_LooseIsoPFTau50_Trk30_eta2p1_v1",
                "HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_LooseIsoPFTau50_Trk30_eta2p1_vx"
            ]
#            a.Trigger.triggerOR = ["HLT_IsoMu20_eta2p1_v2"]
#            a.Trigger.triggerOR2 = ["HLT_IsoMu17_eta2p1_LooseIsoPFTau20_v2"]
        if era == "2015D":
            a.Trigger.triggerOR = [
                "HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_v2",
                "HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_v3",
                "HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_vx",
                "HLT_IsoMu16_eta2p1_MET30_v1", "HLT_IsoMu16_eta2p1_MET30_vx"
            ]
            a.Trigger.triggerOR2 = [
                "HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_LooseIsoPFTau50_Trk30_eta2p1_v2",
                "HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_LooseIsoPFTau50_Trk30_eta2p1_v3",
                "HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_LooseIsoPFTau50_Trk30_eta2p1_vx",
                "HLT_IsoMu16_eta2p1_MET30_LooseIsoPFTau50_Trk30_eta2p1_v1",
                "HLT_IsoMu16_eta2p1_MET30_LooseIsoPFTau50_Trk30_eta2p1_vx"
            ]
        if era == "2015CD":
            a.Trigger.triggerOR = [
                "HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_v1",
                "HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_v2",
                "HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_v3",
                "HLT_IsoMu16_eta2p1_MET30_v1"
            ]
            a.Trigger.triggerOR2 = [
                "HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_LooseIsoPFTau50_Trk30_eta2p1_v1",
                "HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_LooseIsoPFTau50_Trk30_eta2p1_v2",
                "HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_LooseIsoPFTau50_Trk30_eta2p1_v3",
                "HLT_IsoMu16_eta2p1_MET30_LooseIsoPFTau50_Trk30_eta2p1_v1"
            ]
        if "2016" in era:
            a.Trigger.triggerOR = [
                "HLT_IsoMu16_eta2p1_MET30_vx", "HLT_IsoMu22_eta2p1_vx"
            ]
            a.Trigger.triggerOR2 = [
                "HLT_IsoMu16_eta2p1_MET30_LooseIsoPFTau50_Trk30_eta2p1_vx",
                "HLT_IsoMu21_eta2p1_LooseIsoPFTau50_Trk30_eta2p1_SingleL1_vx"
            ]

        if era == "2016ICHEP":
            a.Trigger.triggerOR = ["HLT_IsoMu16_eta2p1_MET30_vx"]
            a.Trigger.triggerOR2 = [
                "HLT_IsoMu16_eta2p1_MET30_LooseIsoPFTau50_Trk30_eta2p1_vx"
            ]

        if era == "2016HIPFIXED":
            a.Trigger.triggerOR = ["HLT_IsoMu22_eta2p1_vx"]
            a.Trigger.triggerOR2 = [
                "HLT_IsoMu21_eta2p1_LooseIsoPFTau50_Trk30_eta2p1_SingleL1_vx"
            ]

#            a.Trigger.triggerOR = ["HLT_IsoMu20_eta2p1_v1",
#                                   "HLT_IsoMu20_eta2p1_v2",
#                                   "HLT_IsoMu17_eta2p1_v2"]
#            a.Trigger.triggerOR2= ["HLT_IsoMu17_eta2p1_LooseIsoPFTau20_v1",
#                                   "HLT_IsoMu17_eta2p1_LooseIsoPFTau20_v2"]

#        runmin,runmax = process.getRuns()
#        a.lumi    = lumi
        a.runMin = runmin
        a.runMax = runmax
    else:
        a.Trigger.triggerOR = ["HLT_IsoMu15_eta2p1_L1ETM20_v5"]
        a.Trigger.triggerOR2 = [
            "HLT_IsoMu15_eta2p1_LooseIsoPFTau35_Trk20_Prong1_L1ETM20_v6"
        ]
        if era == "2015C" or era == "2015D" or era == "2015CD" or "2016" in era:
            a.Trigger.triggerOR = [
                "HLT_IsoMu16_eta2p1_CaloMET30_v1",
                "HLT_IsoMu16_eta2p1_MET30_vx",
                "HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_vx"
            ]
            a.Trigger.triggerOR2 = [
                "HLT_IsoMu16_eta2p1_CaloMET30_LooseIsoPFTau50_Trk30_eta2p1_v1",
                "HLT_IsoMu16_eta2p1_MET30_LooseIsoPFTau50_Trk30_eta2p1_vx",
                "HLT_IsoMu16_eta2p1_MET30_JetIdCleaned_LooseIsoPFTau50_Trk30_eta2p1_vx"
            ]


#            a.Trigger.triggerOR = ["HLT_IsoMu20_eta2p1_v1"]
#            a.Trigger.triggerOR2 = ["HLT_IsoMu17_eta2p1_LooseIsoPFTau20_v1"]

#print "check triggerOR",a.Trigger.triggerOR
    return a