File indexing completed on 2024-04-06 12:19:26
0001 import FWCore.ParameterSet.Config as cms
0002
0003
0004 from JetMETCorrections.Configuration.JetCorrectors_cff import *
0005
0006
0007
0008
0009 from CommonTools.ParticleFlow.TopProjectors.pfNoJet_cfi import pfNoJet as _pfNoJet
0010
0011
0012
0013 pfJetsPtrForMetCorr = cms.EDProducer("PFJetFwdPtrProducer",
0014 src = cms.InputTag("ak4PFJets")
0015 )
0016
0017
0018 from RecoParticleFlow.PFProducer.pfLinker_cff import particleFlowPtrs
0019
0020
0021
0022
0023
0024
0025 pfCandsNotInJetsPtrForMetCorr = _pfNoJet.clone(
0026 topCollection = cms.InputTag('pfJetsPtrForMetCorr'),
0027 bottomCollection = cms.InputTag('particleFlowPtrs')
0028 )
0029 pfCandsNotInJetsForMetCorr = cms.EDProducer("PFCandidateFromFwdPtrProducer",
0030 src = cms.InputTag("pfCandsNotInJetsPtrForMetCorr")
0031 )
0032
0033
0034 corrPfMetType1 = cms.EDProducer(
0035 "PFJetMETcorrInputProducer",
0036 src = cms.InputTag('ak4PFJetsCHS'),
0037 offsetCorrLabel = cms.InputTag("ak4PFCHSL1FastjetCorrector"),
0038 jetCorrLabel = cms.InputTag("ak4PFCHSL1FastL2L3Corrector"),
0039 jetCorrLabelRes = cms.InputTag("ak4PFCHSL1FastL2L3ResidualCorrector"),
0040 jetCorrEtaMax = cms.double(9.9),
0041 type1JetPtThreshold = cms.double(15.0),
0042 skipEM = cms.bool(True),
0043 skipEMfractionThreshold = cms.double(0.90),
0044 skipMuons = cms.bool(True),
0045 skipMuonSelection = cms.string("isGlobalMuon | isStandAloneMuon")
0046 )
0047
0048
0049 pfCandMETcorr = cms.EDProducer(
0050 "PFCandMETcorrInputProducer",
0051 src = cms.InputTag('pfCandsNotInJetsForMetCorr'),
0052 srcWeights = cms.InputTag('')
0053 )
0054
0055
0056 corrPfMetType2 = cms.EDProducer(
0057 "Type2CorrectionProducer",
0058 srcUnclEnergySums = cms.VInputTag(
0059 cms.InputTag('corrPfMetType1', 'type2'),
0060 cms.InputTag('corrPfMetType1', 'offset'),
0061 cms.InputTag('pfCandMETcorr')
0062 ),
0063 type2CorrFormula = cms.string("A"),
0064 type2CorrParameter = cms.PSet(
0065 A = cms.double(1.4)
0066 )
0067 )
0068
0069
0070 correctionTermsPfMetType1Type2Task = cms.Task(
0071 pfJetsPtrForMetCorr,
0072 particleFlowPtrs,
0073 pfCandsNotInJetsPtrForMetCorr,
0074 pfCandsNotInJetsForMetCorr,
0075 pfCandMETcorr,
0076 ak4PFCHSL1FastL2L3ResidualCorrectorTask,
0077 ak4PFCHSL1FastL2L3CorrectorTask,
0078 corrPfMetType1,
0079 corrPfMetType2
0080 )
0081
0082 correctionTermsPfMetType1Type2 = cms.Sequence(correctionTermsPfMetType1Type2Task)