1 import FWCore.ParameterSet.Config
as cms
8 process.load(
"RecoTauTag.Configuration.boostedHPSPFTaus_cff")
9 patAlgosToolsTask = configtools.getPatAlgosToolsTask(process)
10 patAlgosToolsTask.add(process.boostedHPSPFTausTask)
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 _allModifiers = cms.VPSet()
25 for modifier
in process.combinatoricRecoTausBoosted.modifiers:
26 _allModifiers.append(modifier)
27 process.combinatoricRecoTausBoosted.modifiers.remove(process.combinatoricRecoTausBoosted.modifiers[3])
28 from Configuration.Eras.Modifier_run2_miniAOD_80XLegacy_cff
import run2_miniAOD_80XLegacy
29 from Configuration.Eras.Modifier_run2_miniAOD_94XFall17_cff
import run2_miniAOD_94XFall17
30 for era
in [ run2_miniAOD_80XLegacy, run2_miniAOD_94XFall17]:
31 era.toModify(process.combinatoricRecoTausBoosted, modifiers = _allModifiers)
32 process.combinatoricRecoTausBoosted.builders[0].pfCandSrc = cms.InputTag(
'particleFlow')
35 process.hpsPFTauDiscriminationByLooseMuonRejection3Boosted.dRmuonMatch = 0.1
36 process.hpsPFTauDiscriminationByTightMuonRejection3Boosted.dRmuonMatch = 0.1
38 process.slimmedTausBoosted = process.slimmedTaus.clone(src = cms.InputTag(
"selectedPatTausBoosted"))
39 patAlgosToolsTask.add(process.slimmedTausBoosted)
def cloneProcessingSnippet(process, sequence, postfix, removePostfix="", noClones=[], addToTask=False)
def massSearchReplaceAnyInputTag(sequence, oldInputTag, newInputTag, verbose=False, moduleLabelOnly=False, skipLabelTest=False)
def addBoostedTaus(process)