Skip to content

Commit

Permalink
Merge pull request #13681 from slava77/CMSSW_8_0_0_patch1/hackaroundP…
Browse files Browse the repository at this point in the history
…ATCutParser-temp-cleanPatJets

delete loaded cleanPatJets after the temporary load if it was not around already
  • Loading branch information
davidlange6 committed Mar 12, 2016
2 parents 2b2bd23 + c0e5ee4 commit 7cf35bf
Showing 1 changed file with 4 additions and 0 deletions.
Expand Up @@ -1429,10 +1429,14 @@ def jetCleaning(self, process, jetCollectionName, autoJetCleaning, jetProduction
photonCollection = cms.InputTag("cleanedPatPhotons"+postfix)

#jet cleaning
have_cleanPatJets = hasattr(process, "cleanPatJets")
process.load("PhysicsTools.PatAlgos.cleaningLayer1.jetCleaner_cfi")
cleanPatJetProducer = getattr(process, "cleanPatJets").clone(
src = cms.InputTag(jetCollectionName)
)
#do not leave it hanging
if not have_cleanPatJets:
del process.cleanPatJets
cleanPatJetProducer.checkOverlaps.muons.src = muonCollection
cleanPatJetProducer.checkOverlaps.electrons.src = electronCollection
if isValidInputTag(photonCollection) and autoJetCleaning != "LepClean":
Expand Down

0 comments on commit 7cf35bf

Please sign in to comment.