Example #1
0
# Define the discriminators for this tau
from RecoTauTag.RecoTau.PFRecoTauDiscriminationByIsolation_cfi import *
from RecoTauTag.RecoTau.PFRecoTauDiscriminationByLeadingTrackFinding_cfi import *
from RecoTauTag.RecoTau.PFRecoTauDiscriminationAgainstElectron_cfi import *
from RecoTauTag.RecoTau.PFRecoTauDiscriminationAgainstElectronMVA_cfi import *
from RecoTauTag.RecoTau.PFRecoTauDiscriminationAgainstMuon_cfi import *

# Load helper functions to change the source of the discriminants
from RecoTauTag.RecoTau.TauDiscriminatorTools import *

# Select those taus that pass the HPS selections
#  - pt > 15, mass cuts, tauCone cut
from RecoTauTag.RecoTau.PFRecoTauDiscriminationByHPSSelection_cfi import hpsSelectionDiscriminator

hpsPFTauDiscriminationByDecayModeFinding = hpsSelectionDiscriminator.clone(
    PFTauProducer=cms.InputTag('hpsPFTauProducer'))

# Define decay mode prediscriminant
requireDecayMode = cms.PSet(
    BooleanOperator=cms.string("and"),
    decayMode=cms.PSet(
        Producer=cms.InputTag('hpsPFTauDiscriminationByDecayModeFinding'),
        cut=cms.double(0.5)))

# First apply only charged isolation
hpsPFTauDiscriminationByLooseChargedIsolation = pfRecoTauDiscriminationByIsolation.clone(
    PFTauProducer=cms.InputTag("hpsPFTauProducer"),
    Prediscriminants=requireDecayMode.clone(),
    ApplyDiscriminationByECALIsolation=False)

#Building the prototype for  the Discriminator by Isolation
            "&& sigmaIetaIeta                                  < 0.03" +
            "&& hcalOverEcal                                   < 0.10" +
            "&& abs(1./superCluster.energy - 1./p)             < 0.05))" 
            ),
        filter = cms.bool(False)
        )

from RecoJets.Configuration.RecoPFJets_cff import kt6PFJets as dummy
kt6PFJetsForRhoComputationVoronoiMet = dummy.clone(
        doRhoFastjet = True,
        voronoiRfact = 0.9
        )

from RecoTauTag.RecoTau.PFRecoTauDiscriminationByHPSSelection_cfi import hpsSelectionDiscriminator
hpsPFTauDiscriminationByDecayModeFindingMVAMET = hpsSelectionDiscriminator.clone(
        PFTauProducer = cms.InputTag('hpsPFTauProducer')
            )

from RecoTauTag.RecoTau.TauDiscriminatorTools import requireLeadTrack
# Define decay mode prediscriminant
requireDecayMode = cms.PSet(
        BooleanOperator = cms.string("and"),
            decayMode = cms.PSet(
            Producer = cms.InputTag('hpsPFTauDiscriminationByDecayModeFindingMVAMET'),
                    cut = cms.double(0.5)
                )
        )

