CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
boostedHPSPFTaus_cfi.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 def addBoostedTaus(process):
4  from PhysicsTools.PatAlgos.tools.helpers import cloneProcessingSnippet
5  from PhysicsTools.PatAlgos.tools.helpers import massSearchReplaceAnyInputTag
6  process.load("RecoTauTag.Configuration.boostedHPSPFTaus_cff")
7  process.load("RecoTauTag.Configuration.RecoPFTauTag_cff")
8  process.ptau = cms.Path( process.PFTau )
9  process.PATTauSequence = cms.Sequence(process.PFTau+process.makePatTaus+process.selectedPatTaus)
10  process.PATTauSequenceBoosted = cloneProcessingSnippet(process,process.PATTauSequence, "Boosted")
11  process.recoTauAK4PFJets08RegionBoosted.src = cms.InputTag('boostedTauSeeds')
12  process.recoTauAK4PFJets08RegionBoosted.pfCandSrc = cms.InputTag('particleFlow')
13  process.recoTauAK4PFJets08RegionBoosted.pfCandAssocMapSrc = cms.InputTag('boostedTauSeeds', 'pfCandAssocMapForIsolation')
14  process.ak4PFJetsLegacyHPSPiZerosBoosted.jetSrc = cms.InputTag('boostedTauSeeds')
15  process.ak4PFJetsRecoTauChargedHadronsBoosted.jetSrc = cms.InputTag('boostedTauSeeds')
16  process.ak4PFJetsRecoTauChargedHadronsBoosted.builders[1].dRcone = cms.double(0.3)
17  process.ak4PFJetsRecoTauChargedHadronsBoosted.builders[1].dRconeLimitedToJetArea = cms.bool(True)
18  process.combinatoricRecoTausBoosted.jetSrc = cms.InputTag('boostedTauSeeds')
19  process.combinatoricRecoTausBoosted.modifiers.remove(process.combinatoricRecoTausBoosted.modifiers[3])
20  #process.combinatoricRecoTausBoosted.builders[0].pfCandSrc = cms.InputTag('pfNoPileUpForBoostedTaus')
21  process.combinatoricRecoTausBoosted.builders[0].pfCandSrc = cms.InputTag('particleFlow')
22  massSearchReplaceAnyInputTag(process.PATTauSequenceBoosted,cms.InputTag("ak4PFJets"),cms.InputTag("boostedTauSeeds"))
23  process.slimmedTausBoosted = process.slimmedTaus.clone(src = cms.InputTag("selectedPatTausBoosted"))
24 
25  return process
def cloneProcessingSnippet
Definition: helpers.py:306
def massSearchReplaceAnyInputTag
Definition: helpers.py:262