CMS 3D CMS Logo

miniAOD_tools.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
4 
5 from PhysicsTools.PatAlgos.tools.helpers import getPatAlgosToolsTask, addToProcessAndTask
6 
8  process.patMuons.isoDeposits = cms.PSet()
9  process.patElectrons.isoDeposits = cms.PSet()
10  process.patTaus.isoDeposits = cms.PSet()
11  process.patPhotons.isoDeposits = cms.PSet()
12  #
13  process.patMuons.embedTrack = True # used for IDs
14  process.patMuons.embedCombinedMuon = True # used for IDs
15  process.patMuons.embedMuonBestTrack = True # used for IDs
16  process.patMuons.embedStandAloneMuon = True # maybe?
17  process.patMuons.embedPickyMuon = False # no, use best track
18  process.patMuons.embedTpfmsMuon = False # no, use best track
19  process.patMuons.embedDytMuon = False # no, use best track
20  process.patMuons.addPuppiIsolation = cms.bool(True)
21  process.patMuons.puppiIsolationChargedHadrons = cms.InputTag("muonPUPPIIsolation","h+-DR040-ThresholdVeto000-ConeVeto000")
22  process.patMuons.puppiIsolationNeutralHadrons = cms.InputTag("muonPUPPIIsolation","h0-DR040-ThresholdVeto000-ConeVeto001")
23  process.patMuons.puppiIsolationPhotons = cms.InputTag("muonPUPPIIsolation","gamma-DR040-ThresholdVeto000-ConeVeto001")
24  process.patMuons.puppiNoLeptonsIsolationChargedHadrons = cms.InputTag("muonPUPPINoLeptonsIsolation","h+-DR040-ThresholdVeto000-ConeVeto000")
25  process.patMuons.puppiNoLeptonsIsolationNeutralHadrons = cms.InputTag("muonPUPPINoLeptonsIsolation","h0-DR040-ThresholdVeto000-ConeVeto001")
26  process.patMuons.puppiNoLeptonsIsolationPhotons = cms.InputTag("muonPUPPINoLeptonsIsolation","gamma-DR040-ThresholdVeto000-ConeVeto001")
27 
28  process.patMuons.computeMiniIso = cms.bool(True)
29 
30  #
31  # disable embedding of electron and photon associated objects already stored by the ReducedEGProducer
32  process.patElectrons.embedGsfElectronCore = False ## process.patElectrons.embed in AOD externally stored gsf electron core
33  process.patElectrons.embedSuperCluster = False ## process.patElectrons.embed in AOD externally stored supercluster
34  process.patElectrons.embedPflowSuperCluster = False ## process.patElectrons.embed in AOD externally stored supercluster
35  process.patElectrons.embedSeedCluster = False ## process.patElectrons.embed in AOD externally stored the electron's seedcluster
36  process.patElectrons.embedBasicClusters = False ## process.patElectrons.embed in AOD externally stored the electron's basic clusters
37  process.patElectrons.embedPreshowerClusters = False ## process.patElectrons.embed in AOD externally stored the electron's preshower clusters
38  process.patElectrons.embedPflowBasicClusters = False ## process.patElectrons.embed in AOD externally stored the electron's pflow basic clusters
39  process.patElectrons.embedPflowPreshowerClusters = False ## process.patElectrons.embed in AOD externally stored the electron's pflow preshower clusters
40  process.patElectrons.embedRecHits = False ## process.patElectrons.embed in AOD externally stored the RecHits - can be called from the PATElectronProducer
41  process.patElectrons.electronSource = cms.InputTag("reducedEgamma","reducedGedGsfElectrons")
42  process.patElectrons.electronIDSources = cms.PSet(
43  # configure many IDs as InputTag <someName> = <someTag> you
44  # can comment out those you don't want to save some disk space
45  eidRobustLoose = cms.InputTag("reducedEgamma","eidRobustLoose"),
46  eidRobustTight = cms.InputTag("reducedEgamma","eidRobustTight"),
47  eidLoose = cms.InputTag("reducedEgamma","eidLoose"),
48  eidTight = cms.InputTag("reducedEgamma","eidTight"),
49  eidRobustHighEnergy = cms.InputTag("reducedEgamma","eidRobustHighEnergy"),
50  )
51  process.patElectrons.addPFClusterIso = cms.bool(True)
52  #add puppi isolation in miniAOD
53  process.patElectrons.addPuppiIsolation = cms.bool(True)
54  process.patElectrons.puppiIsolationChargedHadrons = cms.InputTag("egmElectronPUPPIIsolation","h+-DR030-BarVeto000-EndVeto001")
55  process.patElectrons.puppiIsolationNeutralHadrons = cms.InputTag("egmElectronPUPPIIsolation","h0-DR030-BarVeto000-EndVeto000")
56  process.patElectrons.puppiIsolationPhotons = cms.InputTag("egmElectronPUPPIIsolation","gamma-DR030-BarVeto000-EndVeto008")
57  process.patElectrons.puppiNoLeptonsIsolationChargedHadrons = cms.InputTag("egmElectronPUPPINoLeptonsIsolation","h+-DR030-BarVeto000-EndVeto001")
58  process.patElectrons.puppiNoLeptonsIsolationNeutralHadrons = cms.InputTag("egmElectronPUPPINoLeptonsIsolation","h0-DR030-BarVeto000-EndVeto000")
59  process.patElectrons.puppiNoLeptonsIsolationPhotons = cms.InputTag("egmElectronPUPPINoLeptonsIsolation","gamma-DR030-BarVeto000-EndVeto008")
60 
61  process.patElectrons.computeMiniIso = cms.bool(True)
62 
63  process.patElectrons.ecalPFClusterIsoMap = cms.InputTag("reducedEgamma", "eleEcalPFClusIso")
64  process.patElectrons.hcalPFClusterIsoMap = cms.InputTag("reducedEgamma", "eleHcalPFClusIso")
65 
66  process.elPFIsoDepositChargedPAT.src = cms.InputTag("reducedEgamma","reducedGedGsfElectrons")
67  process.elPFIsoDepositChargedAllPAT.src = cms.InputTag("reducedEgamma","reducedGedGsfElectrons")
68  process.elPFIsoDepositNeutralPAT.src = cms.InputTag("reducedEgamma","reducedGedGsfElectrons")
69  process.elPFIsoDepositGammaPAT.src = cms.InputTag("reducedEgamma","reducedGedGsfElectrons")
70  process.elPFIsoDepositPUPAT.src = cms.InputTag("reducedEgamma","reducedGedGsfElectrons")
71  #
72  process.patPhotons.embedSuperCluster = False ## whether to process.patPhotons.embed in AOD externally stored supercluster
73  process.patPhotons.embedSeedCluster = False ## process.patPhotons.embed in AOD externally stored the photon's seedcluster
74  process.patPhotons.embedBasicClusters = False ## process.patPhotons.embed in AOD externally stored the photon's basic clusters
75  process.patPhotons.embedPreshowerClusters = False ## process.patPhotons.embed in AOD externally stored the photon's preshower clusters
76  process.patPhotons.embedRecHits = False ## process.patPhotons.embed in AOD externally stored the RecHits - can be called from the PATPhotonProducer
77  process.patPhotons.addPFClusterIso = cms.bool(True)
78 
79  #add puppi isolation in miniAOD
80  process.patPhotons.addPuppiIsolation = cms.bool(True)
81  process.patPhotons.puppiIsolationChargedHadrons = cms.InputTag("egmPhotonPUPPIIsolation","h+-DR030-")
82  process.patPhotons.puppiIsolationNeutralHadrons = cms.InputTag("egmPhotonPUPPIIsolation","h0-DR030-")
83  process.patPhotons.puppiIsolationPhotons = cms.InputTag("egmPhotonPUPPIIsolation","gamma-DR030-")
84 
85  process.patPhotons.ecalPFClusterIsoMap = cms.InputTag("reducedEgamma", "phoEcalPFClusIso")
86  process.patPhotons.hcalPFClusterIsoMap = cms.InputTag("reducedEgamma", "phoHcalPFClusIso")
87  process.patPhotons.photonSource = cms.InputTag("reducedEgamma","reducedGedPhotons")
88  process.patPhotons.electronSource = cms.InputTag("reducedEgamma","reducedGedGsfElectrons")
89  process.patPhotons.photonIDSources = cms.PSet(
90  PhotonCutBasedIDLoose = cms.InputTag('reducedEgamma',
91  'PhotonCutBasedIDLoose'),
92  PhotonCutBasedIDTight = cms.InputTag('reducedEgamma',
93  'PhotonCutBasedIDTight')
94  )
95 
96  process.phPFIsoDepositChargedPAT.src = cms.InputTag("reducedEgamma","reducedGedPhotons")
97  process.phPFIsoDepositChargedAllPAT.src = cms.InputTag("reducedEgamma","reducedGedPhotons")
98  process.phPFIsoDepositNeutralPAT.src = cms.InputTag("reducedEgamma","reducedGedPhotons")
99  process.phPFIsoDepositGammaPAT.src = cms.InputTag("reducedEgamma","reducedGedPhotons")
100  process.phPFIsoDepositPUPAT.src = cms.InputTag("reducedEgamma","reducedGedPhotons")
101  #
102  process.selectedPatJets.cut = cms.string("pt > 10")
103  process.selectedPatMuons.cut = cms.string("pt > 5 || isPFMuon || (pt > 3 && (isGlobalMuon || isStandAloneMuon || numberOfMatches > 0 || muonID('RPCMuLoose')))")
104 
105  from Configuration.Eras.Modifier_phase2_muon_cff import phase2_muon
106  phase2_muon.toModify(process.selectedPatMuons, cut = "pt > 5 || isPFMuon || (pt > 3 && (isGlobalMuon || isStandAloneMuon || numberOfMatches > 0 || muonID('RPCMuLoose') || muonID('ME0MuonArbitrated') || muonID('GEMMuonArbitrated')) )")
107 
108  process.selectedPatElectrons.cut = cms.string("")
109  process.selectedPatTaus.cut = cms.string("pt > 18. && tauID('decayModeFindingNewDMs')> 0.5")
110  process.selectedPatPhotons.cut = cms.string("")
111 
112  from PhysicsTools.PatAlgos.tools.jetTools import addJetCollection
113 
114  from PhysicsTools.PatAlgos.slimming.applySubstructure_cff import applySubstructure
115  applySubstructure( process )
116 
117 
118  #
119  from PhysicsTools.PatAlgos.tools.trigTools import switchOnTriggerStandAlone
120  switchOnTriggerStandAlone( process, outputModule = '' )
121  process.patTrigger.packTriggerPathNames = cms.bool(True)
122  #
123  # apply type I + other PFMEt corrections to pat::MET object
124  # and estimate systematic uncertainties on MET
125 
126  from PhysicsTools.PatUtils.tools.runMETCorrectionsAndUncertainties import runMetCorAndUncForMiniAODProduction
127  runMetCorAndUncForMiniAODProduction(process, metType="PF",
128  jetCollUnskimmed="patJets")
129 
130  #caloMET computation
131  from PhysicsTools.PatAlgos.tools.metTools import addMETCollection
132  addMETCollection(process,
133  labelName = "patCaloMet",
134  metSource = "caloMetM"
135  )
136 
137  #noHF pfMET =========
138 
139  task = getPatAlgosToolsTask(process)
140 
141  process.noHFCands = cms.EDFilter("GenericPFCandidateSelector",
142  src=cms.InputTag("particleFlow"),
143  cut=cms.string("abs(pdgId)!=1 && abs(pdgId)!=2 && abs(eta)<3.0")
144  )
145  task.add(process.noHFCands)
146 
148  pfCandColl=cms.InputTag("noHFCands"),
149  recoMetFromPFCs=True, #needed for HF removal
150  jetSelection="pt>15 && abs(eta)<3.",
151  postfix="NoHF"
152  )
153 
154  process.load('PhysicsTools.PatAlgos.slimming.slimmedMETs_cfi')
155  task.add(process.slimmedMETs)
156  addToProcessAndTask('slimmedMETsNoHF', process.slimmedMETs.clone(), process, task)
157  process.slimmedMETsNoHF.src = cms.InputTag("patMETsNoHF")
158  process.slimmedMETsNoHF.rawVariation = cms.InputTag("patPFMetNoHF")
159  process.slimmedMETsNoHF.t1Uncertainties = cms.InputTag("patPFMetT1%sNoHF")
160  process.slimmedMETsNoHF.t01Variation = cms.InputTag("patPFMetT0pcT1NoHF")
161  process.slimmedMETsNoHF.t1SmearedVarsAndUncs = cms.InputTag("patPFMetT1Smear%sNoHF")
162  process.slimmedMETsNoHF.tXYUncForRaw = cms.InputTag("patPFMetTxyNoHF")
163  process.slimmedMETsNoHF.tXYUncForT1 = cms.InputTag("patPFMetT1TxyNoHF")
164  process.slimmedMETsNoHF.tXYUncForT01 = cms.InputTag("patPFMetT0pcT1TxyNoHF")
165  process.slimmedMETsNoHF.tXYUncForT1Smear = cms.InputTag("patPFMetT1SmearTxyNoHF")
166  process.slimmedMETsNoHF.tXYUncForT01Smear = cms.InputTag("patPFMetT0pcT1SmearTxyNoHF")
167  del process.slimmedMETsNoHF.caloMET
168  # ================== NoHF pfMET
169 
170  ## PU JetID
171  process.load("RecoJets.JetProducers.PileupJetID_cfi")
172  task.add(process.pileUpJetIDTask)
173 
174  process.patJets.userData.userFloats.src = [ cms.InputTag("pileupJetId:fullDiscriminant"), ]
175  process.patJets.userData.userInts.src = [ cms.InputTag("pileupJetId:fullId"), ]
176 
177  ## Quark Gluon Likelihood
178  process.load('RecoJets.JetProducers.QGTagger_cfi')
179  task.add(process.QGTaggerTask)
180 
181  process.patJets.userData.userFloats.src += [ cms.InputTag('QGTagger:qgLikelihood'), ]
182 
183  ## CaloJets
184  process.caloJetMap = cms.EDProducer("RecoJetDeltaRValueMapProducer",
185  src = process.patJets.jetSource,
186  matched = cms.InputTag("ak4CaloJets"),
187  distMax = cms.double(0.4),
188  values = cms.vstring('pt','emEnergyFraction'),
189  valueLabels = cms.vstring('pt','emEnergyFraction'),
190  lazyParser = cms.bool(True) )
191  task.add(process.caloJetMap)
192  process.patJets.userData.userFloats.src += [ cms.InputTag("caloJetMap:pt"), cms.InputTag("caloJetMap:emEnergyFraction") ]
193 
194  #Muon object modifications
195  from PhysicsTools.PatAlgos.slimming.muonIsolationsPUPPI_cfi import makeInputForPUPPIIsolationMuon
197 
198  #EGM object modifications
199  from PhysicsTools.PatAlgos.slimming.egmIsolationsPUPPI_cfi import makeInputForPUPPIIsolationEgm
201  from RecoEgamma.EgammaTools.egammaObjectModificationsInMiniAOD_cff import egamma_modifications
202  process.slimmedElectrons.modifierConfig.modifications = egamma_modifications
203  process.slimmedPhotons.modifierConfig.modifications = egamma_modifications
204 
205  #VID Electron IDs
206  electron_ids = ['RecoEgamma.ElectronIdentification.Identification.cutBasedElectronID_PHYS14_PU20bx25_V2_cff',
207  'RecoEgamma.ElectronIdentification.Identification.cutBasedElectronID_Spring15_25ns_V1_cff',
208  'RecoEgamma.ElectronIdentification.Identification.cutBasedElectronID_Spring15_50ns_V2_cff',
209  'RecoEgamma.ElectronIdentification.Identification.heepElectronID_HEEPV60_cff',
210  'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_Spring15_25ns_nonTrig_V1_cff',
211  'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_Spring15_25ns_Trig_V1_cff',
212  'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_Spring15_50ns_Trig_V1_cff']
213  switchOnVIDElectronIdProducer(process,DataFormat.MiniAOD, task)
214  process.egmGsfElectronIDs.physicsObjectSrc = \
215  cms.InputTag("reducedEgamma","reducedGedGsfElectrons")
216  process.electronMVAValueMapProducer.src = \
217  cms.InputTag('reducedEgamma','reducedGedGsfElectrons')
218  process.electronRegressionValueMapProducer.src = \
219  cms.InputTag('reducedEgamma','reducedGedGsfElectrons')
220  for idmod in electron_ids:
221  setupAllVIDIdsInModule(process,idmod,setupVIDElectronSelection,None,False,task)
222 
223  #heepIDVarValueMaps only exists if HEEP V6.1 or HEEP 7.0 ID has already been loaded
224  if hasattr(process,'heepIDVarValueMaps'):
225  process.heepIDVarValueMaps.elesMiniAOD = cms.InputTag('reducedEgamma','reducedGedGsfElectrons')
226  #force HEEP to use miniAOD (otherwise it'll detect the AOD)
227  process.heepIDVarValueMaps.dataFormat = cms.int32(2)
228 
229 
230  #VID Photon IDs
231  photon_ids = ['RecoEgamma.PhotonIdentification.Identification.cutBasedPhotonID_Spring15_25ns_V1_cff',
232  'RecoEgamma.PhotonIdentification.Identification.cutBasedPhotonID_Spring15_50ns_V1_cff',
233  'RecoEgamma.PhotonIdentification.Identification.mvaPhotonID_Spring15_25ns_nonTrig_V2p1_cff',
234  'RecoEgamma.PhotonIdentification.Identification.mvaPhotonID_Spring15_50ns_nonTrig_V2p1_cff',
235  'RecoEgamma.PhotonIdentification.Identification.cutBasedPhotonID_Spring16_V2p2_cff',
236  'RecoEgamma.PhotonIdentification.Identification.mvaPhotonID_Spring16_nonTrig_V1_cff']
237  switchOnVIDPhotonIdProducer(process,DataFormat.AOD, task)
238  process.egmPhotonIsolation.srcToIsolate = \
239  cms.InputTag("reducedEgamma","reducedGedPhotons")
240  for iPSet in process.egmPhotonIsolation.isolationConeDefinitions:
241  iPSet.particleBasedIsolation = cms.InputTag("reducedEgamma","reducedPhotonPfCandMap")
242 
243  process.egmPhotonIDs.physicsObjectSrc = \
244  cms.InputTag("reducedEgamma","reducedGedPhotons")
245  process.photonIDValueMapProducer.src = \
246  cms.InputTag("reducedEgamma","reducedGedPhotons")
247  process.photonRegressionValueMapProducer.src = \
248  cms.InputTag("reducedEgamma","reducedGedPhotons")
249  process.photonIDValueMapProducer.particleBasedIsolation = \
250  cms.InputTag("reducedEgamma","reducedPhotonPfCandMap")
251  process.photonMVAValueMapProducer.src = \
252  cms.InputTag('reducedEgamma','reducedGedPhotons')
253  for idmod in photon_ids:
254  setupAllVIDIdsInModule(process,idmod,setupVIDPhotonSelection,None,False,task)
255 
256  #---------------------------------------------------------------------------
257  #Adding Boosted Subjets taus
258  from RecoTauTag.Configuration.boostedHPSPFTaus_cfi import addBoostedTaus
259  addBoostedTaus(process)
260  #---------------------------------------------------------------------------
261 
262  # Adding puppi jets
263  if not hasattr(process, 'ak4PFJetsPuppi'): #MM: avoid confilct with substructure call
264  process.load('RecoJets.JetProducers.ak4PFJetsPuppi_cfi')
265  task.add(process.ak4PFJets)
266  task.add(process.ak4PFJetsPuppi)
267  process.ak4PFJetsPuppi.doAreaFastjet = True # even for standard ak4PFJets this is overwritten in RecoJets/Configuration/python/RecoPFJets_cff
268 
269  from RecoJets.JetAssociationProducers.j2tParametersVX_cfi import j2tParametersVX
270  process.ak4PFJetsPuppiTracksAssociatorAtVertex = cms.EDProducer("JetTracksAssociatorAtVertex",
271  j2tParametersVX,
272  jets = cms.InputTag("ak4PFJetsPuppi")
273  )
274  task.add(process.ak4PFJetsPuppiTracksAssociatorAtVertex)
275  process.patJetPuppiCharge = cms.EDProducer("JetChargeProducer",
276  src = cms.InputTag("ak4PFJetsPuppiTracksAssociatorAtVertex"),
277  var = cms.string('Pt'),
278  exp = cms.double(1.0)
279  )
280  task.add(process.patJetPuppiCharge)
281 
282  addJetCollection(process, postfix = "", labelName = 'Puppi', jetSource = cms.InputTag('ak4PFJetsPuppi'),
283  jetCorrections = ('AK4PFPuppi', ['L2Relative', 'L3Absolute'], ''),
284  pfCandidates = cms.InputTag('puppi'), # using Puppi candidates as input for b tagging of Puppi jets
285  algo= 'AK', rParam = 0.4, btagDiscriminators = map(lambda x: x.value() ,process.patJets.discriminatorSources)
286  )
287 
288  process.patJetGenJetMatchPuppi.matched = 'slimmedGenJets'
289 
290  process.patJetsPuppi.jetChargeSource = cms.InputTag("patJetPuppiCharge")
291 
292  process.selectedPatJetsPuppi.cut = cms.string("pt > 15")
293 
294  process.load('PhysicsTools.PatAlgos.slimming.slimmedJets_cfi')
295  task.add(process.slimmedJets)
296  task.add(process.slimmedJetsAK8)
297  addToProcessAndTask('slimmedJetsPuppi', process.slimmedJets.clone(), process, task)
298  process.slimmedJetsPuppi.src = cms.InputTag("selectedPatJetsPuppi")
299  process.slimmedJetsPuppi.packedPFCandidates = cms.InputTag("packedPFCandidates")
300 
301 
302  ## puppi met
303  from PhysicsTools.PatAlgos.slimming.puppiForMET_cff import makePuppies
304  makePuppies( process );
305 
306  runMetCorAndUncForMiniAODProduction(process, metType="Puppi",
307  pfCandColl=cms.InputTag("puppiForMET"),
308  jetCollUnskimmed="slimmedJetsPuppi",
309  recoMetFromPFCs=True,
310  jetFlavor="AK4PFPuppi",
311  postfix="Puppi"
312  )
313 
314  process.load('PhysicsTools.PatAlgos.slimming.slimmedMETs_cfi')
315  task.add(process.slimmedMETs)
316  addToProcessAndTask('slimmedMETsPuppi', process.slimmedMETs.clone(), process, task)
317  process.slimmedMETsPuppi.src = cms.InputTag("patMETsPuppi")
318  process.slimmedMETsPuppi.rawVariation = cms.InputTag("patPFMetPuppi")
319  process.slimmedMETsPuppi.t1Uncertainties = cms.InputTag("patPFMetT1%sPuppi")
320  process.slimmedMETsPuppi.t01Variation = cms.InputTag("patPFMetT0pcT1Puppi")
321  process.slimmedMETsPuppi.t1SmearedVarsAndUncs = cms.InputTag("patPFMetT1Smear%sPuppi")
322  process.slimmedMETsPuppi.tXYUncForRaw = cms.InputTag("patPFMetTxyPuppi")
323  process.slimmedMETsPuppi.tXYUncForT1 = cms.InputTag("patPFMetT1TxyPuppi")
324  process.slimmedMETsPuppi.tXYUncForT01 = cms.InputTag("patPFMetT0pcT1TxyPuppi")
325  process.slimmedMETsPuppi.tXYUncForT1Smear = cms.InputTag("patPFMetT1SmearTxyPuppi")
326  process.slimmedMETsPuppi.tXYUncForT01Smear = cms.InputTag("patPFMetT0pcT1SmearTxyPuppi")
327  del process.slimmedMETsPuppi.caloMET
328 
329  # add DetIdAssociatorRecords to EventSetup (for isolatedTracks)
330  process.load("TrackingTools.TrackAssociator.DetIdAssociatorESProducer_cff")
331 
332 
333 def miniAOD_customizeMC(process):
334  #slimmed pileup information
335  process.load('PhysicsTools.PatAlgos.slimming.slimmedAddPileupInfo_cfi')
336  task = getPatAlgosToolsTask(process)
337  task.add(process.slimmedAddPileupInfo)
338 
339  process.muonMatch.matched = "prunedGenParticles"
340  process.electronMatch.matched = "prunedGenParticles"
341  process.electronMatch.src = cms.InputTag("reducedEgamma","reducedGedGsfElectrons")
342  process.photonMatch.matched = "prunedGenParticles"
343  process.photonMatch.src = cms.InputTag("reducedEgamma","reducedGedPhotons")
344  process.tauMatch.matched = "prunedGenParticles"
345  process.tauGenJets.GenParticles = "prunedGenParticles"
346  #Boosted taus
347  process.tauMatchBoosted.matched = "prunedGenParticles"
348  process.tauGenJetsBoosted.GenParticles = "prunedGenParticles"
349  process.patJetPartons.particles = "prunedGenParticles"
350  process.patJetPartonMatch.matched = "prunedGenParticles"
351  process.patJetPartonMatch.mcStatus = [ 3, 23 ]
352  process.patJetGenJetMatch.matched = "slimmedGenJets"
353  process.patJetGenJetMatchAK8.matched = "slimmedGenJetsAK8"
354  process.patMuons.embedGenMatch = False
355  process.patElectrons.embedGenMatch = False
356  process.patPhotons.embedGenMatch = False
357  process.patTaus.embedGenMatch = False
358  process.patTausBoosted.embedGenMatch = False
359  process.patJets.embedGenPartonMatch = False
360  #also jet flavour must be switched
361  process.patJetFlavourAssociation.rParam = 0.4
362 
364  out.dropMetaData = cms.untracked.string('ALL')
365  out.fastCloning= cms.untracked.bool(False)
366  out.overrideInputFileSplitLevels = cms.untracked.bool(True)
367  out.compressionAlgorithm = cms.untracked.string('LZMA')
368 
370  from PhysicsTools.PatAlgos.tools.coreTools import runOnData
371  runOnData( process, outputModules = [] )
372  process.load("RecoCTPPS.TotemRPLocal.ctppsLocalTrackLiteProducer_cfi")
373  task = getPatAlgosToolsTask(process)
374  task.add(process.ctppsLocalTrackLiteProducer)
375 
377  miniAOD_customizeCommon(process)
378  miniAOD_customizeData(process)
379  return process
380 
382  miniAOD_customizeCommon(process)
383  miniAOD_customizeMC(process)
384  return process
def makeInputForPUPPIIsolationMuon(process)
def miniAOD_customizeAllData(process)
def miniAOD_customizeData(process)
def miniAOD_customizeCommon(process)
Definition: miniAOD_tools.py:7
def applySubstructure(process, postfix="")
def switchOnVIDElectronIdProducer(process, dataFormat, task=None)
Electrons.
Definition: vid_id_tools.py:67
def addToProcessAndTask(label, module, process, task)
Definition: helpers.py:27
def makeInputForPUPPIIsolationEgm(process)
def setupAllVIDIdsInModule(process, id_module_name, setupFunction, patProducer=None, addUserData=True, task=None)
Definition: vid_id_tools.py:50
def runMetCorAndUncForMiniAODProduction(process, metType="PF", jetCollUnskimmed="patJets", photonColl="selectedPatPhotons", electronColl="selectedPatElectrons", muonColl="selectedPatMuons", tauColl="selectedPatTaus", pfCandColl="particleFlow", jetCleaning="LepClean", jetSelection="pt>15 && abs(eta)<9.9", jecUnFile="", jetFlavor="AK4PFchs", recoMetFromPFCs=False, postfix="")
def makePuppies(process)
def miniAOD_customizeAllMC(process)
switchOnTriggerStandAlone
Definition: trigTools.py:281
def miniAOD_customizeOutput(out)
def miniAOD_customizeMC(process)
def getPatAlgosToolsTask(process)
Definition: helpers.py:12
def switchOnVIDPhotonIdProducer(process, dataFormat, task=None)
Photons.