CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
miniAOD_tools Namespace Reference

Functions

def miniAOD_customizeAllData
 
def miniAOD_customizeAllMC
 
def miniAOD_customizeCommon
 
def miniAOD_customizeData
 
def miniAOD_customizeMC
 
def miniAOD_customizeOutput
 

Function Documentation

def miniAOD_tools.miniAOD_customizeAllData (   process)

Definition at line 331 of file miniAOD_tools.py.

References miniAOD_customizeCommon(), and miniAOD_customizeData().

332 def miniAOD_customizeAllData(process):
333  miniAOD_customizeCommon(process)
334  miniAOD_customizeData(process)
335  return process
def miniAOD_customizeCommon
Definition: miniAOD_tools.py:5
def miniAOD_customizeAllData
def miniAOD_customizeData
def miniAOD_tools.miniAOD_customizeAllMC (   process)

Definition at line 336 of file miniAOD_tools.py.

References miniAOD_customizeCommon(), and miniAOD_customizeMC().

337 def miniAOD_customizeAllMC(process):
338  miniAOD_customizeCommon(process)
339  miniAOD_customizeMC(process)
340  return process
def miniAOD_customizeAllMC
def miniAOD_customizeCommon
Definition: miniAOD_tools.py:5
def miniAOD_tools.miniAOD_customizeCommon (   process)

Definition at line 5 of file miniAOD_tools.py.

References applySubstructure_cff.applySubstructure(), python.multivaluedict.map(), runMETCorrectionsAndUncertainties.runMetCorAndUncForMiniAODProduction(), vid_id_tools.setupAllVIDIdsInModule(), trigTools.switchOnTriggerStandAlone, vid_id_tools.switchOnVIDElectronIdProducer(), vid_id_tools.switchOnVIDPhotonIdProducer(), and tauTools.switchToPFTauHPS76xReMiniAOD().

Referenced by miniAOD_customizeAllData(), and miniAOD_customizeAllMC().

