Exemplo n.º 1
0
    decayMode_1Prong2Pi0,
    decayMode_2Prong0Pi0,
    decayMode_2Prong1Pi0,
    decayMode_3Prong0Pi0,
    decayMode_3Prong1Pi0,
)
#----------------------------------------------------------------------------

from RecoTauTag.RecoTau.RecoTauCleaner_cfi import RecoTauCleaner
hpsPFTauProducerSansRefs = RecoTauCleaner.clone(
    src=cms.InputTag("combinatoricRecoTaus"))
hpsPFTauProducerSansRefs.cleaners[1].src = cms.InputTag(
    "hpsSelectionDiscriminator")

from RecoTauTag.RecoTau.RecoTauPiZeroUnembedder_cfi import RecoTauPiZeroUnembedder
hpsPFTauProducer = RecoTauPiZeroUnembedder.clone(
    src=cms.InputTag("hpsPFTauProducerSansRefs"))

from RecoTauTag.RecoTau.PFTauPrimaryVertexProducer_cfi import *
from RecoTauTag.RecoTau.PFTauSecondaryVertexProducer_cfi import *
from RecoTauTag.RecoTau.PFTauTransverseImpactParameters_cfi import *
hpsPFTauPrimaryVertexProducer = PFTauPrimaryVertexProducer.clone(
    PFTauTag=cms.InputTag("hpsPFTauProducer"),
    ElectronTag=cms.InputTag(""),
    MuonTag=cms.InputTag(""),
    PVTag=cms.InputTag("offlinePrimaryVertices"),
    beamSpot=cms.InputTag("offlineBeamSpot"),
    TrackCollectionTag=cms.InputTag("generalTracks"),
    Algorithm=cms.int32(0),
    useBeamSpot=cms.bool(True),
    RemoveMuonTracks=cms.bool(False),
    RemoveElectronTracks=cms.bool(False),
Exemplo n.º 2
0
    hpsPFTauDiscriminationByTightCombinedIsolationRhoSumPtCorr3Hits*
    hpsPFTauDiscriminationByRawCombinedIsolationRhoSumPtCorr3Hits
)

# Define the HPS selection discriminator used in cleaning
hpsSelectionDiscriminator.PFTauProducer = cms.InputTag("combinatoricRecoTaus")

from RecoTauTag.RecoTau.RecoTauCleaner_cfi import RecoTauCleaner
hpsPFTauProducerSansRefs=RecoTauCleaner.clone(
      src=cms.InputTag("combinatoricRecoTaus")
)


from RecoTauTag.RecoTau.RecoTauPiZeroUnembedder_cfi import RecoTauPiZeroUnembedder
hpsPFTauProducer=RecoTauPiZeroUnembedder.clone(
  src = cms.InputTag("hpsPFTauProducerSansRefs")
)


from RecoTauTag.RecoTau.PFTauPrimaryVertexProducer_cfi      import *
from RecoTauTag.RecoTau.PFTauSecondaryVertexProducer_cfi    import *
from RecoTauTag.RecoTau.PFTauTransverseImpactParameters_cfi import *
hpsPFTauPrimaryVertexProducer = PFTauPrimaryVertexProducer.clone(
    PFTauTag = cms.InputTag("hpsPFTauProducer"),
    ElectronTag = cms.InputTag(""),
    MuonTag = cms.InputTag(""),
    PVTag = cms.InputTag("offlinePrimaryVertices"),
    beamSpot = cms.InputTag("offlineBeamSpot"),
    TrackCollectionTag = cms.InputTag("generalTracks"),
    Algorithm = cms.int32(1),
    useBeamSpot = cms.bool(True),
Exemplo n.º 3
0
    decayMode_1Prong1Pi0,
    decayMode_1Prong2Pi0,
    decayMode_2Prong0Pi0,
    decayMode_2Prong1Pi0,
    decayMode_3Prong0Pi0,
    decayMode_3Prong1Pi0,
)
#----------------------------------------------------------------------------

from RecoTauTag.RecoTau.RecoTauCleaner_cfi import RecoTauCleaner
hpsPFTauProducerSansRefs = RecoTauCleaner.clone(
    src="combinatoricRecoTaus",
    cleaners={1: dict(src="hpsSelectionDiscriminator")})

from RecoTauTag.RecoTau.RecoTauPiZeroUnembedder_cfi import RecoTauPiZeroUnembedder
hpsPFTauProducer = RecoTauPiZeroUnembedder.clone(
    src="hpsPFTauProducerSansRefs")

