CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions
boostedHPSPFTaus_cfi Namespace Reference

Functions

def addBoostedTaus
 

Function Documentation

def boostedHPSPFTaus_cfi.addBoostedTaus (   process)

Definition at line 4 of file boostedHPSPFTaus_cfi.py.

References helpers.cloneProcessingSnippet(), and MassReplace.massSearchReplaceAnyInputTag().

Referenced by miniAOD_tools.miniAOD_customizeCommon().

4 
5 def addBoostedTaus(process):
6  from PhysicsTools.PatAlgos.tools.helpers import cloneProcessingSnippet
7  from PhysicsTools.PatAlgos.tools.helpers import massSearchReplaceAnyInputTag
8 
9  process.load("RecoTauTag.Configuration.boostedHPSPFTaus_cff")
10  patAlgosToolsTask = configtools.getPatAlgosToolsTask(process)
11  patAlgosToolsTask.add(process.boostedHPSPFTausTask)
12 
13  process.load("RecoTauTag.Configuration.RecoPFTauTag_cff")
14  process.ptau = cms.Path( process.PFTau )
15  process.PATTauSequence = cms.Sequence(process.PFTau+process.makePatTaus+process.selectedPatTaus)
16  process.PATTauSequenceBoosted = cloneProcessingSnippet(process,process.PATTauSequence, "Boosted", addToTask = True)
17  process.recoTauAK4PFJets08RegionBoosted.src = cms.InputTag('boostedTauSeeds')
18  process.recoTauAK4PFJets08RegionBoosted.pfCandSrc = cms.InputTag('particleFlow')
19  process.recoTauAK4PFJets08RegionBoosted.pfCandAssocMapSrc = cms.InputTag('boostedTauSeeds', 'pfCandAssocMapForIsolation')
20  process.ak4PFJetsLegacyHPSPiZerosBoosted.jetSrc = cms.InputTag('boostedTauSeeds')
21  process.ak4PFJetsRecoTauChargedHadronsBoosted.jetSrc = cms.InputTag('boostedTauSeeds')
22  process.ak4PFJetsRecoTauChargedHadronsBoosted.builders[1].dRcone = cms.double(0.3)
23  process.ak4PFJetsRecoTauChargedHadronsBoosted.builders[1].dRconeLimitedToJetArea = cms.bool(True)
24  process.combinatoricRecoTausBoosted.jetSrc = cms.InputTag('boostedTauSeeds')
25  process.combinatoricRecoTausBoosted.builders[0].pfCandSrc = cms.InputTag('particleFlow')
26  ## Note JetArea is not defined for subjets (-> do not switch to True in hpsPFTauDiscriminationByLooseMuonRejection3Boosted, False is default)
27  ## The restiction to jetArea is turned to dRMatch=0.1 (-> use explicitly this modified value)
28  process.hpsPFTauDiscriminationByMuonRejection3Boosted.dRmuonMatch = 0.1
29  massSearchReplaceAnyInputTag(process.PATTauSequenceBoosted,cms.InputTag("ak4PFJets"),cms.InputTag("boostedTauSeeds"))
30  process.slimmedTausBoosted = process.slimmedTaus.clone(src = cms.InputTag("selectedPatTausBoosted"))
31  patAlgosToolsTask.add(process.slimmedTausBoosted)
32 
33  return process
def cloneProcessingSnippet
Definition: helpers.py:257
def massSearchReplaceAnyInputTag
Definition: MassReplace.py:79