hpsPFTauDiscriminationAgainstMuon2 = cms.EDProducer("PFRecoTauDiscriminationAgainstMuon2",
                                                         PFTauProducer = cms.InputTag('hpsPFTauProducer'),
                                                         Prediscriminants = requireDecayMode.clone(),
Example #3
0
## DeltaBeta correction factor
ak4dBetaCorrection = 0.20
## MVAs from SQLlite file/prep. DB
from RecoTauTag.Configuration.loadRecoTauTagMVAsFromPrepDB_cfi import *

## Selection of taus that pass the HPS selections: pt > 15, mass cuts, tauCone cut
from RecoTauTag.RecoTau.PFRecoTauDiscriminationByHPSSelection_cfi import hpsSelectionDiscriminator, decayMode_1Prong0Pi0, decayMode_1Prong1Pi0, decayMode_1Prong2Pi0, decayMode_2Prong0Pi0, decayMode_2Prong1Pi0, decayMode_3Prong0Pi0, decayMode_3Prong1Pi0

hpsPFTauDiscriminationByDecayModeFindingNewDMs = hpsSelectionDiscriminator.clone(
    PFTauProducer=cms.InputTag('hpsPFTauProducer'),
    #----------------------------------------------------------------------------
    # CV: disable 3Prong1Pi0 decay mode
    decayModes=cms.VPSet(
        decayMode_1Prong0Pi0,
        decayMode_1Prong1Pi0,
        decayMode_1Prong2Pi0,
        decayMode_2Prong0Pi0,
        decayMode_2Prong1Pi0,
        decayMode_3Prong0Pi0,
        decayMode_3Prong1Pi0,
    )
    #----------------------------------------------------------------------------
)
hpsPFTauDiscriminationByDecayModeFindingOldDMs = hpsSelectionDiscriminator.clone(
    PFTauProducer=cms.InputTag('hpsPFTauProducer'),
    decayModes=cms.VPSet(decayMode_1Prong0Pi0, decayMode_1Prong1Pi0,
                         decayMode_1Prong2Pi0, decayMode_3Prong0Pi0),
    requireTauChargedHadronsToBeChargedPFCands=cms.bool(True))
hpsPFTauDiscriminationByDecayModeFinding = hpsPFTauDiscriminationByDecayModeFindingOldDMs.clone(
)  ## CV: kept for backwards compatibility
Example #4
0
from RecoTauTag.RecoTau.RecoTauDiscriminantCutMultiplexer_cfi import *

# Load helper functions to change the source of the discriminants
from RecoTauTag.RecoTau.TauDiscriminatorTools import *

# Load PFjet input parameters
from RecoTauTag.RecoTau.PFRecoTauPFJetInputs_cfi import PFRecoTauPFJetInputs

# deltaBeta correction factor calculated for taus from ak5PFJets (Run I)
ak5dBetaCorrection=0.0772/0.1687 

# Select those taus that pass the HPS selections
#  - pt > 15, mass cuts, tauCone cut
from RecoTauTag.RecoTau.PFRecoTauDiscriminationByHPSSelection_cfi import hpsSelectionDiscriminator, decayMode_1Prong0Pi0, decayMode_1Prong1Pi0, decayMode_1Prong2Pi0, decayMode_3Prong0Pi0
hpsPFTauDiscriminationByDecayModeFindingNewDMs = hpsSelectionDiscriminator.clone(
    PFTauProducer = cms.InputTag('hpsPFTauProducer')
)
hpsPFTauDiscriminationByDecayModeFindingOldDMs = hpsSelectionDiscriminator.clone(
    PFTauProducer = cms.InputTag('hpsPFTauProducer'),
    decayModes = cms.VPSet(
        decayMode_1Prong0Pi0,
        decayMode_1Prong1Pi0,
        decayMode_1Prong2Pi0,
        decayMode_3Prong0Pi0
    ),
    requireTauChargedHadronsToBeChargedPFCands = cms.bool(True)
)
hpsPFTauDiscriminationByDecayModeFinding = hpsPFTauDiscriminationByDecayModeFindingOldDMs.clone() # CV: kept for backwards compatibility

# Define decay mode prediscriminant
requireDecayMode = cms.PSet(
Example #5
0
    discriminantOptions=discriminantConfiguration,
)

#Produce the transformed TaNC output
combinatoricRecoTausTancTransform = cms.EDProducer(
    "RecoTauMVATransform",
    transforms=transforms,  # blank for now
    PFTauProducer=cms.InputTag("combinatoricRecoTaus"),
    toTransform=cms.InputTag("combinatoricRecoTausDiscriminationByTanc"),
    Prediscriminants=noPrediscriminants)

from RecoTauTag.RecoTau.PFRecoTauDiscriminationByHPSSelection_cfi import hpsSelectionDiscriminator

combinatoricRecoTausHPSSelector = hpsSelectionDiscriminator.clone(
    src=cms.InputTag("combinatoricRecoTaus"),
    minTauPt=cms.double(5.),
    # Turn off narrowness req.
    coneSizeFormula=cms.string('0.3'),
)

# Clean the taus according to the transformed output
hpsTancTaus = cms.EDProducer(
    "RecoTauCleaner",
    src=cms.InputTag("combinatoricRecoTaus"),
    cleaners=cms.VPSet(
        # Prefer taus that don't have charge == 3
        cleaners.unitCharge,
        # Prefer taus that are within DR<0.1 of the jet axis
        cleaners.matchingConeCut,
        # Prefer taus that pass the lead pion requirement
        cms.PSet(name=cms.string("lead pion"),
                 plugin=cms.string("RecoTauDiscriminantCleanerPlugin"),
Example #6
0

#Produce the transformed TaNC output
combinatoricRecoTausTancTransform = cms.EDProducer(
    "RecoTauMVATransform",
    transforms = transforms, # blank for now
    PFTauProducer = cms.InputTag("combinatoricRecoTaus"),
    toTransform = cms.InputTag("combinatoricRecoTausDiscriminationByTanc"),
    Prediscriminants = noPrediscriminants
)

from RecoTauTag.RecoTau.PFRecoTauDiscriminationByHPSSelection_cfi import hpsSelectionDiscriminator

combinatoricRecoTausHPSSelector = hpsSelectionDiscriminator.clone(
    src = cms.InputTag("combinatoricRecoTaus"),
    minTauPt = cms.double(5.),
    # Turn off narrowness req.
    coneSizeFormula = cms.string('0.3'),
)

# Clean the taus according to the transformed output
hpsTancTaus = cms.EDProducer(
    "RecoTauCleaner",
    src = cms.InputTag("combinatoricRecoTaus"),
    cleaners = cms.VPSet(
        # Prefer taus that don't have charge == 3
        cleaners.unitCharge,
        # Prefer taus that are within DR<0.1 of the jet axis
        cleaners.matchingConeCut,
        # Prefer taus that pass the lead pion requirement
        cms.PSet(
            name = cms.string("lead pion"),