CMS 3D CMS Logo

Functions
boostedHPSPFTaus_cfi Namespace Reference

Functions

def addBoostedTaus (process)
 

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 def addBoostedTaus(process):
5  from PhysicsTools.PatAlgos.tools.helpers import cloneProcessingSnippet
6  from PhysicsTools.PatAlgos.tools.helpers import massSearchReplaceAnyInputTag
7 
8  process.load("RecoTauTag.Configuration.boostedHPSPFTaus_cff")
9  patAlgosToolsTask = configtools.getPatAlgosToolsTask(process)
10  patAlgosToolsTask.add(process.boostedHPSPFTausTask)
11 
12  process.load("RecoTauTag.Configuration.RecoPFTauTag_cff")
13  process.ptau = cms.Path( process.PFTau )
14  process.PATTauSequence = cms.Sequence(process.PFTau+process.makePatTaus+process.selectedPatTaus)
15  process.PATTauSequenceBoosted = cloneProcessingSnippet(process,process.PATTauSequence, "Boosted", addToTask = True)
16  process.recoTauAK4PFJets08RegionBoosted.src = cms.InputTag('boostedTauSeeds')
17  process.recoTauAK4PFJets08RegionBoosted.pfCandSrc = cms.InputTag('particleFlow')
18  process.recoTauAK4PFJets08RegionBoosted.pfCandAssocMapSrc = cms.InputTag('boostedTauSeeds', 'pfCandAssocMapForIsolation')
19  process.ak4PFJetsLegacyHPSPiZerosBoosted.jetSrc = cms.InputTag('boostedTauSeeds')
20  process.ak4PFJetsRecoTauChargedHadronsBoosted.jetSrc = cms.InputTag('boostedTauSeeds')
21  process.ak4PFJetsRecoTauChargedHadronsBoosted.builders[1].dRcone = cms.double(0.3)
22  process.ak4PFJetsRecoTauChargedHadronsBoosted.builders[1].dRconeLimitedToJetArea = cms.bool(True)
23  process.combinatoricRecoTausBoosted.jetSrc = cms.InputTag('boostedTauSeeds')
24  process.combinatoricRecoTausBoosted.modifiers.remove(process.combinatoricRecoTausBoosted.modifiers[3])
25  #process.combinatoricRecoTausBoosted.builders[0].pfCandSrc = cms.InputTag('pfNoPileUpForBoostedTaus')
26  process.combinatoricRecoTausBoosted.builders[0].pfCandSrc = cms.InputTag('particleFlow')
27  #Note JetArea is not defined for subjets and restiction to jetArea is turned to dRMatch=0.1, so better use the latter explicitely
28  #process.hpsPFTauDiscriminationByLooseMuonRejection3Boosted.dRmuonMatchLimitedToJetArea = cms.bool(True)
29  #process.hpsPFTauDiscriminationByTightMuonRejection3Boosted.dRmuonMatchLimitedToJetArea = cms.bool(True)
30  process.hpsPFTauDiscriminationByLooseMuonRejection3Boosted.dRmuonMatch = 0.1
31  process.hpsPFTauDiscriminationByTightMuonRejection3Boosted.dRmuonMatch = 0.1
32  massSearchReplaceAnyInputTag(process.PATTauSequenceBoosted,cms.InputTag("ak4PFJets"),cms.InputTag("boostedTauSeeds"))
33  process.slimmedTausBoosted = process.slimmedTaus.clone(src = cms.InputTag("selectedPatTausBoosted"))
34  patAlgosToolsTask.add(process.slimmedTausBoosted)
35 
36  return process
37 
def cloneProcessingSnippet(process, sequence, postfix, removePostfix="", noClones=[], addToTask=False)
Definition: helpers.py:251
def massSearchReplaceAnyInputTag(sequence, oldInputTag, newInputTag, verbose=False, moduleLabelOnly=False, skipLabelTest=False)
Definition: MassReplace.py:71