process.PATCMGSequence += process.selectedPatJetsCA8CHSprunedForBoostedTaus
process.PATCMGSequence += process.selectedPatJetsCA8CHSwithQJetsForBoostedTaus
patEventContentCMG+=['drop patJets_selectedPatJetsCA8CHSpruned_*_*']
patEventContentCMG+=['drop patJets_selectedPatJetsCA8CHSwithQjets_*_*']

######ADD PU JET ID

from  CMGTools.External.pujetidsequence_cff import puJetId, puJetMva
#process.puJetIdAK7CHS = puJetId.clone(
#    jets ='selectedPatJetsAK7CHSwithQjets',
#    jec = 'AK7chs'
#    )
#process.PATCMGSequence += process.puJetIdAK7CHS
#patEventContentCMG+=['keep *_puJetIdAK7CHS_*_*']
process.puJetIdCA8CHS = puJetId.clone(
    jets ='selectedPatJetsCA8CHSwithQjets',
    jec = 'AK7chs'
    )

process.puJetIdCA8CHSwithQJetsForBoostedTaus = puJetId.clone(
    jets ='selectedPatJetsCA8CHSwithQJetsForBoostedTaus',
    jec = 'AK7chs'
    )

from CMGTools.External.pujetidproducer_cfi import  stdalgos_4x, stdalgos_5x, stdalgos, cutbased, chsalgos_4x, chsalgos_5x, chsalgos

process.puJetMvaAK5CHS= puJetMva.clone(
    jetids = cms.InputTag("puJetIdCHS"),
####    jets ='selectedPatJetsCHS',
    jets ='patJetsWithVarCHS',
    algos =  chsalgos
    )
Beispiel #2
0
    cutoff=cms.double(100.0),
    jetRad=cms.double(0.7),
    jetAlgo=cms.string("AK"),
    preclustering=cms.int32(30),
)
if not runQJets:
    process.selectedPatJetsAK7CHSwithQjets.cutoff = 100000.0
process.PATCMGSequence += process.selectedPatJetsAK7CHSwithQjets
patEventContentCMG += ['drop patJets_selectedPatJetsAK7CHSwithNsub_*_*']
process.PATCMGSequence += process.selectedPatJetsCA8CHSwithQjets
patEventContentCMG += ['drop patJets_selectedPatJetsCA8CHSwithNsub_*_*']

######ADD PU JET ID

from CMGTools.External.pujetidsequence_cff import puJetId, puJetMva
process.puJetIdAK7CHS = puJetId.clone(jets='selectedPatJetsAK7CHSwithQjets',
                                      jec='AK7chs')
process.PATCMGSequence += process.puJetIdAK7CHS
patEventContentCMG += ['keep *_puJetIdAK7CHS_*_*']
process.puJetIdCA8CHS = puJetId.clone(jets='selectedPatJetsCA8CHSwithQjets',
                                      jec='AK7chs')

from CMGTools.External.pujetidproducer_cfi import stdalgos_4x, stdalgos_5x, stdalgos, cutbased, chsalgos_4x, chsalgos_5x, chsalgos

process.puJetMvaAK5CHS = puJetMva.clone(
    jetids=cms.InputTag("puJetIdCHS"),
    ####    jets ='selectedPatJetsCHS',
    jets='patJetsWithVarCHS',
    algos=chsalgos)

