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()
33 pfJetsLegacyHPSPiZeros.jetSrc = cms.InputTag(
"ak4PFJets")
35 pfTauPFJets08Region = recoTauAK4PFJets08Region.clone()
36 pfTauPFJets08Region.src = cms.InputTag(
"ak4PFJets")
37 pfTauPFJetsRecoTauChargedHadrons = ak4PFJetsRecoTauChargedHadrons.clone()
38 pfTauPFJets08Region.pfSrc = cms.InputTag(
"particleFlow")
39 pfTauPFJetsRecoTauChargedHadrons.jetRegionSrc =
'pfTauPFJets08Region'
41 pfTauTagInfoProducer = pfRecoTauTagInfoProducer.clone()
42 pfTauTagInfoProducer.PFCandidateProducer = jetConfig.ak4PFJets.src
43 pfTauTagInfoProducer.PFJetTracksAssociatorProducer =
'pfJetTracksAssociatorAtVertex'
46 pfTausProducer = hpsPFTauProducer.clone()
47 pfTausCombiner = combinatoricRecoTaus.clone()
48 pfTausCombiner.jetSrc= cms.InputTag(
"ak4PFJets")
49 pfTausCombiner.piZeroSrc=
"pfJetsLegacyHPSPiZeros"
50 pfTausCombiner.jetRegionSrc=
'pfTauPFJets08Region'
51 pfTausCombiner.chargedHadronSrc=
'pfTauPFJetsRecoTauChargedHadrons'
52 pfTausCombiner.modifiers[3].pfTauTagInfoSrc=cms.InputTag(
"pfTauTagInfoProducer")
53 pfTausSelectionDiscriminator = hpsSelectionDiscriminator.clone()
54 pfTausSelectionDiscriminator.PFTauProducer = cms.InputTag(
"pfTausCombiner")
55 pfTausProducerSansRefs = hpsPFTauProducerSansRefs.clone()
56 pfTausProducerSansRefs = cms.EDProducer(
58 src = cms.InputTag(
"pfTausCombiner"),
62 name = cms.string(
"leadStripPtLt2_5"),
63 plugin = cms.string(
"RecoTauStringCleanerPlugin"),
64 selection = cms.string(
"signalPiZeroCandidates().size() = 0 | signalPiZeroCandidates()[0].pt > 2.5"),
65 selectionPassFunction = cms.string(
"0"),
66 selectionFailValue = cms.double(1e3)
69 name = cms.string(
"HPS_Select"),
70 plugin = cms.string(
"RecoTauDiscriminantCleanerPlugin"),
71 src = cms.InputTag(
"pfTausSelectionDiscriminator"),
73 cleaners.combinedIsolation
79 pfTausProducerSansRefs.src=cms.InputTag(
"pfTausCombiner")
80 pfTausProducer.src = cms.InputTag(
"pfTausProducerSansRefs")
84 pfTausDiscriminationByDecayModeFinding = hpsPFTauDiscriminationByDecayModeFinding.clone()
85 pfTausDiscriminationByDecayModeFinding.PFTauProducer=
"pfTausProducer"
87 pfTausDiscriminationByIsolation= hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits.clone()
88 pfTausDiscriminationByIsolation.PFTauProducer=
"pfTausProducer"
90 pfTausrequireDecayMode = cms.PSet(
91 BooleanOperator = cms.string(
"and"),
93 Producer = cms.InputTag(
'pfTausDiscriminationByDecayModeFinding'),
98 pfTausDiscriminationByIsolation.Prediscriminants=pfTausrequireDecayMode.clone()
101 pfTausBaseSequence = cms.Sequence(
102 pfJetsLegacyHPSPiZeros +
103 pfTauPFJetsRecoTauChargedHadrons +
105 pfTausSelectionDiscriminator +
106 pfTausProducerSansRefs +
108 pfTausDiscriminationByDecayModeFinding *
109 pfTausDiscriminationByIsolation
113 pfJetTracksAssociatorAtVertex = ak4PFJetTracksAssociatorAtVertex.clone()
114 pfJetTracksAssociatorAtVertex.jets= cms.InputTag(
"ak4PFJets")
116 pfTauPileUpVertices = cms.EDFilter(
117 "RecoTauPileUpVertexSelector",
118 src = cms.InputTag(
"offlinePrimaryVertices"),
119 minTrackSumPt = cms.double(5),
120 filter = cms.bool(
False),
124 pfTauTagInfoProducer = pfRecoTauTagInfoProducer.clone()
125 pfTauTagInfoProducer.PFCandidateProducer = jetConfig.ak4PFJets.src
126 pfTauTagInfoProducer.PFJetTracksAssociatorProducer =
'pfJetTracksAssociatorAtVertex'
128 pfTausPreSequence = cms.Sequence(
129 pfJetTracksAssociatorAtVertex +
130 pfTauPFJets08Region +
131 pfTauPileUpVertices +
136 pfTaus = pfTauSelector.clone()
137 pfTaus.src = cms.InputTag(
"pfTausProducer")
138 pfTaus.discriminators = cms.VPSet(
139 cms.PSet( discriminator=cms.InputTag(
"pfTausDiscriminationByDecayModeFinding"),selectionCut=cms.double(0.5) ),
142 pfTausPtrs = cms.EDProducer(
"PFTauFwdPtrProducer",
143 src=cms.InputTag(
"pfTaus")
146 pfTauSequence = cms.Sequence(