1 import FWCore.ParameterSet.Config
as cms
8 process.patMuons.isoDeposits = cms.PSet()
9 process.patElectrons.isoDeposits = cms.PSet()
10 process.patTaus.isoDeposits = cms.PSet()
11 process.patPhotons.isoDeposits = cms.PSet()
13 process.patMuons.embedTrack =
True
14 process.patMuons.embedCombinedMuon =
True
15 process.patMuons.embedMuonBestTrack =
True
16 process.patMuons.embedStandAloneMuon =
True
17 process.patMuons.embedPickyMuon =
False
18 process.patMuons.embedTpfmsMuon =
False
19 process.patMuons.embedDytMuon =
False
20 process.patMuons.addPuppiIsolation = cms.bool(
True)
21 process.patMuons.puppiIsolationChargedHadrons = cms.InputTag(
"muonPUPPIIsolation",
"h+-DR040-ThresholdVeto000-ConeVeto000")
22 process.patMuons.puppiIsolationNeutralHadrons = cms.InputTag(
"muonPUPPIIsolation",
"h0-DR040-ThresholdVeto000-ConeVeto001")
23 process.patMuons.puppiIsolationPhotons = cms.InputTag(
"muonPUPPIIsolation",
"gamma-DR040-ThresholdVeto000-ConeVeto001")
24 process.patMuons.puppiNoLeptonsIsolationChargedHadrons = cms.InputTag(
"muonPUPPINoLeptonsIsolation",
"h+-DR040-ThresholdVeto000-ConeVeto000")
25 process.patMuons.puppiNoLeptonsIsolationNeutralHadrons = cms.InputTag(
"muonPUPPINoLeptonsIsolation",
"h0-DR040-ThresholdVeto000-ConeVeto001")
26 process.patMuons.puppiNoLeptonsIsolationPhotons = cms.InputTag(
"muonPUPPINoLeptonsIsolation",
"gamma-DR040-ThresholdVeto000-ConeVeto001")
28 process.patMuons.computeMiniIso =
True
29 process.patMuons.computeMuonMVA =
True
30 process.patMuons.computeSoftMuonMVA =
True
32 process.patMuons.addTriggerMatching =
True
33 from Configuration.Eras.Modifier_run2_muon_2016_cff
import run2_muon_2016
34 from Configuration.Eras.Modifier_run2_muon_2017_cff
import run2_muon_2017
35 from Configuration.Eras.Modifier_run2_muon_2018_cff
import run2_muon_2018
36 run2_muon_2016.toModify( process.patMuons, effectiveAreaVec = [0.0735,0.0619,0.0465,0.0433,0.0577])
37 run2_muon_2017.toModify( process.patMuons, effectiveAreaVec = [0.0566, 0.0562, 0.0363, 0.0119, 0.0064])
38 run2_muon_2018.toModify( process.patMuons, effectiveAreaVec = [0.0566, 0.0562, 0.0363, 0.0119, 0.0064])
39 run2_muon_2016.toModify( process.patMuons, mvaTrainingFile =
"RecoMuon/MuonIdentification/data/mu_2016_BDTG.weights.xml")
41 process.patMuons.computePuppiCombinedIso =
True
44 process.patElectrons.embedGsfElectronCore =
False
45 process.patElectrons.embedSuperCluster =
False
46 process.patElectrons.embedPflowSuperCluster =
False
47 process.patElectrons.embedSeedCluster =
False
48 process.patElectrons.embedBasicClusters =
False
49 process.patElectrons.embedPreshowerClusters =
False
50 process.patElectrons.embedPflowBasicClusters =
False
51 process.patElectrons.embedPflowPreshowerClusters =
False
52 process.patElectrons.embedRecHits =
False
53 process.patElectrons.electronSource = cms.InputTag(
"reducedEgamma",
"reducedGedGsfElectrons")
54 process.patElectrons.usePfCandidateMultiMap =
True
55 process.patElectrons.pfCandidateMultiMap = cms.InputTag(
"reducedEgamma",
"reducedGsfElectronPfCandMap")
56 process.patElectrons.electronIDSources = cms.PSet()
58 from Configuration.Eras.Modifier_run2_miniAOD_80XLegacy_cff
import run2_miniAOD_80XLegacy
59 from Configuration.Eras.Modifier_run2_miniAOD_94XFall17_cff
import run2_miniAOD_94XFall17
60 (run2_miniAOD_80XLegacy | run2_miniAOD_94XFall17).toModify(process.patElectrons,
61 addPFClusterIso =
True,
62 ecalPFClusterIsoMap =
"reducedEgamma:eleEcalPFClusIso",
63 hcalPFClusterIsoMap =
"reducedEgamma:eleHcalPFClusIso")
66 process.patElectrons.addPuppiIsolation = cms.bool(
True)
67 process.patElectrons.puppiIsolationChargedHadrons = cms.InputTag(
"egmElectronPUPPIIsolation",
"h+-DR030-BarVeto000-EndVeto001")
68 process.patElectrons.puppiIsolationNeutralHadrons = cms.InputTag(
"egmElectronPUPPIIsolation",
"h0-DR030-BarVeto000-EndVeto000")
69 process.patElectrons.puppiIsolationPhotons = cms.InputTag(
"egmElectronPUPPIIsolation",
"gamma-DR030-BarVeto000-EndVeto008")
70 process.patElectrons.puppiNoLeptonsIsolationChargedHadrons = cms.InputTag(
"egmElectronPUPPINoLeptonsIsolation",
"h+-DR030-BarVeto000-EndVeto001")
71 process.patElectrons.puppiNoLeptonsIsolationNeutralHadrons = cms.InputTag(
"egmElectronPUPPINoLeptonsIsolation",
"h0-DR030-BarVeto000-EndVeto000")
72 process.patElectrons.puppiNoLeptonsIsolationPhotons = cms.InputTag(
"egmElectronPUPPINoLeptonsIsolation",
"gamma-DR030-BarVeto000-EndVeto008")
74 process.patElectrons.computeMiniIso = cms.bool(
True)
76 process.elPFIsoDepositChargedPAT.src = cms.InputTag(
"reducedEgamma",
"reducedGedGsfElectrons")
77 process.elPFIsoDepositChargedAllPAT.src = cms.InputTag(
"reducedEgamma",
"reducedGedGsfElectrons")
78 process.elPFIsoDepositNeutralPAT.src = cms.InputTag(
"reducedEgamma",
"reducedGedGsfElectrons")
79 process.elPFIsoDepositGammaPAT.src = cms.InputTag(
"reducedEgamma",
"reducedGedGsfElectrons")
80 process.elPFIsoDepositPUPAT.src = cms.InputTag(
"reducedEgamma",
"reducedGedGsfElectrons")
82 process.patPhotons.embedSuperCluster =
False
83 process.patPhotons.embedSeedCluster =
False
84 process.patPhotons.embedBasicClusters =
False
85 process.patPhotons.embedPreshowerClusters =
False
86 process.patPhotons.embedRecHits =
False
89 process.patPhotons.addPuppiIsolation = cms.bool(
True)
90 process.patPhotons.puppiIsolationChargedHadrons = cms.InputTag(
"egmPhotonPUPPIIsolation",
"h+-DR030-")
91 process.patPhotons.puppiIsolationNeutralHadrons = cms.InputTag(
"egmPhotonPUPPIIsolation",
"h0-DR030-")
92 process.patPhotons.puppiIsolationPhotons = cms.InputTag(
"egmPhotonPUPPIIsolation",
"gamma-DR030-")
94 (run2_miniAOD_80XLegacy | run2_miniAOD_94XFall17).toModify(process.patPhotons,
95 addPFClusterIso =
True,
96 ecalPFClusterIsoMap =
"reducedEgamma:phoEcalPFClusIso",
97 hcalPFClusterIsoMap =
"reducedEgamma:phoHcalPFClusIso")
99 run2_miniAOD_94XFall17.toModify(process.patOOTPhotons,
100 addPFClusterIso =
True,
101 ecalPFClusterIsoMap =
"reducedEgamma:ootPhoEcalPFClusIso",
102 hcalPFClusterIsoMap =
"reducedEgamma:ootPhoHcalPFClusIso")
105 process.patPhotons.photonSource = cms.InputTag(
"reducedEgamma",
"reducedGedPhotons")
106 process.patPhotons.electronSource = cms.InputTag(
"reducedEgamma",
"reducedGedGsfElectrons")
108 process.phPFIsoDepositChargedPAT.src = cms.InputTag(
"reducedEgamma",
"reducedGedPhotons")
109 process.phPFIsoDepositChargedAllPAT.src = cms.InputTag(
"reducedEgamma",
"reducedGedPhotons")
110 process.phPFIsoDepositNeutralPAT.src = cms.InputTag(
"reducedEgamma",
"reducedGedPhotons")
111 process.phPFIsoDepositGammaPAT.src = cms.InputTag(
"reducedEgamma",
"reducedGedPhotons")
112 process.phPFIsoDepositPUPAT.src = cms.InputTag(
"reducedEgamma",
"reducedGedPhotons")
114 process.patOOTPhotons.photonSource = cms.InputTag(
"reducedEgamma",
"reducedOOTPhotons")
115 process.patOOTPhotons.electronSource = cms.InputTag(
"reducedEgamma",
"reducedGedGsfElectrons")
117 process.selectedPatJets.cut = cms.string(
"pt > 10")
118 process.selectedPatMuons.cut = cms.string(
"pt > 5 || isPFMuon || (pt > 3 && (isGlobalMuon || isStandAloneMuon || numberOfMatches > 0 || muonID('RPCMuLoose')))")
120 from Configuration.Eras.Modifier_phase2_muon_cff
import phase2_muon
121 phase2_muon.toModify(process.selectedPatMuons, cut =
"pt > 5 || isPFMuon || (pt > 3 && (isGlobalMuon || isStandAloneMuon || numberOfMatches > 0 || muonID('RPCMuLoose') || muonID('ME0MuonArbitrated') || muonID('GEMMuonArbitrated')) )")
123 process.selectedPatElectrons.cut = cms.string(
"")
124 process.selectedPatTaus.cut = cms.string(
"pt > 18. && tauID('decayModeFindingNewDMs')> 0.5")
125 process.selectedPatPhotons.cut = cms.string(
"")
129 from PhysicsTools.PatAlgos.slimming.applySubstructure_cff
import applySubstructure
134 from PhysicsTools.PatAlgos.tools.trigTools
import switchOnTriggerStandAlone
136 process.patTrigger.packTriggerPathNames = cms.bool(
True)
141 from PhysicsTools.PatUtils.tools.runMETCorrectionsAndUncertainties
import runMetCorAndUncForMiniAODProduction
143 jetCollUnskimmed=
"patJets")
146 from PhysicsTools.PatAlgos.tools.metTools
import addMETCollection
147 addMETCollection(process,
148 labelName =
"patCaloMet",
149 metSource =
"caloMetM"
156 process.noHFCands = cms.EDFilter(
"GenericPFCandidateSelector",
157 src=cms.InputTag(
"particleFlow"),
158 cut=cms.string(
"abs(pdgId)!=1 && abs(pdgId)!=2 && abs(eta)<3.0")
160 task.add(process.noHFCands)
163 pfCandColl=cms.InputTag(
"noHFCands"),
164 recoMetFromPFCs=
True,
165 jetSelection=
"pt>15 && abs(eta)<3.",
169 process.load(
'PhysicsTools.PatAlgos.slimming.slimmedMETs_cfi')
170 task.add(process.slimmedMETs)
171 process.slimmedMETs.addDeepMETs =
True
174 process.slimmedMETsNoHF.src = cms.InputTag(
"patMETsNoHF")
175 process.slimmedMETsNoHF.rawVariation = cms.InputTag(
"patPFMetNoHF")
176 process.slimmedMETsNoHF.t1Uncertainties = cms.InputTag(
"patPFMetT1%sNoHF")
177 process.slimmedMETsNoHF.t01Variation = cms.InputTag(
"patPFMetT0pcT1NoHF")
178 process.slimmedMETsNoHF.t1SmearedVarsAndUncs = cms.InputTag(
"patPFMetT1Smear%sNoHF")
179 process.slimmedMETsNoHF.tXYUncForRaw = cms.InputTag(
"patPFMetTxyNoHF")
180 process.slimmedMETsNoHF.tXYUncForT1 = cms.InputTag(
"patPFMetT1TxyNoHF")
181 process.slimmedMETsNoHF.tXYUncForT01 = cms.InputTag(
"patPFMetT0pcT1TxyNoHF")
182 process.slimmedMETsNoHF.tXYUncForT1Smear = cms.InputTag(
"patPFMetT1SmearTxyNoHF")
183 process.slimmedMETsNoHF.tXYUncForT01Smear = cms.InputTag(
"patPFMetT0pcT1SmearTxyNoHF")
184 del process.slimmedMETsNoHF.caloMET
188 process.CHSCands = cms.EDFilter(
"CandPtrSelector",
189 src=cms.InputTag(
"packedPFCandidates"),
190 cut=cms.string(
"fromPV(0) > 0")
192 task.add(process.CHSCands)
195 process.pfMetCHS = pfMet.clone(src =
'CHSCands')
196 task.add(process.pfMetCHS)
198 addMETCollection(process,
199 labelName =
"patCHSMet",
200 metSource =
"pfMetCHS"
203 process.patCHSMet.computeMETSignificance = cms.bool(
False)
208 process.TrkCands = cms.EDFilter(
"CandPtrSelector",
209 src=cms.InputTag(
"packedPFCandidates"),
210 cut=cms.string(
"charge()!=0 && pvAssociationQuality()>=4 && vertexRef().key()==0")
212 task.add(process.TrkCands)
214 process.pfMetTrk = pfMet.clone(src =
'TrkCands')
215 task.add(process.pfMetTrk)
217 addMETCollection(process,
218 labelName =
"patTrkMet",
219 metSource =
"pfMetTrk"
222 process.patTrkMet.computeMETSignificance = cms.bool(
False)
228 process.load(
"RecoJets.JetProducers.PileupJetID_cfi")
229 task.add(process.pileUpJetIDTask)
231 process.patJets.userData.userFloats.src = [ cms.InputTag(
"pileupJetId:fullDiscriminant"), ]
232 process.patJets.userData.userInts.src = [ cms.InputTag(
"pileupJetId:fullId"), ]
235 process.load(
'RecoJets.JetProducers.QGTagger_cfi')
236 task.add(process.QGTaggerTask)
238 process.patJets.userData.userFloats.src += [ cms.InputTag(
'QGTagger:qgLikelihood'), ]
241 process.load(
'RecoBTag.Combined.deepFlavour_cff')
242 task.add(process.pfDeepCSVDiscriminatorsJetTags)
243 process.patJets.discriminatorSources.extend([
244 cms.InputTag(
'pfDeepCSVDiscriminatorsJetTags:BvsAll' ),
245 cms.InputTag(
'pfDeepCSVDiscriminatorsJetTags:CvsB' ),
246 cms.InputTag(
'pfDeepCSVDiscriminatorsJetTags:CvsL' ),
250 process.caloJetMap = cms.EDProducer(
"RecoJetDeltaRValueMapProducer",
251 src = process.patJets.jetSource,
252 matched = cms.InputTag(
"ak4CaloJets"),
253 distMax = cms.double(0.4),
254 values = cms.vstring(
'pt',
'emEnergyFraction'),
255 valueLabels = cms.vstring(
'pt',
'emEnergyFraction'),
256 lazyParser = cms.bool(
True) )
257 task.add(process.caloJetMap)
258 process.patJets.userData.userFloats.src += [ cms.InputTag(
"caloJetMap:pt"), cms.InputTag(
"caloJetMap:emEnergyFraction") ]
261 from PhysicsTools.PatAlgos.slimming.muonIsolationsPUPPI_cfi
import makeInputForPUPPIIsolationMuon
265 from PhysicsTools.PatAlgos.slimming.egmIsolationsPUPPI_cfi
import makeInputForPUPPIIsolationEgm
267 from RecoEgamma.EgammaTools.egammaObjectModificationsInMiniAOD_cff
import egamma_modifications
268 process.slimmedElectrons.modifierConfig.modifications = egamma_modifications
269 process.slimmedPhotons.modifierConfig.modifications = egamma_modifications
272 process.patElectrons.addElectronID = cms.bool(
True)
273 electron_ids = [
'RecoEgamma.ElectronIdentification.Identification.heepElectronID_HEEPV70_cff',
274 'RecoEgamma.ElectronIdentification.Identification.heepElectronID_HEEPV71_cff',
275 'RecoEgamma.ElectronIdentification.Identification.cutBasedElectronID_Fall17_94X_V1_cff',
276 'RecoEgamma.ElectronIdentification.Identification.cutBasedElectronID_Fall17_94X_V2_cff',
277 'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_Fall17_noIso_V1_cff',
278 'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_Fall17_iso_V1_cff',
279 'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_Fall17_noIso_V2_cff',
280 'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_Fall17_iso_V2_cff',
281 'RecoEgamma.ElectronIdentification.Identification.cutBasedElectronID_Summer16_80X_V1_cff',
282 'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_Spring16_GeneralPurpose_V1_cff',
283 'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_Spring16_HZZ_V1_cff',
286 process.egmGsfElectronIDs.physicsObjectSrc = \
287 cms.InputTag(
"reducedEgamma",
"reducedGedGsfElectrons")
288 process.electronMVAValueMapProducer.src = \
289 cms.InputTag(
'reducedEgamma',
'reducedGedGsfElectrons')
290 for idmod
in electron_ids:
294 process.patPhotons.addPhotonID = cms.bool(
True)
295 photon_ids = [
'RecoEgamma.PhotonIdentification.Identification.cutBasedPhotonID_Fall17_94X_V1_TrueVtx_cff',
296 'RecoEgamma.PhotonIdentification.Identification.cutBasedPhotonID_Fall17_94X_V2_cff',
297 'RecoEgamma.PhotonIdentification.Identification.mvaPhotonID_Fall17_94X_V1p1_cff',
298 'RecoEgamma.PhotonIdentification.Identification.mvaPhotonID_Fall17_94X_V2_cff',
299 'RecoEgamma.PhotonIdentification.Identification.cutBasedPhotonID_Spring16_V2p2_cff',
300 'RecoEgamma.PhotonIdentification.Identification.mvaPhotonID_Spring16_nonTrig_V1_cff']
302 process.egmPhotonIDs.physicsObjectSrc = \
303 cms.InputTag(
"reducedEgamma",
"reducedGedPhotons")
304 process.photonMVAValueMapProducer.src = \
305 cms.InputTag(
'reducedEgamma',
'reducedGedPhotons')
306 for idmod
in photon_ids:
310 from RecoEgamma.EgammaTools.egammaObjectModifications_tools
import makeVIDBitsModifier
311 egamma_modifications.append(
makeVIDBitsModifier(process,
"egmGsfElectronIDs",
"egmPhotonIDs"))
314 from RecoTauTag.Configuration.boostedHPSPFTaus_cfi
import addBoostedTaus
316 process.load(
"RecoTauTag.Configuration.RecoPFTauTag_cff")
317 process.load(
"RecoTauTag.Configuration.HPSPFTaus_cff")
319 _makePatTausTaskWithRetrainedMVATauID = process.makePatTausTask.copy()
320 _makePatTausTaskWithRetrainedMVATauID.add(process.hpsPFTauBasicDiscriminatorsTask,
321 process.hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTTask,
322 process.hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTTask,
323 process.hpsPFTauBasicDiscriminatorsdR03Task,
324 process.hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTTask,
325 process.hpsPFTauDiscriminationByMVA6rawElectronRejection,
326 process.hpsPFTauDiscriminationByMVA6ElectronRejection,
327 process.hpsPFTauDiscriminationByMuonRejection3)
328 from Configuration.ProcessModifiers.run2_miniAOD_UL_cff
import run2_miniAOD_UL
329 (run2_miniAOD_94XFall17 | run2_miniAOD_UL).toReplaceWith(
330 process.makePatTausTask, _makePatTausTaskWithRetrainedMVATauID
334 _updatedTauName =
'slimmedTausDeepIDsv2p1'
335 _noUpdatedTauName =
'slimmedTausNoDeepIDs'
336 import RecoTauTag.RecoTau.tools.runTauIdMVA
as tauIdConfig
337 tauIdEmbedder = tauIdConfig.TauIDEmbedder(
338 process, debug =
False,
339 updatedTauName = _updatedTauName,
340 toKeep = [
'deepTau2017v2p1']
342 tauIdEmbedder.runTauID()
344 delattr(process,
'slimmedTaus')
345 process.deepTau2017v2p1.taus = _noUpdatedTauName
346 process.slimmedTaus = getattr(process, _updatedTauName).
clone(
347 src = _noUpdatedTauName
349 process.deepTauIDTask = cms.Task(process.deepTau2017v2p1, process.slimmedTaus)
350 task.add(process.deepTauIDTask)
353 from Configuration.Eras.Modifier_pp_on_AA_2018_cff
import pp_on_AA_2018
354 _makePatTausTaskWithTauReReco = process.makePatTausTask.copy()
355 _makePatTausTaskWithTauReReco.add(process.PFTauTask)
356 (run2_miniAOD_80XLegacy | pp_on_AA_2018).toReplaceWith(
357 process.makePatTausTask, _makePatTausTaskWithTauReReco
361 process.load(
'CommonTools.PileupAlgos.Puppi_cff')
362 process.load(
'RecoJets.JetProducers.ak4PFJets_cfi')
363 from Configuration.Eras.Modifier_pA_2016_cff
import pA_2016
364 _rerun_puppijets_task = task.copy()
365 _rerun_puppijets_task.add(process.puppi, process.ak4PFJetsPuppi)
366 _run2_miniAOD_ANY = (run2_miniAOD_80XLegacy | run2_miniAOD_94XFall17 | run2_miniAOD_UL)
367 (_run2_miniAOD_ANY | pA_2016 | pp_on_AA_2018).toReplaceWith(task, _rerun_puppijets_task)
370 process.ak4PFJetsPuppiTracksAssociatorAtVertex = cms.EDProducer(
"JetTracksAssociatorAtVertex",
372 jets = cms.InputTag(
"ak4PFJetsPuppi")
374 task.add(process.ak4PFJetsPuppiTracksAssociatorAtVertex)
375 process.patJetPuppiCharge = cms.EDProducer(
"JetChargeProducer",
376 src = cms.InputTag(
"ak4PFJetsPuppiTracksAssociatorAtVertex"),
377 var = cms.string(
'Pt'),
378 exp = cms.double(1.0)
380 task.add(process.patJetPuppiCharge)
382 noDeepFlavourDiscriminators = [x.value()
for x
in process.patJets.discriminatorSources
if not "DeepFlavour" in x.value()]
383 addJetCollection(process, postfix =
"", labelName =
'Puppi', jetSource = cms.InputTag(
'ak4PFJetsPuppi'),
384 jetCorrections = (
'AK4PFPuppi', [
'L2Relative',
'L3Absolute'],
''),
385 pfCandidates = cms.InputTag(
"particleFlow"),
386 algo=
'AK', rParam = 0.4, btagDiscriminators = noDeepFlavourDiscriminators
389 process.patJetGenJetMatchPuppi.matched =
'slimmedGenJets'
391 process.patJetsPuppi.jetChargeSource = cms.InputTag(
"patJetPuppiCharge")
393 process.selectedPatJetsPuppi.cut = cms.string(
"pt > 15")
395 from PhysicsTools.PatAlgos.slimming.applyDeepBtagging_cff
import applyDeepBtagging
399 src =
"selectedPatJetsPuppi", packedPFCandidates =
"packedPFCandidates"),
402 task.add(process.slimmedJetsPuppi)
405 process.patJets.addTagInfos =
True
406 process.patJets.tagInfoSources = [
"pixelClusterTagInfos"]
407 process.slimmedJetsNoDeepFlavour.dropTagInfos =
'0'
408 process.updatedPatJetsTransientCorrectedSlimmedDeepFlavour.addTagInfos =
True
409 process.updatedPatJetsTransientCorrectedSlimmedDeepFlavour.tagInfoSources = [
"pixelClusterTagInfos"]
411 _run2_miniAOD_ANY.toModify(process.patJets, addTagInfos =
False )
412 _run2_miniAOD_ANY.toModify(process.updatedPatJetsTransientCorrectedSlimmedDeepFlavour, addTagInfos =
False )
415 process.load(
'RecoMET.METProducers.pfMetPuppi_cfi')
416 _rerun_puppimet_task = task.copy()
417 _rerun_puppimet_task.add(process.puppiNoLep, process.pfMetPuppi)
418 _run2_miniAOD_ANY.toReplaceWith(task, _rerun_puppimet_task)
421 jetCollUnskimmed=
"slimmedJetsPuppi",
422 recoMetFromPFCs=
True,
423 jetFlavor=
"AK4PFPuppi",
427 process.load(
'PhysicsTools.PatAlgos.slimming.slimmedMETs_cfi')
428 task.add(process.slimmedMETs)
430 process.slimmedMETsPuppi.src = cms.InputTag(
"patMETsPuppi")
431 process.slimmedMETsPuppi.rawVariation = cms.InputTag(
"patPFMetPuppi")
432 process.slimmedMETsPuppi.t1Uncertainties = cms.InputTag(
"patPFMetT1%sPuppi")
433 process.slimmedMETsPuppi.t01Variation = cms.InputTag(
"patPFMetT0pcT1Puppi")
434 process.slimmedMETsPuppi.t1SmearedVarsAndUncs = cms.InputTag(
"patPFMetT1Smear%sPuppi")
435 process.slimmedMETsPuppi.tXYUncForRaw = cms.InputTag(
"patPFMetTxyPuppi")
436 process.slimmedMETsPuppi.tXYUncForT1 = cms.InputTag(
"patPFMetT1TxyPuppi")
437 process.slimmedMETsPuppi.tXYUncForT01 = cms.InputTag(
"patPFMetT0pcT1TxyPuppi")
438 process.slimmedMETsPuppi.tXYUncForT1Smear = cms.InputTag(
"patPFMetT1SmearTxyPuppi")
439 process.slimmedMETsPuppi.tXYUncForT01Smear = cms.InputTag(
"patPFMetT0pcT1SmearTxyPuppi")
440 del process.slimmedMETsPuppi.caloMET
442 process.load(
'RecoMET.METPUSubtraction.deepMETProducer_cfi')
444 addToProcessAndTask(
'deepMETsResolutionTune', process.deepMETProducer.clone(), process, task)
445 addToProcessAndTask(
'deepMETsResponseTune', process.deepMETProducer.clone(), process, task)
446 process.deepMETsResponseTune.graph_path =
'RecoMET/METPUSubtraction/data/deepmet/deepmet_resp_v1_2018.pb'
448 from Configuration.Eras.Modifier_phase2_common_cff
import phase2_common
449 phase2_common.toModify(
450 process.deepMETsResolutionTune,
452 graph_path=
"RecoMET/METPUSubtraction/data/deepmet/deepmet_v1_phase2.pb"
454 phase2_common.toModify(
455 process.deepMETsResponseTune,
457 graph_path=
"RecoMET/METPUSubtraction/data/deepmet/deepmet_resp_v1_phase2.pb"
460 from Configuration.Eras.Modifier_run2_jme_2016_cff
import run2_jme_2016
461 run2_jme_2016.toModify(
462 process.deepMETsResponseTune,
463 graph_path=
"RecoMET/METPUSubtraction/data/deepmet/deepmet_resp_v1_2016.pb"
466 process.load(
"TrackingTools.TrackAssociator.DetIdAssociatorESProducer_cff")
470 from Configuration.Eras.Modifier_phase2_hgcal_cff
import phase2_hgcal
471 process.load(
"RecoEgamma.EgammaTools.slimmedEgammaFromMultiCl_cff")
472 phase2_hgcal.toModify(task, func=
lambda t: t.add(process.slimmedEgammaFromMultiClTask))
475 from Configuration.Eras.Modifier_run2_L1prefiring_cff
import run2_L1prefiring
476 from Configuration.Eras.Modifier_stage1L1Trigger_cff
import stage1L1Trigger
477 from Configuration.Eras.Modifier_stage2L1Trigger_2017_cff
import stage2L1Trigger_2017
478 process.load(
"PhysicsTools.PatUtils.L1ECALPrefiringWeightProducer_cff")
479 stage1L1Trigger.toModify(process.prefiringweight, DataEra =
"2016BtoH")
480 stage2L1Trigger_2017.toModify(process.prefiringweight, DataEra =
"2017BtoF")
481 run2_L1prefiring.toModify(task, func=
lambda t: t.add(process.prefiringweight))
486 process.load(
"PhysicsTools.JetMCAlgos.HadronAndPartonSelector_cfi")
487 task.add(process.selectedHadronsAndPartons)
488 task.add(process.selectedHadronsAndPartonsForGenJetsFlavourInfos)
490 process.load(
"PhysicsTools.JetMCAlgos.AK4GenJetFlavourInfos_cfi")
491 task.add(process.ak4GenJetFlavourInfos)
493 process.load(
'PhysicsTools.PatAlgos.slimming.slimmedGenJetsFlavourInfos_cfi')
494 task.add(process.slimmedGenJetsFlavourInfos)
497 process.load(
'PhysicsTools.PatAlgos.slimming.slimmedAddPileupInfo_cfi')
498 task.add(process.slimmedAddPileupInfo)
500 process.muonMatch.matched =
"prunedGenParticles"
501 process.electronMatch.matched =
"prunedGenParticles"
502 process.electronMatch.src = cms.InputTag(
"reducedEgamma",
"reducedGedGsfElectrons")
503 process.photonMatch.matched =
"prunedGenParticles"
504 process.photonMatch.src = cms.InputTag(
"reducedEgamma",
"reducedGedPhotons")
505 process.ootPhotonMatch.matched =
"prunedGenParticles"
506 process.ootPhotonMatch.src = cms.InputTag(
"reducedEgamma",
"reducedOOTPhotons")
507 process.tauMatch.matched =
"prunedGenParticles"
508 process.tauGenJets.GenParticles =
"prunedGenParticles"
510 process.tauMatchBoosted.matched =
"prunedGenParticles"
511 process.tauGenJetsBoosted.GenParticles =
"prunedGenParticles"
512 process.patJetPartons.particles =
"genParticles"
513 process.patJetPartonMatch.matched =
"prunedGenParticles"
514 process.patJetPartonMatch.mcStatus = [ 3, 23 ]
515 process.patJetGenJetMatch.matched =
"slimmedGenJets"
516 process.patJetGenJetMatchAK8Puppi.matched =
"slimmedGenJetsAK8"
517 process.patMuons.embedGenMatch =
False
518 process.patElectrons.embedGenMatch =
False
519 process.patPhotons.embedGenMatch =
False
520 process.patOOTPhotons.embedGenMatch =
False
521 process.patTaus.embedGenMatch =
False
522 process.patTausBoosted.embedGenMatch =
False
523 process.patJets.embedGenPartonMatch =
False
525 process.patJetFlavourAssociation.rParam = 0.4
529 out.overrideBranchesSplitLevel = MiniAODOverrideBranchesSplitLevel
530 out.splitLevel = cms.untracked.int32(0)
531 out.dropMetaData = cms.untracked.string(
'ALL')
532 out.fastCloning= cms.untracked.bool(
False)
533 out.overrideInputFileSplitLevels = cms.untracked.bool(
True)
534 out.compressionAlgorithm = cms.untracked.string(
'LZMA')
538 runOnData( process, outputModules = [] )
539 process.load(
"RecoPPS.Local.ctppsLocalTrackLiteProducer_cff")
540 process.load(
"RecoPPS.ProtonReconstruction.ctppsProtons_cff")
541 process.load(
"Geometry.VeryForwardGeometry.geometryRPFromDB_cfi")
543 from Configuration.Eras.Modifier_ctpps_2016_cff
import ctpps_2016
544 ctpps_2016.toModify(task, func=
lambda t: t.add(process.ctppsLocalTrackLiteProducer))
545 ctpps_2016.toModify(task, func=
lambda t: t.add(process.ctppsProtons))
564 process.patMuons.addTriggerMatching =
False
566 from Configuration.Eras.Modifier_fastSim_cff
import fastSim
567 fastSim.toModify(process.patJets, addTagInfos = cms.bool(
False) )
568 fastSim.toModify(process.slimmedJetsNoDeepFlavour, dropTagInfos = cms.string(
'1') )
569 fastSim.toModify(process.updatedPatJetsSlimmedDeepFlavour, addTagInfos = cms.bool(
False) )
570 fastSim.toModify(process.updatedPatJetsTransientCorrectedSlimmedDeepFlavour, addTagInfos = cms.bool(
False) )