示例#1
0
def addFatJet(process):
    from RecoJets.JetProducers.ak5PFJets_cfi import ak5PFJets
    process.ca8PFJetsCHS = ak5PFJets.clone(
        src = 'pfNoPileUp',
        jetPtMin = cms.double(10.0),
        doAreaFastjet = cms.bool(True),
        rParam = cms.double(0.8),
        jetAlgorithm = cms.string("CambridgeAachen"),
    )

    jetSource = 'ca8PFJetsCHS'

    # corrections 
    from PhysicsTools.PatAlgos.recoLayer0.jetCorrFactors_cfi import patJetCorrFactors
    process.patJetCorrFactorsCA8CHS = patJetCorrFactors.clone()
    process.patJetCorrFactorsCA8CHS.src = jetSource
    # will need to add L2L3 corrections in the cfg
    process.patJetCorrFactorsCA8CHS.levels = ['L1FastJet', 'L2Relative', 'L3Absolute']
    process.patJetCorrFactorsCA8CHS.payload = 'AK7PFchs'
    process.patJetCorrFactorsCA8CHS.useRho = True

    # pat jet
    from PhysicsTools.PatAlgos.producersLayer1.jetProducer_cfi import patJets
    process.patJetsCA8CHS = patJets.clone()
    process.patJetsCA8CHS.jetSource = jetSource
    process.patJetsCA8CHS.addJetCharge = False
    process.patJetsCA8CHS.embedCaloTowers = False
    process.patJetsCA8CHS.embedPFCandidates = False
    process.patJetsCA8CHS.addAssociatedTracks = False
    process.patJetsCA8CHS.addBTagInfo = False
    process.patJetsCA8CHS.addDiscriminators = False
    process.patJetsCA8CHS.getJetMCFlavour = False
    process.patJetsCA8CHS.jetCorrFactorsSource = cms.VInputTag(cms.InputTag('patJetCorrFactorsCA8CHS'))
    process.patJetsCA8CHS.genPartonMatch = cms.InputTag('patJetPartonMatchCA8CHS')
    process.patJetsCA8CHS.genJetMatch = cms.InputTag('patJetGenJetMatchCA8CHS')

    from PhysicsTools.PatAlgos.selectionLayer1.jetSelector_cfi import selectedPatJets
    process.selectedPatJetsCA8CHS = selectedPatJets.clone()
    process.selectedPatJetsCA8CHS.src = 'patJetsCA8CHS'
    process.selectedPatJetsCA8CHS.cut = 'pt()>20'


#process.jetMCSequenceCA8CHS = cms.Sequence(
    #process.patJetPartonMatchCA8CHS +
    #process.genParticlesForJetsNoNu +
    #process.ca8GenJetsNoNu +
    #process.patJetGenJetMatchCA8CHS
    #)

    process.PATJetSequenceCA8CHS = cms.Sequence(
        process.ca8PFJetsCHS +
        #process.jetMCSequenceCA8CHS +
        process.patJetCorrFactorsCA8CHS
        #process.patJetsCA8CHS +
        #process.selectedPatJetsCA8CHS
        )

    process.PATJetPathCA8CHS = cms.Path ( process.PATJetSequenceCA8CHS )
示例#2
0
#####################################################################################
# Additional Reconstruction and Analysis: Main Body
#####################################################################################

####################################################################################

#############################
# Jets
#############################

### PP RECO does not include R=3 or R=5 jets.
### re-RECO is only possible for PF, RECO is missing calotowers
from RecoJets.JetProducers.ak5PFJets_cfi import ak5PFJets
ak5PFJets.doAreaFastjet = True
process.ak5PFJets = ak5PFJets
process.ak3PFJets = ak5PFJets.clone(rParam = 0.3)

process.load('HeavyIonsAnalysis.JetAnalysis.jets.ak4CaloJetSequence_pp_data_cff')

process.load('HeavyIonsAnalysis.JetAnalysis.jets.ak3PFJetSequence_pp_data_cff')
process.load('HeavyIonsAnalysis.JetAnalysis.jets.ak4PFJetSequence_pp_data_cff')
process.load('HeavyIonsAnalysis.JetAnalysis.jets.ak5PFJetSequence_pp_data_cff')

process.highPurityTracks = cms.EDFilter("TrackSelector",
                                        src = cms.InputTag("generalTracks"),
                                        cut = cms.string('quality("highPurity")')
                                        )



