Example #1
0
######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)

process.puJetMvaCA8CHS = puJetMva.clone(jetids=cms.InputTag("puJetIdCA8CHS"),
                                        jets='selectedPatJetsCA8CHSwithQjets',
                                        algos=chsalgos)

process.puJetIdAK5Sequence = cms.Sequence(process.puJetMvaAK5CHS)
process.puJetIdAK7Sequence = cms.Sequence(process.puJetIdAK7CHS +
                                          process.puJetMvaAK7CHS)
process.puJetIdCA8Sequence = cms.Sequence(process.puJetIdCA8CHS +
Example #2
0
from CMGTools.Common.skims.leadingCMGBaseJetSelector_cfi import leadingCMGBaseJetSelector
from CMGTools.Common.skims.leadingCMGPFJetSelector_cfi import leadingCMGPFJetSelector
from CMGTools.External.pujetidsequence_cff import puJetMva

# PF jets -------------------------------------------------------

# this pt cut is also going to be used to select GenJets,
# see CMGTools.Common.gen.generator.genJets_cff
ptCut = 'pt()>10'
cmgPFJetSel.cut = ptCut

# Jets for Type 1 MET corrections
cmgPFJetType1MET = cmgPFJetSel.clone(src = 'cmgPFJet',cut='pt() >= 10 && abs(eta()) < 4.7')

# PU JetID
cmgPUJetMva = puJetMva.clone()
cmgPUJetMva.jets = cms.InputTag('patJetsWithVar')

from CMGTools.Common.jetId_cff import *

pfJetSequence = cms.Sequence(
    cmgPUJetMva +
    cmgPFJet +
    cmgPFJetSel +
    cmgPFJetType1MET +
    jetIdSequence  
    )


jetSequence = cms.Sequence(
    pfJetSequence
#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',
#    algos =  chsalgos
#    )

process.puJetMvaCA8CHS= puJetMva.clone(
    jetids = cms.InputTag("puJetIdCA8CHS"),
    jets ='selectedPatJetsCA8CHSwithQjets',
    algos =  chsalgos
    )
    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 ########################
# (made from all reco muons, and all gsf electrons, respectively)
process.patMuons.embedTcMETMuonCorrs = False
process.patMuons.embedCaloMETMuonCorrs = False
Example #5
0
    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")
process.pfJetMETcorr.src = cms.InputTag('ak5PFJetsL1FastL2L3')
process.pfJetMETcorrNoV.src = cms.InputTag('ak5PFJetsL1FastL2L3NoV')
process.pfJetMETcorr.jetCorrLabel = cms.string(jetcorrection)
process.pfJetMETcorrNoV.jetCorrLabel = cms.string(jetcorrection)


# QuarkGluonTagger
Example #6
0
#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",
GenAllParticles = cms.untracked.bool(False),
GenSomeParticles = cms.untracked.bool(True),
GenAK5Jets = cms.untracked.bool(True),

Trigger = cms.untracked.bool(True),
HLTriggerSelection = cms.untracked.vstring(),
#TriggerProcess = cms.untracked.string('REDIGI311X'),
###########################################################################################


# 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(
    "VertexSelector",
    src = cms.InputTag("offlinePrimaryVertices"),
    cut = cms.string("!isFake && ndof > 4 && abs(z) <= 24 && position.Rho <= 2"),
    filter = cms.bool(True)
    ) 

## The beam scraping filter
process.noscraping = cms.EDFilter(
Example #8
0
    '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)

process.hTozzTo4leptonsSelectionPath = cms.Path(
    process.hTozzTo4leptonsPFJetSelector + process.ak5PFJetsCorrection +