1 import FWCore.ParameterSet.Config
as cms
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)
92 from PhysicsTools.PatUtils.tools.runMETCorrectionsAndUncertainties
import runMetCorAndUncForMiniAODProduction
94 jetCollUnskimmed=
"patJets")
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"),
110 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 process.load(
'RecoBTag.Combined.deepFlavour_cff')
134 process.patJets.discriminatorSources.extend([
135 cms.InputTag(
'pfDeepCSVJetTags:probudsg'),
136 cms.InputTag(
'pfDeepCSVJetTags:probbb'),
137 cms.InputTag(
'pfDeepCSVJetTags:probc'),
138 cms.InputTag(
'pfDeepCSVJetTags:probb'),
139 cms.InputTag(
'pfDeepCSVJetTags:probcc')
145 if not hasattr( process,
'pfImpactParameterTagInfos' ):
146 process.load(
'RecoBTag.ImpactParameter.pfImpactParameterTagInfos_cfi')
147 if not hasattr( process,
'pfSecondaryVertexTagInfos' ):
148 process.load(
'RecoBTag.SecondaryVertex.pfSecondaryVertexTagInfos_cfi')
149 if not hasattr( process,
'pfInclusiveSecondaryVertexFinderTagInfos' ):
150 process.load(
'RecoBTag.SecondaryVertex.pfInclusiveSecondaryVertexFinderTagInfos_cfi')
151 process.patJets.userData.userFunctions = cms.vstring(
152 '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).p4.M):(0)',
153 '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).numberOfSourceCandidatePtrs):(0)',
154 '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").flightDistance(0).value):(0)',
155 '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").flightDistance(0).significance):(0)',
156 '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).p4.x):(0)',
157 '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).p4.y):(0)',
158 '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).p4.z):(0)',
159 '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).vertex.x):(0)',
160 '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).vertex.y):(0)',
161 '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).vertex.z):(0)',
163 process.patJets.userData.userFunctionLabels = cms.vstring(
'vtxMass',
'vtxNtracks',
'vtx3DVal',
'vtx3DSig',
'vtxPx',
'vtxPy',
'vtxPz',
'vtxPosX',
'vtxPosY',
'vtxPosZ')
164 process.patJets.tagInfoSources = cms.VInputTag(cms.InputTag(
"pfSecondaryVertexTagInfos"))
165 process.patJets.addTagInfos = cms.bool(
True)
174 jetSource = cms.InputTag(
'selectedPatJets'),
176 pvSource = cms.InputTag(
'offlinePrimaryVertices'),
177 pfCandidates = cms.InputTag(
'particleFlow'),
178 svSource = cms.InputTag(
'inclusiveCandidateSecondaryVertices'),
179 muSource = cms.InputTag(
'muons'),
180 elSource = cms.InputTag(
'gedGsfElectrons'),
182 jetCorrections = (
'AK4PFchs', [
'L1FastJet',
'L2Relative',
'L3Absolute'],
''),
183 btagDiscriminators = [
"pfCombinedSecondaryVertexV2BJetTags",
"pfCombinedInclusiveSecondaryVertexV2BJetTags",
184 "pfCombinedCvsLJetTags",
"pfCombinedCvsBJetTags"],
186 tightBTagNTkHits =
True,
187 btagPrefix =
'tight',
192 process.load(
"RecoJets.JetProducers.PileupJetID_cfi")
193 process.patJets.userData.userFloats.src = [ cms.InputTag(
"pileupJetId:fullDiscriminant"), ]
194 process.patJets.userData.userInts.src = [ cms.InputTag(
"pileupJetId:fullId"), ]
197 process.caloJetMap = cms.EDProducer(
"RecoJetDeltaRValueMapProducer",
198 src = process.patJets.jetSource,
199 matched = cms.InputTag(
"ak4CaloJets"),
200 distMax = cms.double(0.4),
201 values = cms.vstring(
'pt',
'emEnergyFraction'),
202 valueLabels = cms.vstring(
'pt',
'emEnergyFraction'),
203 lazyParser = cms.bool(
True) )
204 process.patJets.userData.userFloats.src += [ cms.InputTag(
"caloJetMap:pt"), cms.InputTag(
"caloJetMap:emEnergyFraction") ]
207 from RecoEgamma.EgammaTools.egammaObjectModificationsInMiniAOD_cff
import egamma_modifications
208 process.slimmedElectrons.modifierConfig.modifications = egamma_modifications
209 process.slimmedPhotons.modifierConfig.modifications = egamma_modifications
212 electron_ids = [
'RecoEgamma.ElectronIdentification.Identification.cutBasedElectronID_PHYS14_PU20bx25_V2_cff',
213 'RecoEgamma.ElectronIdentification.Identification.cutBasedElectronID_Spring15_25ns_V1_cff',
214 'RecoEgamma.ElectronIdentification.Identification.cutBasedElectronID_Spring15_50ns_V2_cff',
215 'RecoEgamma.ElectronIdentification.Identification.heepElectronID_HEEPV60_cff',
216 'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_Spring15_25ns_nonTrig_V1_cff',
217 'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_Spring15_25ns_Trig_V1_cff',
218 'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_Spring15_50ns_Trig_V1_cff']
220 process.egmGsfElectronIDs.physicsObjectSrc = \
221 cms.InputTag(
"reducedEgamma",
"reducedGedGsfElectrons")
222 process.electronMVAValueMapProducer.src = \
223 cms.InputTag(
'reducedEgamma',
'reducedGedGsfElectrons')
224 process.electronRegressionValueMapProducer.src = \
225 cms.InputTag(
'reducedEgamma',
'reducedGedGsfElectrons')
226 for idmod
in electron_ids:
230 photon_ids = [
'RecoEgamma.PhotonIdentification.Identification.cutBasedPhotonID_Spring15_25ns_V1_cff',
231 'RecoEgamma.PhotonIdentification.Identification.cutBasedPhotonID_Spring15_50ns_V1_cff',
232 'RecoEgamma.PhotonIdentification.Identification.mvaPhotonID_Spring15_25ns_nonTrig_V2p1_cff',
233 'RecoEgamma.PhotonIdentification.Identification.mvaPhotonID_Spring15_50ns_nonTrig_V2p1_cff']
235 process.egmPhotonIDs.physicsObjectSrc = \
236 cms.InputTag(
"reducedEgamma",
"reducedGedPhotons")
237 process.photonIDValueMapProducer.src = \
238 cms.InputTag(
"reducedEgamma",
"reducedGedPhotons")
239 process.photonRegressionValueMapProducer.src = \
240 cms.InputTag(
"reducedEgamma",
"reducedGedPhotons")
241 process.photonIDValueMapProducer.particleBasedIsolation = \
242 cms.InputTag(
"reducedEgamma",
"reducedPhotonPfCandMap")
243 process.photonMVAValueMapProducer.src = \
244 cms.InputTag(
'reducedEgamma',
'reducedGedPhotons')
245 for idmod
in photon_ids:
250 from RecoTauTag.Configuration.boostedHPSPFTaus_cfi
import addBoostedTaus
255 process.load(
'RecoJets.JetProducers.ak4PFJetsPuppi_cfi')
257 process.ak4PFJetsPuppi.doAreaFastjet =
True
260 process.ak4PFJetsPuppiTracksAssociatorAtVertex = cms.EDProducer(
"JetTracksAssociatorAtVertex",
262 jets = cms.InputTag(
"ak4PFJetsPuppi")
264 process.patJetPuppiCharge = cms.EDProducer(
"JetChargeProducer",
265 src = cms.InputTag(
"ak4PFJetsPuppiTracksAssociatorAtVertex"),
266 var = cms.string(
'Pt'),
267 exp = cms.double(1.0)
270 addJetCollection(process, postfix =
"", labelName =
'Puppi', jetSource = cms.InputTag(
'ak4PFJetsPuppi'),
271 jetCorrections = (
'AK4PFPuppi', [
'L2Relative',
'L3Absolute'],
''),
272 algo=
'AK', rParam = 0.4, btagDiscriminators = map(
lambda x: x.value() ,process.patJets.discriminatorSources)
275 process.patJetGenJetMatchPuppi.matched =
'slimmedGenJets'
277 process.patJetsPuppi.jetChargeSource = cms.InputTag(
"patJetPuppiCharge")
279 process.selectedPatJetsPuppi.cut = cms.string(
"pt > 15")
281 process.load(
'PhysicsTools.PatAlgos.slimming.slimmedJets_cfi')
282 process.slimmedJetsPuppi = process.slimmedJets.clone()
283 process.slimmedJetsPuppi.src = cms.InputTag(
"selectedPatJetsPuppi")
284 process.slimmedJetsPuppi.packedPFCandidates = cms.InputTag(
"packedPFCandidates")
288 from PhysicsTools.PatAlgos.slimming.puppiForMET_cff
import makePuppies
292 pfCandColl=cms.InputTag(
"puppiForMET"),
293 jetCollUnskimmed=
"slimmedJetsPuppi",
294 recoMetFromPFCs=
True,
295 jetFlavor=
"AK4PFPuppi",
299 process.load(
'PhysicsTools.PatAlgos.slimming.slimmedMETs_cfi')
300 process.slimmedMETsPuppi = process.slimmedMETs.clone()
301 process.slimmedMETsPuppi.src = cms.InputTag(
"patMETsPuppi")
302 process.slimmedMETsPuppi.rawVariation = cms.InputTag(
"patPFMetPuppi")
303 process.slimmedMETsPuppi.t1Uncertainties = cms.InputTag(
"patPFMetT1%sPuppi")
304 process.slimmedMETsPuppi.t01Variation = cms.InputTag(
"patPFMetT0pcT1Puppi")
305 process.slimmedMETsPuppi.t1SmearedVarsAndUncs = cms.InputTag(
"patPFMetT1Smear%sPuppi")
306 process.slimmedMETsPuppi.tXYUncForRaw = cms.InputTag(
"patPFMetTxyPuppi")
307 process.slimmedMETsPuppi.tXYUncForT1 = cms.InputTag(
"patPFMetT1TxyPuppi")
308 process.slimmedMETsPuppi.tXYUncForT01 = cms.InputTag(
"patPFMetT0pcT1TxyPuppi")
309 process.slimmedMETsPuppi.tXYUncForT1Smear = cms.InputTag(
"patPFMetT1SmearTxyPuppi")
310 process.slimmedMETsPuppi.tXYUncForT01Smear = cms.InputTag(
"patPFMetT0pcT1SmearTxyPuppi")
311 del process.slimmedMETsPuppi.caloMET
317 process.load(
'PhysicsTools.PatAlgos.slimming.slimmedAddPileupInfo_cfi')
319 process.muonMatch.matched =
"prunedGenParticles"
320 process.electronMatch.matched =
"prunedGenParticles"
321 process.electronMatch.src = cms.InputTag(
"reducedEgamma",
"reducedGedGsfElectrons")
322 process.photonMatch.matched =
"prunedGenParticles"
323 process.photonMatch.src = cms.InputTag(
"reducedEgamma",
"reducedGedPhotons")
324 process.tauMatch.matched =
"prunedGenParticles"
325 process.tauGenJets.GenParticles =
"prunedGenParticles"
327 process.tauMatchBoosted.matched =
"prunedGenParticles"
328 process.tauGenJetsBoosted.GenParticles =
"prunedGenParticles"
329 process.patJetPartons.particles =
"prunedGenParticles"
330 process.patJetPartonMatch.matched =
"prunedGenParticles"
331 process.patJetPartonMatch.mcStatus = [ 3, 23 ]
332 process.patJetGenJetMatch.matched =
"slimmedGenJets"
333 process.patJetGenJetMatchAK8.matched =
"slimmedGenJetsAK8"
334 process.patMuons.embedGenMatch =
False
335 process.patElectrons.embedGenMatch =
False
336 process.patPhotons.embedGenMatch =
False
337 process.patTaus.embedGenMatch =
False
338 process.patTausBoosted.embedGenMatch =
False
339 process.patJets.embedGenPartonMatch =
False
341 process.patJetFlavourAssociation.rParam = 0.4
344 out.dropMetaData = cms.untracked.string(
'ALL')
345 out.fastCloning= cms.untracked.bool(
False)
346 out.overrideInputFileSplitLevels = cms.untracked.bool(
True)
347 out.compressionAlgorithm = cms.untracked.string(
'LZMA')
351 runOnData( process, outputModules = [] )
352 process.load(
"RecoCTPPS.TotemRPLocal.ctppsLocalTrackLiteProducer_cfi")
def runMetCorAndUncForMiniAODProduction