12 process.patMuons.isoDeposits = cms.PSet()
13 process.patElectrons.isoDeposits = cms.PSet()
14 process.patTaus.isoDeposits = cms.PSet()
15 process.patPhotons.isoDeposits = cms.PSet()
17 process.patMuons.embedTrack =
True 18 process.patMuons.embedCombinedMuon =
True 19 process.patMuons.embedMuonBestTrack =
True 20 process.patMuons.embedStandAloneMuon =
True 21 process.patMuons.embedPickyMuon =
False 22 process.patMuons.embedTpfmsMuon =
False 23 process.patMuons.embedDytMuon =
False 24 process.patMuons.addPuppiIsolation = cms.bool(
True)
25 process.patMuons.puppiIsolationChargedHadrons = cms.InputTag(
"muonPUPPIIsolation",
"h+-DR040-ThresholdVeto000-ConeVeto000")
26 process.patMuons.puppiIsolationNeutralHadrons = cms.InputTag(
"muonPUPPIIsolation",
"h0-DR040-ThresholdVeto000-ConeVeto001")
27 process.patMuons.puppiIsolationPhotons = cms.InputTag(
"muonPUPPIIsolation",
"gamma-DR040-ThresholdVeto000-ConeVeto001")
28 process.patMuons.puppiNoLeptonsIsolationChargedHadrons = cms.InputTag(
"muonPUPPINoLeptonsIsolation",
"h+-DR040-ThresholdVeto000-ConeVeto000")
29 process.patMuons.puppiNoLeptonsIsolationNeutralHadrons = cms.InputTag(
"muonPUPPINoLeptonsIsolation",
"h0-DR040-ThresholdVeto000-ConeVeto001")
30 process.patMuons.puppiNoLeptonsIsolationPhotons = cms.InputTag(
"muonPUPPINoLeptonsIsolation",
"gamma-DR040-ThresholdVeto000-ConeVeto001")
32 process.patMuons.computeMiniIso =
True 33 process.patMuons.computeMuonIDMVA =
True 34 process.patMuons.computeSoftMuonMVA =
True 36 process.patMuons.addTriggerMatching =
True 37 from Configuration.Eras.Modifier_run2_muon_2016_cff
import run2_muon_2016
38 from Configuration.Eras.Modifier_run2_muon_2017_cff
import run2_muon_2017
39 from Configuration.Eras.Modifier_run2_muon_2018_cff
import run2_muon_2018
40 from Configuration.Eras.Modifier_run3_muon_cff
import run3_muon
41 run2_muon_2016.toModify( process.patMuons, effectiveAreaVec = [0.0735,0.0619,0.0465,0.0433,0.0577])
42 run2_muon_2017.toModify( process.patMuons, effectiveAreaVec = [0.0566, 0.0562, 0.0363, 0.0119, 0.0064])
43 run2_muon_2018.toModify( process.patMuons, effectiveAreaVec = [0.0566, 0.0562, 0.0363, 0.0119, 0.0064])
44 run3_muon.toModify( process.patMuons, effectiveAreaVec = [0.0566, 0.0562, 0.0363, 0.0119, 0.0064])
46 process.patMuons.computePuppiCombinedIso =
True 49 process.patElectrons.embedGsfElectronCore =
False 50 process.patElectrons.embedSuperCluster =
False 51 process.patElectrons.embedPflowSuperCluster =
False 52 process.patElectrons.embedSeedCluster =
False 53 process.patElectrons.embedBasicClusters =
False 54 process.patElectrons.embedPreshowerClusters =
False 55 process.patElectrons.embedPflowBasicClusters =
False 56 process.patElectrons.embedPflowPreshowerClusters =
False 57 process.patElectrons.embedRecHits =
False 58 process.patElectrons.electronSource = cms.InputTag(
"reducedEgamma",
"reducedGedGsfElectrons")
59 process.patElectrons.usePfCandidateMultiMap =
True 60 process.patElectrons.pfCandidateMultiMap = cms.InputTag(
"reducedEgamma",
"reducedGsfElectronPfCandMap")
61 process.patElectrons.electronIDSources = cms.PSet()
64 process.patElectrons.addPuppiIsolation = cms.bool(
True)
65 process.patElectrons.puppiIsolationChargedHadrons = cms.InputTag(
"egmElectronPUPPIIsolation",
"h+-DR030-BarVeto000-EndVeto001")
66 process.patElectrons.puppiIsolationNeutralHadrons = cms.InputTag(
"egmElectronPUPPIIsolation",
"h0-DR030-BarVeto000-EndVeto000")
67 process.patElectrons.puppiIsolationPhotons = cms.InputTag(
"egmElectronPUPPIIsolation",
"gamma-DR030-BarVeto000-EndVeto008")
68 process.patElectrons.puppiNoLeptonsIsolationChargedHadrons = cms.InputTag(
"egmElectronPUPPINoLeptonsIsolation",
"h+-DR030-BarVeto000-EndVeto001")
69 process.patElectrons.puppiNoLeptonsIsolationNeutralHadrons = cms.InputTag(
"egmElectronPUPPINoLeptonsIsolation",
"h0-DR030-BarVeto000-EndVeto000")
70 process.patElectrons.puppiNoLeptonsIsolationPhotons = cms.InputTag(
"egmElectronPUPPINoLeptonsIsolation",
"gamma-DR030-BarVeto000-EndVeto008")
72 process.patElectrons.computeMiniIso = cms.bool(
True)
74 process.elPFIsoDepositChargedPAT.src = cms.InputTag(
"reducedEgamma",
"reducedGedGsfElectrons")
75 process.elPFIsoDepositChargedAllPAT.src = cms.InputTag(
"reducedEgamma",
"reducedGedGsfElectrons")
76 process.elPFIsoDepositNeutralPAT.src = cms.InputTag(
"reducedEgamma",
"reducedGedGsfElectrons")
77 process.elPFIsoDepositGammaPAT.src = cms.InputTag(
"reducedEgamma",
"reducedGedGsfElectrons")
78 process.elPFIsoDepositPUPAT.src = cms.InputTag(
"reducedEgamma",
"reducedGedGsfElectrons")
80 process.patPhotons.embedSuperCluster =
False 81 process.patPhotons.embedSeedCluster =
False 82 process.patPhotons.embedBasicClusters =
False 83 process.patPhotons.embedPreshowerClusters =
False 84 process.patPhotons.embedRecHits =
False 87 process.patPhotons.addPuppiIsolation = cms.bool(
True)
88 process.patPhotons.puppiIsolationChargedHadrons = cms.InputTag(
"egmPhotonPUPPIIsolation",
"h+-DR030-")
89 process.patPhotons.puppiIsolationNeutralHadrons = cms.InputTag(
"egmPhotonPUPPIIsolation",
"h0-DR030-")
90 process.patPhotons.puppiIsolationPhotons = cms.InputTag(
"egmPhotonPUPPIIsolation",
"gamma-DR030-")
92 process.patPhotons.photonSource = cms.InputTag(
"reducedEgamma",
"reducedGedPhotons")
93 process.patPhotons.electronSource = cms.InputTag(
"reducedEgamma",
"reducedGedGsfElectrons")
95 process.phPFIsoDepositChargedPAT.src = cms.InputTag(
"reducedEgamma",
"reducedGedPhotons")
96 process.phPFIsoDepositChargedAllPAT.src = cms.InputTag(
"reducedEgamma",
"reducedGedPhotons")
97 process.phPFIsoDepositNeutralPAT.src = cms.InputTag(
"reducedEgamma",
"reducedGedPhotons")
98 process.phPFIsoDepositGammaPAT.src = cms.InputTag(
"reducedEgamma",
"reducedGedPhotons")
99 process.phPFIsoDepositPUPAT.src = cms.InputTag(
"reducedEgamma",
"reducedGedPhotons")
101 process.patOOTPhotons.photonSource = cms.InputTag(
"reducedEgamma",
"reducedOOTPhotons")
102 process.patOOTPhotons.electronSource = cms.InputTag(
"reducedEgamma",
"reducedGedGsfElectrons")
104 process.selectedPatJets.cut = cms.string(
"pt > 15")
105 process.selectedPatMuons.cut = cms.string(
"pt > 5 || isPFMuon || (pt > 3 && (isGlobalMuon || isStandAloneMuon || numberOfMatches > 0 || muonID('RPCMuLoose')))")
107 from Configuration.Eras.Modifier_phase2_muon_cff
import phase2_muon
108 phase2_muon.toModify(process.selectedPatMuons, cut =
"pt > 5 || isPFMuon || (pt > 3 && (isGlobalMuon || isStandAloneMuon || numberOfMatches > 0 || muonID('RPCMuLoose') || muonID('ME0MuonArbitrated') || muonID('GEMMuonArbitrated')) )")
109 from Configuration.ProcessModifiers.pp_on_AA_cff
import pp_on_AA
110 pp_on_AA.toModify(process.selectedPatMuons, cut =
"pt > 5 || isPFMuon || (pt > 1.2 && (isGlobalMuon || isStandAloneMuon) )")
111 from Configuration.Eras.Modifier_run3_upc_cff
import run3_upc
112 run3_upc.toModify(process.selectedPatMuons, cut =
"")
113 from Configuration.Eras.Modifier_ppRef_2024_cff
import ppRef_2024
114 ppRef_2024.toModify(process.selectedPatMuons, cut =
"pt > 5 || isPFMuon || isTrackerMuon || (pt > 1.2 && (isGlobalMuon || isStandAloneMuon))")
116 process.selectedPatElectrons.cut = cms.string(
"")
117 process.selectedPatTaus.cut = cms.string(
"pt > 18. && tauID('decayModeFindingNewDMs')> 0.5")
118 process.selectedPatPhotons.cut = cms.string(
"")
120 _dummyPatJets = process.selectedPatJets.clone(cut =
"pt < 0")
123 def _applySubstructure(process):
126 from PhysicsTools.PatAlgos.slimming.applySubstructure_cff
import applySubstructure
128 (~pp_on_AA).toModify(process, _applySubstructure)
130 pp_on_AA.toModify(process, func =
lambda p:
addToProcessAndTask(
'slimmedJets', p.selectedPatJets.clone(), p, task))
131 pp_on_AA.toModify(process, func =
lambda p:
addToProcessAndTask(
'slimmedJetsAK8', _dummyPatJets.clone(), p, task))
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" 154 process.noHFCands = cms.EDFilter(
"GenericPFCandidateSelector",
155 src=cms.InputTag(
"particleFlow"),
156 cut=cms.string(
"abs(pdgId)!=1 && abs(pdgId)!=2 && abs(eta)<3.0")
158 task.add(process.noHFCands)
161 pfCandColl=cms.InputTag(
"noHFCands"),
162 recoMetFromPFCs=
True,
163 jetSelection=
"pt>15 && abs(eta)<3.",
167 process.load(
'PhysicsTools.PatAlgos.slimming.slimmedMETs_cfi')
168 task.add(process.slimmedMETs)
169 (~pp_on_AA).toModify(process.slimmedMETs, addDeepMETs =
True)
174 process.load(
"CommonTools.ParticleFlow.pfCHS_cff")
175 task.add(process.pfCHS)
178 process.pfMetCHS = pfMet.clone(src =
'pfCHS')
179 task.add(process.pfMetCHS)
181 addMETCollection(process,
182 labelName =
"patCHSMet",
183 metSource =
"pfMetCHS" 186 process.patCHSMet.computeMETSignificance = cms.bool(
False)
191 process.TrkCands = chargedPackedCandsForTkMet.clone()
192 task.add(process.TrkCands)
194 process.pfMetTrk = pfMet.clone(src =
'TrkCands')
195 task.add(process.pfMetTrk)
197 addMETCollection(process,
198 labelName =
"patTrkMet",
199 metSource =
"pfMetTrk" 202 process.patTrkMet.computeMETSignificance = cms.bool(
False)
207 process.load(
'RecoJets.JetProducers.hfJetShowerShape_cfi')
208 task.add(process.hfJetShowerShape)
210 process.patJets.userData.userFloats.src += [
'hfJetShowerShape:sigmaEtaEta',
'hfJetShowerShape:sigmaPhiPhi']
211 process.patJets.userData.userInts.src += [
'hfJetShowerShape:centralEtaStripSize',
'hfJetShowerShape:adjacentEtaStripsSize']
214 def _add_deepFlavour(process):
215 process.load(
'RecoBTag.Combined.deepFlavour_cff')
216 task.add(process.pfDeepCSVDiscriminatorsJetTags)
217 process.patJets.discriminatorSources.extend([
218 'pfDeepCSVDiscriminatorsJetTags:BvsAll',
219 'pfDeepCSVDiscriminatorsJetTags:CvsB',
220 'pfDeepCSVDiscriminatorsJetTags:CvsL',
224 process.caloJetMap = cms.EDProducer(
"RecoJetDeltaRValueMapProducer",
225 src = process.patJets.jetSource,
226 matched = cms.InputTag(
"ak4CaloJets"),
227 distMax = cms.double(0.4),
228 values = cms.vstring(
'pt',
'emEnergyFraction'),
229 valueLabels = cms.vstring(
'pt',
'emEnergyFraction'),
230 lazyParser = cms.bool(
True) )
231 task.add(process.caloJetMap)
232 process.patJets.userData.userFloats.src += [
'caloJetMap:pt',
'caloJetMap:emEnergyFraction' ]
234 pp_on_AA.toModify(process.patJets.userData.userInts, src = [] )
235 pp_on_AA.toModify(process.patJets.userData.userFloats, src = [] )
238 from PhysicsTools.PatAlgos.slimming.muonIsolationsPUPPI_cfi
import makeInputForPUPPIIsolationMuon
242 from PhysicsTools.PatAlgos.slimming.egmIsolationsPUPPI_cfi
import makeInputForPUPPIIsolationEgm
244 from RecoEgamma.EgammaTools.egammaObjectModificationsInMiniAOD_cff
import egamma_modifications
245 process.slimmedElectrons.modifierConfig.modifications = egamma_modifications
246 process.slimmedPhotons.modifierConfig.modifications = egamma_modifications
249 process.patElectrons.addElectronID = cms.bool(
True)
250 electron_ids = [
'RecoEgamma.ElectronIdentification.Identification.heepElectronID_HEEPV70_cff',
251 'RecoEgamma.ElectronIdentification.Identification.heepElectronID_HEEPV71_cff',
252 'RecoEgamma.ElectronIdentification.Identification.cutBasedElectronID_Fall17_94X_V1_cff',
253 'RecoEgamma.ElectronIdentification.Identification.cutBasedElectronID_Fall17_94X_V2_cff',
254 'RecoEgamma.ElectronIdentification.Identification.cutBasedElectronID_Winter22_122X_V1_cff',
255 'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_Fall17_noIso_V1_cff',
256 'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_Fall17_iso_V1_cff',
257 'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_Fall17_noIso_V2_cff',
258 'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_Fall17_iso_V2_cff',
259 'RecoEgamma.ElectronIdentification.Identification.cutBasedElectronID_Summer16_80X_V1_cff',
260 'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_Spring16_GeneralPurpose_V1_cff',
261 'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_Spring16_HZZ_V1_cff',
262 'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_Summer16UL_ID_ISO_cff',
263 'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_Summer17UL_ID_ISO_cff',
264 'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_Summer18UL_ID_ISO_cff',
265 'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_RunIIIWinter22_noIso_V1_cff',
266 'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_RunIIIWinter22_iso_V1_cff',
267 'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_Winter22_HZZ_V1_cff' 270 process.egmGsfElectronIDs.physicsObjectSrc = cms.InputTag(
"reducedEgamma",
"reducedGedGsfElectrons")
271 process.electronMVAValueMapProducer.src = cms.InputTag(
'reducedEgamma',
'reducedGedGsfElectrons')
276 process.load(
"RecoEgamma.EgammaTools.gedGsfElectronsTo106X_cff")
277 from Configuration.Eras.Modifier_pp_on_AA_2018_cff
import pp_on_AA_2018
278 pp_on_AA_2018.toModify(task, func=
lambda t: t.add(process.gedGsfElectronsFrom94XTo106XTask))
279 pp_on_AA_2018.toModify(process.electronMVAValueMapProducer,
280 keysForValueMaps = cms.InputTag(
'reducedEgamma',
'reducedGedGsfElectrons'),
281 src =
"gedGsfElectronsFrom94XTo106X")
283 for idmod
in electron_ids:
287 process.patPhotons.addPhotonID = cms.bool(
True)
288 photon_ids = [
'RecoEgamma.PhotonIdentification.Identification.cutBasedPhotonID_Fall17_94X_V1_TrueVtx_cff',
289 'RecoEgamma.PhotonIdentification.Identification.cutBasedPhotonID_Fall17_94X_V2_cff',
290 'RecoEgamma.PhotonIdentification.Identification.mvaPhotonID_Fall17_94X_V1p1_cff',
291 'RecoEgamma.PhotonIdentification.Identification.mvaPhotonID_Fall17_94X_V2_cff',
292 'RecoEgamma.PhotonIdentification.Identification.cutBasedPhotonID_Spring16_V2p2_cff',
293 'RecoEgamma.PhotonIdentification.Identification.mvaPhotonID_Spring16_nonTrig_V1_cff',
294 'RecoEgamma.PhotonIdentification.Identification.mvaPhotonID_Winter22_122X_V1_cff',
295 'RecoEgamma.PhotonIdentification.Identification.cutBasedPhotonID_RunIIIWinter22_122X_V1_cff']
298 process.egmPhotonIDs.physicsObjectSrc = cms.InputTag(
"reducedEgamma",
"reducedGedPhotons")
299 process.photonMVAValueMapProducer.src = cms.InputTag(
'reducedEgamma',
'reducedGedPhotons')
300 for idmod
in photon_ids:
304 from RecoEgamma.EgammaTools.egammaObjectModifications_tools
import makeVIDBitsModifier
305 egamma_modifications.append(
makeVIDBitsModifier(process,
"egmGsfElectronIDs",
"egmPhotonIDs"))
308 from RecoTauTag.Configuration.boostedHPSPFTaus_cfi
import addBoostedTaus
310 process.load(
"RecoTauTag.Configuration.RecoPFTauTag_cff")
311 process.load(
"RecoTauTag.Configuration.HPSPFTaus_cff")
313 _makePatTausTaskWithRetrainedMVATauID = process.makePatTausTask.copy()
314 _makePatTausTaskWithRetrainedMVATauID.add(process.hpsPFTauBasicDiscriminatorsTask,
315 process.hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTTask,
316 process.hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTTask,
317 process.hpsPFTauBasicDiscriminatorsdR03Task,
318 process.hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTTask,
319 process.hpsPFTauDiscriminationByMVA6rawElectronRejection,
320 process.hpsPFTauDiscriminationByMVA6ElectronRejection,
321 process.hpsPFTauDiscriminationByMuonRejection3)
322 from Configuration.ProcessModifiers.run2_miniAOD_UL_cff
import run2_miniAOD_UL
323 (run2_miniAOD_UL).toReplaceWith(
324 process.makePatTausTask, _makePatTausTaskWithRetrainedMVATauID
328 _updatedTauName =
'slimmedTausDeepIDsv2p1' 329 _noUpdatedTauName =
'slimmedTausNoDeepIDs' 330 import RecoTauTag.RecoTau.tools.runTauIdMVA
as tauIdConfig
331 tauIdEmbedder = tauIdConfig.TauIDEmbedder(
332 process, debug =
False,
333 originalTauName = _noUpdatedTauName,
334 updatedTauName = _updatedTauName,
336 toKeep = [
'deepTau2017v2p1',
'deepTau2018v2p5']
338 from Configuration.Eras.Modifier_phase2_common_cff
import phase2_common
339 _tauIds_phase2 = [
'deepTau2026v2p5']
340 phase2_common.toModify(tauIdEmbedder.toKeep, func=
lambda t:t.extend(_tauIds_phase2))
341 tauIdEmbedder.runTauID()
343 delattr(process,
'slimmedTaus')
344 process.slimmedTaus = getattr(process, _updatedTauName).
clone()
345 process.rerunMvaIsolationTaskForMini.add(process.slimmedTaus)
346 task.add(process.rerunMvaIsolationTaskForMini)
350 _makePatTausTaskWithDeadECalVeto = process.makePatTausTask.copy()
351 _makePatTausTaskWithDeadECalVeto.add(
352 process.hpsPFTauDiscriminationByDeadECALElectronRejection
354 _run2_miniAOD_ANY = (run2_miniAOD_UL)
355 _run2_miniAOD_ANY.toReplaceWith(
356 process.makePatTausTask, _makePatTausTaskWithDeadECalVeto
360 _makePatTausTaskWithTauReReco = process.makePatTausTask.copy()
361 _makePatTausTaskWithTauReReco.add(process.PFTauTask)
362 (pp_on_AA).toReplaceWith(
363 process.makePatTausTask, _makePatTausTaskWithTauReReco
367 process.load(
'CommonTools.PileupAlgos.Puppi_cff')
368 process.load(
'RecoJets.JetProducers.ak4PFJets_cfi')
369 from Configuration.Eras.Modifier_pA_2016_cff
import pA_2016
370 _rerun_puppijets_task = task.copy()
371 _rerun_puppijets_task.add(process.puppi, process.ak4PFJetsPuppi)
372 (_run2_miniAOD_ANY | pA_2016 | pp_on_AA).toReplaceWith(task, _rerun_puppijets_task)
375 process.ak4PFJetsPuppiTracksAssociatorAtVertex = cms.EDProducer(
"JetTracksAssociatorAtVertex",
377 jets = cms.InputTag(
"ak4PFJetsPuppi")
379 task.add(process.ak4PFJetsPuppiTracksAssociatorAtVertex)
380 process.patJetPuppiCharge = cms.EDProducer(
"JetChargeProducer",
381 src = cms.InputTag(
"ak4PFJetsPuppiTracksAssociatorAtVertex"),
382 var = cms.string(
'Pt'),
383 exp = cms.double(1.0)
385 task.add(process.patJetPuppiCharge)
387 def _add_jetsPuppi(process):
389 noDeepFlavourDiscriminators = [x.value()
if isinstance(x, cms.InputTag)
else x
for x
in process.patJets.discriminatorSources
390 if (
not "DeepFlavour" in str(x)
and not "Transformer" in str(x))]
391 addJetCollection(process, postfix =
"", labelName =
'Puppi', jetSource = cms.InputTag(
'ak4PFJetsPuppi'),
392 jetCorrections = (
'AK4PFPuppi', [
'L2Relative',
'L3Absolute'],
''),
393 pfCandidates = cms.InputTag(
"particleFlow"),
394 algo=
'AK', rParam = 0.4, btagDiscriminators = noDeepFlavourDiscriminators
397 process.patJetGenJetMatchPuppi.matched =
'slimmedGenJets' 399 process.patJetsPuppi.jetChargeSource = cms.InputTag(
"patJetPuppiCharge")
401 process.selectedPatJetsPuppi.cut = cms.string(
"pt > 10")
403 from PhysicsTools.PatAlgos.slimming.applyDeepBtagging_cff
import applyDeepBtagging
406 process.slimmedJetsNoDeepFlavour.dropTagInfos =
'0' 407 process.updatedPatJetsTransientCorrectedSlimmedDeepFlavour.addTagInfos =
True 408 process.updatedPatJetsTransientCorrectedSlimmedDeepFlavour.tagInfoSources = [
"pixelClusterTagInfos"]
409 _run2_miniAOD_ANY.toModify(process.updatedPatJetsTransientCorrectedSlimmedDeepFlavour, addTagInfos =
False )
410 (~pp_on_AA).toModify(process, _add_jetsPuppi)
412 pp_on_AA.toModify(process, func =
lambda p:
addToProcessAndTask(
'slimmedJetsPuppi', _dummyPatJets.clone(), p, task))
415 process.patJets.addTagInfos =
True 416 process.patJets.tagInfoSources = [
"pixelClusterTagInfos"]
418 _run2_miniAOD_ANY.toModify(process.patJets, addTagInfos =
False )
420 from Configuration.Eras.Modifier_pp_on_AA_2018_cff
import pp_on_AA_2018
421 pp_on_AA_2018.toModify(process.patJets, tagInfoSources = cms.VInputTag([
"impactParameterTagInfos",
"secondaryVertexTagInfos"]) )
424 def _add_metPuppi(process):
425 process.load(
'RecoMET.METProducers.pfMetPuppi_cfi')
426 _rerun_puppimet_task = task.copy()
427 _rerun_puppimet_task.add(process.puppiNoLep, process.pfMetPuppi)
428 (_run2_miniAOD_ANY | pA_2016 | pp_on_AA ).toReplaceWith(task, _rerun_puppimet_task)
431 jetCollUnskimmed=
"slimmedJetsPuppi",
432 recoMetFromPFCs=
True,
433 jetFlavor=
"AK4PFPuppi",
436 (~pp_on_AA).toModify(process, _add_metPuppi)
438 process.load(
'PhysicsTools.PatAlgos.slimming.slimmedMETs_cfi')
439 task.add(process.slimmedMETs)
441 def _add_slimmedMETsPuppi(process):
443 process.slimmedMETsPuppi.src = cms.InputTag(
"patMETsPuppi")
444 process.slimmedMETsPuppi.rawVariation = cms.InputTag(
"patPFMetPuppi")
445 process.slimmedMETsPuppi.t1Uncertainties = cms.InputTag(
"patPFMetT1%sPuppi")
446 process.slimmedMETsPuppi.t01Variation = cms.InputTag(
"patPFMetT0pcT1Puppi")
447 process.slimmedMETsPuppi.t1SmearedVarsAndUncs = cms.InputTag(
"patPFMetT1Smear%sPuppi")
448 process.slimmedMETsPuppi.tXYUncForRaw = cms.InputTag(
"patPFMetTxyPuppi")
449 process.slimmedMETsPuppi.tXYUncForT1 = cms.InputTag(
"patPFMetT1TxyPuppi")
450 process.slimmedMETsPuppi.tXYUncForT01 = cms.InputTag(
"patPFMetT0pcT1TxyPuppi")
451 process.slimmedMETsPuppi.tXYUncForT1Smear = cms.InputTag(
"patPFMetT1SmearTxyPuppi")
452 process.slimmedMETsPuppi.tXYUncForT01Smear = cms.InputTag(
"patPFMetT0pcT1SmearTxyPuppi")
453 del process.slimmedMETsPuppi.caloMET
454 (~pp_on_AA).toModify(process, _add_slimmedMETsPuppi)
456 def _add_deepMET(process):
457 from RecoMET.METPUSubtraction.deepMETProducer_cff
import deepMETsResolutionTune, deepMETsResponseTune
461 (~pp_on_AA).toModify(process, _add_deepMET)
464 process.load(
"TrackingTools.TrackAssociator.DetIdAssociatorESProducer_cff")
468 from Configuration.Eras.Modifier_phase2_hgcal_cff
import phase2_hgcal
469 process.load(
"RecoEgamma.EgammaTools.slimmedEgammaHGC_cff")
470 phase2_hgcal.toModify(task, func=
lambda t: t.add(process.slimmedEgammaHGCTask))
473 from Configuration.Eras.Modifier_run2_L1prefiring_cff
import run2_L1prefiring
474 from Configuration.Eras.Modifier_stage2L1Trigger_cff
import stage2L1Trigger
475 from Configuration.Eras.Modifier_stage2L1Trigger_2017_cff
import stage2L1Trigger_2017
476 from Configuration.Eras.Modifier_stage2L1Trigger_2018_cff
import stage2L1Trigger_2018
477 from Configuration.Eras.Modifier_tracker_apv_vfp30_2016_cff
import tracker_apv_vfp30_2016
478 if not hasattr(process,
'prefiringweight'):
479 process.load(
"PhysicsTools.PatUtils.L1PrefiringWeightProducer_cff")
480 (stage2L1Trigger & tracker_apv_vfp30_2016).toModify(process.prefiringweight, DataEraECAL =
"UL2016preVFP", DataEraMuon =
"2016preVFP" )
481 (stage2L1Trigger & ~tracker_apv_vfp30_2016).toModify(process.prefiringweight, DataEraECAL =
"UL2016postVFP", DataEraMuon =
"2016postVFP" )
482 stage2L1Trigger_2017.toModify(process.prefiringweight, DataEraECAL =
"UL2017BtoF", DataEraMuon =
"20172018")
483 stage2L1Trigger_2018.toModify(process.prefiringweight, DataEraECAL =
"None", DataEraMuon =
"20172018")
484 run2_L1prefiring.toModify(task, func=
lambda t: t.add(process.prefiringweight))
486 from PhysicsTools.PatAlgos.producersHeavyIons.heavyIonJetSetup
import removeL1FastJetJECs
487 pp_on_AA.toModify(process, removeL1FastJetJECs)
def makeInputForPUPPIIsolationMuon(process)
def applySubstructure(process, postfix="")
def addToProcessAndTask(label, module, process, task)
def makeInputForPUPPIIsolationEgm(process)
def runMetCorAndUncForMiniAODProduction(process, metType="PF", jetCollUnskimmed="patJets", photonColl="selectedPatPhotons", electronColl="selectedPatElectrons", muonColl="selectedPatMuons", tauColl="selectedPatTaus", pfCandColl="particleFlow", jetCleaning="LepClean", jetSelection="pt>15 && abs(eta)<9.9", jecUnFile="", jetFlavor="AK4PFchs", recoMetFromPFCs=False, postfix="")
def applyDeepBtagging(process, postfix="")
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
def getPatAlgosToolsTask(process)
def addBoostedTaus(process)