1 import FWCore.ParameterSet.Config
as cms
6 cleanElectronCollection,
8 unCleanElectronCollection,
9 unCleanPhotonCollection ):
14 from PhysicsTools.PatUtils.tools.corMETFromMuonAndEG
import corMETFromMuonAndEG
15 from PhysicsTools.PatUtils.tools.runMETCorrectionsAndUncertainties
import runMetCorAndUncForMiniAODProduction
21 del process.patJetsBackupAllEvents.userData
22 process.patJetsBackupAllEvents.addAssociatedTracks = cms.bool(
False)
23 process.patJetsBackupAllEvents.addBTagInfo = cms.bool(
False)
24 process.patJetsBackupAllEvents.addDiscriminators = cms.bool(
False)
25 process.patJetsBackupAllEvents.addGenJetMatch = cms.bool(
False)
26 process.patJetsBackupAllEvents.addGenPartonMatch = cms.bool(
False)
27 process.patJetsBackupAllEvents.addJetCharge = cms.bool(
False)
28 process.patJetsBackupAllEvents.addJetCorrFactors = cms.bool(
True)
29 process.patJetsBackupAllEvents.addJetFlavourInfo = cms.bool(
False)
30 process.patJetsBackupAllEvents.addJetID = cms.bool(
False)
31 process.patJetsBackupAllEvents.addPartonJetMatch = cms.bool(
False)
32 process.patJetsBackupAllEvents.addResolutions = cms.bool(
False)
33 process.patJetsBackupAllEvents.addTagInfos = cms.bool(
False)
34 process.patJetsBackupAllEvents.discriminatorSources = cms.VInputTag()
35 process.patJetsBackupAllEvents.embedGenJetMatch = cms.bool(
False)
39 pfCandColl=cms.InputTag(unCleanPFCandidateCollection),
41 jetCollUnskimmed=
"patJetsBackupAllEvents",
45 if not hasattr(process,
"slimmedMETs"):
46 process.load(
'PhysicsTools.PatAlgos.slimming.slimmedMETs_cfi')
48 process.slimmedMETsUncorrected = process.slimmedMETs.clone()
49 task.add(process.slimmedMETs)
50 process.slimmedMETsUncorrected.src = cms.InputTag(
"patPFMetT1Uncorrected")
51 process.slimmedMETsUncorrected.rawVariation = cms.InputTag(
"patPFMetUncorrected")
52 process.slimmedMETsUncorrected.t1Uncertainties = cms.InputTag(
"patPFMetT1%sUncorrected")
53 process.slimmedMETsUncorrected.t01Variation = cms.InputTag(
"patPFMetT0pcT1Uncorrected")
54 process.slimmedMETsUncorrected.t1SmearedVarsAndUncs = cms.InputTag(
"patPFMetT1Smear%sUncorrected")
55 process.slimmedMETsUncorrected.tXYUncForRaw = cms.InputTag(
"patPFMetTxyUncorrected")
56 process.slimmedMETsUncorrected.tXYUncForT1 = cms.InputTag(
"patPFMetT1TxyUncorrected")
57 process.slimmedMETsUncorrected.tXYUncForT01 = cms.InputTag(
"patPFMetT0pcT1TxyUncorrected")
58 process.slimmedMETsUncorrected.tXYUncForT1Smear = cms.InputTag(
"patPFMetT1SmearTxyUncorrected")
59 process.slimmedMETsUncorrected.tXYUncForT01Smear = cms.InputTag(
"patPFMetT0pcT1SmearTxyUncorrected")
60 del process.slimmedMETsUncorrected.caloMET
65 electronCollection=unCleanElectronCollection,
66 photonCollection=unCleanPhotonCollection,
67 corElectronCollection=cleanElectronCollection,
68 corPhotonCollection=cleanPhotonCollection,
69 allMETEGCorrected=
True,
76 process.slimmedMETsEGClean = process.slimmedMETs.clone()
77 task.add(process.slimmedMETsEGClean)
78 process.slimmedMETsEGClean.src = cms.InputTag(
"patPFMetT1UncorrectedEGOnly")
79 process.slimmedMETsEGClean.rawVariation = cms.InputTag(
"patPFMetRawUncorrectedEGOnly")
80 process.slimmedMETsEGClean.t1Uncertainties = cms.InputTag(
"patPFMetT1%sUncorrectedEGOnly")
81 process.slimmedMETsEGClean.t01Variation = cms.InputTag(
"patPFMetT0pcT1UncorrectedEGOnly")
82 process.slimmedMETsEGClean.t1SmearedVarsAndUncs = cms.InputTag(
"patPFMetT1Smear%sUncorrectedEGOnly")
83 process.slimmedMETsEGClean.tXYUncForRaw = cms.InputTag(
"patPFMetTxyUncorrectedEGOnly")
84 process.slimmedMETsEGClean.tXYUncForT1 = cms.InputTag(
"patPFMetT1TxyUncorrectedEGOnly")
85 process.slimmedMETsEGClean.tXYUncForT01 = cms.InputTag(
"patPFMetT0pcT1TxyUncorrectedEGOnly")
86 process.slimmedMETsEGClean.tXYUncForT1Smear = cms.InputTag(
"patPFMetT1SmearTxyUncorrectedEGOnly")
87 process.slimmedMETsEGClean.tXYUncForT01Smear = cms.InputTag(
"patPFMetT0pcT1SmearTxyUncorrectedEGOnly")
88 del process.slimmedMETsEGClean.caloMET
93 electronCollection=unCleanElectronCollection,
94 photonCollection=unCleanPhotonCollection,
95 corElectronCollection=cleanElectronCollection,
96 corPhotonCollection=cleanPhotonCollection,
97 allMETEGCorrected=
True,
103 process.slimmedMETsMuEGClean = process.slimmedMETs.clone()
104 task.add(process.slimmedMETsMuEGClean)
105 process.slimmedMETsMuEGClean.src = cms.InputTag(
"patPFMetT1MuEGClean")
106 process.slimmedMETsMuEGClean.rawVariation = cms.InputTag(
"patPFMetRawMuEGClean")
107 process.slimmedMETsMuEGClean.t1Uncertainties = cms.InputTag(
"patPFMetT1%sMuEGClean")
108 process.slimmedMETsMuEGClean.t01Variation = cms.InputTag(
"patPFMetT0pcT1MuEGClean")
109 process.slimmedMETsMuEGClean.t1SmearedVarsAndUncs = cms.InputTag(
"patPFMetT1Smear%sMuEGClean")
110 process.slimmedMETsMuEGClean.tXYUncForRaw = cms.InputTag(
"patPFMetTxyMuEGClean")
111 process.slimmedMETsMuEGClean.tXYUncForT1 = cms.InputTag(
"patPFMetT1TxyMuEGClean")
112 process.slimmedMETsMuEGClean.tXYUncForT01 = cms.InputTag(
"patPFMetT0pcT1TxyMuEGClean")
113 process.slimmedMETsMuEGClean.tXYUncForT1Smear = cms.InputTag(
"patPFMetT1SmearTxyMuEGClean")
114 process.slimmedMETsMuEGClean.tXYUncForT01Smear = cms.InputTag(
"patPFMetT0pcT1SmearTxyMuEGClean")
115 del process.slimmedMETsMuEGClean.caloMET
118 [
"keep *_slimmedMETsUncorrected_*_*",
"keep *_slimmedMETsEGClean_*_*",
"keep *_slimmedMETsMuEGClean_*_*"])
123 cleanPFCandidateCollection,
124 unCleanPFCandidateCollection,
125 cleanElectronCollection,
126 cleanPhotonCollection,
127 unCleanElectronCollection,
128 unCleanPhotonCollection
133 from PhysicsTools.PatUtils.tools.corMETFromMuonAndEG
import corMETFromMuonAndEG
137 electronCollection=unCleanElectronCollection,
138 photonCollection=unCleanPhotonCollection,
139 corElectronCollection=cleanElectronCollection,
140 corPhotonCollection=cleanPhotonCollection,
141 allMETEGCorrected=
True,
145 eGPfCandMatching=
True,
150 if not hasattr(process,
"slimmedMETs"):
151 process.load(
'PhysicsTools.PatAlgos.slimming.slimmedMETs_cfi')
152 task.add(process.slimmedMETs)
154 process.slimmedMETsPuppi.src = cms.InputTag(
"patPFMetT1PuppiPuppiClean")
155 process.slimmedMETsPuppi.rawVariation = cms.InputTag(
"patPFMetRawPuppiPuppiClean")
156 process.slimmedMETsPuppi.t1Uncertainties = cms.InputTag(
"patPFMetT1%sPuppiPuppiClean")
157 process.slimmedMETsPuppi.t01Variation = cms.InputTag(
"patPFMetT0pcT1PuppiPuppiClean")
158 process.slimmedMETsPuppi.t1SmearedVarsAndUncs = cms.InputTag(
"patPFMetT1Smear%sPuppiPuppiClean")
159 process.slimmedMETsPuppi.tXYUncForRaw = cms.InputTag(
"patPFMetTxyPuppiPuppiClean")
160 process.slimmedMETsPuppi.tXYUncForT1 = cms.InputTag(
"patPFMetT1TxyPuppiPuppiClean")
161 process.slimmedMETsPuppi.tXYUncForT01 = cms.InputTag(
"patPFMetT0pcT1TxyPuppiPuppiClean")
162 process.slimmedMETsPuppi.tXYUncForT1Smear = cms.InputTag(
"patPFMetT1SmearTxyPuppiPuppiClean")
163 process.slimmedMETsPuppi.tXYUncForT01Smear = cms.InputTag(
"patPFMetT0pcT1SmearTxyPuppiPuppiClean")
167 process.puppiMETEGCor = cms.EDProducer(
"CorrMETDataExtractor",
168 corrections = cms.VInputTag(
169 cms.InputTag(
"corMETPhotonPuppiClean"),
170 cms.InputTag(
"corMETElectronPuppiClean") )
172 task.add(process.puppiMETEGCor)
175 process.puppiMuonCorrection = cms.EDProducer(
"ShiftedParticleMETcorrInputProducer",
176 srcOriginal = cms.InputTag(unCleanPFCandidateCollection),
177 srcShifted = cms.InputTag(cleanPFCandidateCollection),
178 srcWeights = cms.InputTag(
"")
181 task.add(process.puppiMuonCorrection)
183 process.puppiMETMuCor = cms.EDProducer(
"CorrMETDataExtractor",
184 corrections = cms.VInputTag(
185 cms.InputTag(
"puppiMuonCorrection") )
187 task.add(process.puppiMETMuCor)
189 [
"keep *_puppiMETEGCor_*_*",
"keep *_puppiMETMuCor_*_*"])