process.puJetMvaAK7CHS = puJetMva.clone(jetids=cms.InputTag("puJetIdAK7CHS"),
                                        jets='selectedPatJetsAK7CHSwithQjets',
Beispiel #3
0
process.load("ExoDiBosonResonances.PATtupleProduction.PAT_boostedtaus_cff")
process.PATCMGSequence += process.selectedPatJetsCA8CHSprunedForBoostedTaus
process.PATCMGSequence += process.selectedPatJetsCA8CHSwithQJetsForBoostedTaus
patEventContentCMG += ['drop patJets_selectedPatJetsCA8CHSpruned_*_*']
patEventContentCMG += ['drop patJets_selectedPatJetsCA8CHSwithQjets_*_*']

######ADD PU JET ID

from CMGTools.External.pujetidsequence_cff import puJetId, puJetMva
#process.puJetIdAK7CHS = puJetId.clone(
#    jets ='selectedPatJetsAK7CHSwithQjets',
#    jec = 'AK7chs'
#    )
#process.PATCMGSequence += process.puJetIdAK7CHS
#patEventContentCMG+=['keep *_puJetIdAK7CHS_*_*']
process.puJetIdCA8CHS = puJetId.clone(jets='selectedPatJetsCA8CHSwithQjets',
                                      jec='AK7chs')

process.puJetIdCA8CHSwithQJetsForBoostedTaus = puJetId.clone(
    jets='selectedPatJetsCA8CHSwithQJetsForBoostedTaus', jec='AK7chs')

from CMGTools.External.pujetidproducer_cfi import stdalgos_4x, stdalgos_5x, stdalgos, cutbased, chsalgos_4x, chsalgos_5x, chsalgos

process.puJetMvaAK5CHS = puJetMva.clone(
    jetids=cms.InputTag("puJetIdCHS"),
    ####    jets ='selectedPatJetsCHS',
    jets='patJetsWithVarCHS',
    algos=chsalgos)

#process.puJetMvaAK7CHS= puJetMva.clone(
#    jetids = cms.InputTag("puJetIdAK7CHS"),
#    jets ='selectedPatJetsAK7CHSwithQjets',
#process.PATCMGSequence += process.selectedPatJetsAK7CHSwithQjets
#patEventContentCMG+=['drop patJets_selectedPatJetsAK7CHSwithNsub_*_*']
process.PATCMGSequence += process.selectedPatJetsCA8CHSwithQjets
patEventContentCMG+=['drop patJets_selectedPatJetsCA8CHSwithNsub_*_*']

######ADD PU JET ID

from  CMGTools.External.pujetidsequence_cff import puJetId, puJetMva
#process.puJetIdAK7CHS = puJetId.clone(
#    jets ='selectedPatJetsAK7CHSwithQjets',
#    jec = 'AK7chs'
#    )
#process.PATCMGSequence += process.puJetIdAK7CHS
#patEventContentCMG+=['keep *_puJetIdAK7CHS_*_*']
process.puJetIdCA8CHS = puJetId.clone(
    jets ='selectedPatJetsCA8CHSwithQjets',
    jec = 'AK7chs'
    )

from CMGTools.External.pujetidproducer_cfi import  stdalgos_4x, stdalgos_5x, stdalgos, cutbased, chsalgos_4x, chsalgos_5x, chsalgos

process.puJetMvaAK5CHS= puJetMva.clone(
    jetids = cms.InputTag("puJetIdCHS"),
####    jets ='selectedPatJetsCHS',
    jets ='patJetsWithVarCHS',
    algos =  chsalgos
    )

#process.puJetMvaAK7CHS= puJetMva.clone(
#    jetids = cms.InputTag("puJetIdAK7CHS"),
#    jets ='selectedPatJetsAK7CHSwithQjets',
#    algos =  chsalgos
    jets     = cms.InputTag("selectedPatJetsAK5"),
    rho      = cms.InputTag("kt6PFJetsForIso:rho"),
    jec      = cms.string('ak5PFL1FastL2L3'),
    isPatJet = cms.bool(True),
    )

process.customPFJets = cms.EDProducer(
    'PFJetUserData',
    JetInputCollection=cms.untracked.InputTag("selectedPatJetsAK5"),
    is2012Data=cms.untracked.bool(True),
    qgMap=cms.untracked.InputTag("qglAK5PFCHS"),
    Verbosity=cms.untracked.bool(False)
    )

from  CMGTools.External.pujetidsequence_cff import puJetId, puJetMva
process.puJetIdAK5 = puJetId.clone( jets = 'customPFJets')
process.puJetMvaAK5= puJetMva.clone(
    jetids = cms.InputTag("puJetIdAK5"),
    jets = 'customPFJets',
    )

process.puJetIdSequenceAK5 = cms.Sequence(process.puJetIdAK5*process.puJetMvaAK5)

# central jets for filtering and Z->jj candidates
process.customPFJetsCentral = cms.EDFilter(
    "PATJetSelector",
    src = cms.InputTag("customPFJets"),
    cut = cms.string("abs(eta) < 2.4")
    )

############## "Classic" PAT Muons and Electrons ########################
Beispiel #6
0
process.ak5PFJetsL1FastL2L3 = cms.EDProducer('PFJetCorrectionProducer',
    src         = cms.InputTag('ak5PFJets'), 
    correctors  = cms.vstring(jetcorrection)
)
process.ak5PFJetsL1FastL2L3NoV = cms.EDProducer('PFJetCorrectionProducer',
    src         = cms.InputTag('ak5PFJetsNoV'), 
    correctors  = cms.vstring(jetcorrection)
)

#PU jet ID
from CMGTools.External.pujetidsequence_cff import puJetId, puJetMva

process.jetPUId = puJetId.clone(
   jets = cms.InputTag("ak5PFJetsL1FastL2L3NoV"),
   applyJec = cms.bool(False),
   inputIsCorrected = cms.bool(True),                
)

process.jetPUMVA = puJetMva.clone(
   jets = cms.InputTag("ak5PFJetsL1FastL2L3NoV"),
   jetids = cms.InputTag("jetPUId"),
   applyJec = cms.bool(False),
   inputIsCorrected = cms.bool(True),               
)

process.jetPUIdSequence = cms.Sequence(process.jetPUId * process.jetPUMVA)


