コード例 #1
0
'''

Multiplex a cut on a PFTauDiscriminator using another PFTauDiscriminator as the
index.

Used by the anti-electron MVA, which needs to choose what cut to apply on the
MVA output depending on what the category is.

'''

import FWCore.ParameterSet.Config as cms
from RecoTauTag.RecoTau.recoTauDiscriminantCutMultiplexerDefault_cfi import recoTauDiscriminantCutMultiplexerDefault

recoTauDiscriminantCutMultiplexer = recoTauDiscriminantCutMultiplexerDefault.clone(
    PFTauProducer=cms.InputTag("fixme"),
    toMultiplex=cms.InputTag("fixme"),
    mapping=cms.VPSet(
        cms.PSet(
            category=cms.uint32(0),
            cut=cms.double(0.5),
        ),
        cms.PSet(
            category=cms.uint32(1),
            cut=cms.double(0.2),
        ),
    ))
コード例 #2
0
'''

Multiplex a cut on a PFTauDiscriminator using another PFTauDiscriminator as the
index.

Used by the anti-electron MVA, which needs to choose what cut to apply on the
MVA output depending on what the category is.

'''

import FWCore.ParameterSet.Config as cms
from RecoTauTag.RecoTau.recoTauDiscriminantCutMultiplexerDefault_cfi import recoTauDiscriminantCutMultiplexerDefault

recoTauDiscriminantCutMultiplexer = recoTauDiscriminantCutMultiplexerDefault.clone(
    PFTauProducer = cms.InputTag("fixme"),
    toMultiplex = cms.InputTag("fixme"),
    mapping = cms.VPSet(
        cms.PSet(
            category = cms.uint32(0),
            cut = cms.double(0.5),
        ),
        cms.PSet(
            category = cms.uint32(1),
            cut = cms.double(0.2),
        ),
    )
)
コード例 #3
0
discriminationByIsolationMVArun2v1raw = pfRecoTauDiscriminationByMVAIsolationRun2.clone(

    # tau collection to discriminate
    PFTauProducer=cms.InputTag('pfTauProducer'),

    # Require leading pion ensures that:
    #  1) these is at least one track above threshold (0.5 GeV) in the signal cone
    #  2) a track OR a pi-zero in the signal cone has pT > 5 GeV
    Prediscriminants=requireLeadTrack,
    loadMVAfromDB=cms.bool(True),
    srcBasicTauDiscriminators=cms.InputTag('hpsPFTauBasicDiscriminators'))

discriminationByIsolationMVArun2v1 = recoTauDiscriminantCutMultiplexerDefault.clone(
    PFTauProducer=cms.InputTag('pfTauProducer'),
    Prediscriminants=requireLeadTrack,
    toMultiplex=cms.InputTag('discriminationByIsolationMVArun2v1raw'),
    loadMVAfromDB=cms.bool(True),
    mapping=cms.VPSet(
        cms.PSet(
            category=cms.uint32(0),
            cut=cms.string("newDMwLT"),
            variable=cms.string("pt"),
        )),
    workingPoints=cms.vstring("Eff80", "Eff70", "Eff60", "Eff50", "Eff40"))

mvaIsolation2TaskRun2 = cms.Task(hpsPFTauBasicDiscriminators,
                                 discriminationByIsolationMVArun2v1raw,
                                 discriminationByIsolationMVArun2v1)