5 
6 def miniAOD_customizeCommon(process):
7  process.patMuons.isoDeposits = cms.PSet()
8  process.patElectrons.isoDeposits = cms.PSet()
9  process.patTaus.isoDeposits = cms.PSet()
10  process.patPhotons.isoDeposits = cms.PSet()
11  #
12  process.patMuons.embedTrack = True # used for IDs
13  process.patMuons.embedCombinedMuon = True # used for IDs
14  process.patMuons.embedMuonBestTrack = True # used for IDs
15  process.patMuons.embedStandAloneMuon = True # maybe?
16  process.patMuons.embedPickyMuon = False # no, use best track
17  process.patMuons.embedTpfmsMuon = False # no, use best track
18  process.patMuons.embedDytMuon = False # no, use best track
19  #
20  # disable embedding of electron and photon associated objects already stored by the ReducedEGProducer
21  process.patElectrons.embedGsfElectronCore = False ## process.patElectrons.embed in AOD externally stored gsf electron core
22  process.patElectrons.embedSuperCluster = False ## process.patElectrons.embed in AOD externally stored supercluster
23  process.patElectrons.embedPflowSuperCluster = False ## process.patElectrons.embed in AOD externally stored supercluster
24  process.patElectrons.embedSeedCluster = False ## process.patElectrons.embed in AOD externally stored the electron's seedcluster
25  process.patElectrons.embedBasicClusters = False ## process.patElectrons.embed in AOD externally stored the electron's basic clusters
26  process.patElectrons.embedPreshowerClusters = False ## process.patElectrons.embed in AOD externally stored the electron's preshower clusters
27  process.patElectrons.embedPflowBasicClusters = False ## process.patElectrons.embed in AOD externally stored the electron's pflow basic clusters
28  process.patElectrons.embedPflowPreshowerClusters = False ## process.patElectrons.embed in AOD externally stored the electron's pflow preshower clusters
29  process.patElectrons.embedRecHits = False ## process.patElectrons.embed in AOD externally stored the RecHits - can be called from the PATElectronProducer
30  process.patElectrons.electronSource = cms.InputTag("reducedEgamma","reducedGedGsfElectrons")
31  process.patElectrons.electronIDSources = cms.PSet(
32  # configure many IDs as InputTag <someName> = <someTag> you
33  # can comment out those you don't want to save some disk space
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"),
39  )
40  process.patElectrons.addPFClusterIso = cms.bool(True)
41  process.patElectrons.ecalPFClusterIsoMap = cms.InputTag("reducedEgamma", "eleEcalPFClusIso")
42  process.patElectrons.hcalPFClusterIsoMap = cms.InputTag("reducedEgamma", "eleHcalPFClusIso")
43 
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")
49  #
50  process.patPhotons.embedSuperCluster = False ## whether to process.patPhotons.embed in AOD externally stored supercluster
51  process.patPhotons.embedSeedCluster = False ## process.patPhotons.embed in AOD externally stored the photon's seedcluster
52  process.patPhotons.embedBasicClusters = False ## process.patPhotons.embed in AOD externally stored the photon's basic clusters
53  process.patPhotons.embedPreshowerClusters = False ## process.patPhotons.embed in AOD externally stored the photon's preshower clusters
54  process.patPhotons.embedRecHits = False ## process.patPhotons.embed in AOD externally stored the RecHits - can be called from the PATPhotonProducer
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')
65  )
66 
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")
72  #
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("")
78 
79  from PhysicsTools.PatAlgos.tools.jetTools import addJetCollection
80 
81  from PhysicsTools.PatAlgos.slimming.applySubstructure_cff import applySubstructure
82  applySubstructure( process )
83 
84 
85  #
86  from PhysicsTools.PatAlgos.tools.trigTools import switchOnTriggerStandAlone
87  switchOnTriggerStandAlone( process, outputModule = '' )
88  process.patTrigger.packTriggerPathNames = cms.bool(True)
89  #
90  # apply type I + other PFMEt corrections to pat::MET object
91  # and estimate systematic uncertainties on MET
92 
93  process.selectedPatJetsForMETUnc = process.selectedPatJets.clone()
94  process.selectedPatJetsForMETUnc.cut = cms.string("pt > 15")
95 
96  from PhysicsTools.PatUtils.tools.runMETCorrectionsAndUncertainties import runMetCorAndUncForMiniAODProduction
97  runMetCorAndUncForMiniAODProduction(process, metType="PF",
98  jetCollUnskimmed="patJets",
99  jetColl="selectedPatJetsForMETUnc")
100 
101  #caloMET computation
102  from PhysicsTools.PatAlgos.tools.metTools import addMETCollection
103  addMETCollection(process,
104  labelName = "patCaloMet",
105  metSource = "caloMetM"
106  )
107 
108  #noHF pfMET =========
109  process.noHFCands = cms.EDFilter("GenericPFCandidateSelector",
110  src=cms.InputTag("particleFlow"),
111  cut=cms.string("abs(pdgId)!=1 && abs(pdgId)!=2 && abs(eta)<3.0")
112  )
114  pfCandColl=cms.InputTag("noHFCands"),
115  recoMetFromPFCs=True, #needed for HF removal
116  postfix="NoHF"
117  )
118  process.load('PhysicsTools.PatAlgos.slimming.slimmedMETs_cfi')
119  process.slimmedMETsNoHF = process.slimmedMETs.clone()
120  process.slimmedMETsNoHF.src = cms.InputTag("patMETsNoHF")
121  process.slimmedMETsNoHF.rawVariation = cms.InputTag("patPFMetNoHF")
122  process.slimmedMETsNoHF.t1Uncertainties = cms.InputTag("patPFMetT1%sNoHF")
123  process.slimmedMETsNoHF.t01Variation = cms.InputTag("patPFMetT0pcT1NoHF")
124  process.slimmedMETsNoHF.t1SmearedVarsAndUncs = cms.InputTag("patPFMetT1Smear%sNoHF")
125  process.slimmedMETsNoHF.tXYUncForRaw = cms.InputTag("patPFMetTxyNoHF")
126  process.slimmedMETsNoHF.tXYUncForT1 = cms.InputTag("patPFMetT1TxyNoHF")
127  process.slimmedMETsNoHF.tXYUncForT01 = cms.InputTag("patPFMetT0pcT1TxyNoHF")
128  process.slimmedMETsNoHF.tXYUncForT1Smear = cms.InputTag("patPFMetT1SmearTxyNoHF")
129  process.slimmedMETsNoHF.tXYUncForT01Smear = cms.InputTag("patPFMetT0pcT1SmearTxyNoHF")
130  del process.slimmedMETsNoHF.caloMET
131  # ================== NoHF pfMET
132 
133  #keep this after all addJetCollections otherwise it will attempt computing them also for stuf with no taginfos
134  #Some useful BTAG vars
135  process.patJets.userData.userFunctions = cms.vstring(
136  '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).p4.M):(0)',
137  '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).numberOfSourceCandidatePtrs):(0)',
138  '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").flightDistance(0).value):(0)',
139  '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").flightDistance(0).significance):(0)',
140  '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).p4.x):(0)',
141  '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).p4.y):(0)',
142  '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).p4.z):(0)',
143  '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).vertex.x):(0)',
144  '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).vertex.y):(0)',
145  '?(tagInfoCandSecondaryVertex("pfSecondaryVertex").nVertices()>0)?(tagInfoCandSecondaryVertex("pfSecondaryVertex").secondaryVertex(0).vertex.z):(0)',
146  )
147  process.patJets.userData.userFunctionLabels = cms.vstring('vtxMass','vtxNtracks','vtx3DVal','vtx3DSig','vtxPx','vtxPy','vtxPz','vtxPosX','vtxPosY','vtxPosZ')
148  process.patJets.tagInfoSources = cms.VInputTag(cms.InputTag("pfSecondaryVertexTagInfos"))
149  process.patJets.addTagInfos = cms.bool(True)
150  #
151  ## PU JetID
152  process.load("RecoJets.JetProducers.PileupJetID_cfi")
153  process.patJets.userData.userFloats.src = [ cms.InputTag("pileupJetId:fullDiscriminant"), ]
154 
155  ## CaloJets
156  process.caloJetMap = cms.EDProducer("RecoJetDeltaRValueMapProducer",
157  src = process.patJets.jetSource,
158  matched = cms.InputTag("ak4CaloJets"),
159  distMax = cms.double(0.4),
160  values = cms.vstring('pt','emEnergyFraction'),
161  valueLabels = cms.vstring('pt','emEnergyFraction'),
162  lazyParser = cms.bool(True) )
163  process.patJets.userData.userFloats.src += [ cms.InputTag("caloJetMap:pt"), cms.InputTag("caloJetMap:emEnergyFraction") ]
164 
165  #EGM object modifications
166  from RecoEgamma.EgammaTools.egammaObjectModificationsInMiniAOD_cff import egamma_modifications
167  process.slimmedElectrons.modifierConfig.modifications = egamma_modifications
168  process.slimmedPhotons.modifierConfig.modifications = egamma_modifications
169 
170  #VID Electron IDs
171  electron_ids = ['RecoEgamma.ElectronIdentification.Identification.cutBasedElectronID_PHYS14_PU20bx25_V2_cff',
172  'RecoEgamma.ElectronIdentification.Identification.cutBasedElectronID_Spring15_25ns_V1_cff',
173  'RecoEgamma.ElectronIdentification.Identification.cutBasedElectronID_Spring15_50ns_V2_cff',
174  'RecoEgamma.ElectronIdentification.Identification.heepElectronID_HEEPV60_cff',
175  'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_Spring15_25ns_nonTrig_V1_cff',
176  'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_Spring15_25ns_Trig_V1_cff',
177  'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_Spring15_50ns_Trig_V1_cff']
178  switchOnVIDElectronIdProducer(process,DataFormat.MiniAOD)
179  process.egmGsfElectronIDs.physicsObjectSrc = \
180  cms.InputTag("reducedEgamma","reducedGedGsfElectrons")
181  process.electronMVAValueMapProducer.src = \
182  cms.InputTag('reducedEgamma','reducedGedGsfElectrons')
183  process.electronRegressionValueMapProducer.src = \
184  cms.InputTag('reducedEgamma','reducedGedGsfElectrons')
185  for idmod in electron_ids:
186  setupAllVIDIdsInModule(process,idmod,setupVIDElectronSelection,None,False)
187 
188  #VID Photon IDs
189  photon_ids = ['RecoEgamma.PhotonIdentification.Identification.cutBasedPhotonID_PHYS14_PU20bx25_V2p1_cff',
190  'RecoEgamma.PhotonIdentification.Identification.cutBasedPhotonID_Spring15_50ns_V1_cff',
191  'RecoEgamma.PhotonIdentification.Identification.mvaPhotonID_Spring15_25ns_nonTrig_V2p1_cff',
192  'RecoEgamma.PhotonIdentification.Identification.mvaPhotonID_Spring15_50ns_nonTrig_V2p1_cff']
193  switchOnVIDPhotonIdProducer(process,DataFormat.MiniAOD)
194  process.egmPhotonIDs.physicsObjectSrc = \
195  cms.InputTag("reducedEgamma","reducedGedPhotons")
196  process.photonIDValueMapProducer.src = \
197  cms.InputTag("reducedEgamma","reducedGedPhotons")
198  process.photonRegressionValueMapProducer.src = \
199  cms.InputTag("reducedEgamma","reducedGedPhotons")
200  process.photonIDValueMapProducer.particleBasedIsolation = \
201  cms.InputTag("reducedEgamma","reducedPhotonPfCandMap")
202  process.photonMVAValueMapProducer.src = \
203  cms.InputTag('reducedEgamma','reducedGedPhotons')
204  for idmod in photon_ids:
205  setupAllVIDIdsInModule(process,idmod,setupVIDPhotonSelection,None,False)
206 
207  #----------------------------------------------------------------------------
208  # CV: add old and new tau ID discriminators for CMSSW 7_6_x reminiAOD v2
209  process.load("RecoTauTag.Configuration.RecoPFTauTag_reminiAOD_cff")
210  from PhysicsTools.PatAlgos.tools.tauTools import switchToPFTauHPS76xReMiniAOD
212  #----------------------------------------------------------------------------
213 
214  # Adding puppi jets
215  process.load('CommonTools.PileupAlgos.Puppi_cff')
216  process.load('RecoJets.JetProducers.ak4PFJetsPuppi_cfi')
217  process.ak4PFJetsPuppi.doAreaFastjet = True # even for standard ak4PFJets this is overwritten in RecoJets/Configuration/python/RecoPFJets_cff
218  #process.puppi.candName = cms.InputTag('packedPFCandidates')
219  #process.puppi.vertexName = cms.InputTag('offlineSlimmedPrimaryVertices')
220  # kind of ugly, is there a better way to do this?
221  process.pfNoLepPUPPI = cms.EDFilter("PdgIdCandViewSelector",
222  src = cms.InputTag("particleFlow"),
223  pdgId = cms.vint32( 1,2,22,111,130,310,2112,211,-211,321,-321,999211,2212,-2212 )
224  )
225  process.pfLeptonsPUPPET = cms.EDFilter("PdgIdCandViewSelector",
226  src = cms.InputTag("particleFlow"),
227  pdgId = cms.vint32(-11,11,-13,13),
228  )
229  process.puppiNoLep = process.puppi.clone()
230  process.puppiNoLep.candName = cms.InputTag('pfNoLepPUPPI')
231 
232  from RecoJets.JetAssociationProducers.j2tParametersVX_cfi import j2tParametersVX
233  process.ak4PFJetsPuppiTracksAssociatorAtVertex = cms.EDProducer("JetTracksAssociatorAtVertex",
234  j2tParametersVX,
235  jets = cms.InputTag("ak4PFJetsPuppi")
236  )
237  process.patJetPuppiCharge = cms.EDProducer("JetChargeProducer",
238  src = cms.InputTag("ak4PFJetsPuppiTracksAssociatorAtVertex"),
239  var = cms.string('Pt'),
240  exp = cms.double(1.0)
241  )
242 
243  addJetCollection(process, postfix = "", labelName = 'Puppi', jetSource = cms.InputTag('ak4PFJetsPuppi'),
244  jetCorrections = ('AK4PFchs', ['L2Relative', 'L3Absolute'], ''),
245  algo= 'AK', rParam = 0.4, btagDiscriminators = map(lambda x: x.value() ,process.patJets.discriminatorSources)
246  )
247 
248  process.patJetGenJetMatchPuppi.matched = 'slimmedGenJets'
249 
250  process.patJetsPuppi.userData.userFloats.src = cms.VInputTag(cms.InputTag(""))
251  process.patJetsPuppi.jetChargeSource = cms.InputTag("patJetPuppiCharge")
252 
253  process.selectedPatJetsPuppi.cut = cms.string("pt > 20")
254 
255  process.load('PhysicsTools.PatAlgos.slimming.slimmedJets_cfi')
256  process.slimmedJetsPuppi = process.slimmedJets.clone()
257  process.slimmedJetsPuppi.src = cms.InputTag("selectedPatJetsPuppi")
258  process.slimmedJetsPuppi.packedPFCandidates = cms.InputTag("packedPFCandidates")
259 
260  ## puppi met
261  process.load('RecoMET.METProducers.PFMET_cfi')
262  process.puppiForMET = cms.EDProducer("CandViewMerger",
263  src = cms.VInputTag( "pfLeptonsPUPPET", "puppiNoLep")
264  )
265  process.pfMetPuppi = process.pfMet.clone()
266  process.pfMetPuppi.src = cms.InputTag("puppiForMET")
267  process.pfMetPuppi.alias = cms.string('pfMetPuppi')
268  # type1 correction, from puppi jets
269  process.corrPfMetType1Puppi = process.corrPfMetType1.clone(
270  src = 'ak4PFJetsPuppi',
271  jetCorrLabel = 'ak4PFCHSL2L3Corrector',
272  )
273  del process.corrPfMetType1Puppi.offsetCorrLabel # no L1 for PUPPI jets
274  process.pfMetT1Puppi = process.pfMetT1.clone(
275  src = 'pfMetPuppi',
276  srcCorrections = [ cms.InputTag("corrPfMetType1Puppi","type1") ]
277  )
278 
279  from PhysicsTools.PatAlgos.tools.metTools import addMETCollection
280  addMETCollection(process, labelName='patMETPuppi', metSource='pfMetT1Puppi') # T1
281  addMETCollection(process, labelName='patPFMetPuppi', metSource='pfMetPuppi') # RAW
282 
283  process.load('PhysicsTools.PatAlgos.slimming.slimmedMETs_cfi')
284  process.slimmedMETsPuppi = process.slimmedMETs.clone()
285  process.slimmedMETsPuppi.src = cms.InputTag("patMETPuppi")
286  process.slimmedMETsPuppi.rawVariation = cms.InputTag("patPFMetPuppi") # only central value
287  # only central values for puppi met
288  del process.slimmedMETsPuppi.t01Variation
289  del process.slimmedMETsPuppi.t1SmearedVarsAndUncs
290  del process.slimmedMETsPuppi.tXYUncForRaw
291  del process.slimmedMETsPuppi.tXYUncForT1
292  del process.slimmedMETsPuppi.tXYUncForT01
293  del process.slimmedMETsPuppi.tXYUncForT1Smear
294  del process.slimmedMETsPuppi.tXYUncForT01Smear
295  del process.slimmedMETsPuppi.caloMET
296 
def setupAllVIDIdsInModule
Definition: vid_id_tools.py:50
def switchOnVIDElectronIdProducer
Definition: vid_id_tools.py:69
def miniAOD_customizeCommon
Definition: miniAOD_tools.py:5
def switchToPFTauHPS76xReMiniAOD
Definition: tauTools.py:330
tuple switchOnTriggerStandAlone
Definition: trigTools.py:276
def switchOnVIDPhotonIdProducer
Photons.
def miniAOD_tools.miniAOD_customizeData (   process)