from RecoTauTag.RecoTau.PFTauPrimaryVertexProducer_cfi import *
from RecoTauTag.RecoTau.PFTauSecondaryVertexProducer_cfi import *
from RecoTauTag.RecoTau.PFTauTransverseImpactParameters_cfi import *
hpsPFTauPrimaryVertexProducer = PFTauPrimaryVertexProducer.clone(
    PFTauTag="hpsPFTauProducer",
    ElectronTag="",
    MuonTag="",
    PVTag="offlinePrimaryVertices",
    beamSpot="offlineBeamSpot",
    Algorithm=0,
    useBeamSpot=True,
    RemoveMuonTracks=False,
    RemoveElectronTracks=False,
    useSelectedTaus=False,
def addHLTPFTaus(process,
                 algorithm,
                 srcPFCandidates,
                 srcVertices,
                 srcBeamSpot,
                 isolation_maxDeltaZ,
                 isolation_maxDeltaZToLeadTrack,
                 isolation_minTrackHits,
                 suffix=""):
    pfTauLabel = None
    signalConeSize = None
    isolationConeSize = None
    if algorithm == "shrinking-cone":
        pfTauLabel = "PFTau"
        signalConeSize = signalConeSize_sc
        isolationConeSize = isolationConeSize_sc
    elif algorithm == "hps":
        pfTauLabel = "HpsPFTau"
        signalConeSize = signalConeSize_hps
        isolationConeSize = isolationConeSize_hps
    else:
        raise ValueError("Invalid parameter algorithm = '%s' !!" % algorithm)

    pftauSequence = cms.Sequence()

    hltQualityCuts = PFTauQualityCuts.clone()
    hltQualityCuts.signalQualityCuts.minTrackPt = cms.double(minSignalTrackPt)
    hltQualityCuts.isolationQualityCuts.minTrackPt = cms.double(
        minIsolationTrackPt)
    hltQualityCuts.isolationQualityCuts.maxDeltaZ = cms.double(
        isolation_maxDeltaZ)
    hltQualityCuts.isolationQualityCuts.maxDeltaZToLeadTrack = cms.double(
        isolation_maxDeltaZToLeadTrack)
    hltQualityCuts.isolationQualityCuts.minTrackHits = cms.uint32(
        isolation_minTrackHits)
    hltQualityCuts.primaryVertexSrc = cms.InputTag(srcVertices)
    #------------------------------------------------------------------------------------------------
    # CV: fix for Phase-2 HLT tau trigger studies
    #    (pT of PFCandidates within HGCal acceptance is significantly higher than track pT !!)
    hltQualityCuts.leadingTrkOrPFCandOption = cms.string(
        'minLeadTrackOrPFCand')
    #------------------------------------------------------------------------------------------------

    hltPFTauAK4PFJets = ak4PFJets.clone(src=cms.InputTag(srcPFCandidates),
                                        srcPVs=cms.InputTag(srcVertices))
    setattr(process, "hlt%sAK4PFJets%s" % (pfTauLabel, suffix),
            hltPFTauAK4PFJets)
    pftauSequence += hltPFTauAK4PFJets
    srcPFTauAK4PFJets = hltPFTauAK4PFJets.label()

    #------------------------------------------------------------------------------------------------
    ## CV: restrict PFTau reconstruction to genuine taus when debbugging,
    ##     in order to avoid getting swamped by debug output !!
    ##genTaus = cms.EDFilter("GenParticleSelector",
    ##    src = cms.InputTag('genParticles'),
    ##    cut = cms.string('abs(pdgId) = 15 & status = 2 & pt > 20. & abs(eta) > 2.0 & abs(eta) < 2.4'),
    ##    stableOnly = cms.bool(True),
    ##    filter = cms.bool(False)
    ##)
    ##setattr(process, "genTausFor%s%s" % (pfTauLabel, suffix), genTaus)
    ##pftauSequence += genTaus
    ##srcGenTaus = genTaus.label()
    ##
    ##genMatchedAK4PFJets = cms.EDFilter("PFJetAntiOverlapSelector",
    ##  src = cms.InputTag(srcPFTauAK4PFJets),
    ##  srcNotToBeFiltered = cms.VInputTag(srcGenTaus),
    ##  dRmin = cms.double(0.3),
    ##  invert = cms.bool(True),
    ##  filter = cms.bool(False)
    ##)
    ##setattr(process, "genMatchedAK4PFJetsFor%s%s" % (pfTauLabel, suffix), genMatchedAK4PFJets)
    ##pftauSequence += genMatchedAK4PFJets
    ##srcPFTauAK4PFJets = genMatchedAK4PFJets.label()
    #------------------------------------------------------------------------------------------------

    hltPFTau08Region = RecoTauJetRegionProducer.clone(
        src=cms.InputTag(srcPFTauAK4PFJets),
        pfCandSrc=cms.InputTag(srcPFCandidates),
        minJetPt=cms.double(minSeedJetPt),
        maxJetAbsEta=cms.double(maxSeedJetAbsEta))
    setattr(process, "hlt%sPFJets08Region%s" % (pfTauLabel, suffix),
            hltPFTau08Region)
    pftauSequence += hltPFTau08Region
    srcPFTau08Region = hltPFTau08Region.label()

    builders_chargedPFCandidates = builders.chargedPFCandidates.clone(
        qualityCuts=hltQualityCuts)

    ranking_isChargedPFCandidate_withHGCalFix = cms.PSet(
        name=cms.string("ChargedPFCandidate"),
        plugin=cms.string(
            "PFRecoTauChargedHadronQualityPluginHGCalWorkaround"),
    )

    hltPFTauPFJetsRecoTauChargedHadrons = ak4PFJetsRecoTauChargedHadrons.clone(
        jetSrc=cms.InputTag(srcPFTauAK4PFJets),
        minJetPt=cms.double(minSeedJetPt),
        maxJetAbsEta=cms.double(maxSeedJetAbsEta),
        outputSelection=cms.string('pt > %1.2f' % minSignalTrackPt),
        builders=cms.VPSet(builders_chargedPFCandidates),
        ranking=cms.VPSet(ranking_isChargedPFCandidate_withHGCalFix))
    setattr(process,
            "hlt%sPFJetsRecoTauChargedHadrons%s" % (pfTauLabel, suffix),
            hltPFTauPFJetsRecoTauChargedHadrons)
    pftauSequence += hltPFTauPFJetsRecoTauChargedHadrons
    srcPFTauPFJetsRecoTauChargedHadrons = hltPFTauPFJetsRecoTauChargedHadrons.label(
    )

    hltPFTauPiZeros = ak4PFJetsLegacyHPSPiZeros.clone(
        jetSrc=cms.InputTag(srcPFTauAK4PFJets),
        minJetPt=cms.double(minSeedJetPt),
        maxJetAbsEta=cms.double(maxSeedJetAbsEta))
    hltPFTauPiZeros.builders[0].qualityCuts = hltQualityCuts
    setattr(process, "hlt%sPiZeros%s" % (pfTauLabel, suffix), hltPFTauPiZeros)
    pftauSequence += hltPFTauPiZeros
    srcPFTauPiZeros = hltPFTauPiZeros.label()

    srcPFTausTmp = None
    if algorithm == "shrinking-cone":
        hltPFTausSansRef = combinatoricRecoTaus.clone(
            jetSrc=cms.InputTag(srcPFTauAK4PFJets),
            minJetPt=cms.double(minSeedJetPt),
            maxJetAbsEta=cms.double(maxSeedJetAbsEta),
            jetRegionSrc=cms.InputTag(srcPFTau08Region),
            chargedHadronSrc=cms.InputTag(srcPFTauPFJetsRecoTauChargedHadrons),
            piZeroSrc=cms.InputTag(srcPFTauPiZeros),
            builders=cms.VPSet(
                cms.PSet(
                    plugin=cms.string("RecoTauBuilderConePlugin"),
                    name=cms.string("shrinkingConeTau"),
                    matchingCone=cms.string("0.3"),
                    pfCandSrc=cms.InputTag(srcPFCandidates),
                    usePFLeptons=cms.bool(True),
                    leadObjectPt=cms.double(minSignalTrackPt),
                    signalConeChargedHadrons=cms.string(signalConeSize),
                    maxSignalConeChargedHadrons=cms.int32(3),
                    signalConeNeutralHadrons=cms.string("0.1"),
                    signalConePiZeros=cms.string(signalConeSize_sc),
                    minAbsPhotonSumPt_insideSignalCone=cms.double(2.5),
                    minRelPhotonSumPt_insideSignalCone=cms.double(0.1),
                    isoConeChargedHadrons=cms.string("%1.2f" %
                                                     isolationConeSize),
                    isoConeNeutralHadrons=cms.string("%1.2f" %
                                                     isolationConeSize),
                    isoConePiZeros=cms.string("%1.2f" % isolationConeSize),
                    qualityCuts=hltQualityCuts,
                )),
            modifiers=cms.VPSet())
        setattr(process, "hlt%ssSansRef%s" % (pfTauLabel, suffix),
                hltPFTausSansRef)
        pftauSequence += hltPFTausSansRef
        srcPFTausTmp = hltPFTausSansRef.label()
    elif algorithm == "hps":
        hltCombinatoricRecoTaus = combinatoricRecoTaus.clone(
            jetSrc=cms.InputTag(srcPFTauAK4PFJets),
            minJetPt=cms.double(minSeedJetPt),
            maxJetAbsEta=cms.double(maxSeedJetAbsEta),
            jetRegionSrc=cms.InputTag(srcPFTau08Region),
            chargedHadronSrc=cms.InputTag(srcPFTauPFJetsRecoTauChargedHadrons),
            piZeroSrc=cms.InputTag(srcPFTauPiZeros),
            builders=cms.VPSet(
                cms.PSet(
                    name=cms.string("combinatoric"),
                    plugin=cms.string("RecoTauBuilderCombinatoricPlugin"),
                    pfCandSrc=cms.InputTag(srcPFCandidates),
                    isolationConeSize=cms.double(isolationConeSize_hps),
                    qualityCuts=hltQualityCuts,
                    decayModes=cms.VPSet(
                        combinatoricDecayModeConfigs.config1prong0pi0,
                        combinatoricDecayModeConfigs.config1prong1pi0,
                        combinatoricDecayModeConfigs.config1prong2pi0,
                        ##combinatoricDecayModeConfigs.config2prong0pi0,
                        ##combinatoricDecayModeConfigs.config2prong1pi0,
                        combinatoricDecayModeConfigs.config3prong0pi0,
                        combinatoricDecayModeConfigs.config3prong1pi0),
                    signalConeSize=cms.string(signalConeSize_hps),
                    minAbsPhotonSumPt_insideSignalCone=cms.double(2.5),
                    minRelPhotonSumPt_insideSignalCone=cms.double(0.10),
                    minAbsPhotonSumPt_outsideSignalCone=cms.double(1.e+9),
                    minRelPhotonSumPt_outsideSignalCone=cms.double(1.e+9),
                    verbosity=cms.int32(0))),
            modifiers=cms.VPSet(
                cms.PSet(name=cms.string("tau_mass"),
                         plugin=cms.string("PFRecoTauMassPlugin"),
                         verbosity=cms.int32(0))))
        setattr(process, "hlt%sCombinatoricProducer%s" % (pfTauLabel, suffix),
                hltCombinatoricRecoTaus)
        pftauSequence += hltCombinatoricRecoTaus
        srcCombinatoricRecoTaus = hltCombinatoricRecoTaus.label()

        hltPFTauSelectionDiscriminator = hpsSelectionDiscriminator.clone(
            PFTauProducer=cms.InputTag(srcCombinatoricRecoTaus),
            # CV: mass-window cuts taken from configuation used for HLT tau trigger during LHC Run 2
            decayModes=cms.VPSet(
                decayMode_1Prong0Pi0.clone(maxMass=cms.string("1.")),
                decayMode_1Prong1Pi0.clone(maxMass=cms.string(
                    "max(1.72, min(1.72*sqrt(pt/100.), 4.2))")),
                decayMode_1Prong2Pi0.clone(maxMass=cms.string(
                    "max(1.72, min(1.72*sqrt(pt/100.), 4.0))")),
                ##decayMode_2Prong0Pi0.clone(
                ##    maxMass = cms.string("1.2")
                ##),
                ##decayMode_2Prong1Pi0.clone(
                ##    maxMass = cms.string("max(1.6, min(1.6*sqrt(pt/100.), 4.0))")
                ##),
                decayMode_3Prong0Pi0.clone(maxMass=cms.string("1.6")),
                decayMode_3Prong1Pi0.clone(maxMass=cms.string("1.6"))),
            requireTauChargedHadronsToBeChargedPFCands=cms.bool(True))
        setattr(process,
                "hlt%sSelectionDiscriminationByHPS%s" % (pfTauLabel, suffix),
                hltPFTauSelectionDiscriminator)
        pftauSequence += hltPFTauSelectionDiscriminator
        srcPFTauSelectionDiscriminationByHPS = hltPFTauSelectionDiscriminator.label(
        )

        cleaner_leadTrackPt = cms.PSet(
            name=cms.string("leadTrackPt"),
            plugin=cms.string("RecoTauCleanerPluginHGCalWorkaround"),
            tolerance=cleaners.tolerance_default)

        hltPFTauCleaner = RecoTauCleaner.clone(
            src=cms.InputTag(srcCombinatoricRecoTaus),
            cleaners=cms.VPSet(
                cleaners.charge,  # CV: to be disabled when using 2-prongs !!
                cms.PSet(
                    name=cms.string("HPS_Select"),
                    plugin=cms.string("RecoTauDiscriminantCleanerPlugin"),
                    src=cms.InputTag(srcPFTauSelectionDiscriminationByHPS)),
                cleaners.killSoftTwoProngTaus,
                cleaner_leadTrackPt,
                cleaners.chargedHadronMultiplicity,
                cleaners.pt,
                cleaners.stripMultiplicity,
                cleaners.chargeIsolation))
        setattr(process, "hlt%sCleaner%s" % (pfTauLabel, suffix),
                hltPFTauCleaner)
        pftauSequence += hltPFTauCleaner
        srcPFTausTmp = hltPFTauCleaner.label()
    else:
        raise ValueError("Invalid parameter algorithm = '%s' !!" % algorithm)

    hltPFTaus = RecoTauPiZeroUnembedder.clone(src=cms.InputTag(srcPFTausTmp))
    setattr(process, "hlt%ss%s" % (pfTauLabel, suffix), hltPFTaus)
    pftauSequence += hltPFTaus
    srcPFTaus = hltPFTaus.label()

    pftauDiscriminators = []

    hltPFTauDiscriminationByTrackFinding = addPFTauDiscriminator(
        process, "hlt%sDiscriminationByTrackFinding%s" % (pfTauLabel, suffix),
        pfRecoTauDiscriminationByLeadingObjectPtCut.clone(
            PFTauProducer=cms.InputTag(srcPFTaus),
            UseOnlyChargedHadrons=cms.bool(True),
            MinPtLeadingObject=cms.double(0.0)), pftauSequence)
    pftauDiscriminators.append(hltPFTauDiscriminationByTrackFinding.label())

    hltPFTauDiscriminationByTrackPt = addPFTauDiscriminator(
        process, "hlt%sDiscriminationByTrackPt%s" % (pfTauLabel, suffix),
        pfRecoTauDiscriminationByLeadingObjectPtCut.clone(
            PFTauProducer=cms.InputTag(srcPFTaus),
            UseOnlyChargedHadrons=cms.bool(True),
            MinPtLeadingObject=cms.double(minLeadTrackPt)), pftauSequence)
    pftauDiscriminators.append(hltPFTauDiscriminationByTrackPt.label())

    hltSelectedPFTaus = addPFTauSelector(
        process, "hltSelected%ss%s" % (pfTauLabel, suffix), srcPFTaus,
        pftauDiscriminators, pftauSequence)
    srcSelectedPFTaus = hltSelectedPFTaus.label()

    addPFTauDiscriminator(
        process,
        "hlt%sDiscriminationByDecayModeFinding%s" % (pfTauLabel, suffix),
        hpsSelectionDiscriminator.clone(
            PFTauProducer=cms.InputTag(srcSelectedPFTaus),
            decayModes=cms.VPSet(decayMode_1Prong0Pi0, decayMode_1Prong1Pi0,
                                 decayMode_1Prong2Pi0, decayMode_3Prong0Pi0),
            requireTauChargedHadronsToBeChargedPFCands=cms.bool(True),
            minPixelHits=cms.int32(1)), pftauSequence)

    # CV: do not cut on charged isolation, but store charged isolation pT-sum in output file instead
    hltPFTauChargedIsoPtSumHGCalFix = addPFTauDiscriminator(
        process,
        "hltSelected%sChargedIsoPtSumHGCalFix%s" % (pfTauLabel, suffix),
        cms.EDProducer(
            "PFRecoTauDiscriminationByIsolation",
            PFTauProducer=cms.InputTag(srcSelectedPFTaus),
            particleFlowSrc=cms.InputTag(srcPFCandidates),
            vertexSrc=cms.InputTag(srcVertices),
            qualityCuts=hltQualityCuts,
            Prediscriminants=noPrediscriminants,
            ApplyDiscriminationByTrackerIsolation=cms.bool(True),
            ApplyDiscriminationByECALIsolation=cms.bool(False),
            ApplyDiscriminationByWeightedECALIsolation=cms.bool(False),
            enableHGCalWorkaround=cms.bool(True),
            WeightECALIsolation=cms.double(0.),
            minTauPtForNoIso=cms.double(-99.),
            applyOccupancyCut=cms.bool(False),
            maximumOccupancy=cms.uint32(0),
            applySumPtCut=cms.bool(False),
            maximumSumPtCut=cms.double(-1.),
            applyRelativeSumPtCut=cms.bool(False),
            relativeSumPtCut=cms.double(-1.),
            relativeSumPtOffset=cms.double(0.),
            storeRawOccupancy=cms.bool(False),
            storeRawSumPt=cms.bool(True),
            storeRawPUsumPt=cms.bool(False),
            storeRawFootprintCorrection=cms.bool(False),
            storeRawPhotonSumPt_outsideSignalCone=cms.bool(False),
            customOuterCone=cms.double(-1.),
            applyPhotonPtSumOutsideSignalConeCut=cms.bool(False),
            maxAbsPhotonSumPt_outsideSignalCone=cms.double(1.e+9),
            maxRelPhotonSumPt_outsideSignalCone=cms.double(0.1),
            applyFootprintCorrection=cms.bool(False),
            footprintCorrections=cms.VPSet(),
            applyDeltaBetaCorrection=cms.bool(False),
            deltaBetaPUTrackPtCutOverride=cms.bool(False),
            deltaBetaPUTrackPtCutOverride_val=cms.double(0.5),
            isoConeSizeForDeltaBeta=cms.double(isolationConeSize),
            deltaBetaFactor=cms.string("0.20"),
            applyRhoCorrection=cms.bool(False),
            rhoProducer=cms.InputTag("NotUsed"),
            rhoConeSize=cms.double(0.357),
            rhoUEOffsetCorrection=cms.double(0.),
            UseAllPFCandsForWeights=cms.bool(False),
            verbosity=cms.int32(0)), pftauSequence)

    hltPFTauChargedIsoPtSumdR03HGCalFix = addPFTauDiscriminator(
        process,
        "hltSelected%sChargedIsoPtSumdR03HGCalFix%s" % (pfTauLabel, suffix),
        hltPFTauChargedIsoPtSumHGCalFix.clone(
            customOuterCone=0.3,
            deltaBetaFactor='0.0720'  # 0.2*(0.3/0.5)^2
        ),
        pftauSequence)

    hltPFTauNeutralIsoPtSumHGCalFix = addPFTauDiscriminator(
        process,
        "hltSelected%sNeutralIsoPtSumHGCalFix%s" % (pfTauLabel, suffix),
        hltPFTauChargedIsoPtSumHGCalFix.clone(
            ApplyDiscriminationByTrackerIsolation=cms.bool(False),
            ApplyDiscriminationByECALIsolation=cms.bool(True),
            WeightECALIsolation=cms.double(1.)), pftauSequence)

    hltPFTauNeutralIsoPtSumdR03HGCalFix = addPFTauDiscriminator(
        process,
        "hltSelected%sNeutralIsoPtSumdR03HGCalFix%s" % (pfTauLabel, suffix),
        hltPFTauNeutralIsoPtSumHGCalFix.clone(
            customOuterCone=0.3,
            deltaBetaFactor='0.0720'  # 0.2*(0.3/0.5)^2
        ),
        pftauSequence)

    # CV: add additional tauID discriminators and tau lifetime information for DeepTau training
    srcPFTauDiscriminationByDecayModeFindingNewDMs = addPFTauDiscriminatorsForDeepTau(
        process, srcSelectedPFTaus, srcPFCandidates, srcVertices,
        hltQualityCuts, pftauSequence, pfTauLabel, suffix)
    addPFTauTransverseImpactParametersForDeepTau(
        process, srcSelectedPFTaus,
        srcPFTauDiscriminationByDecayModeFindingNewDMs, srcVertices,
        srcBeamSpot, pftauSequence, pfTauLabel, suffix)

    pftauSequenceName = "HLT%sSequence%s" % (pfTauLabel, suffix)
    setattr(process, pftauSequenceName, pftauSequence)
    return pftauSequence