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.runType1PFMEtUncertainties
import runType1PFMEtUncertainties
94 addJetCollection(process, postfix =
"ForMetUnc", labelName =
'AK4PF', jetSource = cms.InputTag(
'ak4PFJets'), jetCorrections = (
'AK4PF', [
'L1FastJet',
'L2Relative',
'L3Absolute'],
''))
95 process.patJetsAK4PFForMetUnc.getJetMCFlavour =
False
97 addToPatDefaultSequence=
False,
98 jetCollectionUnskimmed=
"patJetsAK4PFForMetUnc",
99 jetCollection=
"selectedPatJetsAK4PFForMetUnc",
100 electronCollection=
"selectedPatElectrons",
101 muonCollection=
"selectedPatMuons",
102 tauCollection=
"selectedPatTaus",
103 makeType1p2corrPFMEt=
True,
107 from PhysicsTools.PatAlgos.tools.metTools
import addMETCollection
108 addMETCollection(process,
109 labelName =
"patCaloMet",
110 metSource =
"caloMetM"
116 process.patJets.userData.userFunctions = cms.vstring(
117 '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).p4.M):(0)',
118 '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).numberOfSourceCandidatePtrs):(0)',
119 '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").flightDistance(0).value):(0)',
120 '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").flightDistance(0).significance):(0)',
121 '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).p4.x):(0)',
122 '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).p4.y):(0)',
123 '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).p4.z):(0)',
124 '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).vertex.x):(0)',
125 '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).vertex.y):(0)',
126 '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).vertex.z):(0)',
128 process.patJets.userData.userFunctionLabels = cms.vstring(
'vtxMass',
'vtxNtracks',
'vtx3DVal',
'vtx3DSig',
'vtxPx',
'vtxPy',
'vtxPz',
'vtxPosX',
'vtxPosY',
'vtxPosZ')
129 process.patJets.tagInfoSources = cms.VInputTag(cms.InputTag(
"pfSecondaryVertexTagInfos"))
130 process.patJets.addTagInfos = cms.bool(
True)
133 process.load(
"PhysicsTools.PatAlgos.slimming.pileupJetId_cfi")
134 process.patJets.userData.userFloats.src = [ cms.InputTag(
"pileupJetId:fullDiscriminant"), ]
137 process.caloJetMap = cms.EDProducer(
"RecoJetDeltaRValueMapProducer",
138 src = process.patJets.jetSource,
139 matched = cms.InputTag(
"ak4CaloJets"),
140 distMax = cms.double(0.4),
141 values = cms.vstring(
'pt',
'emEnergyFraction'),
142 valueLabels = cms.vstring(
'pt',
'emEnergyFraction'),
143 lazyParser = cms.bool(
True) )
144 process.patJets.userData.userFloats.src += [ cms.InputTag(
"caloJetMap:pt"), cms.InputTag(
"caloJetMap:emEnergyFraction") ]
147 electron_ids = [
'RecoEgamma.ElectronIdentification.Identification.cutBasedElectronID_CSA14_50ns_V1_cff',
148 'RecoEgamma.ElectronIdentification.Identification.cutBasedElectronID_CSA14_PU20bx25_V0_cff',
149 'RecoEgamma.ElectronIdentification.Identification.heepElectronID_HEEPV50_CSA14_25ns_cff',
150 'RecoEgamma.ElectronIdentification.Identification.heepElectronID_HEEPV50_CSA14_startup_cff']
152 process.egmGsfElectronIDs.physicsObjectSrc = \
153 cms.InputTag(
"reducedEgamma",
"reducedGedGsfElectrons")
154 process.electronIDValueMapProducer.src = \
155 cms.InputTag(
"reducedEgamma",
"reducedGedGsfElectrons")
156 process.electronIDValueMapProducer.ebReducedRecHitCollection = \
157 cms.InputTag(
"reducedEgamma",
"reducedEBRecHits")
158 process.electronIDValueMapProducer.eeReducedRecHitCollection = \
159 cms.InputTag(
"reducedEgamma",
"reducedEERecHits")
160 process.electronIDValueMapProducer.esReducedRecHitCollection = \
161 cms.InputTag(
"reducedEgamma",
"reducedESRecHits")
162 for idmod
in electron_ids:
166 process.load(
'CommonTools.PileupAlgos.Puppi_cff')
167 process.load(
'RecoJets.JetProducers.ak4PFJetsPuppi_cfi')
168 process.ak4PFJetsPuppi.doAreaFastjet =
True
173 process.ak4PFJetsPuppiTracksAssociatorAtVertex = cms.EDProducer(
"JetTracksAssociatorAtVertex",
175 jets = cms.InputTag(
"ak4PFJetsPuppi")
177 process.patJetPuppiCharge = cms.EDProducer(
"JetChargeProducer",
178 src = cms.InputTag(
"ak4PFJetsPuppiTracksAssociatorAtVertex"),
179 var = cms.string(
'Pt'),
180 exp = cms.double(1.0)
183 addJetCollection(process, postfix =
"", labelName =
'Puppi', jetSource = cms.InputTag(
'ak4PFJetsPuppi'),
184 jetCorrections = (
'AK4PFchs', [
'L2Relative',
'L3Absolute'],
''),
185 algo=
'AK', rParam = 0.4, btagDiscriminators =
map(
lambda x: x.value() ,process.patJets.discriminatorSources)
188 process.patJetGenJetMatchPuppi.matched =
'slimmedGenJets'
190 process.patJetsPuppi.userData.userFloats.src = cms.VInputTag(cms.InputTag(
""))
191 process.patJetsPuppi.jetChargeSource = cms.InputTag(
"patJetPuppiCharge")
193 process.selectedPatJetsPuppi.cut = cms.string(
"pt > 20")
195 process.load(
'PhysicsTools.PatAlgos.slimming.slimmedJets_cfi')
196 process.slimmedJetsPuppi = process.slimmedJets.clone()
197 process.slimmedJetsPuppi.src = cms.InputTag(
"selectedPatJetsPuppi")
198 process.slimmedJetsPuppi.packedPFCandidates = cms.InputTag(
"packedPFCandidates")
201 process.load(
'RecoMET.METProducers.PFMET_cfi')
202 process.pfMetPuppi = process.pfMet.clone()
203 process.pfMetPuppi.src = cms.InputTag(
"puppi")
204 process.pfMetPuppi.alias = cms.string(
'pfMetPuppi')
206 process.corrPfMetType1Puppi = process.corrPfMetType1.clone(
207 src =
'ak4PFJetsPuppi',
208 jetCorrLabel =
'ak4PFCHSL2L3Corrector',
210 del process.corrPfMetType1Puppi.offsetCorrLabel
211 process.pfMetT1Puppi = process.pfMetT1.clone(
213 srcCorrections = [ cms.InputTag(
"corrPfMetType1Puppi",
"type1") ]
216 from PhysicsTools.PatAlgos.tools.metTools
import addMETCollection
217 addMETCollection(process, labelName=
'patMETPuppi', metSource=
'pfMetT1Puppi')
218 addMETCollection(process, labelName=
'patPFMetPuppi', metSource=
'pfMetPuppi')
220 process.load(
'PhysicsTools.PatAlgos.slimming.slimmedMETs_cfi')
221 process.slimmedMETsPuppi = process.slimmedMETs.clone()
222 process.slimmedMETsPuppi.src = cms.InputTag(
"patMETPuppi")
223 process.slimmedMETsPuppi.rawUncertainties = cms.InputTag(
"patPFMetPuppi")
224 process.slimmedMETsPuppi.type1Uncertainties = cms.InputTag(
"patPFMetT1")
225 del process.slimmedMETsPuppi.type1p2Uncertainties