mvaIsolation2SeqRun2 = cms.Sequence(mvaIsolation2TaskRun2)
コード例 #4
0
hpsPFTauDiscriminationByMVA6ElectronRejection = recoTauDiscriminantCutMultiplexerDefault.clone(
    PFTauProducer='hpsPFTauProducer',
    Prediscriminants=requireDecayMode.clone(),
    toMultiplex='hpsPFTauDiscriminationByMVA6rawElectronRejection',
    loadMVAfromDB=True,
    mapping=cms.VPSet(
        cms.PSet(
            category=cms.uint32(0),  # minMVANoEleMatchWOgWOgsfBL
            cut=cms.string(
                "RecoTauTag_antiElectronMVA_NoEleMatch_woGwoGSF_BL"),
            variable=cms.string("pt")),
        cms.PSet(
            category=cms.uint32(2),  # minMVANoEleMatchWgWOgsfBL
            cut=cms.string("RecoTauTag_antiElectronMVA_NoEleMatch_wGwoGSF_BL"),
            variable=cms.string("pt")),
        cms.PSet(
            category=cms.uint32(5),  # minMVAWOgWgsfBL
            cut=cms.string("RecoTauTag_antiElectronMVA_woGwGSF_BL"),
            variable=cms.string("pt")),
        cms.PSet(
            category=cms.uint32(7),  # minMVAWgWgsfBL
            cut=cms.string("RecoTauTag_antiElectronMVA_wGwGSF_BL"),
            variable=cms.string("pt")),
        cms.PSet(
            category=cms.uint32(8),  # minMVANoEleMatchWOgWOgsfEC
            cut=cms.string(
                "RecoTauTag_antiElectronMVA_NoEleMatch_woGwoGSF_EC"),
            variable=cms.string("pt")),
        cms.PSet(
            category=cms.uint32(10),  # minMVANoEleMatchWgWOgsfEC
            cut=cms.string("RecoTauTag_antiElectronMVA_NoEleMatch_wGwoGSF_EC"),
            variable=cms.string("pt")),
        cms.PSet(
            category=cms.uint32(13),  # minMVAWOgWgsfEC
            cut=cms.string("RecoTauTag_antiElectronMVA_woGwGSF_EC"),
            variable=cms.string("pt")),
        cms.PSet(
            category=cms.uint32(15),  # minMVAWgWgsfEC
            cut=cms.string("RecoTauTag_antiElectronMVA_wGwGSF_EC"),
            variable=cms.string("pt"))),
    rawValues=cms.vstring("discriminator", "category"),
    workingPoints=cms.vstring("_VLoose", "_Loose", "_Medium", "_Tight",
                              "_VTight"))
コード例 #5
0
    srcBasicTauDiscriminators = 'hpsPFTauBasicDiscriminators',
    srcChargedIsoPtSumIndex = 0,
    srcNeutralIsoPtSumIndex = 1,
    srcPUcorrPtSumIndex = 5,
)

discriminationByIsolationMVA2 = recoTauDiscriminantCutMultiplexerDefault.clone(
    PFTauProducer = 'pfTauProducer',    
    Prediscriminants = requireLeadTrack,
    toMultiplex = 'discriminationByIsolationMVA2raw',
    loadMVAfromDB = True,
    mapping = cms.VPSet(
        cms.PSet(
            category = cms.uint32(0),
            cut = cms.string("newDMwLT"),
            variable = cms.string("pt"),
        )
    ),
    workingPoints = [
        "Eff80",
        "Eff70",
        "Eff60",
        "Eff50",
        "Eff40"
    ]
)

mvaIsolation2Task = cms.Task(
    hpsPFTauBasicDiscriminators
   , discriminationByIsolationMVA2raw
   , discriminationByIsolationMVA2
)
コード例 #6
0
from RecoTauTag.RecoTau.tauDiscriminationAgainstElectronMVA6Phase2_mvaDefs_cff import mvaNames_phase2, mapping_phase2, workingPoints_phase2
from RecoTauTag.RecoTau.pfRecoTauDiscriminationAgainstElectronMVA6_cfi import *
pfRecoTauDiscriminationAgainstElectronMVA6Phase2Raw = pfRecoTauDiscriminationAgainstElectronMVA6.clone(
    #Note: PFTauProducer and Prediscriminants have to be set in the final cfg
    srcElectrons = "mergedGsfElectronsForTauId",
    isPhase2 = True,
    vetoEcalCracks = False,
    hgcalElectronIDs = [cms.InputTag("hgcElectronIdForTauId", key) for key in hgcElectronIdForTauId.variables],
    **mvaNames_phase2
)
# anti-e phase-2 tauID (WPs)
from RecoTauTag.RecoTau.recoTauDiscriminantCutMultiplexerDefault_cfi import recoTauDiscriminantCutMultiplexerDefault
pfRecoTauDiscriminationAgainstElectronMVA6Phase2 = recoTauDiscriminantCutMultiplexerDefault.clone(
    #Note: PFTauProducer and Prediscriminants have to be set in the final cfg
    toMultiplex = "pfRecoTauDiscriminationAgainstElectronMVA6Phase2Raw",
    mapping = mapping_phase2,
    rawValues = ["discriminator", "category"],
    workingPoints = workingPoints_phase2
)

electronsForTauDiscriminationAgainstElectronMVA6Phase2Task = cms.Task(
    cleanedEcalDrivenGsfElectronsFromMultiCl,
    cleanedEcalDrivenGsfElectronsFromMultiClNoEB,
    mergedGsfElectronsForTauId,
    hgcElectronIdForTauId
)

pfRecoTauDiscriminationAgainstElectronMVA6Phase2Task = cms.Task(
    electronsForTauDiscriminationAgainstElectronMVA6Phase2Task,
    pfRecoTauDiscriminationAgainstElectronMVA6Phase2Raw,
    pfRecoTauDiscriminationAgainstElectronMVA6Phase2