4 from RecoTauTag.TauTagTools.PFTauSelector_cfi
import pfTauSelector
5 import RecoTauTag.RecoTau.RecoTauCleanerPlugins
as cleaners
7 from RecoJets.JetProducers.ak5PFJets_cfi
import ak5PFJets
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 = ak5PFJetsLegacyHPSPiZeros.clone()
34 pfJetsLegacyHPSPiZeros.jetSrc = cms.InputTag(
"ak5PFJets")
36 pfTauPFJets08Region = recoTauAK5PFJets08Region.clone()
37 pfTauPFJets08Region.src = cms.InputTag(
"ak5PFJets")
38 pfTauPFJets08Region.pfSrc = cms.InputTag(
"particleFlow")
39 pfJetsLegacyHPSPiZeros.jetRegionSrc =
'pfTauPFJets08Region'
42 pfTausProducer = hpsPFTauProducer.clone()
43 pfTausCombiner = combinatoricRecoTaus.clone()
44 pfTausCombiner.jetSrc= cms.InputTag(
"ak5PFJets")
45 pfTausCombiner.piZeroSrc=
"pfJetsLegacyHPSPiZeros"
46 pfTausSelectionDiscriminator = hpsSelectionDiscriminator.clone()
47 pfTausSelectionDiscriminator.PFTauProducer = cms.InputTag(
"pfTausCombiner")
48 pfTausProducerSansRefs = hpsPFTauProducerSansRefs.clone()
49 pfTausProducerSansRefs = cms.EDProducer(
51 src = cms.InputTag(
"pfTausCombiner"),
55 name = cms.string(
"leadStripPtLt2_5"),
56 plugin = cms.string(
"RecoTauStringCleanerPlugin"),
57 selection = cms.string(
"signalPiZeroCandidates().size() = 0 | signalPiZeroCandidates()[0].pt > 2.5"),
58 selectionPassFunction = cms.string(
"0"),
59 selectionFailValue = cms.double(1e3)
62 name = cms.string(
"HPS_Select"),
63 plugin = cms.string(
"RecoTauDiscriminantCleanerPlugin"),
64 src = cms.InputTag(
"pfTausSelectionDiscriminator"),
66 cleaners.combinedIsolation
72 pfTausProducerSansRefs.src=cms.InputTag(
"pfTausCombiner")
73 pfTausProducer.src = cms.InputTag(
"pfTausProducerSansRefs")
77 pfTausDiscriminationByDecayModeFinding = hpsPFTauDiscriminationByDecayModeFinding.clone()
78 pfTausDiscriminationByDecayModeFinding.PFTauProducer=
"pfTausProducer"
80 pfTausDiscriminationByIsolation= hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits.clone()
81 pfTausDiscriminationByIsolation.PFTauProducer=
"pfTausProducer"
83 pfTausrequireDecayMode = cms.PSet(
84 BooleanOperator = cms.string(
"and"),
86 Producer = cms.InputTag(
'pfTausDiscriminationByDecayModeFinding'),
91 pfTausDiscriminationByIsolation.Prediscriminants=pfTausrequireDecayMode.clone()
94 pfTausBaseSequence = cms.Sequence(
95 pfJetsLegacyHPSPiZeros +
97 pfTausSelectionDiscriminator +
98 pfTausProducerSansRefs +
100 pfTausDiscriminationByDecayModeFinding *
101 pfTausDiscriminationByIsolation
106 pfJetTracksAssociatorAtVertex = ak5PFJetTracksAssociatorAtVertex.clone()
107 pfJetTracksAssociatorAtVertex.jets= cms.InputTag(
"ak5PFJets")
109 pfTauPileUpVertices = cms.EDFilter(
110 "RecoTauPileUpVertexSelector",
111 src = cms.InputTag(
"offlinePrimaryVertices"),
112 minTrackSumPt = cms.double(5),
113 filter = cms.bool(
False),
117 pfTauTagInfoProducer = pfRecoTauTagInfoProducer.clone()
118 pfTauTagInfoProducer.PFCandidateProducer = ak5PFJets.src
119 pfTauTagInfoProducer.PFJetTracksAssociatorProducer =
'pfJetTracksAssociatorAtVertex'
122 pfTausPreSequence = cms.Sequence(
123 pfJetTracksAssociatorAtVertex +
124 pfTauPFJets08Region +
125 pfTauPileUpVertices +
130 pfTaus = pfTauSelector.clone()
131 pfTaus.src = cms.InputTag(
"pfTausProducer")
132 pfTaus.discriminators = cms.VPSet(
133 cms.PSet( discriminator=cms.InputTag(
"pfTausDiscriminationByDecayModeFinding"),selectionCut=cms.double(0.5) ),
134 cms.PSet( discriminator=cms.InputTag(
"pfTausDiscriminationByIsolation"),selectionCut=cms.double(0.5) )
138 pfTausPtrs = cms.EDProducer(
"PFTauFwdPtrProducer",
139 src=cms.InputTag(
"pfTaus")
142 pfTauSequence = cms.Sequence(