2 import RecoTauTag.RecoTau.RecoTauCleanerPlugins
as cleaners
7 from RecoTauTag.RecoTau.hpstanc_transforms
import transforms, cuts
14 combinatoricRecoTausDiscriminationByLeadingPionPtCut = pfRecoTauDiscriminationByLeadingPionPtCut.clone(
15 PFTauProducer = cms.InputTag(
"combinatoricRecoTaus")
20 from RecoTauTag.Configuration.RecoTauMVAConfiguration_cfi
import TauTagMVAComputerRecord, esPreferLocalTancDB
23 from RecoTauTag.RecoTau.RecoTauDiscriminantConfiguration
import discriminantConfiguration
25 combinatoricRecoTausDiscriminationByTanc = cms.EDProducer(
26 "RecoTauMVADiscriminator",
27 PFTauProducer = cms.InputTag(
"combinatoricRecoTaus"),
28 Prediscriminants = noPrediscriminants,
29 dbLabel = cms.string(
"hpstanc"),
30 remapOutput = cms.bool(
True),
33 nCharged = cms.uint32(1),
34 nPiZeros = cms.uint32(0),
35 mvaLabel = cms.string(
"1prong0pi0"),
38 nCharged = cms.uint32(1),
39 nPiZeros = cms.uint32(1),
40 mvaLabel = cms.string(
"1prong1pi0"),
43 nCharged = cms.uint32(1),
44 nPiZeros = cms.uint32(2),
45 mvaLabel = cms.string(
"1prong2pi0"),
48 nCharged = cms.uint32(3),
49 nPiZeros = cms.uint32(0),
50 mvaLabel = cms.string(
"3prong0pi0"),
53 discriminantOptions = discriminantConfiguration,
58 combinatoricRecoTausTancTransform = cms.EDProducer(
59 "RecoTauMVATransform",
60 transforms = transforms,
61 PFTauProducer = cms.InputTag(
"combinatoricRecoTaus"),
62 toTransform = cms.InputTag(
"combinatoricRecoTausDiscriminationByTanc"),
63 Prediscriminants = noPrediscriminants
66 from RecoTauTag.RecoTau.PFRecoTauDiscriminationByHPSSelection_cfi
import hpsSelectionDiscriminator
68 combinatoricRecoTausHPSSelector = hpsSelectionDiscriminator.clone(
69 src = cms.InputTag(
"combinatoricRecoTaus"),
70 minTauPt = cms.double(5.),
72 coneSizeFormula = cms.string(
'0.3'),
76 hpsTancTausSansRefs = cms.EDProducer(
78 src = cms.InputTag(
"combinatoricRecoTaus"),
83 cleaners.matchingConeCut,
86 name = cms.string(
"lead pion"),
87 plugin = cms.string(
"RecoTauDiscriminantCleanerPlugin"),
88 src = cms.InputTag(
"combinatoricRecoTausDiscriminationByLeadingPionPtCut")
92 name = cms.string(
"HPS selection"),
93 plugin = cms.string(
"RecoTauDiscriminantCleanerPlugin"),
94 src = cms.InputTag(
"combinatoricRecoTausHPSSelector")
96 cleaners.combinedIsolation
100 hpsTancTaus = cms.EDProducer(
101 "RecoTauPiZeroUnembedder",
102 src = cms.InputTag(
"hpsTancTausSansRefs")
106 hpsTancTausDiscriminationByLeadingPionPtCut = combinatoricRecoTausDiscriminationByLeadingPionPtCut.clone(
107 PFTauProducer = cms.InputTag(
"hpsTancTaus")
110 _leadPionPrediscriminant = cms.PSet(
111 BooleanOperator = cms.string(
"and"),
113 Producer = cms.InputTag(
114 'hpsTancTausDiscriminationByLeadingPionPtCut'),
115 cut = cms.double(0.5)
120 hpsTancTausDiscriminationByDecayModeSelection = combinatoricRecoTausHPSSelector.clone(
121 PFTauProducer = cms.InputTag(
"hpsTancTaus")
125 hpsPFTauDiscriminationByVLooseIsolation,\
126 hpsPFTauDiscriminationByLooseIsolation,\
127 hpsPFTauDiscriminationByMediumIsolation,\
128 hpsPFTauDiscriminationByTightIsolation
132 hpsTancTausDiscriminationByLeadingTrackFinding = pfRecoTauDiscriminationByLeadingTrackFinding.clone(
133 PFTauProducer = cms.InputTag(
"hpsTancTaus")
137 hpsTancTausDiscriminationByLeadingTrackPtCut = pfRecoTauDiscriminationByLeadingTrackPtCut.clone(
138 PFTauProducer = cms.InputTag(
"hpsTancTaus")
145 hpsTancTausDiscriminationByLooseElectronRejection = pfRecoTauDiscriminationAgainstElectron.clone(
146 PFTauProducer = cms.InputTag(
"hpsTancTaus"),
147 Prediscriminants = noPrediscriminants,
148 PFElectronMVA_maxValue = cms.double(0.6)
151 hpsTancTausDiscriminationByMediumElectronRejection = pfRecoTauDiscriminationAgainstElectron.clone(
152 PFTauProducer = cms.InputTag(
"hpsTancTaus"),
153 Prediscriminants = noPrediscriminants,
154 ApplyCut_EcalCrackCut = cms.bool(
True)
157 hpsTancTausDiscriminationByTightElectronRejection = pfRecoTauDiscriminationAgainstElectron.clone(
158 PFTauProducer = cms.InputTag(
"hpsTancTaus"),
159 Prediscriminants = noPrediscriminants,
160 ApplyCut_EcalCrackCut = cms.bool(
True),
161 ApplyCut_BremCombined = cms.bool(
True)
166 hpsTancTausDiscriminationByLooseMuonRejection = pfRecoTauDiscriminationAgainstMuon.clone(
167 PFTauProducer = cms.InputTag(
"hpsTancTaus"),
168 Prediscriminants = noPrediscriminants
171 hpsTancTausDiscriminationByTightMuonRejection = pfRecoTauDiscriminationAgainstMuon.clone(
172 PFTauProducer = cms.InputTag(
"hpsTancTaus"),
173 Prediscriminants = noPrediscriminants,
174 discriminatorOption = cms.string(
'noAllArbitrated')
177 from RecoTauTag.RecoTau.PFRecoTauDiscriminationAgainstCaloMuon_cfi
import pfRecoTauDiscriminationAgainstCaloMuon
178 hpsTancTausDiscriminationAgainstCaloMuon = pfRecoTauDiscriminationAgainstCaloMuon.clone(
179 PFTauProducer = cms.InputTag(
"hpsTancTaus")
181 hpsTancTausDiscriminationAgainstCaloMuon.Prediscriminants.leadTrack.Producer = cms.InputTag(
"hpsTancTausDiscriminationByLeadingTrackFinding")
184 hpsTancRequireDecayMode = requireDecayMode.clone()
185 hpsTancRequireDecayMode.decayMode.Producer = cms.InputTag(
"hpsTancTausDiscriminationByDecayModeSelection")
187 hpsTancTausDiscriminationByFlightPath = cms.EDProducer(
188 "PFRecoTauDiscriminationByFlight",
189 PFTauProducer = cms.InputTag(
"hpsTancTaus"),
190 vertexSource = PFTauQualityCuts.primaryVertexSrc,
191 beamspot = cms.InputTag(
"offlineBeamSpot"),
192 refitPV = cms.bool(
True),
193 Prediscriminants = cms.PSet(
194 BooleanOperator = cms.string(
"and"),
195 leadTrack = cms.PSet(
196 Producer = cms.InputTag(
197 "hpsTancTausDiscriminationByDecayModeSelection"),
198 cut = cms.double(0.5),
204 hpsTancTausDiscriminationByVLooseIsolation = \
205 hpsPFTauDiscriminationByVLooseIsolation.clone(
206 PFTauProducer = cms.InputTag(
"hpsTancTaus"),
207 Prediscriminants = hpsTancRequireDecayMode
209 hpsTancTausDiscriminationByVLooseIsolation.Prediscriminants = hpsTancRequireDecayMode
211 hpsTancTausDiscriminationByLooseIsolation = \
212 hpsPFTauDiscriminationByLooseIsolation.clone(
213 PFTauProducer = cms.InputTag(
"hpsTancTaus"),
214 Prediscriminants = hpsTancRequireDecayMode
216 hpsTancTausDiscriminationByLooseIsolation.Prediscriminants = hpsTancRequireDecayMode
218 hpsTancTausDiscriminationByMediumIsolation = \
219 hpsPFTauDiscriminationByMediumIsolation.clone(
220 PFTauProducer = cms.InputTag(
"hpsTancTaus"),
221 Prediscriminants = hpsTancRequireDecayMode
223 hpsTancTausDiscriminationByMediumIsolation.Prediscriminants = hpsTancRequireDecayMode
225 hpsTancTausDiscriminationByTightIsolation = \
226 hpsPFTauDiscriminationByTightIsolation.clone(
227 PFTauProducer = cms.InputTag(
"hpsTancTaus"),
228 Prediscriminants = hpsTancRequireDecayMode
230 hpsTancTausDiscriminationByTightIsolation.Prediscriminants = hpsTancRequireDecayMode
232 _tancPrediscriminants = _leadPionPrediscriminant.clone(
233 hpsSelect = cms.PSet(
234 Producer = cms.InputTag(
235 'hpsTancTausDiscriminationByDecayModeSelection'),
236 cut = cms.double(0.5)
241 hpsTancTausDiscriminationByTancRaw = \
242 combinatoricRecoTausDiscriminationByTanc.clone(
243 PFTauProducer = cms.InputTag(
"hpsTancTaus"),
244 Prediscriminants = _tancPrediscriminants,
248 hpsTancTausDiscriminationByTanc = \
249 combinatoricRecoTausTancTransform.clone(
250 PFTauProducer = cms.InputTag(
"hpsTancTaus"),
251 toTransform = cms.InputTag(
"hpsTancTausDiscriminationByTancRaw"),
252 transforms = transforms,
253 Prediscriminants = _tancPrediscriminants,
256 hpsTancTausDiscriminationByTancLoose = cms.EDProducer(
259 "PFRecoTauDiscriminationByLeadingObjectPtCut",
260 PFTauProducer = cms.InputTag(
"hpsTancTaus"),
261 UseOnlyChargedHadrons = cms.bool(
True),
262 MinPtLeadingObject = cms.double(0.0),
263 Prediscriminants = cms.PSet(
264 BooleanOperator = cms.string(
"and"),
266 Producer = cms.InputTag(
"hpsTancTausDiscriminationByTanc"),
273 hpsTancTausDiscriminationByTancVLoose = \
274 hpsTancTausDiscriminationByTancLoose.clone()
275 hpsTancTausDiscriminationByTancVLoose.Prediscriminants.tancCut.cut = cuts.vlooseCut
277 hpsTancTausDiscriminationByTancMedium = \
278 hpsTancTausDiscriminationByTancLoose.clone()
279 hpsTancTausDiscriminationByTancMedium.Prediscriminants.tancCut.cut = cuts.mediumCut
281 hpsTancTausDiscriminationByTancTight = \
282 hpsTancTausDiscriminationByTancLoose.clone()
283 hpsTancTausDiscriminationByTancTight.Prediscriminants.tancCut.cut = cuts.tightCut
285 hpsTancTauInitialSequence = cms.Sequence(
286 combinatoricRecoTausDiscriminationByLeadingPionPtCut
287 + combinatoricRecoTausHPSSelector
289 + hpsTancTausSansRefs
291 + hpsTancTausDiscriminationByLeadingTrackFinding
292 + hpsTancTausDiscriminationByLeadingPionPtCut
293 + hpsTancTausDiscriminationByLeadingTrackPtCut
294 + hpsTancTausDiscriminationByDecayModeSelection
298 hpsTancTauDiscriminantSequence = cms.Sequence(
300 hpsTancTausDiscriminationByTancRaw
301 + hpsTancTausDiscriminationByTanc
302 + hpsTancTausDiscriminationByTancVLoose
303 + hpsTancTausDiscriminationByTancLoose
304 + hpsTancTausDiscriminationByTancMedium
305 + hpsTancTausDiscriminationByTancTight
306 + hpsTancTausDiscriminationByVLooseIsolation
307 + hpsTancTausDiscriminationByLooseIsolation
308 + hpsTancTausDiscriminationByMediumIsolation
309 + hpsTancTausDiscriminationByTightIsolation
310 + hpsTancTausDiscriminationByLooseElectronRejection
311 + hpsTancTausDiscriminationByMediumElectronRejection
312 + hpsTancTausDiscriminationByTightElectronRejection
313 + hpsTancTausDiscriminationByLooseMuonRejection
314 + hpsTancTausDiscriminationByTightMuonRejection