4 from RecoTauTag.TauTagTools.PFTauSelector_cfi
import pfTauSelector
5 import RecoTauTag.RecoTau.RecoTauCleanerPlugins
as cleaners
7 from RecoJets.JetProducers.ak4PFJets_cfi
import ak4PFJets
13 Specify the prototype/default configuration of 'pfTaus', which is a selected
14 collection of taus that is used as an input to the 'patTaus'. The pf2pat tau
15 selection is constructed by:
16 * Rerunning a tau algorithm (fixedConePFTaus, shrinkingConePFTaus, etc)
17 * Cloning and running a set of discriminants for this algorithm so they are
18 independent of other cfis
19 * Constructing pfTaus via a PFTauSelector using the cloned discriminants
20 * In PhysicsTools.PatAlgos.tools.pfTools the regular discriminants are
21 modified to take the pfTaus as input. The original discriminant
22 labels are kept (i.e. fixedConePFTauDiscriminationByIsolation) but the Tau
23 source is defined as pfTaus
32 pfJetsLegacyHPSPiZeros = ak4PFJetsLegacyHPSPiZeros.clone()
34 pfJetsLegacyHPSPiZeros.jetSrc = cms.InputTag(
"ak4PFJets")
36 pfTauPFJets08Region = recoTauAK4PFJets08Region.clone()
37 pfTauPFJets08Region.src = cms.InputTag(
"ak4PFJets")
38 pfTauPFJetsRecoTauChargedHadrons = ak4PFJetsRecoTauChargedHadrons.clone()
39 pfTauPFJets08Region.pfSrc = cms.InputTag(
"particleFlow")
40 pfTauPFJetsRecoTauChargedHadrons.jetRegionSrc =
'pfTauPFJets08Region'
42 pfTauTagInfoProducer = pfRecoTauTagInfoProducer.clone()
43 pfTauTagInfoProducer.PFCandidateProducer = ak4PFJets.src
44 pfTauTagInfoProducer.PFJetTracksAssociatorProducer =
'pfJetTracksAssociatorAtVertex'
47 pfTausProducer = hpsPFTauProducer.clone()
48 pfTausCombiner = combinatoricRecoTaus.clone()
49 pfTausCombiner.jetSrc= cms.InputTag(
"ak4PFJets")
50 pfTausCombiner.piZeroSrc=
"pfJetsLegacyHPSPiZeros"
51 pfTausCombiner.jetRegionSrc=
'pfTauPFJets08Region'
52 pfTausCombiner.chargedHadronSrc=
'pfTauPFJetsRecoTauChargedHadrons'
53 pfTausCombiner.modifiers[3].pfTauTagInfoSrc=cms.InputTag(
"pfTauTagInfoProducer")
54 pfTausSelectionDiscriminator = hpsSelectionDiscriminator.clone()
55 pfTausSelectionDiscriminator.PFTauProducer = cms.InputTag(
"pfTausCombiner")
56 pfTausProducerSansRefs = hpsPFTauProducerSansRefs.clone()
57 pfTausProducerSansRefs = cms.EDProducer(
59 src = cms.InputTag(
"pfTausCombiner"),
63 name = cms.string(
"leadStripPtLt2_5"),
64 plugin = cms.string(
"RecoTauStringCleanerPlugin"),
65 selection = cms.string(
"signalPiZeroCandidates().size() = 0 | signalPiZeroCandidates()[0].pt > 2.5"),
66 selectionPassFunction = cms.string(
"0"),
67 selectionFailValue = cms.double(1e3)
70 name = cms.string(
"HPS_Select"),
71 plugin = cms.string(
"RecoTauDiscriminantCleanerPlugin"),
72 src = cms.InputTag(
"pfTausSelectionDiscriminator"),
74 cleaners.combinedIsolation
80 pfTausProducerSansRefs.src=cms.InputTag(
"pfTausCombiner")
81 pfTausProducer.src = cms.InputTag(
"pfTausProducerSansRefs")
85 pfTausDiscriminationByDecayModeFinding = hpsPFTauDiscriminationByDecayModeFinding.clone()
86 pfTausDiscriminationByDecayModeFinding.PFTauProducer=
"pfTausProducer"
88 pfTausDiscriminationByIsolation= hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits.clone()
89 pfTausDiscriminationByIsolation.PFTauProducer=
"pfTausProducer"
91 pfTausrequireDecayMode = cms.PSet(
92 BooleanOperator = cms.string(
"and"),
94 Producer = cms.InputTag(
'pfTausDiscriminationByDecayModeFinding'),
99 pfTausDiscriminationByIsolation.Prediscriminants=pfTausrequireDecayMode.clone()
102 pfTausBaseSequence = cms.Sequence(
103 pfJetsLegacyHPSPiZeros +
104 pfTauPFJetsRecoTauChargedHadrons +
106 pfTausSelectionDiscriminator +
107 pfTausProducerSansRefs +
109 pfTausDiscriminationByDecayModeFinding *
110 pfTausDiscriminationByIsolation
115 pfJetTracksAssociatorAtVertex = ak4PFJetTracksAssociatorAtVertex.clone()
116 pfJetTracksAssociatorAtVertex.jets= cms.InputTag(
"ak4PFJets")
118 pfTauPileUpVertices = cms.EDFilter(
119 "RecoTauPileUpVertexSelector",
120 src = cms.InputTag(
"offlinePrimaryVertices"),
121 minTrackSumPt = cms.double(5),
122 filter = cms.bool(
False),
126 pfTauTagInfoProducer = pfRecoTauTagInfoProducer.clone()
127 pfTauTagInfoProducer.PFCandidateProducer = ak4PFJets.src
128 pfTauTagInfoProducer.PFJetTracksAssociatorProducer =
'pfJetTracksAssociatorAtVertex'
131 pfTausPreSequence = cms.Sequence(
132 pfJetTracksAssociatorAtVertex +
133 pfTauPFJets08Region +
134 pfTauPileUpVertices +
139 pfTaus = pfTauSelector.clone()
140 pfTaus.src = cms.InputTag(
"pfTausProducer")
141 pfTaus.discriminators = cms.VPSet(
142 cms.PSet( discriminator=cms.InputTag(
"pfTausDiscriminationByDecayModeFinding"),selectionCut=cms.double(0.5) ),
145 pfTausPtrs = cms.EDProducer(
"PFTauFwdPtrProducer",
146 src=cms.InputTag(
"pfTaus")
149 pfTauSequence = cms.Sequence(