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.runType1PFMEtUncertainties
import runType1PFMEtUncertainties
93 addJetCollection(process, postfix =
"ForMetUnc", labelName =
'AK4PF', jetSource = cms.InputTag(
'ak4PFJets'), jetCorrections = (
'AK4PF', [
'L1FastJet',
'L2Relative',
'L3Absolute'],
''))
94 process.patJetsAK4PFForMetUnc.getJetMCFlavour =
False
96 addToPatDefaultSequence=
False,
97 jetCollectionUnskimmed=
"patJetsAK4PFForMetUnc",
98 jetCollection=
"selectedPatJetsAK4PFForMetUnc",
99 electronCollection=
"selectedPatElectrons",
100 muonCollection=
"selectedPatMuons",
101 tauCollection=
"selectedPatTaus",
102 makeType1p2corrPFMEt=
True,
106 from PhysicsTools.PatAlgos.tools.metTools
import addMETCollection
107 addMETCollection(process,
108 labelName =
"patCaloMet",
109 metSource =
"caloMetM"
115 process.patJets.userData.userFunctions = cms.vstring(
116 '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).p4.M):(0)',
117 '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).numberOfSourceCandidatePtrs):(0)',
118 '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").flightDistance(0).value):(0)',
119 '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").flightDistance(0).significance):(0)',
120 '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).p4.x):(0)',
121 '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).p4.y):(0)',
122 '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).p4.z):(0)',
123 '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).vertex.x):(0)',
124 '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).vertex.y):(0)',
125 '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).vertex.z):(0)',
127 process.patJets.userData.userFunctionLabels = cms.vstring(
'vtxMass',
'vtxNtracks',
'vtx3DVal',
'vtx3DSig',
'vtxPx',
'vtxPy',
'vtxPz',
'vtxPosX',
'vtxPosY',
'vtxPosZ')
128 process.patJets.tagInfoSources = cms.VInputTag(cms.InputTag(
"pfSecondaryVertexTagInfos"))
129 process.patJets.addTagInfos = cms.bool(
True)
132 process.load(
"PhysicsTools.PatAlgos.slimming.pileupJetId_cfi")
133 process.patJets.userData.userFloats.src = [ cms.InputTag(
"pileupJetId:fullDiscriminant"), ]
136 process.caloJetMap = cms.EDProducer(
"RecoJetDeltaRValueMapProducer",
137 src = process.patJets.jetSource,
138 matched = cms.InputTag(
"ak4CaloJets"),
139 distMax = cms.double(0.4),
140 values = cms.vstring(
'pt',
'emEnergyFraction'),
141 valueLabels = cms.vstring(
'pt',
'emEnergyFraction'),
142 lazyParser = cms.bool(
True) )
143 process.patJets.userData.userFloats.src += [ cms.InputTag(
"caloJetMap:pt"), cms.InputTag(
"caloJetMap:emEnergyFraction") ]
146 from RecoEgamma.EgammaTools.egammaObjectModificationsInMiniAOD_cff
import egamma_modifications
147 process.slimmedElectrons.modifierConfig.modifications = egamma_modifications
148 process.slimmedPhotons.modifierConfig.modifications = egamma_modifications
151 electron_ids = [
'RecoEgamma.ElectronIdentification.Identification.cutBasedElectronID_CSA14_50ns_V1_cff',
152 'RecoEgamma.ElectronIdentification.Identification.cutBasedElectronID_CSA14_PU20bx25_V0_cff',
153 'RecoEgamma.ElectronIdentification.Identification.heepElectronID_HEEPV50_CSA14_25ns_cff',
154 'RecoEgamma.ElectronIdentification.Identification.heepElectronID_HEEPV50_CSA14_startup_cff']
156 process.egmGsfElectronIDs.physicsObjectSrc = \
157 cms.InputTag(
"reducedEgamma",
"reducedGedGsfElectrons")
158 process.electronIDValueMapProducer.src = \
159 cms.InputTag(
"reducedEgamma",
"reducedGedGsfElectrons")
160 process.electronIDValueMapProducer.ebReducedRecHitCollection = \
161 cms.InputTag(
"reducedEgamma",
"reducedEBRecHits")
162 process.electronIDValueMapProducer.eeReducedRecHitCollection = \
163 cms.InputTag(
"reducedEgamma",
"reducedEERecHits")
164 process.electronIDValueMapProducer.esReducedRecHitCollection = \
165 cms.InputTag(
"reducedEgamma",
"reducedESRecHits")
166 for idmod
in electron_ids:
170 process.load(
'CommonTools.PileupAlgos.Puppi_cff')
171 process.load(
'RecoJets.JetProducers.ak4PFJetsPuppi_cfi')
172 process.ak4PFJetsPuppi.doAreaFastjet =
True
177 process.ak4PFJetsPuppiTracksAssociatorAtVertex = cms.EDProducer(
"JetTracksAssociatorAtVertex",
179 jets = cms.InputTag(
"ak4PFJetsPuppi")
181 process.patJetPuppiCharge = cms.EDProducer(
"JetChargeProducer",
182 src = cms.InputTag(
"ak4PFJetsPuppiTracksAssociatorAtVertex"),
183 var = cms.string(
'Pt'),
184 exp = cms.double(1.0)
187 addJetCollection(process, postfix =
"", labelName =
'Puppi', jetSource = cms.InputTag(
'ak4PFJetsPuppi'),
188 jetCorrections = (
'AK4PFchs', [
'L2Relative',
'L3Absolute'],
''),
189 algo=
'AK', rParam = 0.4, btagDiscriminators =
map(
lambda x: x.value() ,process.patJets.discriminatorSources)
192 process.patJetGenJetMatchPuppi.matched =
'slimmedGenJets'
194 process.patJetsPuppi.userData.userFloats.src = cms.VInputTag(cms.InputTag(
""))
195 process.patJetsPuppi.jetChargeSource = cms.InputTag(
"patJetPuppiCharge")
197 process.selectedPatJetsPuppi.cut = cms.string(
"pt > 20")
199 process.load(
'PhysicsTools.PatAlgos.slimming.slimmedJets_cfi')
200 process.slimmedJetsPuppi = process.slimmedJets.clone()
201 process.slimmedJetsPuppi.src = cms.InputTag(
"selectedPatJetsPuppi")
202 process.slimmedJetsPuppi.packedPFCandidates = cms.InputTag(
"packedPFCandidates")
205 process.load(
'RecoMET.METProducers.PFMET_cfi')
206 process.pfMetPuppi = process.pfMet.clone()
207 process.pfMetPuppi.src = cms.InputTag(
"puppi")
208 process.pfMetPuppi.alias = cms.string(
'pfMetPuppi')
210 process.corrPfMetType1Puppi = process.corrPfMetType1.clone(
211 src =
'ak4PFJetsPuppi',
212 jetCorrLabel =
'ak4PFCHSL2L3Corrector',
214 del process.corrPfMetType1Puppi.offsetCorrLabel
215 process.pfMetT1Puppi = process.pfMetT1.clone(
217 srcCorrections = [ cms.InputTag(
"corrPfMetType1Puppi",
"type1") ]
220 from PhysicsTools.PatAlgos.tools.metTools
import addMETCollection
221 addMETCollection(process, labelName=
'patMETPuppi', metSource=
'pfMetT1Puppi')
222 addMETCollection(process, labelName=
'patPFMetPuppi', metSource=
'pfMetPuppi')
224 process.load(
'PhysicsTools.PatAlgos.slimming.slimmedMETs_cfi')
225 process.slimmedMETsPuppi = process.slimmedMETs.clone()
226 process.slimmedMETsPuppi.src = cms.InputTag(
"patMETPuppi")
227 process.slimmedMETsPuppi.rawUncertainties = cms.InputTag(
"patPFMetPuppi")
228 process.slimmedMETsPuppi.type1Uncertainties = cms.InputTag(
"patPFMetT1")
229 del process.slimmedMETsPuppi.type1p2Uncertainties
232 process.muonMatch.matched =
"prunedGenParticles"
233 process.electronMatch.matched =
"prunedGenParticles"
234 process.electronMatch.src = cms.InputTag(
"reducedEgamma",
"reducedGedGsfElectrons")
235 process.photonMatch.matched =
"prunedGenParticles"
236 process.photonMatch.src = cms.InputTag(
"reducedEgamma",
"reducedGedPhotons")
237 process.tauMatch.matched =
"prunedGenParticles"
238 process.tauGenJets.GenParticles =
"prunedGenParticles"
239 process.patJetPartonMatch.matched =
"prunedGenParticles"
240 process.patJetPartonMatch.mcStatus = [ 3, 23 ]
241 process.patJetGenJetMatch.matched =
"slimmedGenJets"
242 process.patJetGenJetMatchAK8.matched =
"slimmedGenJetsAK8"
243 process.patMuons.embedGenMatch =
False
244 process.patElectrons.embedGenMatch =
False
245 process.patPhotons.embedGenMatch =
False
246 process.patTaus.embedGenMatch =
False
247 process.patJets.embedGenPartonMatch =
False
249 process.patJetFlavourAssociation.rParam = 0.4
252 out.dropMetaData = cms.untracked.string(
'ALL')
253 out.fastCloning= cms.untracked.bool(
False)
254 out.overrideInputFileSplitLevels = cms.untracked.bool(
True)
255 out.compressionAlgorithm = cms.untracked.string(
'LZMA')
259 runOnData( process, outputModules = [] )