Skip to content

Commit

Permalink
Allow adding to existing tauEmbedder
Browse files Browse the repository at this point in the history
  • Loading branch information
mbluj committed Jun 28, 2019
1 parent e6888e9 commit fd4728f
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions RecoTauTag/RecoTau/python/tools/runTauIdMVA.py
Expand Up @@ -1043,11 +1043,17 @@ def runTauID(self):

##
if self.debug: print('Embedding new TauIDs into \"'+self.updatedTauName+'\"')
embedID = self.cms.EDProducer("PATTauIDEmbedder",
src = self.cms.InputTag('slimmedTaus'),
tauIDSources = tauIDSources
)
setattr(self.process, self.updatedTauName, embedID)
if not hasattr(self.process, self.updatedTauName):
embedID = self.cms.EDProducer("PATTauIDEmbedder",
src = self.cms.InputTag('slimmedTaus'),
tauIDSources = tauIDSources
)
setattr(self.process, self.updatedTauName, embedID)
else: #assume same type
tauIDSources = self.cms.PSet(
getattr(self.process, self.updatedTauName).tauIDSources,
tauIDSources)
getattr(self.process, self.updatedTauName).tauIDSources = tauIDSources


def processDeepProducer(self, producer_name, tauIDSources, workingPoints_):
Expand Down

0 comments on commit fd4728f

Please sign in to comment.