1 import FWCore.ParameterSet.Config
as cms
4 from RecoTauTag.TauTagTools.PFTauSelector_cfi
import pfTauSelector
5 import RecoTauTag.RecoTau.RecoTauCleanerPlugins
as cleaners
6 import RecoJets.JetProducers.ak4PFJets_cfi
as jetConfig
12 Specify the prototype/default configuration of 'pfTaus', which is a selected 13 collection of taus that is used as an input to the 'patTaus'. The pf2pat tau 14 selection is constructed by: 15 * Rerunning a tau algorithm (fixedConePFTaus, shrinkingConePFTaus, etc) 16 * Cloning and running a set of discriminants for this algorithm so they are 17 independent of other cfis 18 * Constructing pfTaus via a PFTauSelector using the cloned discriminants 19 * In PhysicsTools.PatAlgos.tools.pfTools the regular discriminants are 20 modified to take the pfTaus as input. The original discriminant 21 labels are kept (i.e. fixedConePFTauDiscriminationByIsolation) but the Tau 22 source is defined as pfTaus 31 pfJetsLegacyHPSPiZeros = ak4PFJetsLegacyHPSPiZeros.clone()
32 pfJetsLegacyHPSPiZeros.jetSrc = cms.InputTag(
"ak4PFJets")
34 pfTauPFJetsRecoTauChargedHadrons = ak4PFJetsRecoTauChargedHadrons.clone()
36 pfTauTagInfoProducer = pfRecoTauTagInfoProducer.clone()
37 pfTauTagInfoProducer.PFCandidateProducer = jetConfig.ak4PFJets.src
38 pfTauTagInfoProducer.PFJetTracksAssociatorProducer =
'pfJetTracksAssociatorAtVertex' 41 pfTausProducer = hpsPFTauProducer.clone()
42 pfTausCombiner = combinatoricRecoTaus.clone()
43 pfTausCombiner.jetSrc= cms.InputTag(
"ak4PFJets")
44 pfTausCombiner.piZeroSrc=
"pfJetsLegacyHPSPiZeros" 45 pfTausCombiner.chargedHadronSrc=
'pfTauPFJetsRecoTauChargedHadrons' 46 pfTausCombiner.modifiers[3].pfTauTagInfoSrc=cms.InputTag(
"pfTauTagInfoProducer")
47 pfTausSelectionDiscriminator = hpsSelectionDiscriminator.clone()
48 pfTausSelectionDiscriminator.PFTauProducer = cms.InputTag(
"pfTausCombiner")
49 pfTausProducerSansRefs = hpsPFTauProducerSansRefs.clone()
50 pfTausProducerSansRefs = cms.EDProducer(
52 src = cms.InputTag(
"pfTausCombiner"),
56 name = cms.string(
"leadStripPtLt2_5"),
57 plugin = cms.string(
"RecoTauStringCleanerPlugin"),
58 selection = cms.string(
"signalPiZeroCandidates().size() = 0 | signalPiZeroCandidates()[0].pt > 2.5"),
59 selectionPassFunction = cms.string(
"0"),
60 selectionFailValue = cms.double(1e3)
63 name = cms.string(
"HPS_Select"),
64 plugin = cms.string(
"RecoTauDiscriminantCleanerPlugin"),
65 src = cms.InputTag(
"pfTausSelectionDiscriminator"),
67 cleaners.combinedIsolation
73 pfTausProducerSansRefs.src=cms.InputTag(
"pfTausCombiner")
74 pfTausProducer.src = cms.InputTag(
"pfTausProducerSansRefs")
78 pfTausDiscriminationByDecayModeFinding = hpsPFTauDiscriminationByDecayModeFinding.clone()
79 pfTausDiscriminationByDecayModeFinding.PFTauProducer=
"pfTausProducer" 81 pfTausDiscriminationByIsolation= hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits.clone()
82 pfTausDiscriminationByIsolation.PFTauProducer=
"pfTausProducer" 84 pfTausrequireDecayMode = cms.PSet(
85 BooleanOperator = cms.string(
"and"),
87 Producer = cms.InputTag(
'pfTausDiscriminationByDecayModeFinding'),
92 pfTausDiscriminationByIsolation.Prediscriminants=pfTausrequireDecayMode.clone()
95 pfTausBaseSequence = cms.Sequence(
96 pfJetsLegacyHPSPiZeros +
97 pfTauPFJetsRecoTauChargedHadrons +
99 pfTausSelectionDiscriminator +
100 pfTausProducerSansRefs +
102 pfTausDiscriminationByDecayModeFinding *
103 pfTausDiscriminationByIsolation
107 pfJetTracksAssociatorAtVertex = ak4PFJetTracksAssociatorAtVertex.clone()
108 pfJetTracksAssociatorAtVertex.jets= cms.InputTag(
"ak4PFJets")
110 pfTauPileUpVertices = cms.EDFilter(
111 "RecoTauPileUpVertexSelector",
112 src = cms.InputTag(
"offlinePrimaryVertices"),
113 minTrackSumPt = cms.double(5),
114 filter = cms.bool(
False),
118 pfTauTagInfoProducer = pfRecoTauTagInfoProducer.clone()
119 pfTauTagInfoProducer.PFCandidateProducer = jetConfig.ak4PFJets.src
120 pfTauTagInfoProducer.PFJetTracksAssociatorProducer =
'pfJetTracksAssociatorAtVertex' 122 pfTausPreSequence = cms.Sequence(
123 pfJetTracksAssociatorAtVertex +
124 pfTauPileUpVertices +
129 pfTaus = pfTauSelector.clone()
130 pfTaus.src = cms.InputTag(
"pfTausProducer")
131 pfTaus.discriminators = cms.VPSet(
132 cms.PSet( discriminator=cms.InputTag(
"pfTausDiscriminationByDecayModeFinding"),selectionCut=cms.double(0.5) ),
135 pfTausPtrs = cms.EDProducer(
"PFTauFwdPtrProducer",
136 src=cms.InputTag(
"pfTaus")
139 pfTauSequence = cms.Sequence(