process.jetSequences = cms.Sequence(
def reSetJet(process):
    ## Filter out neutrinos from packed GenParticles
    process.packedGenParticlesForJetsNoNu = cms.EDFilter("CandPtrSelector", src = cms.InputTag("packedGenParticles"), cut = cms.string("abs(pdgId) != 12 && abs(pdgId) != 14 && abs(pdgId) != 16"))
    ## Define GenJets
    from RecoJets.JetProducers.ak5GenJets_cfi import ak5GenJets
    process.ak5GenJetsNoNu = ak5GenJets.clone(src = 'packedGenParticlesForJetsNoNu')

    ## Select charged hadron subtracted packed PF candidates
    process.pfCHS = cms.EDFilter("CandPtrSelector", src = cms.InputTag("packedPFCandidates"), cut = cms.string("fromPV"))
    from RecoJets.JetProducers.ak5PFJets_cfi import ak5PFJets
    ## Define PFJetsCHS
    process.ak5PFJetsCHS = ak5PFJets.clone(src = 'pfCHS', doAreaFastjet = True)

    #################################################
    ## Remake PAT jets
    #################################################

    ## b-tag discriminators
    bTagDiscriminators = [
        'pfCombinedInclusiveSecondaryVertexV2BJetTags'
    ]
#################################################################
    slimmedAddPileupInfo = cms.EDProducer(
       'PileupSummaryInfoSlimmer',
        src = cms.InputTag('addPileupInfo'),
        keepDetailedInfoFor = cms.vint32(0)
    )
#######################################################
    from PhysicsTools.PatAlgos.tools.jetTools import addJetCollection

    ## Add PAT jet collection based on the above-defined ak5PFJetsCHS
    addJetCollection(
        process,
        labelName = 'AK5PFCHS',
        jetSource = cms.InputTag('ak5PFJetsCHS'),
        pvSource = cms.InputTag('offlineSlimmedPrimaryVertices'),
        bsSource = cms.InputTag('offlineBeamSpot'),
        pfCandidates = cms.InputTag('packedPFCandidates'),
        svSource = cms.InputTag('slimmedSecondaryVertices'),
        btagDiscriminators = bTagDiscriminators,
        jetCorrections = ('AK5PFchs', ['L1FastJet', 'L2Relative', 'L3Absolute'], 'None'),
        genJetCollection = cms.InputTag('ak5GenJetsNoNu'),
        genParticles = cms.InputTag('prunedGenParticles'),
        algo = 'AK',
        rParam = 0.5
    )

    getattr(process,'selectedPatJetsAK5PFCHS').cut = cms.string('pt > 20.')

    process.rejet = cms.Path(process.packedGenParticlesForJetsNoNu *
                             process.ak5GenJetsNoNu *
                             process.pfCHS *
                             process.ak5PFJetsCHS *
                             process.patJetCorrFactorsAK5PFCHS *
                             process.patJetPartons *
                             process.patJetFlavourAssociationAK5PFCHS *
                             process.patJetPartonMatchAK5PFCHS *
                             process.patJetGenJetMatchAK5PFCHS *
                             process.pfImpactParameterTagInfosAK5PFCHS *
                             process.pfInclusiveSecondaryVertexFinderTagInfosAK5PFCHS *
                             process.pfCombinedInclusiveSecondaryVertexV2BJetTagsAK5PFCHS *
                             process.patJetsAK5PFCHS *
                             process.selectedPatJetsAK5PFCHS)

    from PhysicsTools.PatAlgos.tools.pfTools import adaptPVs
    ## Adapt primary vertex collection and BeamSpot
    adaptPVs(process, pvCollection=cms.InputTag('offlineSlimmedPrimaryVertices'))
    adaptBSs(process, bsCollection=cms.InputTag('offlineBeamSpot'))
AK12byRef = cms.EDProducer("JetPartonMatcher",
                          jets = cms.InputTag("AK12PFJets"),
                          coneSizeToAssociate = cms.double(0.3),
                          partons = cms.InputTag("partons")
                          )

AK12byValAlgo = cms.EDProducer("JetFlavourIdentifier",
                              srcByReference = cms.InputTag("AK12byRef"),
                              physicsDefinition = cms.bool(False),
                              leptonInfo = cms.bool(True))

AK12jetFlavor    = cms.Sequence(AK12byRef*AK12byValPhys*AK12byValAlgo)

#for each jet collection run Pruning, subjet b-tagging, quark gluon discrimination,n-subjettiness and subjet quark gluon discrimination
AK12PFJets = ak5PFJets.clone(
    rParam = cms.double(1.2),
    jetPtMin = cms.double(20)
    )

AK12caPFJetsPruned = ak5PFJetsPruned.clone(
    jetAlgorithm = cms.string("CambridgeAachen"),
    rParam = cms.double(1.2),
    doAreaFastjet = cms.bool(False),
    writeCompound = cms.bool(True),
    jetCollInstanceName=cms.string("SubJets"),
    jetPtMin = cms.double(20)
    )

from RecoJets.JetAssociationProducers.ic5JetTracksAssociatorAtVertex_cfi import ic5JetTracksAssociatorAtVertex
AK12jetTracksAssociatorAtVertex          = ic5JetTracksAssociatorAtVertex.clone()
AK12jetTracksAssociatorAtVertex  .jets   = cms.InputTag('AK12PFJets')
AK12jetTracksAssociatorAtVertex  .tracks = "generalTracks"
示例#5
0
import FWCore.ParameterSet.Config as cms

from RecoJets.JetProducers.PFJetParameters_cfi import *
from RecoJets.JetProducers.AnomalousCellParameters_cfi import *
from RecoJets.JetProducers.ak5PFJets_cfi import ak5PFJets

ak5PFJetsTrimmed = ak5PFJets.clone(
    useTrimming = cms.bool(True),
    rFilt = cms.double(0.2),
    trimPtFracMin = cms.double(0.03),
    useExplicitGhosts = cms.bool(True)
    )

def addPATSequences(process,runMC):
    # Load the PAT config
    from PhysicsTools.PatAlgos.patEventContent_cff import patEventContent
    process.out = cms.OutputModule("PoolOutputModule",
	    fileName = cms.untracked.string('patTuple.root'),
	    SelectEvents   = cms.untracked.PSet( SelectEvents = cms.vstring('pat_step') ),
	    outputCommands = cms.untracked.vstring('drop *', *patEventContent )
            )
    ###
    process.load('PhysicsTools.PatAlgos.patSequences_cff')

    from PhysicsTools.PatAlgos.tools.pfTools import usePF2PAT
    postfix = "PFlow"
    jetAlgo="AK5"
    jetCorrections = None
    if runMC:
	jetCorrections = ('AK5PFchs', ['L1FastJet','L2Relative','L3Absolute'])
    else:
	jetCorrections = ('AK5PFchs', ['L1FastJet','L2Relative','L3Absolute','L2L3Residual'])

    usePF2PAT(process,runPF2PAT=True,
                      jetAlgo=jetAlgo, runOnMC=runMC, postfix=postfix,jetCorrections=jetCorrections)

    #from PhysicsTools.PatAlgos.tools.coreTools import removeMCMatching
    #if not runMC:
    #    removeMCMatching(process, ['All'],"")

 
    #-----------------Customization----------------
    process.pfPileUpPFlow.Enable = True
    process.pfPileUpPFlow.checkClosestZVertex = False
    process.pfPileUpPFlow.Vertices = cms.InputTag('goodOfflinePrimaryVertices')
    process.pfPileUpPFlow.verbose = True
    process.pfJetsPFlow.doAreaFastjet = True
    process.pfJetsPFlow.doRhoFastjet = False

    from PhysicsTools.SelectorUtils.pvSelector_cfi import pvSelector
    process.goodOfflinePrimaryVertices = cms.EDFilter(
	"PrimaryVertexObjectFilter",
	filterParams = pvSelector.clone( minNdof = cms.double(4.0), maxZ = cms.double(24.0) ),
	src=cms.InputTag('offlinePrimaryVertices')
	)
    
    # Compute the mean pt per unit area (rho) from the PFCHS inputs
    #from RecoJets.Configuration.RecoPFJets_cff import kt6PFJets,ak5PFJets
    #process.kt6PFJetsPFlow = kt6PFJets.clone(
    #	src = cms.InputTag('pfNoElectron'+postfix),
    #	doAreaFastjet = cms.bool(True),
    #	doRhoFastjet = cms.bool(True)
    #	)
    #process.patJetCorrFactorsPFlow.rho = cms.InputTag("kt6PFJetsPFlow", "rho")
    from RecoJets.JetProducers.kt4PFJets_cfi import kt4PFJets
    process.kt6PFJetsForPAT = kt4PFJets.clone(
	    rParam = cms.double(0.6),
	    doAreaFastjet = cms.bool(True),
	    doRhoFastjet = cms.bool(True)
	    )
    process.patJetCorrFactorsPFlow.rho = cms.InputTag("kt6PFJetsForPAT", "rho")

    from RecoJets.JetProducers.ak5PFJets_cfi import ak5PFJets
    process.ak5PFJetsPileUp = ak5PFJets.clone( src = cms.InputTag('pfPileUp'+postfix) )

    # Switch on PAT trigger
    from PhysicsTools.PatAlgos.tools.trigTools import switchOnTrigger
    #switchOnTrigger( process,triggerProducer = 'patTrigger', triggerEventProducer = 'patTriggerEvent', sequence = 'patPF2PATSequence',hltProcess = 'HLT', outputModule = 'out')
    
    switchOnTrigger( process ,sequence ='patPF2PATSequence'+postfix)
    process.patTrigger.addL1Algos = cms.bool( True )
    switchOnTrigger( process ,sequence = 'patPF2PATSequence'+postfix) # to fix event content
    #-------------------------------------------------------------------------------------------------------------
    
    # Add modules to default sequence
    #if runMC:
    #    getattr(process, "patElectrons"+postfix).embedGenMatch = True
    #    getattr(process, "patMuons"+postfix).embedGenMatch = True
    #else:
    #    getattr(process, "patElectrons"+postfix).embedGenMatch = False
    #    getattr(process, "patMuons"+postfix).embedGenMatch = False

    # Add modules to default sequence
    getattr(process,"patPF2PATSequence"+postfix).replace(
	getattr(process,"pfNoElectron"+postfix),
	getattr(process,"pfNoElectron"+postfix)*process.kt6PFJetsForPAT
	)

    getattr(process,"patPF2PATSequence"+postfix).replace(
	getattr(process,"pfNoPileUp"+postfix),
	getattr(process,"pfNoPileUp"+postfix) * process.ak5PFJetsPileUp
	)

    #----------------------------------------------
    # Let it run
    process.pat_step = cms.Path(
	process.goodOfflinePrimaryVertices * 
	#process.patDefaultSequence  +
	getattr(process,"patPF2PATSequence"+postfix)
    )

    # Add PatTrigger output to the created file
    from PhysicsTools.PatAlgos.patEventContent_cff import patTriggerEventContent
    # Add PF2PAT output to the created file
    from PhysicsTools.PatAlgos.patEventContent_cff import patEventContentNoCleaning
    patOutputCommands = cms.untracked.vstring('drop *',
	    'keep recoPFCandidates_particleFlow_*_*',
	    *patEventContentNoCleaning) 

    # Adjust the event content
    patOutputCommands += [
	#'keep *_selectedPat*_*_*',
	'keep *_genParticles*_*_*',
	'keep *_offlinePrimaryVertices*_*_*',
	'keep *_goodOfflinePrimaryVertices*_*_*',
	#'keep *_pileUpN*PrimaryVertices_*_*',
	#'keep *_pfPileUpExclN*_*_*',
	'keep *_pfPileUpPFlow*_*_*',
	'keep *_pfNoPileUpPFlow*_*_*',
	'keep *_ak5PFJetsPileUp_*_*',
	'keep *_ak5PFJets_*_*',
	'keep recoTracks_generalTracks_*_*',
	'keep HcalNoiseSummary_hcalnoise_*_*',
	'keep *_BeamHaloSummary_*_*', 
     #------- Trigger collections ------
	'keep edmTriggerResults_TriggerResults_*_*',
	'keep *_hltTriggerSummaryAOD_*_*',
	'keep L1GlobalTriggerObjectMapRecord_*_*_*',
	'keep L1GlobalTriggerReadoutRecord_*_*_*',
     #------- CASTOR rec hits ------
	'keep *_logErrorHarvester_*_*', 
	'keep *_castorreco_*_*',
     #------- Calo towers (just for now) ------ 
	'keep *_towerMaker_*_*',
     #---------------PatTrigger----------------
	'keep patTriggerObjects_patTrigger*_*_*',
	'keep patTriggerFilters_patTrigger*_*_*',
	'keep patTriggerPaths_patTrigger*_*_*',
	'keep patTriggerEvent_patTriggerEvent*_*_*'
    ]
    process.out.outputCommands = patOutputCommands

    # top projections in PF2PAT:
    getattr(process,"pfNoPileUp"+postfix).enable = True 
    getattr(process,"pfNoMuon"+postfix).enable = True 
    getattr(process,"pfNoElectron"+postfix).enable = True 
    getattr(process,"pfNoTau"+postfix).enable = False 
    getattr(process,"pfNoJet"+postfix).enable = True

    # verbose flags for the PF2PAT modules
    getattr(process,"pfNoJet"+postfix).verbose = False
#jetPtMin       = cms.double(1.0),
#inputEtMin     = cms.double(1.1)
# )

#ak5PFJetsL2L3 = cms.EDProducer(
#    'PFJetCorrectionProducer',
#    src        = cms.InputTag('ak5PFJets'),
#    correctors = cms.vstring('ak5PFL2L3Residual')
#    )


#RECO jet Tracks

ueAntiKt5PFJet500 = ak5PFJets.clone(
src            = cms.InputTag('particleFlow'),
jetPtMin       = cms.double(1.0),
inputEtMin     = cms.double(0.5)
)

ueAntiKt5PFJet = ak5PFJets.clone(
src            = cms.InputTag('particleFlow'),
jetPtMin       = cms.double(1.0),
inputEtMin     = cms.double(0.9)
)

ueAntiKt5PFJet1500 = ak5PFJets.clone(
  src            = cms.InputTag('particleFlow'),
jetPtMin       = cms.double(1.0),
inputEtMin     = cms.double(1.5)
)
示例#8
0
AK7byRef = cms.EDProducer("JetPartonMatcher",
                          jets = cms.InputTag("AK7PFJets"),
                          coneSizeToAssociate = cms.double(0.3),
                          partons = cms.InputTag("partons")
                          )

AK7byValAlgo = cms.EDProducer("JetFlavourIdentifier",
                              srcByReference = cms.InputTag("AK7byRef"),
                              physicsDefinition = cms.bool(False),
                              leptonInfo = cms.bool(True))

AK7jetFlavor    = cms.Sequence(AK7byRef*AK7byValPhys*AK7byValAlgo)

#for each jet collection run Pruning, subjet b-tagging, quark gluon discrimination,n-subjettiness and subjet quark gluon discrimination
AK7PFJets = ak5PFJets.clone(
    rParam = cms.double(0.7),
    jetPtMin = cms.double(20)
    )

AK7caPFJetsPruned = ak5PFJetsPruned.clone(
    jetAlgorithm = cms.string("CambridgeAachen"),
    rParam = cms.double(0.7),
    doAreaFastjet = cms.bool(False),
    writeCompound = cms.bool(True),
    jetCollInstanceName=cms.string("SubJets"),
    jetPtMin = cms.double(20)
    )

from RecoJets.JetAssociationProducers.ic5JetTracksAssociatorAtVertex_cfi import ic5JetTracksAssociatorAtVertex
AK7jetTracksAssociatorAtVertex          = ic5JetTracksAssociatorAtVertex.clone()
AK7jetTracksAssociatorAtVertex  .jets   = cms.InputTag('AK7PFJets')
AK7jetTracksAssociatorAtVertex  .tracks = "generalTracks"
示例#9
0
process.patJets.addTagInfos  = True

# rho2.5 calculation
process.load("RecoJets.JetProducers.kt4PFJets_cfi")
process.kt6PFJetsForIsolation = process.kt4PFJets.clone( rParam = 0.6, doRhoFastjet = True )
process.kt6PFJetsForIsolation.Rho_EtaMax = cms.double(2.5)

# This is only needed if using the obsolete jetTools.py from VHbbAnalysis/additionalFiles
if not hasattr(process,'kt6PFJets'):
    setattr(process,'kt6PFJets', process.kt4PFJets.clone(doAreaFastjet=True, doRhoFastjet=True, rParam=0.6))

process.kt6PFJets25 = process.kt4PFJets.clone( src = 'pfNoElectron'+postfix,rParam = 0.6,doRhoFastjet = True,Ghost_EtaMax = 2.5, Rho_EtaMax = 2.5 )
process.kt6PFJetsCentralNeutral = process.kt6PFJets.clone( src = cms.InputTag("pfAllNeutralHadronsAndPhotons"+postfix), Ghost_EtaMax = cms.double(3.1), Rho_EtaMax = cms.double(2.5), inputEtMin = cms.double(0.5) )

from RecoJets.JetProducers.ak5PFJets_cfi import ak5PFJets
process.ak7PFJets = ak5PFJets.clone( rParam = cms.double(0.7) )
addJetCollection(process,cms.InputTag("ak7PFJets"),"AK7","PF", doJTA=True,doBTagging=True,jetCorrLabel=('AK7PF',  inputJetCorrLabel), doType1MET=False,doL1Cleaning = False,doL1Counters=False,doJetID = False)



# ------------------------------------------------------------------------------
# Jet Substructure (FastJet 2)
# ------------------------------------------------------------------------------
from PhysicsTools.PatAlgos.tools.jetTools import *

#process.load('RecoJets.JetProducers.caSubjetFilterPFJets_cfi')
from RecoJets.JetProducers.caSubjetFilterPFJets_cfi import caSubjetFilterPFJets
process.caVHPFJets = caSubjetFilterPFJets.clone(src=cms.InputTag('pfNoElectron'+postfix),useAdjacency = cms.int32(0))

#process.load('RecoJets.JetProducers.caSubjetFilterGenJets_cfi')
from RecoJets.JetProducers.caSubjetFilterGenJets_cfi import caSubjetFilterGenJets
def reSetJet(process):
    ## Filter out neutrinos from packed GenParticles
    process.packedGenParticlesForJetsNoNu = cms.EDFilter(
        "CandPtrSelector",
        src=cms.InputTag("packedGenParticles"),
        cut=cms.string(
            "abs(pdgId) != 12 && abs(pdgId) != 14 && abs(pdgId) != 16"))
    ## Define GenJets
    from RecoJets.JetProducers.ak5GenJets_cfi import ak5GenJets
    process.ak5GenJetsNoNu = ak5GenJets.clone(
        src='packedGenParticlesForJetsNoNu')

    ## Select charged hadron subtracted packed PF candidates
    process.pfCHS = cms.EDFilter("CandPtrSelector",
                                 src=cms.InputTag("packedPFCandidates"),
                                 cut=cms.string("fromPV"))
    from RecoJets.JetProducers.ak5PFJets_cfi import ak5PFJets
    ## Define PFJetsCHS
    process.ak5PFJetsCHS = ak5PFJets.clone(src='pfCHS', doAreaFastjet=True)

    #################################################
    ## Remake PAT jets
    #################################################

    ## b-tag discriminators
    bTagDiscriminators = ['pfCombinedInclusiveSecondaryVertexV2BJetTags']
    #################################################################
    slimmedAddPileupInfo = cms.EDProducer(
        'PileupSummaryInfoSlimmer',
        #src = cms.InputTag('addPileupInfo'),
        keepDetailedInfoFor=cms.vint32(0))
    #######################################################
    from PhysicsTools.PatAlgos.tools.jetTools import addJetCollection

    ## Add PAT jet collection based on the above-defined ak5PFJetsCHS
    addJetCollection(
        process,
        labelName='AK5PFCHS',
        jetSource=cms.InputTag('ak5PFJetsCHS'),
        pvSource=cms.InputTag('offlineSlimmedPrimaryVertices'),
        bsSource=cms.InputTag('offlineBeamSpot'),
        pfCandidates=cms.InputTag('packedPFCandidates'),
        svSource=cms.InputTag('slimmedSecondaryVertices'),
        btagDiscriminators=bTagDiscriminators,
        #jetCorrections = ('AK5PFchs', ['L1FastJet', 'L2Relative', 'L3Absolute'], 'None'),  #commented before adding jet corrections
        genJetCollection=cms.InputTag('ak5GenJetsNoNu'),
        genParticles=cms.InputTag('prunedGenParticles'),
        algo='AK',
        rParam=0.5)

    getattr(process, 'selectedPatJetsAK5PFCHS').cut = cms.string('pt > 20.')

    process.rejet = cms.Path(
        process.packedGenParticlesForJetsNoNu * process.ak5GenJetsNoNu *
        process.pfCHS * process.ak5PFJetsCHS *
        process.patJetCorrFactorsAK5PFCHS * process.patJetPartons *
        process.patJetFlavourAssociationAK5PFCHS *
        process.patJetPartonMatchAK5PFCHS * process.patJetGenJetMatchAK5PFCHS *
        process.pfImpactParameterTagInfosAK5PFCHS *
        process.pfInclusiveSecondaryVertexFinderTagInfosAK5PFCHS *
        process.pfCombinedInclusiveSecondaryVertexV2BJetTagsAK5PFCHS *
        process.patJetsAK5PFCHS * process.selectedPatJetsAK5PFCHS)

    from PhysicsTools.PatAlgos.tools.pfTools import adaptPVs
    ## Adapt primary vertex collection and BeamSpot
    adaptPVs(process,
             pvCollection=cms.InputTag('offlineSlimmedPrimaryVertices'))
    adaptBSs(process, bsCollection=cms.InputTag('offlineBeamSpot'))

    from PhysicsTools.PatAlgos.tools.jetTools import updateJetCollection
    updateJetCollection(
        process,
        jetSource=cms.InputTag('slimmedJets'),
        labelName='UpdatedJEC',
        jetCorrections=('AK5PFchs',
                        cms.vstring(['L1FastJet', 'L2Relative', 'L3Absolute']),
                        'None')  # Do not forget 'L2L3Residual' on data
    )

    process.load('Configuration.StandardSequences.Services_cff'
                 )  #Added info from now onwards
    process.load("JetMETCorrections.Modules.JetResolutionESProducer_cfi")

    from CondCore.DBCommon.CondDBSetup_cfi import *
    import os
    process.jer = cms.ESSource(
        "PoolDBESSource",
        CondDBSetup,
        toGet=cms.VPSet(
            # Resolution
            cms.PSet(
                record=cms.string('JetResolutionRcd'),
                tag=cms.string('JR_Fall15_25nsV2_MC_PtResolution_AK5PFchs'),
                label=cms.untracked.string('AK5PFchs_pt')),

            # Scale factors
            cms.PSet(record=cms.string('JetResolutionScaleFactorRcd'),
                     tag=cms.string('JR_Fall15_25nsV2_MC_SF_AK4PFchs'),
                     label=cms.untracked.string('AK5PFchs')),
        ),
        connect=cms.string('sqlite:Fall15_25nsV2_MC.db'))
    process.es_prefer_jer = cms.ESPrefer('PoolDBESSource', 'jer')
示例#11
0
#-------------------------------------------------------------------------
from PhysicsTools.JetMCAlgos.HadronAndPartonSelector_cfi import selectedHadronsAndPartons
process.selectedHadronsAndPartons = selectedHadronsAndPartons.clone()

from PhysicsTools.JetMCAlgos.AK5PFJetsMCFlavourInfos_cfi import ak5JetFlavourInfos
process.jetFlavourInfosAK5PFJets = ak5JetFlavourInfos.clone()

process.printEventAK5PFJets = cms.EDAnalyzer(
    "printJetFlavourInfo",
    jetFlavourInfos=cms.InputTag("jetFlavourInfosAK5PFJets"))
#-------------------------------------------------------------------------
# AK8 fat jets and pruned subjets
#-------------------------------------------------------------------------
from RecoJets.JetProducers.ak5PFJets_cfi import ak5PFJets
process.ak8PFJets = ak5PFJets.clone(
    rParam=cms.double(0.8),
    src=cms.InputTag("particleFlow"),
)

from RecoJets.JetProducers.ak5PFJetsPruned_cfi import ak5PFJetsPruned
process.ak8PFJetsPruned = ak5PFJetsPruned.clone(
    rParam=cms.double(0.8),
    src=cms.InputTag("particleFlow"),
    writeCompound=cms.bool(True),
    jetCollInstanceName=cms.string("SubJets"))

process.jetFlavourInfosAK8PFJets = cms.EDProducer(
    "JetFlavourClustering",
    jets=cms.InputTag("ak8PFJets"),
    groomedJets=cms.InputTag("ak8PFJetsPruned"),
    subjets=cms.InputTag("ak8PFJetsPruned", "SubJets"),
    bHadrons=cms.InputTag("selectedHadronsAndPartons", "bHadrons"),
示例#12
0
# For CMSSW_5XY, this should be taken from RECO or AOD: double_kt6PFJetsCentralNeutral_rho_RECO
process.kt6PFJetsCentralNeutral = kt4PFJets.clone(
    src=cms.InputTag("pfAllNeutralHadronsAndPhotons" + postfix),
    rParam=0.6,
    doRhoFastjet=True,
    doAreaFastjet=True,
    Ghost_EtaMax=3.1,
    Rho_EtaMax=2.5,
    inputEtMin=0.5,
    #voronoiRfact     = 0.9,  # default is -0.9
)

from RecoJets.JetProducers.ak5PFJets_cfi import ak5PFJets

process.ak7PFJets = ak5PFJets.clone(  # clone from process.ak5PFJets instead?
    rParam=0.7, )

addJetCollection(
    process,
    cms.InputTag("ak7PFJets"),
    "AK7",
    "PF",
    doJTA=True,
    doBTagging=True,
    jetCorrLabel=("AK7PF", inputJetCorrLabel),
    doType1MET=False,
    doL1Cleaning=False,
    doL1Counters=False,
    genJetCollection=(cms.InputTag("ak7GenJets") if RUN_ON_MC else None),
    doJetID=False,
    jetIdLabel="ak7",
示例#13
0
import FWCore.ParameterSet.Config as cms

from RecoJets.JetProducers.PFJetParameters_cfi import *
from RecoJets.JetProducers.AnomalousCellParameters_cfi import *
from RecoJets.JetProducers.ak5PFJets_cfi import ak5PFJets

ak5PFJetsFiltered = ak5PFJets.clone(useFiltering=cms.bool(True),
                                    nFilt=cms.int32(3),
                                    rFilt=cms.double(0.3),
                                    useExplicitGhosts=cms.bool(True),
                                    writeCompound=cms.bool(True),
                                    jetCollInstanceName=cms.string("SubJets"))

ak5PFJetsMassDropFiltered = ak5PFJetsFiltered.clone(
    useMassDropTagger=cms.bool(True),
    muCut=cms.double(0.667),
    yCut=cms.double(0.08),
    writeCompound=cms.bool(True),
    jetCollInstanceName=cms.string("SubJets"))
示例#14
0
import FWCore.ParameterSet.Config as cms
from RecoJets.JetProducers.ak5PFJets_cfi import ak5PFJets
ak5PFJets.doAreaFastjet = True
ak5PFJets.jetPtMin = 1
from RecoJets.JetProducers.ak5CaloJets_cfi import ak5CaloJets
ak5CaloJets.doAreaFastjet = True
ak5CaloJets.jetPtMin = 1

ak1PFJets = ak5PFJets.clone(rParam=0.1)
ak2PFJets = ak5PFJets.clone(rParam=0.2)
ak3PFJets = ak5PFJets.clone(rParam=0.3)
ak4PFJets = ak5PFJets.clone(rParam=0.4)
ak6PFJets = ak5PFJets.clone(rParam=0.6)

ak1CaloJets = ak5CaloJets.clone(rParam=0.1)
ak2CaloJets = ak5CaloJets.clone(rParam=0.2)
ak3CaloJets = ak5CaloJets.clone(rParam=0.3)
ak4CaloJets = ak5CaloJets.clone(rParam=0.4)
ak6CaloJets = ak5CaloJets.clone(rParam=0.6)

ppReRecoPFJets = cms.Sequence(ak1PFJets + ak2PFJets + ak3PFJets + ak4PFJets +
                              ak5PFJets + ak6PFJets)

ppReRecoCaloJets = cms.Sequence(ak1CaloJets + ak2CaloJets + ak3CaloJets +
                                ak4CaloJets + ak5CaloJets + ak6CaloJets)
示例#15
0
# For CMSSW_5XY, this should be taken from RECO or AOD: double_kt6PFJetsCentralNeutral_rho_RECO
process.kt6PFJetsCentralNeutral = kt4PFJets.clone(
    src=cms.InputTag("pfAllNeutralHadronsAndPhotons" + postfix),
    rParam=0.6,
    doRhoFastjet=True,
    doAreaFastjet=True,
    Ghost_EtaMax=3.1,
    Rho_EtaMax=2.5,
    inputEtMin=0.5,
    # voronoiRfact     = 0.9,  # default is -0.9
)

from RecoJets.JetProducers.ak5PFJets_cfi import ak5PFJets

process.ak7PFJets = ak5PFJets.clone(rParam=0.7)  # clone from process.ak5PFJets instead?

addJetCollection(
    process,
    cms.InputTag("ak7PFJets"),
    "AK7",
    "PF",
    doJTA=True,
    doBTagging=True,
    jetCorrLabel=("AK7PF", inputJetCorrLabel),
    doType1MET=False,
    doL1Cleaning=False,
    doL1Counters=False,
    genJetCollection=(cms.InputTag("ak7GenJets") if RUN_ON_MC else None),
    doJetID=False,
    jetIdLabel="ak7",
示例#16
0
import FWCore.ParameterSet.Config as cms

from RecoJets.JetProducers.PFJetParameters_cfi import *
from RecoJets.JetProducers.AnomalousCellParameters_cfi import *
from RecoJets.JetProducers.ak5PFJets_cfi import ak5PFJets
from RecoJets.JetProducers.SubJetParameters_cfi import SubJetParameters

ak5PFJetsPruned = ak5PFJets.clone(
    SubJetParameters,
    usePruning = cms.bool(True),
    useExplicitGhosts = cms.bool(True),
    writeCompound = cms.bool(True),
    jetCollInstanceName=cms.string("SubJets")
    )

示例#17
0
import FWCore.ParameterSet.Config as cms

from RecoJets.JetProducers.sc5PFJets_cfi import sisCone5PFJets
from RecoJets.JetProducers.ic5PFJets_cfi import iterativeCone5PFJets
from RecoJets.JetProducers.ak5PFJets_cfi import ak5PFJets
from RecoJets.JetProducers.ak5PFJetsTrimmed_cfi import ak5PFJetsTrimmed
from RecoJets.JetProducers.ak5PFJetsFiltered_cfi import ak5PFJetsFiltered, ak5PFJetsMassDropFiltered
from RecoJets.JetProducers.ak5PFJetsPruned_cfi import ak5PFJetsPruned
from RecoJets.JetProducers.gk5PFJets_cfi import gk5PFJets
from RecoJets.JetProducers.kt4PFJets_cfi import kt4PFJets
from RecoJets.JetProducers.ca4PFJets_cfi import ca4PFJets
from RecoJets.JetProducers.fixedGridRhoProducer_cfi import fixedGridRhoAll
from RecoJets.JetProducers.fixedGridRhoProducerFastjet_cfi import fixedGridRhoFastjetAll

sisCone7PFJets = sisCone5PFJets.clone(rParam=0.7)
ak7PFJets = ak5PFJets.clone(rParam=0.7)
gk7PFJets = gk5PFJets.clone(rParam=0.7)
kt6PFJets = kt4PFJets.clone(rParam=0.6)
ca6PFJets = ca4PFJets.clone(rParam=0.6)

#compute areas for Fastjet PU subtraction
kt6PFJets.doRhoFastjet = True
kt6PFJets.doAreaFastjet = True
#use active areas and not Voronoi tessellation for the moment
kt6PFJets.voronoiRfact = 0.9
ak5PFJets.doAreaFastjet = True
ak5PFJetsTrimmed.doAreaFastjet = True
ak7PFJets.doAreaFastjet = True

kt6PFJetsCentralChargedPileUp = kt6PFJets.clone(
    src=cms.InputTag("pfPileUpAllChargedParticles"),
示例#18
0
#-# Copyright (c) 2014 - All Rights Reserved
#-#   Fabio Colombo <*****@*****.**>
#-#   Joram Berger <*****@*****.**>

import FWCore.ParameterSet.Config as cms

## ------------------------------------------------------------------------
## Create ak5 jets from all pf candidates and from pfNoPileUp candidates
##  - note that this requires that goodOfflinePrimaryVertices and PFBRECO
##    has been run beforehand. e.g. using the sequence makePFBRECO from
##    KPFCandidates_cff.py
from RecoJets.JetProducers.ak5PFJets_cfi import ak5PFJets

ak5PFJets.srcPVs = cms.InputTag('goodOfflinePrimaryVertices')
ak5PFJetsCHS = ak5PFJets.clone( src = cms.InputTag('pfNoPileUp') )

## ------------------------------------------------------------------------
## Gluon tagging
##  - https://twiki.cern.ch/twiki/bin/viewauth/CMS/GluonTag
from QuarkGluonTagger.EightTeV.QGTagger_RecoJets_cff import *

QGTagger.srcJets     = cms.InputTag('ak5PFJets')
AK5PFJetsQGTagger    = QGTagger.clone()
AK5PFJetsCHSQGTagger = QGTagger.clone( srcJets = cms.InputTag('ak5PFJetsCHS'), useCHS = cms.untracked.bool(True) )

## ------------------------------------------------------------------------
## B-tagging (for ak5 jets)
##  - https://twiki.cern.ch/twiki/bin/view/CMSPublic/WorkBookBTagging#DifferentJets
from RecoJets.JetAssociationProducers.ic5JetTracksAssociatorAtVertex_cfi import *
from RecoBTag.Configuration.RecoBTag_cff import *
from RecoBTag.SoftLepton.softPFElectronTagInfos_cfi import softPFElectronsTagInfos
import FWCore.ParameterSet.Config as cms

### PP RECO does not include R=3 or R=5 jets.
### re-RECO is only possible for PF, RECO is missing calotowers
from RecoJets.JetProducers.ak5PFJets_cfi import ak5PFJets
ak5PFJets.doAreaFastjet = True
ak3PFJets = ak5PFJets.clone(rParam = 0.3)
from RecoJets.JetProducers.ak5GenJets_cfi import ak5GenJets
ak3GenJets = ak5GenJets.clone(rParam = 0.3)

from RecoJets.Configuration.GenJetParticles_cff import *
from RecoHI.HiJetAlgos.HiGenJets_cff import *
from HeavyIonsAnalysis.JetAnalysis.makePartons_cff import *
from HeavyIonsAnalysis.JetAnalysis.jets.ak3PFJetSequence_pp_mc_cff import *
from HeavyIonsAnalysis.JetAnalysis.jets.ak4PFJetSequence_pp_mc_cff import *
from HeavyIonsAnalysis.JetAnalysis.jets.ak5PFJetSequence_pp_mc_cff import *
from HeavyIonsAnalysis.JetAnalysis.jets.ak4CaloJetSequence_pp_mc_cff import *

highPurityTracks = cms.EDFilter("TrackSelector",
                                src = cms.InputTag("generalTracks"),
                                cut = cms.string('quality("highPurity")')
)

# Other radii jets and calo jets need to be reconstructed
jetSequences = cms.Sequence(
    genParticlesForJets +
    ak3GenJets +
    ak5GenJets +
    ak3PFJets +
    ak5PFJets +
    makePartons +
示例#20
0
import FWCore.ParameterSet.Config as cms

# Remake AK5 jets from packedPFcandidates
# See: https://twiki.cern.ch/twiki/bin/view/CMSPublic/WorkBookMiniAOD#Advanced_topics_re_clustering_ev

## Filter out neutrinos from packed GenParticles
packedGenParticlesForJetsNoNu = cms.EDFilter("CandPtrSelector", src = cms.InputTag("packedGenParticles"), cut = cms.string("abs(pdgId) != 12 && abs(pdgId) != 14 && abs(pdgId) != 16"))
## Define GenJets
from RecoJets.JetProducers.ak5GenJets_cfi import ak5GenJets
ak5GenJetsNoNu = ak5GenJets.clone(src = 'packedGenParticlesForJetsNoNu')

## Select charged hadron subtracted packed PF candidates
pfCHS = cms.EDFilter("CandPtrSelector", src = cms.InputTag("packedPFCandidates"), cut = cms.string("fromPV"))
from RecoJets.JetProducers.ak5PFJets_cfi import ak5PFJets
## Define ak5PFJetsCHS
ak5PFJetsCHS = ak5PFJets.clone(src = 'pfCHS', doAreaFastjet = True)
## Define ak5PFJets
ak5PFJets = ak5PFJets.clone(src = 'packedPFCandidates')

ak5PFJetsSequence = cms.Sequence(
  packedGenParticlesForJetsNoNu*
  ak5GenJetsNoNu*
  pfCHS*
  ak5PFJetsCHS*
  ak5PFJets
)
示例#21
0
def addPATSequences(process, runMC):
    # Load the PAT config
    from PhysicsTools.PatAlgos.patEventContent_cff import patEventContent
    process.out = cms.OutputModule(
        "PoolOutputModule",
        fileName=cms.untracked.string('patTuple.root'),
        SelectEvents=cms.untracked.PSet(SelectEvents=cms.vstring('pat_step')),
        outputCommands=cms.untracked.vstring('drop *', *patEventContent))
    ###
    process.load('PhysicsTools.PatAlgos.patSequences_cff')

    from PhysicsTools.PatAlgos.tools.pfTools import usePF2PAT
    postfix = "PFlow"
    jetAlgo = "AK5"
    jetCorrections = None
    if runMC:
        jetCorrections = ('AK5PFchs',
                          ['L1FastJet', 'L2Relative', 'L3Absolute'])
    else:
        jetCorrections = ('AK5PFchs', [
            'L1FastJet', 'L2Relative', 'L3Absolute', 'L2L3Residual'
        ])

    usePF2PAT(process,
              runPF2PAT=True,
              jetAlgo=jetAlgo,
              runOnMC=runMC,
              postfix=postfix,
              jetCorrections=jetCorrections)

    #from PhysicsTools.PatAlgos.tools.coreTools import removeMCMatching
    #if not runMC:
    #    removeMCMatching(process, ['All'],"")

    #-----------------Customization----------------
    process.pfPileUpPFlow.Enable = True
    process.pfPileUpPFlow.checkClosestZVertex = False
    process.pfPileUpPFlow.Vertices = cms.InputTag('goodOfflinePrimaryVertices')
    process.pfPileUpPFlow.verbose = True
    process.pfJetsPFlow.doAreaFastjet = True
    process.pfJetsPFlow.doRhoFastjet = False

    from PhysicsTools.SelectorUtils.pvSelector_cfi import pvSelector
    process.goodOfflinePrimaryVertices = cms.EDFilter(
        "PrimaryVertexObjectFilter",
        filterParams=pvSelector.clone(minNdof=cms.double(4.0),
                                      maxZ=cms.double(24.0)),
        src=cms.InputTag('offlinePrimaryVertices'))

    # Compute the mean pt per unit area (rho) from the PFCHS inputs
    #from RecoJets.Configuration.RecoPFJets_cff import kt6PFJets,ak5PFJets
    #process.kt6PFJetsPFlow = kt6PFJets.clone(
    #	src = cms.InputTag('pfNoElectron'+postfix),
    #	doAreaFastjet = cms.bool(True),
    #	doRhoFastjet = cms.bool(True)
    #	)
    #process.patJetCorrFactorsPFlow.rho = cms.InputTag("kt6PFJetsPFlow", "rho")
    from RecoJets.JetProducers.kt4PFJets_cfi import kt4PFJets
    process.kt6PFJetsForPAT = kt4PFJets.clone(rParam=cms.double(0.6),
                                              doAreaFastjet=cms.bool(True),
                                              doRhoFastjet=cms.bool(True))
    process.patJetCorrFactorsPFlow.rho = cms.InputTag("kt6PFJetsForPAT", "rho")

    from RecoJets.JetProducers.ak5PFJets_cfi import ak5PFJets
    process.ak5PFJetsPileUp = ak5PFJets.clone(src=cms.InputTag('pfPileUp' +
                                                               postfix))

    # Switch on PAT trigger
    from PhysicsTools.PatAlgos.tools.trigTools import switchOnTrigger
    #switchOnTrigger( process,triggerProducer = 'patTrigger', triggerEventProducer = 'patTriggerEvent', sequence = 'patPF2PATSequence',hltProcess = 'HLT', outputModule = 'out')

    switchOnTrigger(process, sequence='patPF2PATSequence' + postfix)
    process.patTrigger.addL1Algos = cms.bool(True)
    switchOnTrigger(process, sequence='patPF2PATSequence' +
                    postfix)  # to fix event content
    #-------------------------------------------------------------------------------------------------------------

    # Add modules to default sequence
    #if runMC:
    #    getattr(process, "patElectrons"+postfix).embedGenMatch = True
    #    getattr(process, "patMuons"+postfix).embedGenMatch = True
    #else:
    #    getattr(process, "patElectrons"+postfix).embedGenMatch = False
    #    getattr(process, "patMuons"+postfix).embedGenMatch = False

    # Add modules to default sequence
    getattr(process, "patPF2PATSequence" + postfix).replace(
        getattr(process, "pfNoElectron" + postfix),
        getattr(process, "pfNoElectron" + postfix) * process.kt6PFJetsForPAT)

    getattr(process, "patPF2PATSequence" + postfix).replace(
        getattr(process, "pfNoPileUp" + postfix),
        getattr(process, "pfNoPileUp" + postfix) * process.ak5PFJetsPileUp)

    #----------------------------------------------
    # Let it run
    process.pat_step = cms.Path(
        process.goodOfflinePrimaryVertices *
        #process.patDefaultSequence  +
        getattr(process, "patPF2PATSequence" + postfix))

    # Add PatTrigger output to the created file
    from PhysicsTools.PatAlgos.patEventContent_cff import patTriggerEventContent
    # Add PF2PAT output to the created file
    from PhysicsTools.PatAlgos.patEventContent_cff import patEventContentNoCleaning
    patOutputCommands = cms.untracked.vstring(
        'drop *', 'keep recoPFCandidates_particleFlow_*_*',
        *patEventContentNoCleaning)

    # Adjust the event content
    patOutputCommands += [
        #'keep *_selectedPat*_*_*',
        'keep *_genParticles*_*_*',
        'keep *_offlinePrimaryVertices*_*_*',
        'keep *_goodOfflinePrimaryVertices*_*_*',
        #'keep *_pileUpN*PrimaryVertices_*_*',
        #'keep *_pfPileUpExclN*_*_*',
        'keep *_pfPileUpPFlow*_*_*',
        'keep *_pfNoPileUpPFlow*_*_*',
        'keep *_ak5PFJetsPileUp_*_*',
        'keep *_ak5PFJets_*_*',
        'keep recoTracks_generalTracks_*_*',
        'keep HcalNoiseSummary_hcalnoise_*_*',
        'keep *_BeamHaloSummary_*_*',
        #------- Trigger collections ------
        'keep edmTriggerResults_TriggerResults_*_*',
        'keep *_hltTriggerSummaryAOD_*_*',
        'keep L1GlobalTriggerObjectMapRecord_*_*_*',
        'keep L1GlobalTriggerReadoutRecord_*_*_*',
        #------- CASTOR rec hits ------
        'keep *_logErrorHarvester_*_*',
        'keep *_castorreco_*_*',
        #------- Calo towers (just for now) ------
        'keep *_towerMaker_*_*',
        #---------------PatTrigger----------------
        'keep patTriggerObjects_patTrigger*_*_*',
        'keep patTriggerFilters_patTrigger*_*_*',
        'keep patTriggerPaths_patTrigger*_*_*',
        'keep patTriggerEvent_patTriggerEvent*_*_*'
    ]
    process.out.outputCommands = patOutputCommands

    # top projections in PF2PAT:
    getattr(process, "pfNoPileUp" + postfix).enable = True
    getattr(process, "pfNoMuon" + postfix).enable = True
    getattr(process, "pfNoElectron" + postfix).enable = True
    getattr(process, "pfNoTau" + postfix).enable = False
    getattr(process, "pfNoJet" + postfix).enable = True

    # verbose flags for the PF2PAT modules
    getattr(process, "pfNoJet" + postfix).verbose = False
示例#22
0
from CommonTools.ParticleFlow.pfNoPileUpJME_cff  import *
from RecoJets.JetProducers.gk5PFJets_cfi import gk5PFJets
from RecoJets.JetProducers.kt4PFJets_cfi import kt4PFJets
from RecoJets.JetProducers.ca4PFJets_cfi import ca4PFJets
from RecoJets.JetProducers.fixedGridRhoProducer_cfi import fixedGridRhoAll
from RecoJets.JetProducers.fixedGridRhoProducerFastjet_cfi import fixedGridRhoFastjetAll
from RecoJets.JetProducers.caTopTaggers_cff import *
from RecoJets.JetProducers.ak8PFJetsCHS_groomingValueMaps_cfi import ak8PFJetsCHSPrunedLinks, ak8PFJetsCHSFilteredLinks, ak8PFJetsCHSTrimmedLinks, ak8PFJetsCHSSoftDropLinks
from RecoJets.JetProducers.ca8PFJetsCHS_groomingValueMaps_cfi import ca8PFJetsCHSPrunedLinks, ca8PFJetsCHSFilteredLinks, ca8PFJetsCHSTrimmedLinks, ca8PFJetsCHSSoftDropLinks
from CommonTools.PileupAlgos.Puppi_cff import puppi
from CommonTools.PileupAlgos.softKiller_cfi import softKiller
from RecoJets.JetProducers.ak4PFJetsPuppi_cfi import ak4PFJetsPuppi
from RecoJets.JetProducers.ak4PFJetsSK_cfi import ak4PFJetsSK

sisCone7PFJets = sisCone5PFJets.clone( rParam = 0.7 )
ak7PFJets = ak5PFJets.clone( rParam = 0.7 )
ak8PFJets = ak5PFJets.clone( rParam = 0.8 )
gk7PFJets = gk5PFJets.clone( rParam = 0.7 )
kt6PFJets = kt4PFJets.clone( rParam = 0.6 )
ca8PFJets = ca4PFJets.clone( rParam = 0.8 )

#compute areas for Fastjet PU subtraction  
kt6PFJets.doRhoFastjet = True
kt6PFJets.doAreaFastjet = True
#use active areas and not Voronoi tessellation for the moment
kt6PFJets.voronoiRfact = 0.9
ak4PFJets.doAreaFastjet = True
ak5PFJets.doAreaFastjet = True
ak5PFJetsTrimmed.doAreaFastjet = True
ak7PFJets.doAreaFastjet = True
ak8PFJets.doAreaFastjet = True
示例#23
0
#-#   Joram Berger <*****@*****.**>

import FWCore.ParameterSet.Config as cms
import Kappa.Skimming.tools as tools

cmssw_version_number = tools.get_cmssw_version_number()

## ------------------------------------------------------------------------
## Create ak5 jets from all pf candidates and from pfNoPileUp candidates
##  - note that this requires that goodOfflinePrimaryVertices and PFBRECO
##    has been run beforehand. e.g. using the sequence makePFBRECO from
##    KPFCandidates_cff.py
from RecoJets.JetProducers.ak5PFJets_cfi import ak5PFJets

ak5PFJets.srcPVs = cms.InputTag('goodOfflinePrimaryVertices')
ak5PFJetsCHS = ak5PFJets.clone( src = cms.InputTag('pfNoPileUp') )

### ------------------------------------------------------------------------
### Gluon tagging
###  - https://twiki.cern.ch/twiki/bin/viewauth/CMS/GluonTag
##from QuarkGluonTagger.EightTeV.QGTagger_RecoJets_cff import *

##QGTagger.srcJets     = cms.InputTag('ak5PFJets')
##AK5PFJetsQGTagger    = QGTagger.clone()
##AK5PFJetsCHSQGTagger = QGTagger.clone( srcJets = cms.InputTag('ak5PFJetsCHS'), useCHS = cms.untracked.bool(True) )

## ------------------------------------------------------------------------
## B-tagging (for ak5 jets)
##  - https://twiki.cern.ch/twiki/bin/view/CMSPublic/WorkBookBTagging#DifferentJets
from RecoJets.JetAssociationProducers.ic5JetTracksAssociatorAtVertex_cfi import *
from RecoBTag.Configuration.RecoBTag_cff import *
示例#24
0
process.load("RecoJets.JetProducers.kt4PFJets_cfi")
process.kt6PFJetsForIsolation = process.kt4PFJets.clone(
    rParam=0.6,
    doRhoFastjet=True
)
process.kt6PFJetsForIsolation.Rho_EtaMax = cms.double(2.5)

# This is only needed if using the obsolete jetTools.py from VHbbAnalysis/additionalFiles
if not hasattr(process,"kt6PFJets"):
    setattr(process,"kt6PFJets", process.kt4PFJets.clone(doAreaFastjet=True, doRhoFastjet=True, rParam=0.6))

process.kt6PFJets25 = process.kt4PFJets.clone( src = "pfNoElectron"+postfix,rParam = 0.6,doRhoFastjet = True,Ghost_EtaMax = 2.5, Rho_EtaMax = 2.5 )
process.kt6PFJetsCentralNeutral = process.kt6PFJets.clone( src = cms.InputTag("pfAllNeutralHadronsAndPhotons"+postfix), Ghost_EtaMax = cms.double(3.1), Rho_EtaMax = cms.double(2.5), inputEtMin = cms.double(0.5) )

from RecoJets.JetProducers.ak5PFJets_cfi import ak5PFJets
process.ak7PFJets = ak5PFJets.clone( rParam = cms.double(0.7) )
addJetCollection(
    process, cms.InputTag("ak7PFJets"), "AK7", "PF",
    doJTA=True, doBTagging=True, jetCorrLabel=("AK7PF", jetCorr),
    doType1MET=False, doL1Cleaning = False, doL1Counters=False,
    doJetID = False
)

from PhysicsTools.PatAlgos.tools.jetTools import *

#process.load("RecoJets.JetProducers.caSubjetFilterPFJets_cfi")
from RecoJets.JetProducers.caSubjetFilterPFJets_cfi import caSubjetFilterPFJets
process.caVHPFJets = caSubjetFilterPFJets.clone(src=cms.InputTag("pfNoElectron"+postfix),useAdjacency = cms.int32(0))

#process.load("RecoJets.JetProducers.caSubjetFilterGenJets_cfi")
from RecoJets.JetProducers.caSubjetFilterGenJets_cfi import caSubjetFilterGenJets
示例#25
0
import FWCore.ParameterSet.Config as cms


process = cms.Process("EX")
process.source = cms.Source("PoolSource",
    fileNames = cms.untracked.vstring("file:../ZLL-8A345C56-6665-E411-9C25-1CC1DE04DF20.root")
)
process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(1000) )

process.OUT = cms.OutputModule("PoolOutputModule",
    fileName = cms.untracked.string('test.root'),
    outputCommands = cms.untracked.vstring(['drop *'])
)
process.endpath= cms.EndPath(process.OUT)

from RecoJets.JetProducers.ak5PFJets_cfi import ak5PFJets

# Select candidates that would pass CHS requirements
process.chs = cms.EDFilter("CandPtrSelector", src = cms.InputTag("packedPFCandidates"), cut = cms.string("fromPV"))

#makes chs ak5 jets   (instead of ak4 that are default in miniAOD 70X)
process.ak5PFJetsCHS = ak5PFJets.clone(src = 'chs')
process.OUT.outputCommands.append("keep *_ak5PFJetsCHS_*_EX")

process.options = cms.untracked.PSet( 
        wantSummary = cms.untracked.bool(True), # while the timing of this is not reliable in unscheduled mode, it still helps understanding what was actually run 
        allowUnscheduled = cms.untracked.bool(True)
)
process.load("RecoLocalTracker.SiPixelRecHits.SiPixelRecHits_cfi")
process.load("RecoLocalTracker.SiPixelRecHits.PixelCPEGeneric_cfi")
process.load(
    "RecoLocalTracker.SiStripRecHitConverter.SiStripRecHitConverter_cfi")
process.load("MLAnalyzer.RecHitAnalyzer.RHAnalyzer_cfi")
process.fevt.mode = cms.string(options.processMode)
if options.isTTbar:
    process.fevt.isTTbar = cms.bool(True)
else:
    process.fevt.isTTbar = cms.bool(False)

jet_radius = 0.8
from RecoJets.Configuration.GenJetParticles_cff import genParticlesForJets
process.genParticlesForJets = genParticlesForJets.clone()
from RecoJets.JetProducers.ak5PFJets_cfi import ak5PFJets
process.ak8PFJets = ak5PFJets.clone(rParam=jet_radius)
process.ak8PFJets.doAreaFastjet = True
from RecoJets.JetProducers.ak5GenJets_cfi import ak5GenJets
process.ak8GenJets = ak5GenJets.clone(rParam=jet_radius)

if options.UseAK8:
    process.fevt.PFJetCollection = cms.InputTag('ak8PFJets')
    process.fevt.genJetCollection = cms.InputTag('ak8GenJets')
else:
    process.fevt.PFJetCollection = cms.InputTag('ak5PFJets')
    process.fevt.genJetCollection = cms.InputTag('ak5GenJets')

#process.fevt.mode = cms.string("JetLevel") # for when using crab
#process.fevt.mode = cms.string("EventLevel") # for when using crab
print " >> Processing as:", (process.fevt.mode)
                              srcByReference = cms.InputTag("AK8byRefCHS"),
                              physicsDefinition = cms.bool(True),
                              leptonInfo = cms.bool(True)
                              )                              

AK8byValAlgoCHS = cms.EDProducer("JetFlavourIdentifier",
                                 srcByReference = cms.InputTag("AK8byRefCHS"),
                                 physicsDefinition = cms.bool(False),
                                 leptonInfo = cms.bool(True))

AK8jetFlavorCHS    = cms.Sequence(AK8byRefCHS*AK8byValPhysCHS*AK8byValAlgoCHS)

#for each jet collection run Pruning, subjet b-tagging, quark gluon discrimination,n-subjettiness and subjet quark gluon discrimination
AK8PFJetsCHS = ak5PFJets.clone(
    src      = cms.InputTag('pfNoElectron'),
    rParam   = cms.double(0.8),
    jetPtMin = cms.double(20)
    )

AK8caPFJetsPrunedCHS = ak5PFJetsPruned.clone(
    src      = cms.InputTag('pfNoElectron'),
    jetAlgorithm = cms.string("CambridgeAachen"),
    rParam = cms.double(0.8),
    doAreaFastjet = cms.bool(False),
    writeCompound = cms.bool(True),
    jetCollInstanceName=cms.string("SubJets"),
    jetPtMin = cms.double(20)
    )

from RecoJets.JetAssociationProducers.ic5JetTracksAssociatorAtVertex_cfi import ic5JetTracksAssociatorAtVertex
AK8jetTracksAssociatorAtVertexCHS          = ic5JetTracksAssociatorAtVertex.clone()
示例#28
0
process.PFCand2VertexAM = PFCandAssoMap.clone(
          VertexCollection = cms.InputTag('selectedPrimaryVertexQuality'),
)
		
### PFCandidateCollection-specific includes
from CommonTools.RecoUtils.pfcand_nopu_witham_cfi import FirstVertexPFCandidates
		
process.PFCand = FirstVertexPFCandidates.clone(
          VertexPFCandAssociationMap = cms.InputTag('PFCand2VertexAM'),
)
	
### JetProducer-specific includes
from RecoJets.JetProducers.ak5PFJets_cfi import ak5PFJets	

process.ak5PFJetsNew = ak5PFJets.clone(
	src = cms.InputTag("PFCand")
)

process.load("JetMETCorrections.Configuration.JetCorrectionServices_cff")
process.load("JetMETCorrections.Configuration.JetCorrectionServicesAllAlgos_cff")

# L2L3 Correction Producers
process.ak5PFJetsNewL23 = cms.EDProducer('PFJetCorrectionProducer',
    src        = cms.InputTag('ak5PFJetsNew'),
    correctors = cms.vstring('ak5PFL2L3')
)
		
# L1L2L3 Correction Producers
process.ak5PFJetsNewL123 = cms.EDProducer('PFJetCorrectionProducer',
    src        = cms.InputTag('ak5PFJetsNew'),
    correctors = cms.vstring('ak5PFL1L2L3')
示例#29
0
PFCand2VertexAM = PFCandAssoMap.clone(
    VertexCollection=cms.InputTag("selectedPrimaryVertexQuality"),
    VertexTrackAssociationMap=cms.InputTag("Tracks2VertexAM"),
    ignoreMissingCollection=cms.bool(True),
)

### PFCandidateCollection-specific includes
from CommonTools.RecoUtils.pfcand_nopu_witham_cfi import FirstVertexPFCandidates

PFCand = FirstVertexPFCandidates.clone(VertexPFCandAssociationMap=cms.InputTag("PFCand2VertexAM"))

### JetProducer-specific includes
from RecoJets.JetProducers.ak5PFJets_cfi import ak5PFJets

ak5PFCHSNewJets = ak5PFJets.clone(src=cms.InputTag("PFCand"))

###old CHS
goodOfflinePrimaryVertices = cms.EDFilter(
    "PrimaryVertexObjectFilter",
    filterParams=pvSelector.clone(minNdof=cms.double(4.0), maxZ=cms.double(24.0)),
    src=cms.InputTag("offlinePrimaryVertices"),
)


pfPileUp.Vertices = "goodOfflinePrimaryVertices"
pfPileUp.checkClosestZVertex = cms.bool(False)
pfPileUp.PFCandidates = "particleFlow"
pfNoPileUp.bottomCollection = "particleFlow"

ak5PFCHSJets = ak5PFJets.clone(src="pfNoPileUp")
示例#30
0
process.PFCand2VertexAM = PFCandAssoMap.clone(
    VertexCollection=cms.InputTag('selectedPrimaryVertexQuality'), )

### PFCandidateCollection-specific includes
from CommonTools.RecoUtils.pfcand_nopu_witham_cfi import FirstVertexPFCandidates

process.PFCand = FirstVertexPFCandidates.clone(
    VertexPFCandAssociationMap=cms.InputTag('PFCand2VertexAM'),
    VertexCollection=cms.InputTag('selectedPrimaryVertexQuality'),
)

### JetProducer-specific includes
from RecoJets.JetProducers.ak5PFJets_cfi import ak5PFJets

process.ak5PFJetsNew = ak5PFJets.clone(src=cms.InputTag("PFCand", "P2V")
                                       #src = cms.InputTag("PFCand","V2P")
                                       )

process.load("JetMETCorrections.Configuration.JetCorrectionServices_cff")
process.load(
    "JetMETCorrections.Configuration.JetCorrectionServicesAllAlgos_cff")

# L2L3 Correction Producers
process.ak5PFJetsNewL23 = cms.EDProducer('PFJetCorrectionProducer',
                                         src=cms.InputTag('ak5PFJetsNew'),
                                         correctors=cms.vstring('ak5PFL2L3'))

# L1L2L3 Correction Producers
process.ak5PFJetsNewL123 = cms.EDProducer(
    'PFJetCorrectionProducer',
    src=cms.InputTag('ak5PFJetsNew'),
                              srcByReference = cms.InputTag("AK8byRefPuppi"),
                              physicsDefinition = cms.bool(True),
                              leptonInfo = cms.bool(True)
                              )                              

AK8byValAlgoPuppi = cms.EDProducer("JetFlavourIdentifier",
                                 srcByReference = cms.InputTag("AK8byRefPuppi"),
                                 physicsDefinition = cms.bool(False),
                                 leptonInfo = cms.bool(True))

AK8jetFlavorPuppi    = cms.Sequence(AK8byRefPuppi*AK8byValPhysPuppi*AK8byValAlgoPuppi)

#for each jet collection run Pruning, subjet b-tagging, quark gluon discrimination,n-subjettiness and subjet quark gluon discrimination
AK8PFJetsPuppi = ak5PFJets.clone(
    jetAlgorithm = cms.string("CambridgeAachen"),
    src      = cms.InputTag('puppi','Puppi'),
    rParam   = cms.double(0.8),
    jetPtMin = cms.double(20)
    )

AK8caPFJetsPrunedPuppi = ak5PFJetsPruned.clone(
    src      = cms.InputTag('puppi','Puppi'),
    jetAlgorithm = cms.string("CambridgeAachen"),
    rParam = cms.double(0.8),
    doAreaFastjet = cms.bool(False),
    writeCompound = cms.bool(True),
    jetCollInstanceName=cms.string("SubJets"),
    jetPtMin = cms.double(20)
    )

from RecoJets.JetAssociationProducers.ic5JetTracksAssociatorAtVertex_cfi import ic5JetTracksAssociatorAtVertex
AK8jetTracksAssociatorAtVertexPuppi          = ic5JetTracksAssociatorAtVertex.clone()
def reSetJet(process):
    ## Filter out neutrinos from packed GenParticles
    process.packedGenParticlesForJetsNoNu = cms.EDFilter("CandPtrSelector", src = cms.InputTag("packedGenParticles"), cut = cms.string("abs(pdgId) != 12 && abs(pdgId) != 14 && abs(pdgId) != 16"))
    ## Define GenJets
    from RecoJets.JetProducers.ak5GenJets_cfi import ak5GenJets
    process.ak5GenJetsNoNu = ak5GenJets.clone(src = 'packedGenParticlesForJetsNoNu')

    ## Select charged hadron subtracted packed PF candidates
    process.pfCHS = cms.EDFilter("CandPtrSelector", src = cms.InputTag("packedPFCandidates"), cut = cms.string("fromPV"))
    from RecoJets.JetProducers.ak5PFJets_cfi import ak5PFJets
    ## Define PFJetsCHS
    process.ak5PFJetsCHS = ak5PFJets.clone(src = 'pfCHS', doAreaFastjet = True)

    #################################################
    ## Remake PAT jets
    #################################################

    ## b-tag discriminators
    bTagDiscriminators = [
        'pfCombinedInclusiveSecondaryVertexV2BJetTags'
    ]
#################################################################
    slimmedAddPileupInfo = cms.EDProducer(
       'PileupSummaryInfoSlimmer',
        #src = cms.InputTag('addPileupInfo'),
        keepDetailedInfoFor = cms.vint32(0)
    )
#######################################################
    from PhysicsTools.PatAlgos.tools.jetTools import addJetCollection

    ## Add PAT jet collection based on the above-defined ak5PFJetsCHS
    addJetCollection(
        process,
        labelName = 'AK5PFCHS',
        jetSource = cms.InputTag('ak5PFJetsCHS'),
        pvSource = cms.InputTag('offlineSlimmedPrimaryVertices'),
        bsSource = cms.InputTag('offlineBeamSpot'),
        pfCandidates = cms.InputTag('packedPFCandidates'),
        svSource = cms.InputTag('slimmedSecondaryVertices'),
        btagDiscriminators = bTagDiscriminators,
        #jetCorrections = ('AK5PFchs', ['L1FastJet', 'L2Relative', 'L3Absolute'], 'None'),  #commented before adding jet corrections
        genJetCollection = cms.InputTag('ak5GenJetsNoNu'),
        genParticles = cms.InputTag('prunedGenParticles'),
        algo = 'AK',
        rParam = 0.5
    )

    getattr(process,'selectedPatJetsAK5PFCHS').cut = cms.string('pt > 20.')

    process.rejet = cms.Path(process.packedGenParticlesForJetsNoNu *
                             process.ak5GenJetsNoNu *
                             process.pfCHS *
                             process.ak5PFJetsCHS *
                             process.patJetCorrFactorsAK5PFCHS *
                             process.patJetPartons *
                             process.patJetFlavourAssociationAK5PFCHS *
                             process.patJetPartonMatchAK5PFCHS *
                             process.patJetGenJetMatchAK5PFCHS *
                             process.pfImpactParameterTagInfosAK5PFCHS *
                             process.pfInclusiveSecondaryVertexFinderTagInfosAK5PFCHS *
                             process.pfCombinedInclusiveSecondaryVertexV2BJetTagsAK5PFCHS *
                             process.patJetsAK5PFCHS *
                             process.selectedPatJetsAK5PFCHS)

    from PhysicsTools.PatAlgos.tools.pfTools import adaptPVs
    ## Adapt primary vertex collection and BeamSpot
    adaptPVs(process, pvCollection=cms.InputTag('offlineSlimmedPrimaryVertices'))
    adaptBSs(process, bsCollection=cms.InputTag('offlineBeamSpot'))
 
    from PhysicsTools.PatAlgos.tools.jetTools import updateJetCollection
    updateJetCollection(
        process,
        jetSource = cms.InputTag('slimmedJets'),
        labelName = 'UpdatedJEC',
        jetCorrections = ('AK5PFchs', cms.vstring(['L1FastJet', 'L2Relative', 'L3Absolute']), 'None')  # Do not forget 'L2L3Residual' on data
     )

    process.load('Configuration.StandardSequences.Services_cff') #Added info from now onwards
    process.load("JetMETCorrections.Modules.JetResolutionESProducer_cfi")

    from CondCore.DBCommon.CondDBSetup_cfi import *
    import os
    process.jer = cms.ESSource("PoolDBESSource",
            CondDBSetup,
            toGet = cms.VPSet(
                # Resolution
                cms.PSet(
                    record = cms.string('JetResolutionRcd'),
                    tag    = cms.string('JR_Fall15_25nsV2_MC_PtResolution_AK5PFchs'),
                    label  = cms.untracked.string('AK5PFchs_pt')
                    ),

                # Scale factors
                cms.PSet(
                    record = cms.string('JetResolutionScaleFactorRcd'),
                    tag    = cms.string('JR_Fall15_25nsV2_MC_SF_AK4PFchs'),
                    label  = cms.untracked.string('AK5PFchs')
                    ),
                ),
            connect = cms.string('sqlite:Fall15_25nsV2_MC.db')
            )
    process.es_prefer_jer = cms.ESPrefer('PoolDBESSource', 'jer')
示例#33
0
######## JETS  AK5 ----------------------------
import FWCore.ParameterSet.Config as cms
from miniPAT.miniSubsPAT.PAT_goodPV_cff import *

############################################## NO GROOMING
from RecoJets.JetProducers.ak5PFJets_cfi import ak5PFJets
ak5PFJetsCHS = ak5PFJets.clone(
    src='pfNoPileUp',
    jetPtMin=cms.double(20.0),
    doAreaFastjet=cms.bool(True),
    rParam=cms.double(0.5),
)
jetSource = 'ak5PFJetsCHS'

#### Adding corrections
from PhysicsTools.PatAlgos.recoLayer0.jetCorrFactors_cfi import *
patJetCorrFactorsAK5CHS = patJetCorrFactors.clone()
patJetCorrFactorsAK5CHS.src = jetSource
# will need to add L2L3 corrections in the cfg
patJetCorrFactorsAK5CHS.levels = ['L1FastJet', 'L2Relative', 'L3Absolute']
patJetCorrFactorsAK5CHS.payload = 'AK5PFchs'
patJetCorrFactorsAK5CHS.useRho = True

from PhysicsTools.PatAlgos.producersLayer1.jetProducer_cfi import *
patJetsAK5CHS = patJets.clone()
patJetsAK5CHS.jetSource = jetSource
patJetsAK5CHS.addJetCharge = False
patJetsAK5CHS.embedCaloTowers = False
patJetsAK5CHS.embedPFCandidates = False
patJetsAK5CHS.addAssociatedTracks = False
patJetsAK5CHS.addBTagInfo = False
######## JETS  AK7 ----------------------------
import FWCore.ParameterSet.Config as cms
from jetSubs.MyJetSubsAnalyzer.PAT_goodPV_cff import *

############################################## NO GROOMING
from RecoJets.JetProducers.ak5PFJets_cfi import ak5PFJets
ak7PFJetsCHS = ak5PFJets.clone(
  src = 'pfNoPileUp',
  jetPtMin = cms.double(20.0),
  doAreaFastjet = cms.bool(True),
  rParam = cms.double(0.7),
)
jetSource = 'ak7PFJetsCHS'

#### Adding corrections 
from PhysicsTools.PatAlgos.recoLayer0.jetCorrFactors_cfi import *
patJetCorrFactorsAK7CHS = patJetCorrFactors.clone()
patJetCorrFactorsAK7CHS.src = jetSource
# will need to add L2L3 corrections in the cfg
patJetCorrFactorsAK7CHS.levels = ['L1FastJet', 'L2Relative', 'L3Absolute']
patJetCorrFactorsAK7CHS.payload = 'AK7PFchs'
patJetCorrFactorsAK7CHS.useRho = True

from PhysicsTools.PatAlgos.producersLayer1.jetProducer_cfi import *
patJetsAK7CHS = patJets.clone()
patJetsAK7CHS.jetSource = jetSource
patJetsAK7CHS.addJetCharge = False
patJetsAK7CHS.embedCaloTowers = False
patJetsAK7CHS.embedPFCandidates = False
patJetsAK7CHS.addAssociatedTracks = False
patJetsAK7CHS.addBTagInfo = False
示例#35
0
import FWCore.ParameterSet.Config as cms
from RecoJets.JetProducers.ak5PFJets_cfi import ak5PFJets
ak5PFJets.doAreaFastjet = True
ak5PFJets.jetPtMin = 1
from RecoJets.JetProducers.ak5CaloJets_cfi import ak5CaloJets
ak5CaloJets.doAreaFastjet = True
ak5CaloJets.jetPtMin = 1

ak1PFJets = ak5PFJets.clone(rParam = 0.1)
ak2PFJets = ak5PFJets.clone(rParam = 0.2)
ak3PFJets = ak5PFJets.clone(rParam = 0.3)
ak4PFJets = ak5PFJets.clone(rParam = 0.4)
ak6PFJets = ak5PFJets.clone(rParam = 0.6)

ak1CaloJets = ak5CaloJets.clone(rParam = 0.1)
ak2CaloJets = ak5CaloJets.clone(rParam = 0.2)
ak3CaloJets = ak5CaloJets.clone(rParam = 0.3)
ak4CaloJets = ak5CaloJets.clone(rParam = 0.4)
ak6CaloJets = ak5CaloJets.clone(rParam = 0.6)

ppReRecoPFJets = cms.Sequence(
ak1PFJets
+
ak2PFJets
+
ak3PFJets
+
ak4PFJets
+
ak5PFJets
+
import FWCore.ParameterSet.Config as cms
#from RecoJets.Configuration.GenJetParticles_cff import *
from RecoJets.JetProducers.ak5PFJets_cfi        import ak5PFJets
from RecoJets.JetProducers.ak5PFJetsPruned_cfi  import ak5PFJetsPruned

#for each jet collection run Pruning, subjet b-tagging, quark gluon discrimination,n-subjettiness and subjet quark gluon discrimination
AK6PFJetsPuppi = ak5PFJets.clone(
    src      = cms.InputTag('puppi','Puppi'),
    rParam   = cms.double(0.4),
    jetPtMin = cms.double(20)
    )

AK6caPFJetsPrunedPuppi = ak5PFJetsPruned.clone(
    src      = cms.InputTag('puppi','Puppi'),
    jetAlgorithm = cms.string("CambridgeAachen"),
    rParam = cms.double(0.4),
    doAreaFastjet = cms.bool(False),
    writeCompound = cms.bool(True),
    jetCollInstanceName=cms.string("SubJets"),
    jetPtMin = cms.double(20)
    )

from RecoJets.JetAssociationProducers.ic5JetTracksAssociatorAtVertex_cfi import ic5JetTracksAssociatorAtVertex
AK6jetTracksAssociatorAtVertexPuppi          = ic5JetTracksAssociatorAtVertex.clone()
AK6jetTracksAssociatorAtVertexPuppi  .jets   = cms.InputTag('AK6PFJetsPuppi')
AK6jetTracksAssociatorAtVertexPuppi  .tracks = "generalTracks"

AK6jetTracksAssociatorAtVertexSJPuppi        = ic5JetTracksAssociatorAtVertex.clone()
AK6jetTracksAssociatorAtVertexSJPuppi.jets   = cms.InputTag('AK6caPFJetsPrunedPuppi','SubJets')
AK6jetTracksAssociatorAtVertexSJPuppi.tracks = "generalTracks"
示例#37
0
                                     src=cms.InputTag("pfCHS"),
                                     veto=cms.InputTag("selectedMuons"))
process.pfNoElectronsCHS = cms.EDProducer(
    "CandPtrProjector",
    src=cms.InputTag("pfNoMuonCHS"),
    veto=cms.InputTag("selectedElectrons"))

process.pfNoMuon = cms.EDProducer("CandPtrProjector",
                                  src=cms.InputTag("packedPFCandidates"),
                                  veto=cms.InputTag("selectedMuons"))
process.pfNoElectrons = cms.EDProducer("CandPtrProjector",
                                       src=cms.InputTag("pfNoMuon"),
                                       veto=cms.InputTag("selectedElectrons"))

process.ak5PFJets = ak5PFJets.clone(
    src='pfNoElectrons', doAreaFastjet=True
)  # no idea while doArea is false by default, but it's True in RECO so we have to set it
process.ak5PFJetsCHS = ak5PFJets.clone(
    src='pfNoElectronsCHS', doAreaFastjet=True
)  # no idea while doArea is false by default, but it's True in RECO so we have to set it
process.ak5GenJets = ak5GenJets.clone(src='packedGenParticles')

# The following is make patJets, but EI is done with the above
process.load("PhysicsTools.PatAlgos.producersLayer1.patCandidates_cff")
process.load("Configuration.EventContent.EventContent_cff")
process.load('Configuration.StandardSequences.Geometry_cff')
process.load('Configuration.StandardSequences.MagneticField_38T_cff')
process.load(
    'Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
process.GlobalTag.globaltag = 'START70_V6::All'
示例#38
0
#-------------------------------------------------------------------------
from PhysicsTools.JetMCAlgos.HadronAndPartonSelector_cfi import selectedHadronsAndPartons
process.selectedHadronsAndPartons = selectedHadronsAndPartons.clone()

from PhysicsTools.JetMCAlgos.AK5PFJetsMCFlavourInfos_cfi import ak5JetFlavourInfos
process.jetFlavourInfosAK5PFJets = ak5JetFlavourInfos.clone()

process.printEventAK5PFJets = cms.EDAnalyzer("printJetFlavourInfo",
    jetFlavourInfos = cms.InputTag("jetFlavourInfosAK5PFJets")
)
#-------------------------------------------------------------------------
# AK8 fat jets and pruned subjets
#-------------------------------------------------------------------------
from RecoJets.JetProducers.ak5PFJets_cfi import ak5PFJets
process.ak8PFJets = ak5PFJets.clone(
    rParam        = cms.double(0.8),
    src           = cms.InputTag("particleFlow"),
)

from RecoJets.JetProducers.ak5PFJetsPruned_cfi import ak5PFJetsPruned
process.ak8PFJetsPruned = ak5PFJetsPruned.clone(
    rParam              = cms.double(0.8),
    src                 = cms.InputTag("particleFlow"),
    writeCompound       = cms.bool(True),
    jetCollInstanceName = cms.string("SubJets")
)

process.jetFlavourInfosAK8PFJets = cms.EDProducer("JetFlavourClustering",
    jets                     = cms.InputTag("ak8PFJets"),
    groomedJets              = cms.InputTag("ak8PFJetsPruned"),
    subjets                  = cms.InputTag("ak8PFJetsPruned", "SubJets"),
    bHadrons                 = cms.InputTag("selectedHadronsAndPartons","bHadrons"),
示例#39
0
### PFCandidate AssociationMap-specific includes
from CommonTools.RecoUtils.pfcand_assomap_cfi import PFCandAssoMap

process.PFCand2VertexAM = PFCandAssoMap.clone(
    VertexCollection=cms.InputTag('selectedPrimaryVertexQuality'), )

### PFCandidateCollection-specific includes
from CommonTools.RecoUtils.pfcand_nopu_witham_cfi import FirstVertexPFCandidates

process.PFCand = FirstVertexPFCandidates.clone(
    VertexPFCandAssociationMap=cms.InputTag('PFCand2VertexAM'), )

### JetProducer-specific includes
from RecoJets.JetProducers.ak5PFJets_cfi import ak5PFJets

process.ak5PFJetsNew = ak5PFJets.clone(src=cms.InputTag("PFCand"))

process.load("JetMETCorrections.Configuration.JetCorrectionServices_cff")
process.load(
    "JetMETCorrections.Configuration.JetCorrectionServicesAllAlgos_cff")

# L2L3 Correction Producers
process.ak5PFJetsNewL23 = cms.EDProducer('PFJetCorrectionProducer',
                                         src=cms.InputTag('ak5PFJetsNew'),
                                         correctors=cms.vstring('ak5PFL2L3'))

# L1L2L3 Correction Producers
process.ak5PFJetsNewL123 = cms.EDProducer(
    'PFJetCorrectionProducer',
    src=cms.InputTag('ak5PFJetsNew'),
    correctors=cms.vstring('ak5PFL1L2L3'))
示例#40
0
import FWCore.ParameterSet.Config as cms

from RecoJets.JetProducers.PFJetParameters_cfi import *
from RecoJets.JetProducers.AnomalousCellParameters_cfi import *
from RecoJets.JetProducers.ak5PFJets_cfi import ak5PFJets

ak5PFJetsSoftDrop = ak5PFJets.clone(
    useSoftDrop = cms.bool(True),
    zcut = cms.double(0.1),
    beta = cms.double(0.0),
    useExplicitGhosts = cms.bool(True)
    )

from CommonTools.ParticleFlow.pfPileUp_cfi import pfPileUp
pfPileUpForAK5PFchsJets = pfPileUp.clone(
    PFCandidates = cms.InputTag('particleFlow'),
    Vertices = cms.InputTag('goodOfflinePrimaryVertices'),
    checkClosestZVertex = cms.bool(False)
)
from CommonTools.ParticleFlow.TopProjectors.pfNoPileUp_cfi import pfNoPileUp
pfNoPileUpForAK5PFchsJets = pfNoPileUp.clone(
    topCollection = cms.InputTag('pfPileUpForAK5PFchsJets'),
    bottomCollection = cms.InputTag('particleFlow')
)

from RecoJets.JetProducers.ak5PFJets_cfi import ak5PFJets
ak5PFchsJets = ak5PFJets.clone(
    src = cms.InputTag('pfNoPileUpForAK5PFchsJets'),
    doAreaFastjet = cms.bool(True)
)

from CommonTools.ParticleFlow.ParticleSelectors.pfAllNeutralHadrons_cfi import pfAllNeutralHadrons
from CommonTools.ParticleFlow.ParticleSelectors.pfAllPhotons_cfi import pfAllPhotons
pfNeutralCandPdgIds = []
pfNeutralCandPdgIds.extend(pfAllNeutralHadrons.pdgId.value())
pfNeutralCandPdgIds.extend(pfAllPhotons.pdgId.value()) 
pfNeutralCandsForAK5PFchsJets = cms.EDFilter("PdgIdPFCandidateSelector",
    src = cms.InputTag('particleFlow'),
    pdgId = cms.vint32(pfNeutralCandPdgIds)
)

from RecoJets.JetProducers.kt4PFJets_cfi import kt4PFJets
kt6PFchsJets = kt4PFJets.clone(
    ##src = cms.InputTag('pfNeutralCandsForAK5PFchsJets'),
示例#42
0
import FWCore.ParameterSet.Config as cms

from RecoJets.JetProducers.PFJetParameters_cfi import *
from RecoJets.JetProducers.AnomalousCellParameters_cfi import *
from RecoJets.JetProducers.ak5PFJets_cfi import ak5PFJets
from RecoJets.JetProducers.SubJetParameters_cfi import SubJetParameters

ak5PFJetsPruned = ak5PFJets.clone(SubJetParameters,
                                  usePruning=cms.bool(True),
                                  useExplicitGhosts=cms.bool(True),
                                  writeCompound=cms.bool(True),
                                  jetCollInstanceName=cms.string("SubJets"))
示例#43
0
process = cms.Process("S2")
process.source = cms.Source(
    "PoolSource", fileNames=cms.untracked.vstring("file:patTuple_mini.root"))
process.maxEvents = cms.untracked.PSet(input=cms.untracked.int32(-1))

from RecoJets.JetProducers.ak5PFJets_cfi import ak5PFJets
from RecoJets.JetProducers.ak5GenJets_cfi import ak5GenJets
from RecoMET.METProducers.PFMET_cfi import pfMet

process.chs = cms.EDFilter("CandPtrSelector",
                           src=cms.InputTag("packedPFCandidates"),
                           cut=cms.string("fromPV"))

process.ak5PFJets = ak5PFJets.clone(
    src='packedPFCandidates', doAreaFastjet=True
)  # no idea while doArea is false by default, but it's True in RECO so we have to set it
process.ak5PFJetsCHS = ak5PFJets.clone(
    src='chs', doAreaFastjet=True
)  # no idea while doArea is false by default, but it's True in RECO so we have to set it
process.ak5GenJets = ak5GenJets.clone(src='packedGenParticles')
process.pfMet = pfMet.clone(src="packedPFCandidates")
process.pfMet.calculateSignificance = False  # this can't be easily implemented on packed PF candidates at the moment

process.load("PhysicsTools.PatAlgos.producersLayer1.patCandidates_cff")
process.load("Configuration.EventContent.EventContent_cff")
process.load('Configuration.StandardSequences.Geometry_cff')
process.load('Configuration.StandardSequences.MagneticField_38T_cff')
process.load(
    'Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
process.GlobalTag.globaltag = 'START70_V6::All'
pfNoPileUp.bottomCollection = "particleFlow"

from CommonTools.ParticleFlow.goodOfflinePrimaryVertices_cfi import goodOfflinePrimaryVertices

pfNoPileUpSequence.insert(0, goodOfflinePrimaryVertices)

pileUpSubtractionSequence = cms.Sequence(pfNoPileUpSequence + pfParticleSelectionSequence)

# JETS  CA8 ----------------------------

from RecoJets.JetProducers.ak5PFJets_cfi import ak5PFJets

ca8PFJetsCHS = ak5PFJets.clone(
    src="pfNoPileUp",
    jetPtMin=cms.double(30.0),
    doAreaFastjet=cms.bool(True),
    rParam=cms.double(0.8),
    jetAlgorithm=cms.string("CambridgeAachen"),
)

jetSource = "ca8PFJetsCHS"

# corrections
from PhysicsTools.PatAlgos.recoLayer0.jetCorrFactors_cfi import *

patJetCorrFactorsCA8CHS = patJetCorrFactors.clone()
patJetCorrFactorsCA8CHS.src = jetSource
# will need to add L2L3 corrections in the cfg
patJetCorrFactorsCA8CHS.levels = ["L1FastJet", "L2Relative", "L3Absolute"]
patJetCorrFactorsCA8CHS.payload = "AK7PFchs"
patJetCorrFactorsCA8CHS.useRho = True
                              srcByReference = cms.InputTag("AK8byRefCHS"),
                              physicsDefinition = cms.bool(True),
                              leptonInfo = cms.bool(True)
                              )                              

AK8byValAlgoCHS = cms.EDProducer("JetFlavourIdentifier",
                                 srcByReference = cms.InputTag("AK8byRefCHS"),
                                 physicsDefinition = cms.bool(False),
                                 leptonInfo = cms.bool(True))

AK8jetFlavorCHS    = cms.Sequence(AK8byRefCHS*AK8byValPhysCHS*AK8byValAlgoCHS)

#for each jet collection run Pruning, subjet b-tagging, quark gluon discrimination,n-subjettiness and subjet quark gluon discrimination
AK8PFJetsCHS = ak5PFJets.clone(
    src      = cms.InputTag('pfNoElectron'),
    jetAlgorithm = cms.string("CambridgeAachen"),
    rParam   = cms.double(0.8),
    jetPtMin = cms.double(20)
    )

AK8caPFJetsPrunedCHS = ak5PFJetsPruned.clone(
    src      = cms.InputTag('pfNoElectron'),
    jetAlgorithm = cms.string("CambridgeAachen"),
    rParam = cms.double(0.8),
    doAreaFastjet = cms.bool(False),
    writeCompound = cms.bool(True),
    jetCollInstanceName=cms.string("SubJets"),
    jetPtMin = cms.double(20)
    )

from RecoJets.JetAssociationProducers.ic5JetTracksAssociatorAtVertex_cfi import ic5JetTracksAssociatorAtVertex
AK8jetTracksAssociatorAtVertexCHS          = ic5JetTracksAssociatorAtVertex.clone()
import FWCore.ParameterSet.Config as cms

process = cms.Process("S2")
process.source = cms.Source("PoolSource",
    fileNames = cms.untracked.vstring("file:patTuple_mini.root")
)
process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(1000) )

from RecoJets.JetProducers.ak5PFJets_cfi import ak5PFJets
from RecoJets.JetProducers.ak5GenJets_cfi import ak5GenJets

process.chs = cms.EDFilter("CandPtrSelector", src = cms.InputTag("packedPFCandidates"), cut = cms.string("fromPV"))

process.ak5PFJets = ak5PFJets.clone(src = 'packedPFCandidates', doAreaFastjet = True) # no idea while doArea is false by default, but it's True in RECO so we have to set it
process.ak5PFJetsCHS = ak5PFJets.clone(src = 'chs', doAreaFastjet = True) # no idea while doArea is false by default, but it's True in RECO so we have to set it
process.ak5GenJets = ak5GenJets.clone(src = 'packedGenParticles')

process.load("PhysicsTools.PatAlgos.producersLayer1.patCandidates_cff")
process.load("Configuration.EventContent.EventContent_cff")
process.load('Configuration.StandardSequences.Geometry_cff')
process.load('Configuration.StandardSequences.MagneticField_38T_cff')
process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
process.GlobalTag.globaltag = 'START70_V6::All'

from PhysicsTools.PatAlgos.tools.jetTools import addJetCollection
addJetCollection(
   process,
   postfix   = "",
   labelName = 'AK5PFCHS',
   jetSource = cms.InputTag('ak5PFJetsCHS'),
   trackSource = cms.InputTag('unpackedTracksAndVertices'), 	
示例#47
0
import FWCore.ParameterSet.Config as cms

from RecoJets.JetProducers.PFJetParameters_cfi import *
from RecoJets.JetProducers.AnomalousCellParameters_cfi import *
from RecoJets.JetProducers.ak5PFJets_cfi import ak5PFJets

ak5PFJetsSoftDrop = ak5PFJets.clone(useSoftDrop=cms.bool(True),
                                    zcut=cms.double(0.1),
                                    beta=cms.double(0.0),
                                    R0=cms.double(0.5),
                                    useExplicitGhosts=cms.bool(True),
                                    writeCompound=cms.bool(True),
                                    jetCollInstanceName=cms.string("SubJets"))
import FWCore.ParameterSet.Config as cms
#from RecoJets.Configuration.GenJetParticles_cff import *
from RecoJets.JetProducers.ak5PFJets_cfi        import ak5PFJets
from RecoJets.JetProducers.ak5PFJetsPruned_cfi  import ak5PFJetsPruned

#for each jet collection run Pruning, subjet b-tagging, quark gluon discrimination,n-subjettiness and subjet quark gluon discrimination
AK6PFJetsCHS = ak5PFJets.clone(
    src      = cms.InputTag('PFBRECO','pfNoElectron'),
    rParam   = cms.double(0.4),
    jetPtMin = cms.double(20)
    )

AK6caPFJetsPrunedCHS = ak5PFJetsPruned.clone(
    src      = cms.InputTag('PFBRECO','pfNoElectron'),
    jetAlgorithm = cms.string("CambridgeAachen"),
    rParam = cms.double(0.4),
    doAreaFastjet = cms.bool(False),
    writeCompound = cms.bool(True),
    jetCollInstanceName=cms.string("SubJets"),
    jetPtMin = cms.double(20)
    )

from RecoJets.JetAssociationProducers.ic5JetTracksAssociatorAtVertex_cfi import ic5JetTracksAssociatorAtVertex
AK6jetTracksAssociatorAtVertexCHS          = ic5JetTracksAssociatorAtVertex.clone()
AK6jetTracksAssociatorAtVertexCHS  .jets   = cms.InputTag('AK6PFJetsCHS')
AK6jetTracksAssociatorAtVertexCHS  .tracks = "generalTracks"

AK6jetTracksAssociatorAtVertexSJCHS        = ic5JetTracksAssociatorAtVertex.clone()
AK6jetTracksAssociatorAtVertexSJCHS.jets   = cms.InputTag('AK6caPFJetsPrunedCHS','SubJets')
AK6jetTracksAssociatorAtVertexSJCHS.tracks = "generalTracks"
示例#49
0
from CommonTools.ParticleFlow.pfNoPileUpJME_cff import *
from RecoJets.JetProducers.gk5PFJets_cfi import gk5PFJets
from RecoJets.JetProducers.kt4PFJets_cfi import kt4PFJets
from RecoJets.JetProducers.ca4PFJets_cfi import ca4PFJets
from RecoJets.JetProducers.fixedGridRhoProducer_cfi import fixedGridRhoAll
from RecoJets.JetProducers.fixedGridRhoProducerFastjet_cfi import fixedGridRhoFastjetAll
from RecoJets.JetProducers.caTopTaggers_cff import *
from RecoJets.JetProducers.ak8PFJetsCHS_groomingValueMaps_cfi import ak8PFJetsCHSPrunedMass, ak8PFJetsCHSFilteredMass, ak8PFJetsCHSTrimmedMass, ak8PFJetsCHSSoftDropMass
from RecoJets.JetProducers.ca8PFJetsCHS_groomingValueMaps_cfi import ca8PFJetsCHSPrunedMass, ca8PFJetsCHSFilteredMass, ca8PFJetsCHSTrimmedMass, ca8PFJetsCHSSoftDropMass
from CommonTools.PileupAlgos.Puppi_cff import puppi
from CommonTools.PileupAlgos.softKiller_cfi import softKiller
from RecoJets.JetProducers.ak4PFJetsPuppi_cfi import ak4PFJetsPuppi
from RecoJets.JetProducers.ak4PFJetsSK_cfi import ak4PFJetsSK

sisCone7PFJets = sisCone5PFJets.clone(rParam=0.7)
ak7PFJets = ak5PFJets.clone(rParam=0.7)
ak8PFJets = ak5PFJets.clone(rParam=0.8)
gk7PFJets = gk5PFJets.clone(rParam=0.7)
kt6PFJets = kt4PFJets.clone(rParam=0.6)
ca8PFJets = ca4PFJets.clone(rParam=0.8)

#compute areas for Fastjet PU subtraction
kt6PFJets.doRhoFastjet = True
kt6PFJets.doAreaFastjet = True
#use active areas and not Voronoi tessellation for the moment
kt6PFJets.voronoiRfact = 0.9
ak4PFJets.doAreaFastjet = True
ak5PFJets.doAreaFastjet = True
ak5PFJetsTrimmed.doAreaFastjet = True
ak7PFJets.doAreaFastjet = True
ak8PFJets.doAreaFastjet = True
示例#50
0
#####################################################################################
# Additional Reconstruction and Analysis: Main Body
#####################################################################################

####################################################################################

#############################
# Jets
#############################

### PP RECO does not include R=3 or R=5 jets.
### re-RECO is only possible for PF, RECO is missing calotowers
from RecoJets.JetProducers.ak5PFJets_cfi import ak5PFJets
ak5PFJets.doAreaFastjet = True
process.ak5PFJets = ak5PFJets
process.ak3PFJets = ak5PFJets.clone(rParam = 0.3)

process.load('HeavyIonsAnalysis.JetAnalysis.jets.ak4CaloJetSequence_pp_data_cff')

process.load('HeavyIonsAnalysis.JetAnalysis.jets.ak3PFJetSequence_pp_data_cff')
process.load('HeavyIonsAnalysis.JetAnalysis.jets.ak4PFJetSequence_pp_data_cff')

process.highPurityTracks = cms.EDFilter("TrackSelector",
                                        src = cms.InputTag("generalTracks"),
                                        cut = cms.string('quality("highPurity")')
                                        )



process.jetSequences = cms.Sequence(
    process.ak3PFJets +
示例#51
0
import FWCore.ParameterSet.Config as cms

# JETS  CA8 ----------------------------

from RecoJets.JetProducers.ak5PFJets_cfi import ak5PFJets
ca8PFJetsCHS = ak5PFJets.clone(
    src = 'pfNoPileUp',
    jetPtMin = cms.double(30.0),
    doAreaFastjet = cms.bool(True),
    rParam = cms.double(0.8),
    jetAlgorithm = cms.string("CambridgeAachen"),
    )

jetSource = 'ca8PFJetsCHS'

# corrections 
from PhysicsTools.PatAlgos.recoLayer0.jetCorrFactors_cfi import *
patJetCorrFactorsCA8CHS = patJetCorrFactors.clone()
patJetCorrFactorsCA8CHS.src = jetSource
# will need to add L2L3 corrections in the cfg
patJetCorrFactorsCA8CHS.levels = ['L1FastJet', 'L2Relative', 'L3Absolute']
patJetCorrFactorsCA8CHS.payload = 'AK7PFchs'
patJetCorrFactorsCA8CHS.useRho = True

# parton and gen jet matching

from PhysicsTools.PatAlgos.mcMatchLayer0.jetMatch_cfi import *
patJetPartonMatchCA8CHS = patJetPartonMatch.clone()
patJetPartonMatchCA8CHS.src = jetSource
patJetGenJetMatchCA8CHS = patJetGenJetMatch.clone()
patJetGenJetMatchCA8CHS.src = jetSource
                                     )

from RecoParticleFlow.PFProducer.particleFlowTmpPtrs_cfi import particleFlowTmpPtrs
process.particleFlowNoMuonTmpPtrs = particleFlowTmpPtrs.clone(
    src = cms.InputTag('ZMMProducer', 'PFCandidatesNoMuon')
)

## GenJet
from RecoJets.JetProducers.ak5GenJets_cfi import ak5GenJets
process.load('RecoJets.Configuration.GenJetParticles_cff')
process.ak4GenJets = ak5GenJets.clone(rParam = 0.4, jetPtMin= 0.0, doAreaFastjet=True,
                                      src = 'genParticlesForJetsNoMuNoNu')

## AK4 PFJet
from RecoJets.JetProducers.ak5PFJets_cfi import ak5PFJets
process.ak4PFJets = ak5PFJets.clone(rParam = 0.4, jetPtMin= 0.0, doAreaFastjet=True,
                                    src = cms.InputTag("ZMMProducer", "PFCandidatesNoMuon") )
## AK4 CHSJet
from CommonTools.ParticleFlow.pfNoPileUpJME_cff import *
process.load('CommonTools.ParticleFlow.pfNoPileUpJME_cff')
process.PFPileUpZMM = pfPileUp.clone( PFCandidates='particleFlowNoMuonTmpPtrs', Vertices = 'goodOfflinePrimaryVertices')
process.PFNoPileUpZMM = pfNoPileUp.clone(topCollection = 'PFPileUpZMM', bottomCollection = 'particleFlowNoMuonTmpPtrs' )
process.ak4PFJetsCHS = ak5PFJets.clone(rParam = 0.4, doAreaFastjet=True,
                                       jetPtMin = 0.0, src = cms.InputTag("PFNoPileUpZMM"))

## AK4 PuppiJet
from Dummy.Puppi.Puppi_PhaseII_SLHC23p1_v2 import *
process.puppiZMM = puppi.clone( PFcandName = cms.InputTag("ZMMProducer", "PFCandidatesNoMuon"))
process.ak4PuppiJets = ak5PFJets.clone(rParam = 0.4,  doAreaFastjet=True,
                                       jetPtMin= 0.0, src = cms.InputTag('puppiZMM','Puppi'))

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ AK4 PFJet ~~~~~
示例#53
0
    filterParams=pvSelector.clone(minNdof=cms.double(4.0),
                                  maxZ=cms.double(24.0)),
    src=cms.InputTag('offlinePrimaryVertices'))

from CommonTools.ParticleFlow.pfPileUp_cfi import pfPileUp
pfPileUpForAK5PFchsJets = pfPileUp.clone(
    PFCandidates=cms.InputTag('particleFlow'),
    Vertices=cms.InputTag('goodOfflinePrimaryVertices'),
    checkClosestZVertex=cms.bool(False))
from CommonTools.ParticleFlow.TopProjectors.pfNoPileUp_cfi import pfNoPileUp
pfNoPileUpForAK5PFchsJets = pfNoPileUp.clone(
    topCollection=cms.InputTag('pfPileUpForAK5PFchsJets'),
    bottomCollection=cms.InputTag('particleFlow'))

from RecoJets.JetProducers.ak5PFJets_cfi import ak5PFJets
ak5PFchsJets = ak5PFJets.clone(src=cms.InputTag('pfNoPileUpForAK5PFchsJets'),
                               doAreaFastjet=cms.bool(True))

from CommonTools.ParticleFlow.ParticleSelectors.pfAllNeutralHadrons_cfi import pfAllNeutralHadrons
from CommonTools.ParticleFlow.ParticleSelectors.pfAllPhotons_cfi import pfAllPhotons
pfNeutralCandPdgIds = []
pfNeutralCandPdgIds.extend(pfAllNeutralHadrons.pdgId.value())
pfNeutralCandPdgIds.extend(pfAllPhotons.pdgId.value())
pfNeutralCandsForAK5PFchsJets = cms.EDFilter(
    "PdgIdPFCandidateSelector",
    src=cms.InputTag('particleFlow'),
    pdgId=cms.vint32(pfNeutralCandPdgIds))

from RecoJets.JetProducers.kt4PFJets_cfi import kt4PFJets
kt6PFchsJets = kt4PFJets.clone(
    ##src = cms.InputTag('pfNeutralCandsForAK5PFchsJets'),
    src=cms.InputTag('particleFlow'),