4 from RecoTauTag.TauTagTools.PFTauSelector_cfi
import pfTauSelector
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
27 pfTausProducer = shrinkingConePFTauProducer.clone()
31 pfTausDiscriminationByLeadingTrackFinding = \
32 shrinkingConePFTauDiscriminationByLeadingTrackFinding.clone()
33 pfTausDiscriminationByLeadingTrackFinding.PFTauProducer =
"pfTausProducer"
36 pfTausDiscriminationByLeadingPionPtCut = \
37 shrinkingConePFTauDiscriminationByLeadingPionPtCut.clone()
38 pfTausDiscriminationByLeadingPionPtCut.PFTauProducer =
"pfTausProducer"
40 pfTausDiscriminationByIsolation = \
41 shrinkingConePFTauDiscriminationByIsolation.clone()
42 pfTausDiscriminationByIsolation.Prediscriminants.leadTrack.Producer = \
43 "pfTausDiscriminationByLeadingTrackFinding"
44 pfTausDiscriminationByIsolation.PFTauProducer =
"pfTausProducer"
47 pfTausBaseSequence = cms.Sequence(
49 pfTausDiscriminationByLeadingTrackFinding +
50 pfTausDiscriminationByLeadingPionPtCut +
51 pfTausDiscriminationByIsolation
56 pfJetTracksAssociatorAtVertex = cms.EDProducer(
57 "JetTracksAssociatorAtVertex",
59 jets = cms.InputTag(
"pfJets")
61 pfTausProducer.jetSrc = pfJetTracksAssociatorAtVertex.jets
63 pfTausProducer.builders[0].pfCandSrc = pfJets.src
65 pfTauPileUpVertices = cms.EDFilter(
66 "RecoTauPileUpVertexSelector",
67 src = cms.InputTag(
"offlinePrimaryVertices"),
68 minTrackSumPt = cms.double(5),
69 filter = cms.bool(
False),
73 pfJetsPiZeros = ak5PFJetsRecoTauPiZeros.clone()
74 pfJetsLegacyTaNCPiZeros = ak5PFJetsLegacyTaNCPiZeros.clone()
75 pfJetsLegacyHPSPiZeros = ak5PFJetsLegacyHPSPiZeros.clone()
77 pfJetsPiZeros.jetSrc = pfJetTracksAssociatorAtVertex.jets
78 pfJetsLegacyTaNCPiZeros.jetSrc = pfJetTracksAssociatorAtVertex.jets
79 pfJetsLegacyHPSPiZeros.jetSrc = pfJetTracksAssociatorAtVertex.jets
81 pfTauPFJets08Region = recoTauAK5PFJets08Region.clone()
82 pfTauPFJets08Region.src = pfJetTracksAssociatorAtVertex.jets
83 pfTauPFJets08Region.pfSrc = pfJets.src
84 pfJetsPiZeros.jetRegionSrc =
'pfTauPFJets08Region'
85 pfJetsLegacyTaNCPiZeros.jetRegionSrc =
'pfTauPFJets08Region'
86 pfJetsLegacyHPSPiZeros.jetRegionSrc =
'pfTauPFJets08Region'
87 pfTausProducer.piZeroSrc =
"pfJetsLegacyTaNCPiZeros"
88 pfTausProducer.jetRegionSrc = pfJetsLegacyTaNCPiZeros.jetRegionSrc
90 pfTauTagInfoProducer = pfRecoTauTagInfoProducer.clone()
91 pfTauTagInfoProducer.PFCandidateProducer = pfJets.src
92 pfTauTagInfoProducer.PFJetTracksAssociatorProducer =
'pfJetTracksAssociatorAtVertex'
94 pfTausProducer.modifiers[1] = cms.PSet(
95 name = cms.string(
"pfTauTTIworkaround"),
96 plugin = cms.string(
"RecoTauTagInfoWorkaroundModifer"),
97 pfTauTagInfoSrc = cms.InputTag(
"pfTauTagInfoProducer"),
100 pfTausPreSequence = cms.Sequence(
101 pfJetTracksAssociatorAtVertex +
102 pfTauPFJets08Region +
103 pfTauPileUpVertices +
104 pfTauTagInfoProducer +
106 pfJetsLegacyTaNCPiZeros +
107 pfJetsLegacyHPSPiZeros
111 pfTaus = pfTauSelector.clone()
112 pfTaus.src = cms.InputTag(
"pfTausProducer")
113 pfTaus.discriminators = cms.VPSet(
114 cms.PSet( discriminator=cms.InputTag(
"pfTausDiscriminationByLeadingPionPtCut"),selectionCut=cms.double(0.5) ),
115 cms.PSet( discriminator=cms.InputTag(
"pfTausDiscriminationByIsolation"),selectionCut=cms.double(0.5) )
118 pfTauSequence = cms.Sequence(