7 process.patMuons.isoDeposits = cms.PSet()
8 process.patElectrons.isoDeposits = cms.PSet()
9 process.patTaus.isoDeposits = cms.PSet()
10 process.patPhotons.isoDeposits = cms.PSet()
12 process.patMuons.embedTrack =
True
13 process.patMuons.embedCombinedMuon =
True
14 process.patMuons.embedMuonBestTrack =
True
15 process.patMuons.embedStandAloneMuon =
True
16 process.patMuons.embedPickyMuon =
False
17 process.patMuons.embedTpfmsMuon =
False
18 process.patMuons.embedDytMuon =
False
21 process.patElectrons.embedGsfElectronCore =
False
22 process.patElectrons.embedSuperCluster =
False
23 process.patElectrons.embedPflowSuperCluster =
False
24 process.patElectrons.embedSeedCluster =
False
25 process.patElectrons.embedBasicClusters =
False
26 process.patElectrons.embedPreshowerClusters =
False
27 process.patElectrons.embedPflowBasicClusters =
False
28 process.patElectrons.embedPflowPreshowerClusters =
False
29 process.patElectrons.embedRecHits =
False
30 process.patElectrons.electronSource = cms.InputTag(
"reducedEgamma",
"reducedGedGsfElectrons")
31 process.patElectrons.electronIDSources = cms.PSet(
34 eidRobustLoose = cms.InputTag(
"reducedEgamma",
"eidRobustLoose"),
35 eidRobustTight = cms.InputTag(
"reducedEgamma",
"eidRobustTight"),
36 eidLoose = cms.InputTag(
"reducedEgamma",
"eidLoose"),
37 eidTight = cms.InputTag(
"reducedEgamma",
"eidTight"),
38 eidRobustHighEnergy = cms.InputTag(
"reducedEgamma",
"eidRobustHighEnergy"),
40 process.patElectrons.addPFClusterIso = cms.bool(
True)
41 process.patElectrons.ecalPFClusterIsoMap = cms.InputTag(
"reducedEgamma",
"eleEcalPFClusIso")
42 process.patElectrons.hcalPFClusterIsoMap = cms.InputTag(
"reducedEgamma",
"eleHcalPFClusIso")
44 process.elPFIsoDepositChargedPAT.src = cms.InputTag(
"reducedEgamma",
"reducedGedGsfElectrons")
45 process.elPFIsoDepositChargedAllPAT.src = cms.InputTag(
"reducedEgamma",
"reducedGedGsfElectrons")
46 process.elPFIsoDepositNeutralPAT.src = cms.InputTag(
"reducedEgamma",
"reducedGedGsfElectrons")
47 process.elPFIsoDepositGammaPAT.src = cms.InputTag(
"reducedEgamma",
"reducedGedGsfElectrons")
48 process.elPFIsoDepositPUPAT.src = cms.InputTag(
"reducedEgamma",
"reducedGedGsfElectrons")
50 process.patPhotons.embedSuperCluster =
False
51 process.patPhotons.embedSeedCluster =
False
52 process.patPhotons.embedBasicClusters =
False
53 process.patPhotons.embedPreshowerClusters =
False
54 process.patPhotons.embedRecHits =
False
55 process.patPhotons.addPFClusterIso = cms.bool(
True)
56 process.patPhotons.ecalPFClusterIsoMap = cms.InputTag(
"reducedEgamma",
"phoEcalPFClusIso")
57 process.patPhotons.hcalPFClusterIsoMap = cms.InputTag(
"reducedEgamma",
"phoHcalPFClusIso")
58 process.patPhotons.photonSource = cms.InputTag(
"reducedEgamma",
"reducedGedPhotons")
59 process.patPhotons.electronSource = cms.InputTag(
"reducedEgamma",
"reducedGedGsfElectrons")
60 process.patPhotons.photonIDSources = cms.PSet(
61 PhotonCutBasedIDLoose = cms.InputTag(
'reducedEgamma',
62 'PhotonCutBasedIDLoose'),
63 PhotonCutBasedIDTight = cms.InputTag(
'reducedEgamma',
64 'PhotonCutBasedIDTight')
67 process.phPFIsoDepositChargedPAT.src = cms.InputTag(
"reducedEgamma",
"reducedGedPhotons")
68 process.phPFIsoDepositChargedAllPAT.src = cms.InputTag(
"reducedEgamma",
"reducedGedPhotons")
69 process.phPFIsoDepositNeutralPAT.src = cms.InputTag(
"reducedEgamma",
"reducedGedPhotons")
70 process.phPFIsoDepositGammaPAT.src = cms.InputTag(
"reducedEgamma",
"reducedGedPhotons")
71 process.phPFIsoDepositPUPAT.src = cms.InputTag(
"reducedEgamma",
"reducedGedPhotons")
73 process.selectedPatJets.cut = cms.string(
"pt > 10")
74 process.selectedPatMuons.cut = cms.string(
"pt > 5 || isPFMuon || (pt > 3 && (isGlobalMuon || isStandAloneMuon || numberOfMatches > 0 || muonID('RPCMuLoose')))")
75 process.selectedPatElectrons.cut = cms.string(
"")
76 process.selectedPatTaus.cut = cms.string(
"pt > 18. && tauID('decayModeFindingNewDMs')> 0.5")
77 process.selectedPatPhotons.cut = cms.string(
"")
81 from PhysicsTools.PatAlgos.slimming.applySubstructure_cff
import applySubstructure
86 from PhysicsTools.PatAlgos.tools.trigTools
import switchOnTriggerStandAlone
88 process.patTrigger.packTriggerPathNames = cms.bool(
True)
93 from PhysicsTools.PatUtils.tools.runMETCorrectionsAndUncertainties
import runMetCorAndUncForMiniAODProduction
95 jetCollUnskimmed=
"patJets")
98 from PhysicsTools.PatAlgos.tools.metTools
import addMETCollection
99 addMETCollection(process,
100 labelName =
"patCaloMet",
101 metSource =
"caloMetM"
105 process.noHFCands = cms.EDFilter(
"GenericPFCandidateSelector",
106 src=cms.InputTag(
"particleFlow"),
107 cut=cms.string(
"abs(pdgId)!=1 && abs(pdgId)!=2 && abs(eta)<3.0")
110 pfCandColl=cms.InputTag(
"noHFCands"),
111 recoMetFromPFCs=
True,
112 jetSelection=
"pt>15 && abs(eta)<3.",
116 process.load(
'PhysicsTools.PatAlgos.slimming.slimmedMETs_cfi')
117 process.slimmedMETsNoHF = process.slimmedMETs.clone()
118 process.slimmedMETsNoHF.src = cms.InputTag(
"patMETsNoHF")
119 process.slimmedMETsNoHF.rawVariation = cms.InputTag(
"patPFMetNoHF")
120 process.slimmedMETsNoHF.t1Uncertainties = cms.InputTag(
"patPFMetT1%sNoHF")
121 process.slimmedMETsNoHF.t01Variation = cms.InputTag(
"patPFMetT0pcT1NoHF")
122 process.slimmedMETsNoHF.t1SmearedVarsAndUncs = cms.InputTag(
"patPFMetT1Smear%sNoHF")
123 process.slimmedMETsNoHF.tXYUncForRaw = cms.InputTag(
"patPFMetTxyNoHF")
124 process.slimmedMETsNoHF.tXYUncForT1 = cms.InputTag(
"patPFMetT1TxyNoHF")
125 process.slimmedMETsNoHF.tXYUncForT01 = cms.InputTag(
"patPFMetT0pcT1TxyNoHF")
126 process.slimmedMETsNoHF.tXYUncForT1Smear = cms.InputTag(
"patPFMetT1SmearTxyNoHF")
127 process.slimmedMETsNoHF.tXYUncForT01Smear = cms.InputTag(
"patPFMetT0pcT1SmearTxyNoHF")
128 del process.slimmedMETsNoHF.caloMET
133 if not hasattr( process,
'pfImpactParameterTagInfos' ):
134 process.load(
'RecoBTag.ImpactParameter.pfImpactParameterTagInfos_cfi')
135 if not hasattr( process,
'pfSecondaryVertexTagInfos' ):
136 process.load(
'RecoBTag.SecondaryVertex.pfSecondaryVertexTagInfos_cfi')
137 process.patJets.userData.userFunctions = cms.vstring(
138 '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).p4.M):(0)',
139 '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).numberOfSourceCandidatePtrs):(0)',
140 '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").flightDistance(0).value):(0)',
141 '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").flightDistance(0).significance):(0)',
142 '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).p4.x):(0)',
143 '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).p4.y):(0)',
144 '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).p4.z):(0)',
145 '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).vertex.x):(0)',
146 '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).vertex.y):(0)',
147 '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).vertex.z):(0)',
149 process.patJets.userData.userFunctionLabels = cms.vstring(
'vtxMass',
'vtxNtracks',
'vtx3DVal',
'vtx3DSig',
'vtxPx',
'vtxPy',
'vtxPz',
'vtxPosX',
'vtxPosY',
'vtxPosZ')
150 process.patJets.tagInfoSources = cms.VInputTag(cms.InputTag(
"pfSecondaryVertexTagInfos"))
151 process.patJets.addTagInfos = cms.bool(
True)
160 jetSource = cms.InputTag(
'selectedPatJets'),
162 pvSource = cms.InputTag(
'offlinePrimaryVertices'),
163 pfCandidates = cms.InputTag(
'particleFlow'),
164 svSource = cms.InputTag(
'inclusiveCandidateSecondaryVertices'),
165 muSource = cms.InputTag(
'muons'),
166 elSource = cms.InputTag(
'gedGsfElectrons'),
168 jetCorrections = (
'AK4PFchs', [
'L1FastJet',
'L2Relative',
'L3Absolute'],
''),
169 btagDiscriminators = [
"pfCombinedSecondaryVertexV2BJetTags",
"pfCombinedInclusiveSecondaryVertexV2BJetTags",
170 "pfCombinedCvsLJetTags",
"pfCombinedCvsBJetTags"],
172 tightBTagNTkHits =
True,
173 btagPrefix =
'tight',
178 process.load(
"RecoJets.JetProducers.PileupJetID_cfi")
179 process.patJets.userData.userFloats.src = [ cms.InputTag(
"pileupJetId:fullDiscriminant"), ]
180 process.patJets.userData.userInts.src = [ cms.InputTag(
"pileupJetId:fullId"), ]
183 process.caloJetMap = cms.EDProducer(
"RecoJetDeltaRValueMapProducer",
184 src = process.patJets.jetSource,
185 matched = cms.InputTag(
"ak4CaloJets"),
186 distMax = cms.double(0.4),
187 values = cms.vstring(
'pt',
'emEnergyFraction'),
188 valueLabels = cms.vstring(
'pt',
'emEnergyFraction'),
189 lazyParser = cms.bool(
True) )
190 process.patJets.userData.userFloats.src += [ cms.InputTag(
"caloJetMap:pt"), cms.InputTag(
"caloJetMap:emEnergyFraction") ]
193 from RecoEgamma.EgammaTools.egammaObjectModificationsInMiniAOD_cff
import egamma_modifications
194 process.slimmedElectrons.modifierConfig.modifications = egamma_modifications
195 process.slimmedPhotons.modifierConfig.modifications = egamma_modifications
198 electron_ids = [
'RecoEgamma.ElectronIdentification.Identification.cutBasedElectronID_PHYS14_PU20bx25_V2_cff',
199 'RecoEgamma.ElectronIdentification.Identification.cutBasedElectronID_Spring15_25ns_V1_cff',
200 'RecoEgamma.ElectronIdentification.Identification.cutBasedElectronID_Spring15_50ns_V2_cff',
201 'RecoEgamma.ElectronIdentification.Identification.heepElectronID_HEEPV60_cff',
202 'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_Spring15_25ns_nonTrig_V1_cff',
203 'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_Spring15_25ns_Trig_V1_cff',
204 'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_Spring15_50ns_Trig_V1_cff']
206 process.egmGsfElectronIDs.physicsObjectSrc = \
207 cms.InputTag(
"reducedEgamma",
"reducedGedGsfElectrons")
208 process.electronMVAValueMapProducer.src = \
209 cms.InputTag(
'reducedEgamma',
'reducedGedGsfElectrons')
210 process.electronRegressionValueMapProducer.src = \
211 cms.InputTag(
'reducedEgamma',
'reducedGedGsfElectrons')
212 for idmod
in electron_ids:
216 photon_ids = [
'RecoEgamma.PhotonIdentification.Identification.cutBasedPhotonID_Spring15_25ns_V1_cff',
217 'RecoEgamma.PhotonIdentification.Identification.cutBasedPhotonID_Spring15_50ns_V1_cff',
218 'RecoEgamma.PhotonIdentification.Identification.mvaPhotonID_Spring15_25ns_nonTrig_V2p1_cff',
219 'RecoEgamma.PhotonIdentification.Identification.mvaPhotonID_Spring15_50ns_nonTrig_V2p1_cff']
221 process.egmPhotonIDs.physicsObjectSrc = \
222 cms.InputTag(
"reducedEgamma",
"reducedGedPhotons")
223 process.photonIDValueMapProducer.src = \
224 cms.InputTag(
"reducedEgamma",
"reducedGedPhotons")
225 process.photonRegressionValueMapProducer.src = \
226 cms.InputTag(
"reducedEgamma",
"reducedGedPhotons")
227 process.photonIDValueMapProducer.particleBasedIsolation = \
228 cms.InputTag(
"reducedEgamma",
"reducedPhotonPfCandMap")
229 process.photonMVAValueMapProducer.src = \
230 cms.InputTag(
'reducedEgamma',
'reducedGedPhotons')
231 for idmod
in photon_ids:
236 from RecoTauTag.Configuration.boostedHPSPFTaus_cfi
import addBoostedTaus
241 process.load(
'RecoJets.JetProducers.ak4PFJetsPuppi_cfi')
243 process.ak4PFJetsPuppi.doAreaFastjet =
True
246 process.ak4PFJetsPuppiTracksAssociatorAtVertex = cms.EDProducer(
"JetTracksAssociatorAtVertex",
248 jets = cms.InputTag(
"ak4PFJetsPuppi")
250 process.patJetPuppiCharge = cms.EDProducer(
"JetChargeProducer",
251 src = cms.InputTag(
"ak4PFJetsPuppiTracksAssociatorAtVertex"),
252 var = cms.string(
'Pt'),
253 exp = cms.double(1.0)
256 addJetCollection(process, postfix =
"", labelName =
'Puppi', jetSource = cms.InputTag(
'ak4PFJetsPuppi'),
257 jetCorrections = (
'AK4PFPuppi', [
'L2Relative',
'L3Absolute'],
''),
258 algo=
'AK', rParam = 0.4, btagDiscriminators = map(
lambda x: x.value() ,process.patJets.discriminatorSources)
261 process.patJetGenJetMatchPuppi.matched =
'slimmedGenJets'
263 process.patJetsPuppi.jetChargeSource = cms.InputTag(
"patJetPuppiCharge")
265 process.selectedPatJetsPuppi.cut = cms.string(
"pt > 15")
267 process.load(
'PhysicsTools.PatAlgos.slimming.slimmedJets_cfi')
268 process.slimmedJetsPuppi = process.slimmedJets.clone()
269 process.slimmedJetsPuppi.src = cms.InputTag(
"selectedPatJetsPuppi")
270 process.slimmedJetsPuppi.packedPFCandidates = cms.InputTag(
"packedPFCandidates")
274 from PhysicsTools.PatAlgos.slimming.puppiForMET_cff
import makePuppies
278 pfCandColl=cms.InputTag(
"puppiForMET"),
279 jetCollUnskimmed=
"slimmedJetsPuppi",
280 recoMetFromPFCs=
True,
281 jetFlavor=
"AK4PFPuppi",
285 process.load(
'PhysicsTools.PatAlgos.slimming.slimmedMETs_cfi')
286 process.slimmedMETsPuppi = process.slimmedMETs.clone()
287 process.slimmedMETsPuppi.src = cms.InputTag(
"patMETsPuppi")
288 process.slimmedMETsPuppi.rawVariation = cms.InputTag(
"patPFMetPuppi")
289 process.slimmedMETsPuppi.t1Uncertainties = cms.InputTag(
"patPFMetT1%sPuppi")
290 process.slimmedMETsPuppi.t01Variation = cms.InputTag(
"patPFMetT0pcT1Puppi")
291 process.slimmedMETsPuppi.t1SmearedVarsAndUncs = cms.InputTag(
"patPFMetT1Smear%sPuppi")
292 process.slimmedMETsPuppi.tXYUncForRaw = cms.InputTag(
"patPFMetTxyPuppi")
293 process.slimmedMETsPuppi.tXYUncForT1 = cms.InputTag(
"patPFMetT1TxyPuppi")
294 process.slimmedMETsPuppi.tXYUncForT01 = cms.InputTag(
"patPFMetT0pcT1TxyPuppi")
295 process.slimmedMETsPuppi.tXYUncForT1Smear = cms.InputTag(
"patPFMetT1SmearTxyPuppi")
296 process.slimmedMETsPuppi.tXYUncForT01Smear = cms.InputTag(
"patPFMetT0pcT1SmearTxyPuppi")
297 del process.slimmedMETsPuppi.caloMET