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 pfTausProducerSansRefs = shrinkingConePFTauProducerSansRefs.clone()
28 pfTausProducer = shrinkingConePFTauProducer.clone()
29 pfTausProducer.src =
"pfTausProducerSansRefs"
33 pfTausDiscriminationByLeadingTrackFinding = \
34 shrinkingConePFTauDiscriminationByLeadingTrackFinding.clone()
35 pfTausDiscriminationByLeadingTrackFinding.PFTauProducer =
"pfTausProducer"
38 pfTausDiscriminationByLeadingPionPtCut = \
39 shrinkingConePFTauDiscriminationByLeadingPionPtCut.clone()
40 pfTausDiscriminationByLeadingPionPtCut.PFTauProducer =
"pfTausProducer"
42 pfTausDiscriminationByIsolation = \
43 shrinkingConePFTauDiscriminationByIsolation.clone()
44 pfTausDiscriminationByIsolation.Prediscriminants.leadTrack.Producer = \
45 "pfTausDiscriminationByLeadingTrackFinding"
46 pfTausDiscriminationByIsolation.PFTauProducer =
"pfTausProducer"
49 pfTausBaseSequence = cms.Sequence(
50 pfTausProducerSansRefs +
52 pfTausDiscriminationByLeadingTrackFinding +
53 pfTausDiscriminationByLeadingPionPtCut +
54 pfTausDiscriminationByIsolation
59 pfJetTracksAssociatorAtVertex = cms.EDProducer(
60 "JetTracksAssociatorAtVertex",
62 jets = cms.InputTag(
"pfJets")
64 pfTausProducerSansRefs.jetSrc = pfJetTracksAssociatorAtVertex.jets
65 pfTausProducer.jetSrc = pfTausProducerSansRefs.jetSrc
67 pfTausProducerSansRefs.builders[0].pfCandSrc = pfJets.src
68 pfTausProducer.builders[0].pfCandSrc = pfTausProducerSansRefs.builders[0].pfCandSrc
70 pfTauPileUpVertices = cms.EDFilter(
71 "RecoTauPileUpVertexSelector",
72 src = cms.InputTag(
"offlinePrimaryVertices"),
73 minTrackSumPt = cms.double(5),
74 filter = cms.bool(
False),
78 pfJetsPiZeros = ak5PFJetsRecoTauPiZeros.clone()
79 pfJetsLegacyTaNCPiZeros = ak5PFJetsLegacyTaNCPiZeros.clone()
80 pfJetsLegacyHPSPiZeros = ak5PFJetsLegacyHPSPiZeros.clone()
82 pfJetsPiZeros.jetSrc = pfJetTracksAssociatorAtVertex.jets
83 pfJetsLegacyTaNCPiZeros.jetSrc = pfJetTracksAssociatorAtVertex.jets
84 pfJetsLegacyHPSPiZeros.jetSrc = pfJetTracksAssociatorAtVertex.jets
86 pfTauPFJets08Region = recoTauAK5PFJets08Region.clone()
87 pfTauPFJets08Region.src = pfJetTracksAssociatorAtVertex.jets
88 pfTauPFJets08Region.pfSrc = pfJets.src
89 pfJetsPiZeros.jetRegionSrc =
'pfTauPFJets08Region'
90 pfJetsLegacyTaNCPiZeros.jetRegionSrc =
'pfTauPFJets08Region'
91 pfJetsLegacyHPSPiZeros.jetRegionSrc =
'pfTauPFJets08Region'
92 pfTausProducerSansRefs.piZeroSrc =
"pfJetsLegacyTaNCPiZeros"
93 pfTausProducerSansRefs.jetRegionSrc = pfJetsLegacyTaNCPiZeros.jetRegionSrc
94 pfTausProducer.piZeroSrc = pfTausProducerSansRefs.piZeroSrc
95 pfTausProducer.jetRegionSrc = pfTausProducerSansRefs.jetRegionSrc
97 pfTauTagInfoProducer = pfRecoTauTagInfoProducer.clone()
98 pfTauTagInfoProducer.PFCandidateProducer = pfJets.src
99 pfTauTagInfoProducer.PFJetTracksAssociatorProducer =
'pfJetTracksAssociatorAtVertex'
101 pfTausProducerSansRefs.modifiers[1] = cms.PSet(
102 name = cms.string(
"pfTauTTIworkaround"),
103 plugin = cms.string(
"RecoTauTagInfoWorkaroundModifer"),
104 pfTauTagInfoSrc = cms.InputTag(
"pfTauTagInfoProducer"),
106 pfTausProducer.modifiers[1] = pfTausProducerSansRefs.modifiers[1]
108 pfTausPreSequence = cms.Sequence(
109 pfJetTracksAssociatorAtVertex +
110 pfTauPFJets08Region +
111 pfTauPileUpVertices +
112 pfTauTagInfoProducer +
114 pfJetsLegacyTaNCPiZeros +
115 pfJetsLegacyHPSPiZeros
119 pfTaus = pfTauSelector.clone()
120 pfTaus.src = cms.InputTag(
"pfTausProducer")
121 pfTaus.discriminators = cms.VPSet(
122 cms.PSet( discriminator=cms.InputTag(
"pfTausDiscriminationByLeadingPionPtCut"),selectionCut=cms.double(0.5) ),
123 cms.PSet( discriminator=cms.InputTag(
"pfTausDiscriminationByIsolation"),selectionCut=cms.double(0.5) )
126 pfTauSequence = cms.Sequence(