Skip to content

Commit

Permalink
Merge pull request #33522 from cms-tau-pog/CMSSW_11_3_X_tau-pog_genPa…
Browse files Browse the repository at this point in the history
…rtsForGenTauAtnano

Change input collection for genVisTaus
  • Loading branch information
cmsbuild authored Apr 28, 2021
2 parents 4a20068 + c255002 commit 32d5a10
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions PhysicsTools/NanoAOD/python/taus_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,12 +175,18 @@ def _tauId8WPMask(pattern,doc):
idAntiEleDeadECal = Var("tauID('againstElectronDeadECALForNano')", bool, doc = "Anti-electron dead-ECal discriminator"),
)

tauGenJets.GenParticles = cms.InputTag("prunedGenParticles")
tauGenJets.includeNeutrinos = cms.bool(False)
tauGenJetsForNano = tauGenJets.clone(
GenParticles = "finalGenParticles",
includeNeutrinos = False
)

tauGenJetsSelectorAllHadronsForNano = tauGenJetsSelectorAllHadrons.clone(
src = "tauGenJetsForNano"
)

genVisTaus = cms.EDProducer("GenVisTauProducer",
src = cms.InputTag("tauGenJetsSelectorAllHadrons"),
srcGenParticles = cms.InputTag("prunedGenParticles")
src = cms.InputTag("tauGenJetsSelectorAllHadronsForNano"),
srcGenParticles = cms.InputTag("finalGenParticles")
)

genVisTauTable = cms.EDProducer("SimpleCandidateFlatTableProducer",
Expand Down Expand Up @@ -240,5 +246,5 @@ def _tauId8WPMask(pattern,doc):
_tauSequence80X = cms.Sequence(finalTaus)
run2_miniAOD_80XLegacy.toReplaceWith(tauSequence,_tauSequence80X)
tauTables = cms.Sequence(tauTable)
tauMC = cms.Sequence(tauGenJets + tauGenJetsSelectorAllHadrons + genVisTaus + genVisTauTable + tausMCMatchLepTauForTable + tausMCMatchHadTauForTable + tauMCTable)
tauMC = cms.Sequence(tauGenJetsForNano + tauGenJetsSelectorAllHadronsForNano + genVisTaus + genVisTauTable + tausMCMatchLepTauForTable + tausMCMatchHadTauForTable + tauMCTable)

0 comments on commit 32d5a10

Please sign in to comment.