# MET corrections (type I)
process.load("EWKV.Analyzer.pfMETCorrections_cff")
Beispiel #7
0
#		jetCorrections=('AK5PFchs', ['L1FastJet', 'L2Relative', 'L3Absolute']),
#		pvCollection=cms.InputTag('offlinePrimaryVertices')
#	 )
#process.pfPileUpPFlow.checkClosestZVertex = False
#getattr(process, "patPF2PATSequence"+postfix).remove(getattr(process, "cleanPatCandidates"+postfix))
#getattr(process, "patPF2PATSequence"+postfix).remove(getattr(process, "countPatCandidates"+postfix))
#process.patseq = cms.Sequence(getattr(process,"patPF2PATSequence"+postfix))
#process.pat_step = cms.Path(process.patseq)

######Pileup Jet ID (Hendrik)
#https://twiki.cern.ch/twiki/bin/view/CMS/PileupJetID#Running_the_algorithm_on_reco_je
from CMGTools.External.pujetidsequence_cff import puJetId, puJetMva

process.recoPuJetId = puJetId.clone(
		jets = cms.InputTag("ak5PFJets"),
		applyJec = cms.bool(True),
		inputIsCorrected = cms.bool(False),                
		)

process.recoPuJetMva = puJetMva.clone(
		jets = cms.InputTag("ak5PFJets"),
		jetids = cms.InputTag("recoPuJetId"),
		applyJec = cms.bool(True),
		inputIsCorrected = cms.bool(False),                
		)
process.recoPuJetIdSqeuence = cms.Sequence(process.recoPuJetId * process.recoPuJetMva)
process.jetpuid_step = cms.Path(process.recoPuJetIdSqeuence)


######ROOTMAKER 
process.makeroottree = cms.EDAnalyzer("RootMaker",
process.kt6PFJetsForIsolation.Rho_EtaMax = cms.double(2.5)
#
# particle flow isolation
#
from CommonTools.ParticleFlow.Tools.pfIsolation import setupPFElectronIso, setupPFMuonIso
process.eleIsoSequence = setupPFElectronIso(process, 'gsfElectrons')
process.pfiso = cms.Sequence(process.pfParticleSelectionSequence + process.eleIsoSequence)
###########################################################################################


# MVA PU jets ID
process.load("CMGTools.External.pujetidsequence_cff")
from CMGTools.External.pujetidsequence_cff import puJetId
process.recoPuJetId = puJetId.clone(
   jets = cms.InputTag("ak5PFJetsL1FastL2L3Residual"),
   applyJec = cms.bool(False),
   inputIsCorrected = cms.bool(True)                
)

from CMGTools.External.pujetidsequence_cff import puJetMva
process.recoPuJetMva = puJetMva.clone(
   jets = cms.InputTag("ak5PFJetsL1FastL2L3Residual"),
   jetids = cms.InputTag("recoPuJetId"),
   applyJec = cms.bool(False),
   inputIsCorrected = cms.bool(True)                
)

################## filters ##########################################################

## The good primary vertex filter
process.primaryVertexFilter = cms.EDFilter(
from JetMETCorrections.Configuration.JetCorrectionServices_cff import *

process.load(
    'JetMETCorrections.Configuration.JetCorrectionServicesAllAlgos_cff')
from JetMETCorrections.Configuration.JetCorrectionServicesAllAlgos_cff import *

process.ak5PFJetsCorrection = ak5PFJetsL1FastL2L3.clone()
process.ak5PFJetsCorrection.src = cms.InputTag('hTozzTo4leptonsPFJetSelector')
process.ak5PFJetsCorrectionData = ak5PFJetsL1FastL2L3Residual.clone()
process.ak5PFJetsCorrectionData.src = cms.InputTag(
    'hTozzTo4leptonsPFJetSelector')

process.load('CMGTools.External.pujetidsequence_cff')
from CMGTools.External.pujetidsequence_cff import puJetId, puJetMva

process.recoPuJetIdMC = puJetId.clone(
    jets=cms.InputTag("ak5PFJetsCorrection"), )
process.recoPuJetMvaMC = puJetMva.clone(
    jets=cms.InputTag("ak5PFJetsCorrection"),
    jetids=cms.InputTag("recoPuJetIdMC"),
)
process.recoPuJetIdMCsequence = cms.Sequence(process.recoPuJetIdMC *
                                             process.recoPuJetMvaMC)

process.recoPuJetIdData = puJetId.clone(
    jets=cms.InputTag("ak5PFJetsCorrectionData"), )
process.recoPuJetMvaData = puJetMva.clone(
    jets=cms.InputTag("ak5PFJetsCorrectionData"),
    jetids=cms.InputTag("recoPuJetIdData"),
)
process.recoPuJetIdDatasequence = cms.Sequence(process.recoPuJetIdData *
                                               process.recoPuJetMvaData)