1 import FWCore.ParameterSet.Config
as cms
4 from RecoTauTag.TauTagTools.PFTauSelector_cfi
import pfTauSelector
5 import RecoTauTag.RecoTau.RecoTauCleanerPlugins
as cleaners
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()
32 pfJetsLegacyHPSPiZeros.jetSrc = cms.InputTag(
"ak4PFJets")
34 pfTauPFJetsRecoTauChargedHadrons = ak4PFJetsRecoTauChargedHadrons.clone()
36 pfTauTagInfoProducer = pfRecoTauTagInfoProducer.clone()
37 pfTauTagInfoProducer.PFCandidateProducer = jetConfig.ak4PFJets.src
38 pfTauTagInfoProducer.PFJetTracksAssociatorProducer =
'pfJetTracksAssociatorAtVertex' 41 pfTausProducer = hpsPFTauProducer.clone()
42 pfTausCombiner = combinatoricRecoTaus.clone()
43 pfTausCombiner.jetSrc= cms.InputTag(
"ak4PFJets")
44 pfTausCombiner.piZeroSrc=
"pfJetsLegacyHPSPiZeros" 45 pfTausCombiner.chargedHadronSrc=
'pfTauPFJetsRecoTauChargedHadrons' 46 pfTausCombiner.modifiers[3].pfTauTagInfoSrc=cms.InputTag(
"pfTauTagInfoProducer")
47 pfTausSelectionDiscriminator = hpsSelectionDiscriminator.clone()
48 pfTausSelectionDiscriminator.PFTauProducer = cms.InputTag(
"pfTausCombiner")
49 pfTausProducerSansRefs = hpsPFTauProducerSansRefs.clone()
50 pfTausProducerSansRefs = cms.EDProducer(
52 src = cms.InputTag(
"pfTausCombiner"),
53 outputSelection = cms.string(
""),
54 verbosity = cms.int32(0),
58 name = cms.string(
"leadStripPtLt2_5"),
59 plugin = cms.string(
"RecoTauStringCleanerPlugin"),
60 tolerance = cleaners.tolerance_default,
61 selection = cms.string(
"signalPiZeroCandidates().size() = 0 | signalPiZeroCandidates()[0].pt > 2.5"),
62 selectionPassFunction = cms.string(
"0"),
63 selectionFailValue = cms.double(1e3)
66 name = cms.string(
"HPS_Select"),
67 plugin = cms.string(
"RecoTauDiscriminantCleanerPlugin"),
68 tolerance = cleaners.tolerance_default,
69 src = cms.InputTag(
"pfTausSelectionDiscriminator"),
71 cleaners.combinedIsolation
77 pfTausProducerSansRefs.src=cms.InputTag(
"pfTausCombiner")
78 pfTausProducer.src = cms.InputTag(
"pfTausProducerSansRefs")
82 pfTausDiscriminationByDecayModeFinding = hpsPFTauDiscriminationByDecayModeFinding.clone()
83 pfTausDiscriminationByDecayModeFinding.PFTauProducer=
"pfTausProducer" 85 pfTausDiscriminationByIsolation= hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits.clone()
86 pfTausDiscriminationByIsolation.PFTauProducer=
"pfTausProducer" 88 pfTausrequireDecayMode = cms.PSet(
89 BooleanOperator = cms.string(
"and"),
91 Producer = cms.InputTag(
'pfTausDiscriminationByDecayModeFinding'),
96 pfTausDiscriminationByIsolation.Prediscriminants=pfTausrequireDecayMode.clone()
99 pfTausBaseSequence = cms.Sequence(
100 pfJetsLegacyHPSPiZeros +
101 pfTauPFJetsRecoTauChargedHadrons +
103 pfTausSelectionDiscriminator +
104 pfTausProducerSansRefs +
106 pfTausDiscriminationByDecayModeFinding *
107 pfTausDiscriminationByIsolation
111 pfJetTracksAssociatorAtVertex = ak4PFJetTracksAssociatorAtVertex.clone()
112 pfJetTracksAssociatorAtVertex.jets= cms.InputTag(
"ak4PFJets")
114 pfTauPileUpVertices = cms.EDFilter(
115 "RecoTauPileUpVertexSelector",
116 src = cms.InputTag(
"offlinePrimaryVertices"),
117 minTrackSumPt = cms.double(5),
118 filter = cms.bool(
False),
122 pfTauTagInfoProducer = pfRecoTauTagInfoProducer.clone()
123 pfTauTagInfoProducer.PFCandidateProducer = jetConfig.ak4PFJets.src
124 pfTauTagInfoProducer.PFJetTracksAssociatorProducer =
'pfJetTracksAssociatorAtVertex' 126 pfTausPreSequence = cms.Sequence(
127 pfJetTracksAssociatorAtVertex +
128 pfTauPileUpVertices +
133 pfTaus = pfTauSelector.clone()
134 pfTaus.src = cms.InputTag(
"pfTausProducer")
135 pfTaus.discriminators = cms.VPSet(
136 cms.PSet( discriminator=cms.InputTag(
"pfTausDiscriminationByDecayModeFinding"),selectionCut=cms.double(0.5) ),
139 pfTausPtrs = cms.EDProducer(
"PFTauFwdPtrProducer",
140 src=cms.InputTag(
"pfTaus")
143 pfTauSequence = cms.Sequence(