6 process.patMuons.isoDeposits = cms.PSet()
7 process.patElectrons.isoDeposits = cms.PSet()
8 process.patTaus.isoDeposits = cms.PSet()
9 process.patPhotons.isoDeposits = cms.PSet()
11 process.patMuons.embedTrack =
True
12 process.patMuons.embedCombinedMuon =
True
13 process.patMuons.embedMuonBestTrack =
True
14 process.patMuons.embedStandAloneMuon =
True
15 process.patMuons.embedPickyMuon =
False
16 process.patMuons.embedTpfmsMuon =
False
17 process.patMuons.embedDytMuon =
False
20 process.patElectrons.embedGsfElectronCore =
False
21 process.patElectrons.embedSuperCluster =
False
22 process.patElectrons.embedPflowSuperCluster =
False
23 process.patElectrons.embedSeedCluster =
False
24 process.patElectrons.embedBasicClusters =
False
25 process.patElectrons.embedPreshowerClusters =
False
26 process.patElectrons.embedPflowBasicClusters =
False
27 process.patElectrons.embedPflowPreshowerClusters =
False
28 process.patElectrons.embedRecHits =
False
29 process.patElectrons.electronSource = cms.InputTag(
"reducedEgamma",
"reducedGedGsfElectrons")
30 process.patElectrons.electronIDSources = cms.PSet(
33 eidRobustLoose = cms.InputTag(
"reducedEgamma",
"eidRobustLoose"),
34 eidRobustTight = cms.InputTag(
"reducedEgamma",
"eidRobustTight"),
35 eidLoose = cms.InputTag(
"reducedEgamma",
"eidLoose"),
36 eidTight = cms.InputTag(
"reducedEgamma",
"eidTight"),
37 eidRobustHighEnergy = cms.InputTag(
"reducedEgamma",
"eidRobustHighEnergy"),
39 process.patElectrons.addPFClusterIso = cms.bool(
True)
40 process.patElectrons.ecalPFClusterIsoMap = cms.InputTag(
"reducedEgamma",
"eleEcalPFClusIso")
41 process.patElectrons.hcalPFClusterIsoMap = cms.InputTag(
"reducedEgamma",
"eleHcalPFClusIso")
43 process.elPFIsoDepositChargedPAT.src = cms.InputTag(
"reducedEgamma",
"reducedGedGsfElectrons")
44 process.elPFIsoDepositChargedAllPAT.src = cms.InputTag(
"reducedEgamma",
"reducedGedGsfElectrons")
45 process.elPFIsoDepositNeutralPAT.src = cms.InputTag(
"reducedEgamma",
"reducedGedGsfElectrons")
46 process.elPFIsoDepositGammaPAT.src = cms.InputTag(
"reducedEgamma",
"reducedGedGsfElectrons")
47 process.elPFIsoDepositPUPAT.src = cms.InputTag(
"reducedEgamma",
"reducedGedGsfElectrons")
49 process.patPhotons.embedSuperCluster =
False
50 process.patPhotons.embedSeedCluster =
False
51 process.patPhotons.embedBasicClusters =
False
52 process.patPhotons.embedPreshowerClusters =
False
53 process.patPhotons.embedRecHits =
False
54 process.patPhotons.addPFClusterIso = cms.bool(
True)
55 process.patPhotons.ecalPFClusterIsoMap = cms.InputTag(
"reducedEgamma",
"phoEcalPFClusIso")
56 process.patPhotons.hcalPFClusterIsoMap = cms.InputTag(
"reducedEgamma",
"phoHcalPFClusIso")
57 process.patPhotons.photonSource = cms.InputTag(
"reducedEgamma",
"reducedGedPhotons")
58 process.patPhotons.electronSource = cms.InputTag(
"reducedEgamma",
"reducedGedGsfElectrons")
59 process.patPhotons.photonIDSources = cms.PSet(
60 PhotonCutBasedIDLoose = cms.InputTag(
'reducedEgamma',
61 'PhotonCutBasedIDLoose'),
62 PhotonCutBasedIDTight = cms.InputTag(
'reducedEgamma',
63 'PhotonCutBasedIDTight')
66 process.phPFIsoDepositChargedPAT.src = cms.InputTag(
"reducedEgamma",
"reducedGedPhotons")
67 process.phPFIsoDepositChargedAllPAT.src = cms.InputTag(
"reducedEgamma",
"reducedGedPhotons")
68 process.phPFIsoDepositNeutralPAT.src = cms.InputTag(
"reducedEgamma",
"reducedGedPhotons")
69 process.phPFIsoDepositGammaPAT.src = cms.InputTag(
"reducedEgamma",
"reducedGedPhotons")
70 process.phPFIsoDepositPUPAT.src = cms.InputTag(
"reducedEgamma",
"reducedGedPhotons")
72 process.selectedPatJets.cut = cms.string(
"pt > 10")
73 process.selectedPatMuons.cut = cms.string(
"pt > 5 || isPFMuon || (pt > 3 && (isGlobalMuon || isStandAloneMuon || numberOfMatches > 0 || muonID('RPCMuLoose')))")
74 process.selectedPatElectrons.cut = cms.string(
"")
75 process.selectedPatTaus.cut = cms.string(
"pt > 18. && tauID('decayModeFindingNewDMs')> 0.5")
76 process.selectedPatPhotons.cut = cms.string(
"")
80 from PhysicsTools.PatAlgos.slimming.applySubstructure_cff
import applySubstructure
85 from PhysicsTools.PatAlgos.tools.trigTools
import switchOnTriggerStandAlone
87 process.patTrigger.packTriggerPathNames = cms.bool(
True)
91 from PhysicsTools.PatUtils.tools.runMETCorrectionsAndUncertainties
import runMetCorAndUncForMiniAODProduction
93 jetCollUnskimmed=
"patJets",
94 jetColl=
"selectedPatJets")
97 from PhysicsTools.PatAlgos.tools.metTools
import addMETCollection
98 addMETCollection(process,
99 labelName =
"patCaloMet",
100 metSource =
"caloMetM"
104 process.noHFCands = cms.EDFilter(
"GenericPFCandidateSelector",
105 src=cms.InputTag(
"particleFlow"),
106 cut=cms.string(
"abs(pdgId)!=1 && abs(pdgId)!=2 && abs(eta)<3.0")
109 pfCandColl=cms.InputTag(
"noHFCands"),
113 process.load(
'PhysicsTools.PatAlgos.slimming.slimmedMETs_cfi')
114 process.slimmedMETsNoHF = process.slimmedMETs.clone()
115 process.slimmedMETsNoHF.src = cms.InputTag(
"patMETsNoHF")
116 process.slimmedMETsNoHF.rawVariation = cms.InputTag(
"patPFMetNoHF")
117 process.slimmedMETsNoHF.t1Uncertainties = cms.InputTag(
"patPFMetT1%sNoHF")
118 process.slimmedMETsNoHF.t01Variation = cms.InputTag(
"patPFMetT0pcT1NoHF")
119 process.slimmedMETsNoHF.t1SmearedVarsAndUncs = cms.InputTag(
"patPFMetT1Smear%sNoHF")
120 process.slimmedMETsNoHF.tXYUncForRaw = cms.InputTag(
"patPFMetTxyNoHF")
121 process.slimmedMETsNoHF.tXYUncForT1 = cms.InputTag(
"patPFMetT1TxyNoHF")
122 process.slimmedMETsNoHF.tXYUncForT01 = cms.InputTag(
"patPFMetT0pcT1TxyNoHF")
123 process.slimmedMETsNoHF.tXYUncForT1Smear = cms.InputTag(
"patPFMetT1SmearTxyNoHF")
124 process.slimmedMETsNoHF.tXYUncForT01Smear = cms.InputTag(
"patPFMetT0pcT1SmearTxyNoHF")
125 del process.slimmedMETsNoHF.caloMET
130 process.patJets.userData.userFunctions = cms.vstring(
131 '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).p4.M):(0)',
132 '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).numberOfSourceCandidatePtrs):(0)',
133 '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").flightDistance(0).value):(0)',
134 '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").flightDistance(0).significance):(0)',
135 '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).p4.x):(0)',
136 '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).p4.y):(0)',
137 '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).p4.z):(0)',
138 '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).vertex.x):(0)',
139 '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).vertex.y):(0)',
140 '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).vertex.z):(0)',
142 process.patJets.userData.userFunctionLabels = cms.vstring(
'vtxMass',
'vtxNtracks',
'vtx3DVal',
'vtx3DSig',
'vtxPx',
'vtxPy',
'vtxPz',
'vtxPosX',
'vtxPosY',
'vtxPosZ')
143 process.patJets.tagInfoSources = cms.VInputTag(cms.InputTag(
"pfSecondaryVertexTagInfos"))
144 process.patJets.addTagInfos = cms.bool(
True)
147 process.load(
"RecoJets.JetProducers.PileupJetID_cfi")
148 process.patJets.userData.userFloats.src = [ cms.InputTag(
"pileupJetId:fullDiscriminant"), ]
151 process.caloJetMap = cms.EDProducer(
"RecoJetDeltaRValueMapProducer",
152 src = process.patJets.jetSource,
153 matched = cms.InputTag(
"ak4CaloJets"),
154 distMax = cms.double(0.4),
155 values = cms.vstring(
'pt',
'emEnergyFraction'),
156 valueLabels = cms.vstring(
'pt',
'emEnergyFraction'),
157 lazyParser = cms.bool(
True) )
158 process.patJets.userData.userFloats.src += [ cms.InputTag(
"caloJetMap:pt"), cms.InputTag(
"caloJetMap:emEnergyFraction") ]
161 from RecoEgamma.EgammaTools.egammaObjectModificationsInMiniAOD_cff
import egamma_modifications
162 process.slimmedElectrons.modifierConfig.modifications = egamma_modifications
163 process.slimmedPhotons.modifierConfig.modifications = egamma_modifications
166 electron_ids = [
'RecoEgamma.ElectronIdentification.Identification.cutBasedElectronID_PHYS14_PU20bx25_V2_cff',
167 'RecoEgamma.ElectronIdentification.Identification.cutBasedElectronID_Spring15_25ns_V1_cff',
168 'RecoEgamma.ElectronIdentification.Identification.cutBasedElectronID_Spring15_50ns_V1_cff',
169 'RecoEgamma.ElectronIdentification.Identification.heepElectronID_HEEPV60_cff',
170 'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_Spring15_25ns_nonTrig_V1_cff']
172 process.egmGsfElectronIDs.physicsObjectSrc = \
173 cms.InputTag(
"reducedEgamma",
"reducedGedGsfElectrons")
174 process.electronMVAValueMapProducer.src = \
175 cms.InputTag(
'reducedEgamma',
'reducedGedGsfElectrons')
176 process.electronRegressionValueMapProducer.src = \
177 cms.InputTag(
'reducedEgamma',
'reducedGedGsfElectrons')
178 for idmod
in electron_ids:
182 photon_ids = [
'RecoEgamma.PhotonIdentification.Identification.cutBasedPhotonID_PHYS14_PU20bx25_V2_cff',
183 'RecoEgamma.PhotonIdentification.Identification.cutBasedPhotonID_Spring15_50ns_V1_cff',
184 'RecoEgamma.PhotonIdentification.Identification.mvaPhotonID_Spring15_25ns_nonTrig_V2_cff',
185 'RecoEgamma.PhotonIdentification.Identification.mvaPhotonID_Spring15_50ns_nonTrig_V2_cff']
187 process.egmPhotonIDs.physicsObjectSrc = \
188 cms.InputTag(
"reducedEgamma",
"reducedGedPhotons")
189 process.photonIDValueMapProducer.src = \
190 cms.InputTag(
"reducedEgamma",
"reducedGedPhotons")
191 process.photonRegressionValueMapProducer.src = \
192 cms.InputTag(
"reducedEgamma",
"reducedGedPhotons")
193 process.photonIDValueMapProducer.particleBasedIsolation = \
194 cms.InputTag(
"reducedEgamma",
"reducedPhotonPfCandMap")
195 process.photonMVAValueMapProducer.src = \
196 cms.InputTag(
'reducedEgamma',
'reducedGedPhotons')
197 for idmod
in photon_ids:
201 process.load(
'CommonTools.PileupAlgos.Puppi_cff')
202 process.load(
'RecoJets.JetProducers.ak4PFJetsPuppi_cfi')
203 process.ak4PFJetsPuppi.doAreaFastjet =
True
207 process.pfNoLepPUPPI = cms.EDFilter(
"PdgIdCandViewSelector",
208 src = cms.InputTag(
"particleFlow"),
209 pdgId = cms.vint32( 1,2,22,111,130,310,2112,211,-211,321,-321,999211,2212,-2212 )
211 process.pfLeptonsPUPPET = cms.EDFilter(
"PdgIdCandViewSelector",
212 src = cms.InputTag(
"particleFlow"),
213 pdgId = cms.vint32(-11,11,-13,13),
215 process.puppiNoLep = process.puppi.clone()
216 process.puppiNoLep.candName = cms.InputTag(
'pfNoLepPUPPI')
219 process.ak4PFJetsPuppiTracksAssociatorAtVertex = cms.EDProducer(
"JetTracksAssociatorAtVertex",
221 jets = cms.InputTag(
"ak4PFJetsPuppi")
223 process.patJetPuppiCharge = cms.EDProducer(
"JetChargeProducer",
224 src = cms.InputTag(
"ak4PFJetsPuppiTracksAssociatorAtVertex"),
225 var = cms.string(
'Pt'),
226 exp = cms.double(1.0)
229 addJetCollection(process, postfix =
"", labelName =
'Puppi', jetSource = cms.InputTag(
'ak4PFJetsPuppi'),
230 jetCorrections = (
'AK4PFchs', [
'L2Relative',
'L3Absolute'],
''),
231 algo=
'AK', rParam = 0.4, btagDiscriminators =
map(
lambda x: x.value() ,process.patJets.discriminatorSources)
234 process.patJetGenJetMatchPuppi.matched =
'slimmedGenJets'
236 process.patJetsPuppi.userData.userFloats.src = cms.VInputTag(cms.InputTag(
""))
237 process.patJetsPuppi.jetChargeSource = cms.InputTag(
"patJetPuppiCharge")
239 process.selectedPatJetsPuppi.cut = cms.string(
"pt > 20")
241 process.load(
'PhysicsTools.PatAlgos.slimming.slimmedJets_cfi')
242 process.slimmedJetsPuppi = process.slimmedJets.clone()
243 process.slimmedJetsPuppi.src = cms.InputTag(
"selectedPatJetsPuppi")
244 process.slimmedJetsPuppi.packedPFCandidates = cms.InputTag(
"packedPFCandidates")
247 process.puppiForMET = cms.EDProducer(
"CandViewMerger",
248 src = cms.VInputTag(
"pfLeptonsPUPPET",
"puppiNoLep")
251 process.pfMetPuppi = RecoMET.METProducers.PFMET_cfi.pfMet.clone()
252 process.pfMetPuppi.src = cms.InputTag(
"puppiForMET")
253 process.pfMetPuppi.alias = cms.string(
'pfMetPuppi')
255 process.corrPfMetType1Puppi = process.corrPfMetType1.clone(
256 src =
'ak4PFJetsPuppi',
257 jetCorrLabel =
'ak4PFCHSL2L3Corrector',
259 del process.corrPfMetType1Puppi.offsetCorrLabel
260 process.pfMetT1Puppi = process.pfMetT1.clone(
262 srcCorrections = [ cms.InputTag(
"corrPfMetType1Puppi",
"type1") ]
265 from PhysicsTools.PatAlgos.tools.metTools
import addMETCollection
266 addMETCollection(process, labelName=
'patMETPuppi', metSource=
'pfMetT1Puppi')
267 addMETCollection(process, labelName=
'patPFMetPuppi', metSource=
'pfMetPuppi')
269 process.load(
'PhysicsTools.PatAlgos.slimming.slimmedMETs_cfi')
270 process.slimmedMETsPuppi = process.slimmedMETs.clone()
271 process.slimmedMETsPuppi.src = cms.InputTag(
"patMETPuppi")
272 process.slimmedMETsPuppi.rawVariation = cms.InputTag(
"patPFMetPuppi")
274 del process.slimmedMETsPuppi.t01Variation
275 del process.slimmedMETsPuppi.t1SmearedVarsAndUncs
276 del process.slimmedMETsPuppi.tXYUncForRaw
277 del process.slimmedMETsPuppi.tXYUncForT1
278 del process.slimmedMETsPuppi.tXYUncForT01
279 del process.slimmedMETsPuppi.tXYUncForT1Smear
280 del process.slimmedMETsPuppi.tXYUncForT01Smear
281 del process.slimmedMETsPuppi.caloMET
285 process.load(
'RecoTauTag.Configuration.RecoPFTauTag_cff')
289 process.load(
'PhysicsTools.PatAlgos.slimming.slimmedAddPileupInfo_cfi')
291 process.muonMatch.matched =
"prunedGenParticles"
292 process.electronMatch.matched =
"prunedGenParticles"
293 process.electronMatch.src = cms.InputTag(
"reducedEgamma",
"reducedGedGsfElectrons")
294 process.photonMatch.matched =
"prunedGenParticles"
295 process.photonMatch.src = cms.InputTag(
"reducedEgamma",
"reducedGedPhotons")
296 process.tauMatch.matched =
"prunedGenParticles"
297 process.tauGenJets.GenParticles =
"prunedGenParticles"
298 process.patJetPartons.particles =
"prunedGenParticles"
299 process.patJetPartonMatch.matched =
"prunedGenParticles"
300 process.patJetPartonMatch.mcStatus = [ 3, 23 ]
301 process.patJetGenJetMatch.matched =
"slimmedGenJets"
302 process.patJetGenJetMatchAK8.matched =
"slimmedGenJetsAK8"
303 process.patMuons.embedGenMatch =
False
304 process.patElectrons.embedGenMatch =
False
305 process.patPhotons.embedGenMatch =
False
306 process.patTaus.embedGenMatch =
False
307 process.patJets.embedGenPartonMatch =
False
309 process.patJetFlavourAssociation.rParam = 0.4
312 out.dropMetaData = cms.untracked.string(
'ALL')
313 out.fastCloning= cms.untracked.bool(
False)
314 out.overrideInputFileSplitLevels = cms.untracked.bool(
True)
315 out.compressionAlgorithm = cms.untracked.string(
'LZMA')
319 runOnData( process, outputModules = [] )
def runMetCorAndUncForMiniAODProduction