Exemplo n.º 1
0
from RecoBTag.Combined.pfDeepCSVDiscriminatorsJetTags_cfi import pfDeepCSVDiscriminatorsJetTags
from RecoBTag.Combined.pfDeepCMVAJetTags_cfi import pfDeepCMVAJetTags
from RecoBTag.Combined.pfDeepCMVADiscriminatorsJetTags_cfi import pfDeepCMVADiscriminatorsJetTags

##
## Negative and positive taggers for light SF estimation
##

pfDeepCSVNegativeTagInfos = pfDeepCSVTagInfos.clone(
    svTagInfos=cms.InputTag('pfInclusiveSecondaryVertexFinderNegativeTagInfos'),
    computer = dict(
        vertexFlip = True,
        trackFlip = True,
        trackSelection = dict( 
            sip3dSigMax = 10.0
            ),
        trackPseudoSelection = dict(
            sip3dSigMax = 10.0,
            sip2dSigMin = -99999.9,
            sip2dSigMax = -2.0
            )
        )
    )

pfNegativeDeepCSVJetTags = pfDeepCSVJetTags.clone(
	src=cms.InputTag('pfDeepCSVNegativeTagInfos')
	)

pfDeepCSVPositiveTagInfos = pfDeepCSVTagInfos.clone(
    computer = dict(
        trackSelection = dict( 
Exemplo n.º 2
0
import FWCore.ParameterSet.Config as cms
from RecoBTag.Combined.pfDeepCSVTagInfos_cfi import pfDeepCSVTagInfos
from RecoBTag.Combined.pfDeepCMVATagInfos_cfi import pfDeepCMVATagInfos
from RecoBTag.Combined.pfDeepCSVJetTags_cfi import pfDeepCSVJetTags 
from RecoBTag.Combined.pfDeepCSVDiscriminatorsJetTags_cfi import pfDeepCSVDiscriminatorsJetTags
from RecoBTag.Combined.pfDeepCMVAJetTags_cfi import pfDeepCMVAJetTags
from RecoBTag.Combined.pfDeepCMVADiscriminatorsJetTags_cfi import pfDeepCMVADiscriminatorsJetTags

##
## Negative and positive taggers for light SF estimation
##

pfDeepCSVNegativeTagInfos = pfDeepCSVTagInfos.clone(
	svTagInfos=cms.InputTag('pfInclusiveSecondaryVertexFinderNegativeTagInfos')
	)
pfDeepCSVNegativeTagInfos.computer.vertexFlip = True
pfDeepCSVNegativeTagInfos.computer.trackFlip = True
pfDeepCSVNegativeTagInfos.computer.trackSelection.sip3dSigMax = 0
pfDeepCSVNegativeTagInfos.computer.trackPseudoSelection.sip3dSigMax = 0
pfDeepCSVNegativeTagInfos.computer.trackPseudoSelection.sip2dSigMin = -99999.9
pfDeepCSVNegativeTagInfos.computer.trackPseudoSelection.sip2dSigMax = -2.0

pfNegativeDeepCSVJetTags = pfDeepCSVJetTags.clone(
	src=cms.InputTag('pfDeepCSVNegativeTagInfos')
	)

pfDeepCSVPositiveTagInfos = pfDeepCSVTagInfos.clone()
pfDeepCSVPositiveTagInfos.computer.trackSelection.sip3dSigMin = 0
pfDeepCSVPositiveTagInfos.computer.trackPseudoSelection.sip3dSigMin = 0
pfPositiveDeepCSVJetTags = pfDeepCSVJetTags.clone(
	src=cms.InputTag('pfDeepCSVPositiveTagInfos')
Exemplo n.º 3
0
    def __init__(self,jetname,rParam):
        self.JetTracksAssociatorAtVertex = ak5JetTracksAssociatorAtVertex.clone()
        self.JetTracksAssociatorAtVertex.jets = cms.InputTag(jetname+"Jets")
        self.JetTracksAssociatorAtVertex.tracks = cms.InputTag("hiGeneralTracks")
        self.ImpactParameterTagInfos = impactParameterTagInfos.clone()
        self.ImpactParameterTagInfos.jetTracks = cms.InputTag(jetname+"JetTracksAssociatorAtVertex")
        self.ImpactParameterTagInfos.primaryVertex = cms.InputTag("offlinePrimaryVertices")
        self.TrackCountingHighEffBJetTags          = trackCountingHighEffBJetTags.clone()
        self.TrackCountingHighEffBJetTags.tagInfos = cms.VInputTag(cms.InputTag(jetname+"ImpactParameterTagInfos"))
        self.TrackCountingHighPurBJetTags          = trackCountingHighPurBJetTags.clone()
        self.TrackCountingHighPurBJetTags.tagInfos = cms.VInputTag(cms.InputTag(jetname+"ImpactParameterTagInfos"))
        self.JetProbabilityBJetTags                = jetProbabilityBJetTags.clone()
        self.JetProbabilityBJetTags.tagInfos       = cms.VInputTag(cms.InputTag(jetname+"ImpactParameterTagInfos"))
        self.JetBProbabilityBJetTags               = jetBProbabilityBJetTags.clone()
        self.JetBProbabilityBJetTags.tagInfos      = cms.VInputTag(cms.InputTag(jetname+"ImpactParameterTagInfos"))
        self.pfImpactParameterTagInfos = pfImpactParameterTagInfos.clone(jets = jetname+"Jets")

        self.SecondaryVertexTagInfos                     = secondaryVertexTagInfos.clone()
        self.SecondaryVertexTagInfos.trackIPTagInfos     = cms.InputTag(jetname+"ImpactParameterTagInfos")
        #self.SimpleSecondaryVertexBJetTags               = simpleSecondaryVertexBJetTags.clone()
        #self.SimpleSecondaryVertexBJetTags.tagInfos      = cms.VInputTag(cms.InputTag(jetname+"SecondaryVertexTagInfos"))
        self.CombinedSecondaryVertexBJetTags             = combinedSecondaryVertexV2BJetTags.clone()
        self.CombinedSecondaryVertexBJetTags.tagInfos    = cms.VInputTag(cms.InputTag(jetname+"ImpactParameterTagInfos"),
                cms.InputTag(jetname+"SecondaryVertexTagInfos"))
        self.CombinedSecondaryVertexV2BJetTags          = combinedSecondaryVertexV2BJetTags.clone()
        self.CombinedSecondaryVertexV2BJetTags.tagInfos = cms.VInputTag(cms.InputTag(jetname+"ImpactParameterTagInfos"),
                cms.InputTag(jetname+"SecondaryVertexTagInfos"))


        # secondary vertex b-tag
        self.SecondaryVertexTagInfos                     = secondaryVertexTagInfos.clone()
        self.SecondaryVertexTagInfos.trackIPTagInfos     = cms.InputTag(jetname+"ImpactParameterTagInfos")
        self.SimpleSecondaryVertexHighEffBJetTags               = simpleSecondaryVertexHighEffBJetTags.clone()
        self.SimpleSecondaryVertexHighEffBJetTags.tagInfos      = cms.VInputTag(cms.InputTag(jetname+"SecondaryVertexTagInfos"))
        self.SimpleSecondaryVertexHighPurBJetTags               = simpleSecondaryVertexHighPurBJetTags.clone()
        self.SimpleSecondaryVertexHighPurBJetTags.tagInfos      = cms.VInputTag(cms.InputTag(jetname+"SecondaryVertexTagInfos"))
        self.CombinedSecondaryVertexBJetTags             = combinedSecondaryVertexV2BJetTags.clone()
        self.CombinedSecondaryVertexBJetTags.tagInfos    = cms.VInputTag(cms.InputTag(jetname+"ImpactParameterTagInfos"),
                cms.InputTag(jetname+"SecondaryVertexTagInfos"))
        self.CombinedSecondaryVertexV2BJetTags          = combinedSecondaryVertexV2BJetTags.clone()
        self.CombinedSecondaryVertexV2BJetTags.tagInfos = cms.VInputTag(cms.InputTag(jetname+"ImpactParameterTagInfos"),
                cms.InputTag(jetname+"SecondaryVertexTagInfos"))

        self.SecondaryVertexNegativeTagInfos                     = secondaryVertexNegativeTagInfos.clone()
        self.SecondaryVertexNegativeTagInfos.trackIPTagInfos     = cms.InputTag(jetname+"ImpactParameterTagInfos")

        self.NegativeSimpleSecondaryVertexHighEffBJetTags               = negativeSimpleSecondaryVertexHighEffBJetTags.clone()
        self.NegativeSimpleSecondaryVertexHighEffBJetTags.tagInfos      = cms.VInputTag(cms.InputTag(jetname+"SecondaryVertexNegativeTagInfos"))
        self.NegativeSimpleSecondaryVertexHighPurBJetTags               = negativeSimpleSecondaryVertexHighPurBJetTags.clone()
        self.NegativeSimpleSecondaryVertexHighPurBJetTags.tagInfos      = cms.VInputTag(cms.InputTag(jetname+"SecondaryVertexNegativeTagInfos"))

        self.NegativeCombinedSecondaryVertexBJetTags                    = negativeCombinedSecondaryVertexV2BJetTags.clone()
        self.NegativeCombinedSecondaryVertexBJetTags.tagInfos    = cms.VInputTag(cms.InputTag(jetname+"ImpactParameterTagInfos"),
                                                                                 cms.InputTag(jetname+"SecondaryVertexNegativeTagInfos"))
        self.PositiveCombinedSecondaryVertexBJetTags                    = positiveCombinedSecondaryVertexV2BJetTags.clone()
        self.PositiveCombinedSecondaryVertexBJetTags.tagInfos    = cms.VInputTag(cms.InputTag(jetname+"ImpactParameterTagInfos"),
                                                                                 cms.InputTag(jetname+"SecondaryVertexTagInfos"))

        self.NegativeCombinedSecondaryVertexV2BJetTags                    = negativeCombinedSecondaryVertexV2BJetTags.clone()
        self.NegativeCombinedSecondaryVertexV2BJetTags.tagInfos    = cms.VInputTag(cms.InputTag(jetname+"ImpactParameterTagInfos"),
                                                                                 cms.InputTag(jetname+"SecondaryVertexNegativeTagInfos"))
        self.PositiveCombinedSecondaryVertexV2BJetTags                    = positiveCombinedSecondaryVertexV2BJetTags.clone()
        self.PositiveCombinedSecondaryVertexV2BJetTags.tagInfos    = cms.VInputTag(cms.InputTag(jetname+"ImpactParameterTagInfos"),
                                                                                 cms.InputTag(jetname+"SecondaryVertexTagInfos"))

        self.pfSecondaryVertexTagInfos = pfSecondaryVertexTagInfos.clone(trackIPTagInfos = jetname+"pfImpactParameterTagInfos")
        self.pfDeepCSVTagInfos = pfDeepCSVTagInfos.clone(svTagInfos = jetname+"pfSecondaryVertexTagInfos") 
        self.pfDeepCSVJetTags = pfDeepCSVJetTags.clone(src = jetname+"pfDeepCSVTagInfos") 

        self.SoftPFMuonsTagInfos                = softPFMuonsTagInfos.clone()
        self.SoftPFMuonsTagInfos.jets           = cms.InputTag(jetname+"Jets")
        #self.SoftPFMuonsTagInfos.primaryVertex  = cms.InputTag("offlinePrimaryVertices")
        self.SoftPFMuonBJetTags                = softPFMuonBJetTags.clone()
        self.SoftPFMuonBJetTags.tagInfos       = cms.VInputTag(cms.InputTag(jetname+"SoftPFMuonsTagInfos"))
        self.SoftPFMuonByIP3dBJetTags          = softPFMuonByIP3dBJetTags.clone()
        self.SoftPFMuonByIP3dBJetTags.tagInfos = cms.VInputTag(cms.InputTag(jetname+"SoftPFMuonsTagInfos"))
        self.SoftPFMuonByPtBJetTags            = softPFMuonByPtBJetTags.clone()
        self.SoftPFMuonByPtBJetTags.tagInfos   = cms.VInputTag(cms.InputTag(jetname+"SoftPFMuonsTagInfos"))

        self.PositiveSoftPFMuonByPtBJetTags                = positiveSoftPFMuonByPtBJetTags.clone()
        self.PositiveSoftPFMuonByPtBJetTags.tagInfos       = cms.VInputTag(cms.InputTag(jetname+"SoftPFMuonsTagInfos"))

        # soft muon negative taggers
        self.NegativeSoftPFMuonByPtBJetTags                = negativeSoftPFMuonByPtBJetTags.clone()
        self.NegativeSoftPFMuonByPtBJetTags.tagInfos       = cms.VInputTag(cms.InputTag(jetname+"SoftPFMuonsTagInfos"))

        self.JetTracksAssociator = cms.Sequence(self.JetTracksAssociatorAtVertex)
        self.JetBtaggingIP       = cms.Sequence(self.ImpactParameterTagInfos * (
                self.TrackCountingHighEffBJetTags +
                self.TrackCountingHighPurBJetTags +
                self.JetProbabilityBJetTags +
                self.JetBProbabilityBJetTags 
                )
                                                )

        self.JetBtaggingSV = cms.Sequence(self.ImpactParameterTagInfos *
                self.SecondaryVertexTagInfos * (self.SimpleSecondaryVertexHighEffBJetTags +
                    self.SimpleSecondaryVertexHighPurBJetTags +
                    self.CombinedSecondaryVertexBJetTags +
                    self.CombinedSecondaryVertexV2BJetTags
                    )
                )

        self.JetBtaggingNegSV = cms.Sequence(self.ImpactParameterTagInfos *
                self.SecondaryVertexNegativeTagInfos * (self.NegativeSimpleSecondaryVertexHighEffBJetTags +
                    self.NegativeSimpleSecondaryVertexHighPurBJetTags +
                    self.NegativeCombinedSecondaryVertexBJetTags +
                    self.PositiveCombinedSecondaryVertexBJetTags +
                    self.NegativeCombinedSecondaryVertexV2BJetTags +
                    self.PositiveCombinedSecondaryVertexV2BJetTags
                    )
                )

        self.JetCandBtagging = cms.Sequence(self.pfImpactParameterTagInfos *
                                            self.pfSecondaryVertexTagInfos *
                                            self.pfDeepCSVTagInfos *
                                            self.pfDeepCSVJetTags
                                        )

        self.JetBtaggingMu = cms.Sequence(self.SoftPFMuonsTagInfos 
                                          * (self.SoftPFMuonBJetTags +
                                             self.SoftPFMuonByIP3dBJetTags +
                                             self.SoftPFMuonByPtBJetTags +
                                             self.NegativeSoftPFMuonByPtBJetTags +
                                             self.PositiveSoftPFMuonByPtBJetTags
            )
                                          )

        self.JetBtagging = cms.Sequence(self.JetBtaggingIP
                *self.JetBtaggingSV
                *self.JetBtaggingNegSV
                *self.JetCandBtagging                        
                *self.JetBtaggingMu
                )

        self.PatJetPartonAssociationLegacy       = patJetPartonAssociationLegacy.clone(
            jets = cms.InputTag(jetname+"Jets"),
            partons = cms.InputTag("myPartons")
            )

        self.PatJetFlavourAssociationLegacy      = patJetFlavourAssociationLegacy.clone(
            srcByReference = cms.InputTag(jetname+"PatJetPartonAssociationLegacy")
            )

        self.patJetFlavourIdLegacy = cms.Sequence( self.PatJetPartonAssociationLegacy * self.PatJetFlavourAssociationLegacy)

        self.PatJetPartons = patJetPartons.clone(particles = cms.InputTag("hiSignalGenParticles"))
        self.PatJetFlavourAssociation = patJetFlavourAssociation.clone(
            jets = cms.InputTag(jetname+"Jets"),
            rParam = rParam,
            bHadrons = cms.InputTag(jetname+"PatJetPartons","bHadrons"),
            cHadrons = cms.InputTag(jetname+"PatJetPartons","cHadrons"),
            leptons = cms.InputTag(jetname+"PatJetPartons","leptons"),
            partons = cms.InputTag(jetname+"PatJetPartons","physicsPartons")
            )

        self.PatJetFlavourId               = cms.Sequence(self.PatJetPartons*self.PatJetFlavourAssociation)
        #self.match   = patJetGenJetMatch.clone(
        #    src      = cms.InputTag(jetname+"Jets"),
        #    matched  = cms.InputTag(jetname+"clean"),
        #    maxDeltaR = rParam 
        #    )
        self.parton  = patJetPartonMatch.clone(src      = cms.InputTag(jetname+"Jets"),
                                                matched = cms.InputTag("genParticles")
                                                )