Definition at line 327 of file miniAOD_tools.py.

Referenced by miniAOD_customizeAllData().

328 def miniAOD_customizeData(process):
329  from PhysicsTools.PatAlgos.tools.coreTools import runOnData
330  runOnData( process, outputModules = [] )
def miniAOD_customizeData
def miniAOD_tools.miniAOD_customizeMC (   process)

Definition at line 297 of file miniAOD_tools.py.

Referenced by miniAOD_customizeAllMC().

298 def miniAOD_customizeMC(process):
299  #slimmed pileup information
300  process.load('PhysicsTools.PatAlgos.slimming.slimmedAddPileupInfo_cfi')
301 
302  process.muonMatch.matched = "prunedGenParticles"
303  process.electronMatch.matched = "prunedGenParticles"
304  process.electronMatch.src = cms.InputTag("reducedEgamma","reducedGedGsfElectrons")
305  process.photonMatch.matched = "prunedGenParticles"
306  process.photonMatch.src = cms.InputTag("reducedEgamma","reducedGedPhotons")
307  process.tauMatch.matched = "prunedGenParticles"
308  process.tauGenJets.GenParticles = "prunedGenParticles"
309  process.patJetPartons.particles = "prunedGenParticles"
310  process.patJetPartonMatch.matched = "prunedGenParticles"
311  process.patJetPartonMatch.mcStatus = [ 3, 23 ]
312  process.patJetGenJetMatch.matched = "slimmedGenJets"
313  process.patJetGenJetMatchAK8.matched = "slimmedGenJetsAK8"
314  process.patMuons.embedGenMatch = False
315  process.patElectrons.embedGenMatch = False
316  process.patPhotons.embedGenMatch = False
317  process.patTaus.embedGenMatch = False
318  process.patJets.embedGenPartonMatch = False
319  #also jet flavour must be switched
320  process.patJetFlavourAssociation.rParam = 0.4
def miniAOD_tools.miniAOD_customizeOutput (   out)

Definition at line 321 of file miniAOD_tools.py.

322 def miniAOD_customizeOutput(out):
323  out.dropMetaData = cms.untracked.string('ALL')
324  out.fastCloning= cms.untracked.bool(False)
325  out.overrideInputFileSplitLevels = cms.untracked.bool(True)
326  out.compressionAlgorithm = cms.untracked.string('LZMA')
def miniAOD_customizeOutput