Skip to content

Commit

Permalink
Merge pull request #8577 from ferencek/MiniAODTWeaks_from-CMSSW_7_4_0…
Browse files Browse the repository at this point in the history
…_pre9

MiniAOD tweaks
  • Loading branch information
davidlange6 committed Apr 1, 2015
2 parents 30e5192 + 4ac6b11 commit 91135ce
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 20 deletions.
2 changes: 0 additions & 2 deletions PhysicsTools/PatAlgos/python/slimming/miniAOD_tools.py
Expand Up @@ -178,8 +178,6 @@ def miniAOD_customizeCommon(process):

process.patJetsPuppi.userData.userFloats.src = cms.VInputTag(cms.InputTag(""))
process.patJetsPuppi.jetChargeSource = cms.InputTag("patJetPuppiCharge")
process.patJetsPuppi.tagInfoSources = cms.VInputTag(cms.InputTag("pfSecondaryVertexTagInfosPuppi"))
process.patJetsPuppi.addTagInfos = cms.bool(True)

process.selectedPatJetsPuppi.cut = cms.string("pt > 20")

Expand Down
2 changes: 1 addition & 1 deletion PhysicsTools/PatAlgos/python/tools/helpers.py
Expand Up @@ -11,7 +11,7 @@ def addESProducers(process,config):
module = __import__(config)
for name in dir(sys.modules[config]):
item = getattr(sys.modules[config],name)
if isinstance(item,_Labelable) and not isinstance(item,_ModuleSequenceType) and not name.startswith('_') and not (name == "source" or name == "looper" or name == "subProcess") and not type(item) is cms.PSet:
if isinstance(item,cms._Labelable) and not isinstance(item,cms._ModuleSequenceType) and not name.startswith('_') and not (name == "source" or name == "looper" or name == "subProcess") and not type(item) is cms.PSet:
if 'ESProducer' in item.type_():
setattr(process,name,item)

Expand Down
22 changes: 5 additions & 17 deletions PhysicsTools/PatAlgos/python/tools/jetTools.py
Expand Up @@ -392,27 +392,15 @@ def toolCode(self, process):
requiredTagInfos.append(requiredTagInfo)
## load sequences and setups needed for btagging
## This loads all available btagger, but the ones we need are added to the process by hand later. Only needed to get the ESProducer. Needs improvement
#loadWithPostFix(process,"RecoBTag.Configuration.RecoBTag_cff",postfix)
if hasattr( process, 'candidateJetProbabilityComputer' ) == False :
process.load("RecoBTag.Configuration.RecoBTag_cff")
#process.load("RecoBTag.Configuration.RecoBTag_cff") # commented out to prevent loading of IVF modules already run in the standard reconstruction. Instead, loading individual cffs from RecoBTag_cff
process.load("RecoBTag.ImpactParameter.impactParameter_cff")
process.load("RecoBTag.SecondaryVertex.secondaryVertex_cff")
process.load("RecoBTag.SoftLepton.softLepton_cff")
process.load("RecoBTau.JetTagComputer.combinedMVA_cff")
#addESProducers(process,'RecoBTag.Configuration.RecoBTag_cff')
import RecoBTag.Configuration.RecoBTag_cff as btag
import RecoJets.JetProducers.caTopTaggers_cff as toptag
## Remove IVF modules that were already run by the standard reconstruction to prevent them from re-running in the unscheduled mode
if not runIVF and hasattr( process, 'bVertexFilter' ): # 'if' condition preventing jets from removing IVF modules from other jets that want to run them
if hasattr( process, 'inclusiveCandidateVertexing' ):
for m in getattr( process, 'inclusiveCandidateVertexing' ).moduleNames():
if hasattr( process, m ):
delattr( process, m )
delattr( process, 'inclusiveCandidateVertexing' )
if hasattr( process, 'inclusiveVertexing' ):
for m in getattr( process, 'inclusiveVertexing' ).moduleNames():
if hasattr( process, m ):
delattr( process, m )
delattr( process, 'inclusiveVertexing' )
## the following module is never used explicitly but here it is used to distinguish the first from the subsequent calls to switchJetCollection()/addJetCollection()
if hasattr( process, 'bVertexFilter' ):
delattr( process, 'bVertexFilter' )

## setup all required btagInfos : we give a dedicated treatment for different
## types of tagInfos here. A common treatment is possible but might require a more
Expand Down

0 comments on commit 91135ce

Please sign in to comment.