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")
30 process.patElectrons.embedGsfElectronCore =
False 31 process.patElectrons.embedSuperCluster =
False 32 process.patElectrons.embedPflowSuperCluster =
False 33 process.patElectrons.embedSeedCluster =
False 34 process.patElectrons.embedBasicClusters =
False 35 process.patElectrons.embedPreshowerClusters =
False 36 process.patElectrons.embedPflowBasicClusters =
False 37 process.patElectrons.embedPflowPreshowerClusters =
False 38 process.patElectrons.embedRecHits =
False 39 process.patElectrons.electronSource = cms.InputTag(
"reducedEgamma",
"reducedGedGsfElectrons")
40 process.patElectrons.electronIDSources = cms.PSet(
43 eidRobustLoose = cms.InputTag(
"reducedEgamma",
"eidRobustLoose"),
44 eidRobustTight = cms.InputTag(
"reducedEgamma",
"eidRobustTight"),
45 eidLoose = cms.InputTag(
"reducedEgamma",
"eidLoose"),
46 eidTight = cms.InputTag(
"reducedEgamma",
"eidTight"),
47 eidRobustHighEnergy = cms.InputTag(
"reducedEgamma",
"eidRobustHighEnergy"),
49 process.patElectrons.addPFClusterIso = cms.bool(
True)
51 process.patElectrons.addPuppiIsolation = cms.bool(
True)
52 process.patElectrons.puppiIsolationChargedHadrons = cms.InputTag(
"egmElectronPUPPIIsolation",
"h+-DR030-BarVeto000-EndVeto001")
53 process.patElectrons.puppiIsolationNeutralHadrons = cms.InputTag(
"egmElectronPUPPIIsolation",
"h0-DR030-BarVeto000-EndVeto000")
54 process.patElectrons.puppiIsolationPhotons = cms.InputTag(
"egmElectronPUPPIIsolation",
"gamma-DR030-BarVeto000-EndVeto008")
55 process.patElectrons.puppiNoLeptonsIsolationChargedHadrons = cms.InputTag(
"egmElectronPUPPINoLeptonsIsolation",
"h+-DR030-BarVeto000-EndVeto001")
56 process.patElectrons.puppiNoLeptonsIsolationNeutralHadrons = cms.InputTag(
"egmElectronPUPPINoLeptonsIsolation",
"h0-DR030-BarVeto000-EndVeto000")
57 process.patElectrons.puppiNoLeptonsIsolationPhotons = cms.InputTag(
"egmElectronPUPPINoLeptonsIsolation",
"gamma-DR030-BarVeto000-EndVeto008")
59 process.patElectrons.ecalPFClusterIsoMap = cms.InputTag(
"reducedEgamma",
"eleEcalPFClusIso")
60 process.patElectrons.hcalPFClusterIsoMap = cms.InputTag(
"reducedEgamma",
"eleHcalPFClusIso")
62 process.elPFIsoDepositChargedPAT.src = cms.InputTag(
"reducedEgamma",
"reducedGedGsfElectrons")
63 process.elPFIsoDepositChargedAllPAT.src = cms.InputTag(
"reducedEgamma",
"reducedGedGsfElectrons")
64 process.elPFIsoDepositNeutralPAT.src = cms.InputTag(
"reducedEgamma",
"reducedGedGsfElectrons")
65 process.elPFIsoDepositGammaPAT.src = cms.InputTag(
"reducedEgamma",
"reducedGedGsfElectrons")
66 process.elPFIsoDepositPUPAT.src = cms.InputTag(
"reducedEgamma",
"reducedGedGsfElectrons")
68 process.patPhotons.embedSuperCluster =
False 69 process.patPhotons.embedSeedCluster =
False 70 process.patPhotons.embedBasicClusters =
False 71 process.patPhotons.embedPreshowerClusters =
False 72 process.patPhotons.embedRecHits =
False 73 process.patPhotons.addPFClusterIso = cms.bool(
True)
76 process.patPhotons.addPuppiIsolation = cms.bool(
True)
77 process.patPhotons.puppiIsolationChargedHadrons = cms.InputTag(
"egmPhotonPUPPIIsolation",
"h+-DR030-")
78 process.patPhotons.puppiIsolationNeutralHadrons = cms.InputTag(
"egmPhotonPUPPIIsolation",
"h0-DR030-")
79 process.patPhotons.puppiIsolationPhotons = cms.InputTag(
"egmPhotonPUPPIIsolation",
"gamma-DR030-")
81 process.patPhotons.ecalPFClusterIsoMap = cms.InputTag(
"reducedEgamma",
"phoEcalPFClusIso")
82 process.patPhotons.hcalPFClusterIsoMap = cms.InputTag(
"reducedEgamma",
"phoHcalPFClusIso")
83 process.patPhotons.photonSource = cms.InputTag(
"reducedEgamma",
"reducedGedPhotons")
84 process.patPhotons.electronSource = cms.InputTag(
"reducedEgamma",
"reducedGedGsfElectrons")
85 process.patPhotons.photonIDSources = cms.PSet(
86 PhotonCutBasedIDLoose = cms.InputTag(
'reducedEgamma',
87 'PhotonCutBasedIDLoose'),
88 PhotonCutBasedIDTight = cms.InputTag(
'reducedEgamma',
89 'PhotonCutBasedIDTight')
92 process.phPFIsoDepositChargedPAT.src = cms.InputTag(
"reducedEgamma",
"reducedGedPhotons")
93 process.phPFIsoDepositChargedAllPAT.src = cms.InputTag(
"reducedEgamma",
"reducedGedPhotons")
94 process.phPFIsoDepositNeutralPAT.src = cms.InputTag(
"reducedEgamma",
"reducedGedPhotons")
95 process.phPFIsoDepositGammaPAT.src = cms.InputTag(
"reducedEgamma",
"reducedGedPhotons")
96 process.phPFIsoDepositPUPAT.src = cms.InputTag(
"reducedEgamma",
"reducedGedPhotons")
98 process.selectedPatJets.cut = cms.string(
"pt > 10")
99 process.selectedPatMuons.cut = cms.string(
"pt > 5 || isPFMuon || (pt > 3 && (isGlobalMuon || isStandAloneMuon || numberOfMatches > 0 || muonID('RPCMuLoose')))")
101 from Configuration.Eras.Modifier_phase2_muon_cff
import phase2_muon
102 phase2_muon.toModify(process.selectedPatMuons, cut =
"pt > 5 || isPFMuon || (pt > 3 && (isGlobalMuon || isStandAloneMuon || numberOfMatches > 0 || muonID('RPCMuLoose') || muonID('ME0MuonArbitrated') || muonID('GEMMuonArbitrated')) )")
104 process.selectedPatElectrons.cut = cms.string(
"")
105 process.selectedPatTaus.cut = cms.string(
"pt > 18. && tauID('decayModeFindingNewDMs')> 0.5")
106 process.selectedPatPhotons.cut = cms.string(
"")
110 from PhysicsTools.PatAlgos.slimming.applySubstructure_cff
import applySubstructure
115 from PhysicsTools.PatAlgos.tools.trigTools
import switchOnTriggerStandAlone
117 process.patTrigger.packTriggerPathNames = cms.bool(
True)
122 from PhysicsTools.PatUtils.tools.runMETCorrectionsAndUncertainties
import runMetCorAndUncForMiniAODProduction
124 jetCollUnskimmed=
"patJets")
127 from PhysicsTools.PatAlgos.tools.metTools
import addMETCollection
128 addMETCollection(process,
129 labelName =
"patCaloMet",
130 metSource =
"caloMetM" 137 process.noHFCands = cms.EDFilter(
"GenericPFCandidateSelector",
138 src=cms.InputTag(
"particleFlow"),
139 cut=cms.string(
"abs(pdgId)!=1 && abs(pdgId)!=2 && abs(eta)<3.0")
141 task.add(process.noHFCands)
144 pfCandColl=cms.InputTag(
"noHFCands"),
145 recoMetFromPFCs=
True,
146 jetSelection=
"pt>15 && abs(eta)<3.",
150 process.load(
'PhysicsTools.PatAlgos.slimming.slimmedMETs_cfi')
151 task.add(process.slimmedMETs)
153 process.slimmedMETsNoHF.src = cms.InputTag(
"patMETsNoHF")
154 process.slimmedMETsNoHF.rawVariation = cms.InputTag(
"patPFMetNoHF")
155 process.slimmedMETsNoHF.t1Uncertainties = cms.InputTag(
"patPFMetT1%sNoHF")
156 process.slimmedMETsNoHF.t01Variation = cms.InputTag(
"patPFMetT0pcT1NoHF")
157 process.slimmedMETsNoHF.t1SmearedVarsAndUncs = cms.InputTag(
"patPFMetT1Smear%sNoHF")
158 process.slimmedMETsNoHF.tXYUncForRaw = cms.InputTag(
"patPFMetTxyNoHF")
159 process.slimmedMETsNoHF.tXYUncForT1 = cms.InputTag(
"patPFMetT1TxyNoHF")
160 process.slimmedMETsNoHF.tXYUncForT01 = cms.InputTag(
"patPFMetT0pcT1TxyNoHF")
161 process.slimmedMETsNoHF.tXYUncForT1Smear = cms.InputTag(
"patPFMetT1SmearTxyNoHF")
162 process.slimmedMETsNoHF.tXYUncForT01Smear = cms.InputTag(
"patPFMetT0pcT1SmearTxyNoHF")
163 del process.slimmedMETsNoHF.caloMET
167 process.load(
"RecoJets.JetProducers.PileupJetID_cfi")
168 task.add(process.pileUpJetIDTask)
170 process.patJets.userData.userFloats.src = [ cms.InputTag(
"pileupJetId:fullDiscriminant"), ]
171 process.patJets.userData.userInts.src = [ cms.InputTag(
"pileupJetId:fullId"), ]
174 process.load(
'RecoJets.JetProducers.QGTagger_cfi')
175 task.add(process.QGTaggerTask)
177 process.patJets.userData.userFloats.src += [ cms.InputTag(
'QGTagger:qgLikelihood'), ]
180 process.caloJetMap = cms.EDProducer(
"RecoJetDeltaRValueMapProducer",
181 src = process.patJets.jetSource,
182 matched = cms.InputTag(
"ak4CaloJets"),
183 distMax = cms.double(0.4),
184 values = cms.vstring(
'pt',
'emEnergyFraction'),
185 valueLabels = cms.vstring(
'pt',
'emEnergyFraction'),
186 lazyParser = cms.bool(
True) )
187 task.add(process.caloJetMap)
188 process.patJets.userData.userFloats.src += [ cms.InputTag(
"caloJetMap:pt"), cms.InputTag(
"caloJetMap:emEnergyFraction") ]
191 from PhysicsTools.PatAlgos.slimming.muonIsolationsPUPPI_cfi
import makeInputForPUPPIIsolationMuon
195 from PhysicsTools.PatAlgos.slimming.egmIsolationsPUPPI_cfi
import makeInputForPUPPIIsolationEgm
197 from RecoEgamma.EgammaTools.egammaObjectModificationsInMiniAOD_cff
import egamma_modifications
198 process.slimmedElectrons.modifierConfig.modifications = egamma_modifications
199 process.slimmedPhotons.modifierConfig.modifications = egamma_modifications
202 electron_ids = [
'RecoEgamma.ElectronIdentification.Identification.cutBasedElectronID_PHYS14_PU20bx25_V2_cff',
203 'RecoEgamma.ElectronIdentification.Identification.cutBasedElectronID_Spring15_25ns_V1_cff',
204 'RecoEgamma.ElectronIdentification.Identification.cutBasedElectronID_Spring15_50ns_V2_cff',
205 'RecoEgamma.ElectronIdentification.Identification.heepElectronID_HEEPV60_cff',
206 'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_Spring15_25ns_nonTrig_V1_cff',
207 'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_Spring15_25ns_Trig_V1_cff',
208 'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_Spring15_50ns_Trig_V1_cff']
210 process.egmGsfElectronIDs.physicsObjectSrc = \
211 cms.InputTag(
"reducedEgamma",
"reducedGedGsfElectrons")
212 process.electronMVAValueMapProducer.src = \
213 cms.InputTag(
'reducedEgamma',
'reducedGedGsfElectrons')
214 process.electronRegressionValueMapProducer.src = \
215 cms.InputTag(
'reducedEgamma',
'reducedGedGsfElectrons')
216 for idmod
in electron_ids:
220 if hasattr(process,
'heepIDVarValueMaps'):
221 process.heepIDVarValueMaps.elesMiniAOD = cms.InputTag(
'reducedEgamma',
'reducedGedGsfElectrons')
223 process.heepIDVarValueMaps.dataFormat = cms.int32(2)
227 photon_ids = [
'RecoEgamma.PhotonIdentification.Identification.cutBasedPhotonID_Spring15_25ns_V1_cff',
228 'RecoEgamma.PhotonIdentification.Identification.cutBasedPhotonID_Spring15_50ns_V1_cff',
229 'RecoEgamma.PhotonIdentification.Identification.mvaPhotonID_Spring15_25ns_nonTrig_V2p1_cff',
230 'RecoEgamma.PhotonIdentification.Identification.mvaPhotonID_Spring15_50ns_nonTrig_V2p1_cff']
232 process.egmPhotonIDs.physicsObjectSrc = \
233 cms.InputTag(
"reducedEgamma",
"reducedGedPhotons")
234 process.photonIDValueMapProducer.src = \
235 cms.InputTag(
"reducedEgamma",
"reducedGedPhotons")
236 process.photonRegressionValueMapProducer.src = \
237 cms.InputTag(
"reducedEgamma",
"reducedGedPhotons")
238 process.photonIDValueMapProducer.particleBasedIsolation = \
239 cms.InputTag(
"reducedEgamma",
"reducedPhotonPfCandMap")
240 process.photonMVAValueMapProducer.src = \
241 cms.InputTag(
'reducedEgamma',
'reducedGedPhotons')
242 for idmod
in photon_ids:
247 from RecoTauTag.Configuration.boostedHPSPFTaus_cfi
import addBoostedTaus
252 if not hasattr(process,
'ak4PFJetsPuppi'):
253 process.load(
'RecoJets.JetProducers.ak4PFJetsPuppi_cfi')
254 task.add(process.ak4PFJets)
255 task.add(process.ak4PFJetsPuppi)
256 process.ak4PFJetsPuppi.doAreaFastjet =
True 259 process.ak4PFJetsPuppiTracksAssociatorAtVertex = cms.EDProducer(
"JetTracksAssociatorAtVertex",
261 jets = cms.InputTag(
"ak4PFJetsPuppi")
263 task.add(process.ak4PFJetsPuppiTracksAssociatorAtVertex)
264 process.patJetPuppiCharge = cms.EDProducer(
"JetChargeProducer",
265 src = cms.InputTag(
"ak4PFJetsPuppiTracksAssociatorAtVertex"),
266 var = cms.string(
'Pt'),
267 exp = cms.double(1.0)
269 task.add(process.patJetPuppiCharge)
272 _pfCandidates =
'particleFlow' 273 from Configuration.Eras.Modifier_phase2_common_cff
import phase2_common
274 if process.isUsingModifier( phase2_common ):
275 _pfCandidates =
'puppi' 277 addJetCollection(process, postfix =
"", labelName =
'Puppi', jetSource = cms.InputTag(
'ak4PFJetsPuppi'),
278 jetCorrections = (
'AK4PFPuppi', [
'L2Relative',
'L3Absolute'],
''),
279 pfCandidates = cms.InputTag(_pfCandidates),
280 algo=
'AK', rParam = 0.4, btagDiscriminators =
map(
lambda x: x.value() ,process.patJets.discriminatorSources)
283 process.patJetGenJetMatchPuppi.matched =
'slimmedGenJets' 285 process.patJetsPuppi.jetChargeSource = cms.InputTag(
"patJetPuppiCharge")
287 process.selectedPatJetsPuppi.cut = cms.string(
"pt > 15")
289 process.load(
'PhysicsTools.PatAlgos.slimming.slimmedJets_cfi')
290 task.add(process.slimmedJets)
291 task.add(process.slimmedJetsAK8)
293 process.slimmedJetsPuppi.src = cms.InputTag(
"selectedPatJetsPuppi")
294 process.slimmedJetsPuppi.packedPFCandidates = cms.InputTag(
"packedPFCandidates")
298 from PhysicsTools.PatAlgos.slimming.puppiForMET_cff
import makePuppies
302 pfCandColl=cms.InputTag(
"puppiForMET"),
303 jetCollUnskimmed=
"slimmedJetsPuppi",
304 recoMetFromPFCs=
True,
305 jetFlavor=
"AK4PFPuppi",
309 process.load(
'PhysicsTools.PatAlgos.slimming.slimmedMETs_cfi')
310 task.add(process.slimmedMETs)
312 process.slimmedMETsPuppi.src = cms.InputTag(
"patMETsPuppi")
313 process.slimmedMETsPuppi.rawVariation = cms.InputTag(
"patPFMetPuppi")
314 process.slimmedMETsPuppi.t1Uncertainties = cms.InputTag(
"patPFMetT1%sPuppi")
315 process.slimmedMETsPuppi.t01Variation = cms.InputTag(
"patPFMetT0pcT1Puppi")
316 process.slimmedMETsPuppi.t1SmearedVarsAndUncs = cms.InputTag(
"patPFMetT1Smear%sPuppi")
317 process.slimmedMETsPuppi.tXYUncForRaw = cms.InputTag(
"patPFMetTxyPuppi")
318 process.slimmedMETsPuppi.tXYUncForT1 = cms.InputTag(
"patPFMetT1TxyPuppi")
319 process.slimmedMETsPuppi.tXYUncForT01 = cms.InputTag(
"patPFMetT0pcT1TxyPuppi")
320 process.slimmedMETsPuppi.tXYUncForT1Smear = cms.InputTag(
"patPFMetT1SmearTxyPuppi")
321 process.slimmedMETsPuppi.tXYUncForT01Smear = cms.InputTag(
"patPFMetT0pcT1SmearTxyPuppi")
322 del process.slimmedMETsPuppi.caloMET
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 getPatAlgosToolsTask(process)
def addBoostedTaus(process)