CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HPSPFTaus_cff.py
Go to the documentation of this file.
2 import copy
3 
4 '''
5 
6 Sequences for HPS taus
7 
8 '''
9 
10 # Define the discriminators for this tau
19 
21 
22 # Load helper functions to change the source of the discriminants
24 
25 # Load PFjet input parameters
26 from RecoTauTag.RecoTau.PFRecoTauPFJetInputs_cfi import PFRecoTauPFJetInputs
27 
28 # deltaBeta correction factor calculated for taus from ak5PFJets (Run I)
29 ak5dBetaCorrection=0.0772/0.1687
30 
31 # Load MVAs from SQLlite file/prep. DB
33 
34 # Select those taus that pass the HPS selections
35 # - pt > 15, mass cuts, tauCone cut
36 from RecoTauTag.RecoTau.PFRecoTauDiscriminationByHPSSelection_cfi import hpsSelectionDiscriminator, decayMode_1Prong0Pi0, decayMode_1Prong1Pi0, decayMode_1Prong2Pi0, decayMode_3Prong0Pi0
37 hpsPFTauDiscriminationByDecayModeFindingNewDMs = hpsSelectionDiscriminator.clone(
38  PFTauProducer = cms.InputTag('hpsPFTauProducer')
39 )
40 hpsPFTauDiscriminationByDecayModeFindingOldDMs = hpsSelectionDiscriminator.clone(
41  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
42  decayModes = cms.VPSet(
43  decayMode_1Prong0Pi0,
44  decayMode_1Prong1Pi0,
45  decayMode_1Prong2Pi0,
46  decayMode_3Prong0Pi0
47  ),
48  requireTauChargedHadronsToBeChargedPFCands = cms.bool(True)
49 )
50 hpsPFTauDiscriminationByDecayModeFinding = hpsPFTauDiscriminationByDecayModeFindingOldDMs.clone() # CV: kept for backwards compatibility
51 
52 # Define decay mode prediscriminant
53 requireDecayMode = cms.PSet(
54  BooleanOperator = cms.string("and"),
55  decayMode = cms.PSet(
56  Producer = cms.InputTag('hpsPFTauDiscriminationByDecayModeFindingNewDMs'),
57  cut = cms.double(0.5)
58  )
59 )
60 
61 #Building the prototype for the Discriminator by Isolation
62 hpsPFTauDiscriminationByLooseIsolation = pfRecoTauDiscriminationByIsolation.clone(
63  PFTauProducer = cms.InputTag("hpsPFTauProducer"),
64  Prediscriminants = requireDecayMode.clone(),
65  ApplyDiscriminationByTrackerIsolation = False,
66  ApplyDiscriminationByECALIsolation = True,
67  applyOccupancyCut = True
68 )
69 hpsPFTauDiscriminationByLooseIsolation.Prediscriminants.preIso = cms.PSet(
70  Producer = cms.InputTag("hpsPFTauDiscriminationByLooseChargedIsolation"),
71  cut = cms.double(0.5))
72 
73 # Make an even looser discriminator
74 hpsPFTauDiscriminationByVLooseIsolation = hpsPFTauDiscriminationByLooseIsolation.clone(
75  customOuterCone = cms.double(0.3),
76  isoConeSizeForDeltaBeta = cms.double(0.3),
77 )
78 hpsPFTauDiscriminationByVLooseIsolation.qualityCuts.isolationQualityCuts.minTrackPt = 1.5
79 hpsPFTauDiscriminationByVLooseIsolation.qualityCuts.isolationQualityCuts.minGammaEt = 2.0
80 hpsPFTauDiscriminationByVLooseIsolation.Prediscriminants.preIso.Producer = cms.InputTag("hpsPFTauDiscriminationByVLooseChargedIsolation")
81 
82 hpsPFTauDiscriminationByMediumIsolation = hpsPFTauDiscriminationByLooseIsolation.clone()
83 hpsPFTauDiscriminationByMediumIsolation.qualityCuts.isolationQualityCuts.minTrackPt = 0.8
84 hpsPFTauDiscriminationByMediumIsolation.qualityCuts.isolationQualityCuts.minGammaEt = 0.8
85 hpsPFTauDiscriminationByMediumIsolation.Prediscriminants.preIso.Producer = cms.InputTag("hpsPFTauDiscriminationByMediumChargedIsolation")
86 
87 hpsPFTauDiscriminationByTightIsolation = hpsPFTauDiscriminationByLooseIsolation.clone()
88 hpsPFTauDiscriminationByTightIsolation.qualityCuts.isolationQualityCuts.minTrackPt = 0.5
89 hpsPFTauDiscriminationByTightIsolation.qualityCuts.isolationQualityCuts.minGammaEt = 0.5
90 hpsPFTauDiscriminationByTightIsolation.Prediscriminants.preIso.Producer = cms.InputTag("hpsPFTauDiscriminationByTightChargedIsolation")
91 
92 hpsPFTauDiscriminationByIsolationSeq = cms.Sequence(
93  hpsPFTauDiscriminationByVLooseIsolation*
94  hpsPFTauDiscriminationByLooseIsolation*
95  hpsPFTauDiscriminationByMediumIsolation*
96  hpsPFTauDiscriminationByTightIsolation
97 )
98 
99 _isolation_types = ['VLoose', 'Loose', 'Medium', 'Tight']
100 # Now build the sequences that apply PU corrections
101 
102 # Make Delta Beta corrections (on SumPt quantity)
103 hpsPFTauDiscriminationByVLooseIsolationDBSumPtCorr = hpsPFTauDiscriminationByVLooseIsolation.clone(
104  deltaBetaPUTrackPtCutOverride = cms.double(0.5),
105  applyDeltaBetaCorrection = True,
106  isoConeSizeForDeltaBeta = 0.8,
107  deltaBetaFactor = "%0.4f"%(0.0123/0.1687),
108  applyOccupancyCut = False,
109  applySumPtCut = True,
110 )
111 hpsPFTauDiscriminationByVLooseIsolationDBSumPtCorr.maximumSumPtCut=hpsPFTauDiscriminationByVLooseIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minGammaEt
112 
113 hpsPFTauDiscriminationByLooseIsolationDBSumPtCorr = hpsPFTauDiscriminationByLooseIsolation.clone(
114  deltaBetaPUTrackPtCutOverride = cms.double(0.5),
115  applyDeltaBetaCorrection = True,
116  isoConeSizeForDeltaBeta = 0.8,
117  deltaBetaFactor = "%0.4f"%(0.0123/0.1687),
118  applyOccupancyCut = False,
119  applySumPtCut = True,
120 )
121 hpsPFTauDiscriminationByLooseIsolationDBSumPtCorr.maximumSumPtCut=hpsPFTauDiscriminationByLooseIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minGammaEt
122 
123 hpsPFTauDiscriminationByMediumIsolationDBSumPtCorr = hpsPFTauDiscriminationByMediumIsolation.clone(
124  deltaBetaPUTrackPtCutOverride = cms.double(0.5),
125  applyDeltaBetaCorrection = True,
126  isoConeSizeForDeltaBeta = 0.8,
127  deltaBetaFactor = "%0.4f"%(0.0462/0.1687),
128  applyOccupancyCut = False,
129  applySumPtCut = True,
130 )
131 hpsPFTauDiscriminationByMediumIsolationDBSumPtCorr.maximumSumPtCut=hpsPFTauDiscriminationByMediumIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minGammaEt
132 
133 hpsPFTauDiscriminationByTightIsolationDBSumPtCorr = hpsPFTauDiscriminationByTightIsolation.clone(
134  deltaBetaPUTrackPtCutOverride = cms.double(0.5),
135  applyDeltaBetaCorrection = True,
136  isoConeSizeForDeltaBeta = 0.8,
137  deltaBetaFactor = "%0.4f"%(ak5dBetaCorrection),
138  applyOccupancyCut = False,
139  applySumPtCut = True,
140 )
141 hpsPFTauDiscriminationByTightIsolationDBSumPtCorr.maximumSumPtCut=hpsPFTauDiscriminationByTightIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minGammaEt
142 
143 hpsPFTauDiscriminationByIsolationSeqDBSumPtCorr = cms.Sequence(
144  hpsPFTauDiscriminationByVLooseIsolationDBSumPtCorr*
145  hpsPFTauDiscriminationByLooseIsolationDBSumPtCorr*
146  hpsPFTauDiscriminationByMediumIsolationDBSumPtCorr*
147  hpsPFTauDiscriminationByTightIsolationDBSumPtCorr
148 )
149 
150 hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr = hpsPFTauDiscriminationByVLooseIsolationDBSumPtCorr.clone(
151  ApplyDiscriminationByTrackerIsolation = True,
152  ApplyDiscriminationByECALIsolation = True,
153  deltaBetaFactor = "%0.4f"%((0.09/0.25)*(ak5dBetaCorrection)),
154  applyOccupancyCut = False,
155  applySumPtCut = True,
156  maximumSumPtCut = 3.0,
157  Prediscriminants = requireDecayMode.clone()
158 )
159 hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minTrackPt = 0.5
160 hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minGammaEt = 0.5
161 
162 hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr = hpsPFTauDiscriminationByLooseIsolationDBSumPtCorr.clone(
163  ApplyDiscriminationByTrackerIsolation = True,
164  ApplyDiscriminationByECALIsolation = True,
165  deltaBetaFactor = "%0.4f"%(ak5dBetaCorrection),
166  applyOccupancyCut = False,
167  applySumPtCut = True,
168  maximumSumPtCut = 2.0,
169  Prediscriminants = requireDecayMode.clone()
170 )
171 hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minTrackPt = 0.5
172 hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minGammaEt = 0.5
173 
174 hpsPFTauDiscriminationByRawCombinedIsolationDBSumPtCorr = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr.clone(
175  applySumPtCut = False,
176  storeRawSumPt = cms.bool(True)
177 )
178 
179 hpsPFTauDiscriminationByRawChargedIsolationDBSumPtCorr = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr.clone(
180  applySumPtCut = False,
181  ApplyDiscriminationByECALIsolation = False,
182  storeRawSumPt = cms.bool(True)
183 )
184 
185 hpsPFTauDiscriminationByRawGammaIsolationDBSumPtCorr = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr.clone(
186  applySumPtCut = False,
187  ApplyDiscriminationByTrackerIsolation = False,
188  storeRawSumPt = cms.bool(True)
189 )
190 
191 hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr = hpsPFTauDiscriminationByMediumIsolationDBSumPtCorr.clone(
192  ApplyDiscriminationByTrackerIsolation = True,
193  ApplyDiscriminationByECALIsolation = True,
194  deltaBetaFactor = "%0.4f"%(ak5dBetaCorrection),
195  applyOccupancyCut = False,
196  applySumPtCut = True,
197  maximumSumPtCut = 1.0,
198  Prediscriminants = requireDecayMode.clone()
199 )
200 hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minTrackPt = 0.5
201 hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minGammaEt = 0.5
202 
203 hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr = hpsPFTauDiscriminationByTightIsolationDBSumPtCorr.clone(
204  ApplyDiscriminationByTrackerIsolation = True,
205  ApplyDiscriminationByECALIsolation = True,
206  deltaBetaFactor = "%0.4f"%(ak5dBetaCorrection),
207  applyOccupancyCut = False,
208  applySumPtCut = True,
209  maximumSumPtCut = 0.8,
210  Prediscriminants = requireDecayMode.clone()
211 )
212 hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minTrackPt = 0.5
213 hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minGammaEt = 0.5
214 
215 hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr = cms.Sequence(
216  hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr*
217  hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr*
218  hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr*
219  hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr
220 )
221 
222 #Charge isolation based on combined isolation
223 hpsPFTauDiscriminationByVLooseChargedIsolation = hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr.clone(
224  ApplyDiscriminationByECALIsolation = False
225 )
226 
227 hpsPFTauDiscriminationByLooseChargedIsolation = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr.clone(
228  ApplyDiscriminationByECALIsolation = False
229 )
230 
231 hpsPFTauDiscriminationByMediumChargedIsolation = hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr.clone(
232  ApplyDiscriminationByECALIsolation = False
233 )
234 hpsPFTauDiscriminationByTightChargedIsolation = hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr.clone(
235  ApplyDiscriminationByECALIsolation = False
236 )
237 
238 hpsPFTauDiscriminationByChargedIsolationSeq = cms.Sequence(
239  hpsPFTauDiscriminationByVLooseChargedIsolation*
240  hpsPFTauDiscriminationByLooseChargedIsolation*
241  hpsPFTauDiscriminationByMediumChargedIsolation*
242  hpsPFTauDiscriminationByTightChargedIsolation
243 )
244 
245 #copying discriminator against electrons and muons
246 hpsPFTauDiscriminationByLooseElectronRejection = pfRecoTauDiscriminationAgainstElectron.clone(
247  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
248  Prediscriminants = noPrediscriminants,
249  PFElectronMVA_maxValue = cms.double(0.6)
250 )
251 hpsPFTauDiscriminationByMediumElectronRejection = pfRecoTauDiscriminationAgainstElectron.clone(
252  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
253  Prediscriminants = noPrediscriminants,
254  ApplyCut_EcalCrackCut = cms.bool(True)
255 )
256 hpsPFTauDiscriminationByTightElectronRejection = pfRecoTauDiscriminationAgainstElectron.clone(
257  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
258  Prediscriminants = noPrediscriminants,
259  ApplyCut_EcalCrackCut = cms.bool(True),
260  ApplyCut_BremCombined = cms.bool(True)
261 )
262 
263 hpsPFTauDiscriminationByLooseMuonRejection = pfRecoTauDiscriminationAgainstMuon.clone(
264  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
265  Prediscriminants = noPrediscriminants
266 )
267 hpsPFTauDiscriminationByMediumMuonRejection = pfRecoTauDiscriminationAgainstMuon.clone(
268  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
269  Prediscriminants = noPrediscriminants,
270  discriminatorOption = cms.string('noAllArbitrated')
271 )
272 hpsPFTauDiscriminationByTightMuonRejection = pfRecoTauDiscriminationAgainstMuon.clone(
273  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
274  Prediscriminants = noPrediscriminants,
275  discriminatorOption = cms.string('noAllArbitratedWithHOP')
276 )
277 
278 hpsPFTauDiscriminationByLooseMuonRejection2 = pfRecoTauDiscriminationAgainstMuon2.clone(
279  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
280  Prediscriminants = noPrediscriminants
281 )
282 hpsPFTauDiscriminationByMediumMuonRejection2 = pfRecoTauDiscriminationAgainstMuon2.clone(
283  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
284  Prediscriminants = noPrediscriminants,
285  discriminatorOption = cms.string('medium')
286 )
287 hpsPFTauDiscriminationByTightMuonRejection2 = pfRecoTauDiscriminationAgainstMuon2.clone(
288  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
289  Prediscriminants = noPrediscriminants,
290  discriminatorOption = cms.string('tight')
291 )
292 
293 hpsPFTauDiscriminationByLooseMuonRejection3 = pfRecoTauDiscriminationAgainstMuon2.clone(
294  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
295  Prediscriminants = noPrediscriminants,
296  discriminatorOption = cms.string('custom'),
297  maxNumberOfMatches = cms.int32(1),
298  doCaloMuonVeto = cms.bool(True),
299  maxNumberOfHitsLast2Stations = cms.int32(-1)
300 )
301 hpsPFTauDiscriminationByTightMuonRejection3 = hpsPFTauDiscriminationByLooseMuonRejection3.clone(
302  maxNumberOfHitsLast2Stations = cms.int32(0)
303 )
304 
305 hpsPFTauDiscriminationByMVArawMuonRejection = pfRecoTauDiscriminationAgainstMuonMVA.clone(
306  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
307  Prediscriminants = requireDecayMode.clone(),
308  loadMVAfromDB = cms.bool(True),
309  returnMVA = cms.bool(True),
310  mvaName = cms.string("RecoTauTag_againstMuonMVAv1")
311 )
312 ##hpsPFTauDiscriminationByMVALooseMuonRejection = hpsPFTauDiscriminationByMVArawMuonRejection.clone(
313 ## returnMVA = cms.bool(False),
314 ## mvaMin = cms.double(0.75)
315 ##)
316 ##hpsPFTauDiscriminationByMVAMediumMuonRejection = hpsPFTauDiscriminationByMVALooseMuonRejection.clone(
317 ## mvaMin = cms.double(0.950)
318 ##)
319 ##hpsPFTauDiscriminationByMVATightMuonRejection = hpsPFTauDiscriminationByMVALooseMuonRejection.clone(
320 ## mvaMin = cms.double(0.975)
321 ##)
322 hpsPFTauDiscriminationByMVALooseMuonRejection = recoTauDiscriminantCutMultiplexer.clone(
323  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
324  Prediscriminants = requireDecayMode.clone(),
325  toMultiplex = cms.InputTag('hpsPFTauDiscriminationByMVArawMuonRejection'),
326  key = cms.InputTag('hpsPFTauDiscriminationByMVArawMuonRejection:category'),
327  loadMVAfromDB = cms.bool(True),
328  mvaOutput_normalization = cms.string("RecoTauTag_againstMuonMVAv1_mvaOutput_normalization"),
329  mapping = cms.VPSet(
330  cms.PSet(
331  category = cms.uint32(0),
332  cut = cms.string("RecoTauTag_againstMuonMVAv1_WPeff99_5"),
333  variable = cms.string("pt")
334  )
335  )
336 )
337 hpsPFTauDiscriminationByMVAMediumMuonRejection = hpsPFTauDiscriminationByMVALooseMuonRejection.clone()
338 hpsPFTauDiscriminationByMVAMediumMuonRejection.mapping[0].cut = cms.string("RecoTauTag_againstMuonMVAv1_WPeff99_0")
339 hpsPFTauDiscriminationByMVATightMuonRejection = hpsPFTauDiscriminationByMVALooseMuonRejection.clone()
340 hpsPFTauDiscriminationByMVATightMuonRejection.mapping[0].cut = cms.string("RecoTauTag_againstMuonMVAv1_WPeff98_0")
341 
342 hpsPFTauDiscriminationByMVA5rawElectronRejection = pfRecoTauDiscriminationAgainstElectronMVA5.clone(
343  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
344  Prediscriminants = requireDecayMode.clone(),
345  loadMVAfromDB = cms.bool(True),
346  mvaName_NoEleMatch_woGwoGSF_BL = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_BL"),
347  mvaName_NoEleMatch_woGwGSF_BL = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_BL"),
348  mvaName_NoEleMatch_wGwoGSF_BL = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_BL"),
349  mvaName_NoEleMatch_wGwGSF_BL = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_BL"),
350  mvaName_woGwoGSF_BL = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_BL"),
351  mvaName_woGwGSF_BL = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_BL"),
352  mvaName_wGwoGSF_BL = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_BL"),
353  mvaName_wGwGSF_BL = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_BL"),
354  mvaName_NoEleMatch_woGwoGSF_EC = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_EC"),
355  mvaName_NoEleMatch_woGwGSF_EC = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_EC"),
356  mvaName_NoEleMatch_wGwoGSF_EC = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_EC"),
357  mvaName_NoEleMatch_wGwGSF_EC = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_EC"),
358  mvaName_woGwoGSF_EC = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_EC"),
359  mvaName_woGwGSF_EC = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_EC"),
360  mvaName_wGwoGSF_EC = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_EC"),
361  mvaName_wGwGSF_EC = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_EC")
362 )
363 
364 hpsPFTauDiscriminationByMVA5VLooseElectronRejection = recoTauDiscriminantCutMultiplexer.clone(
365  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
366  Prediscriminants = requireDecayMode.clone(),
367  toMultiplex = cms.InputTag('hpsPFTauDiscriminationByMVA5rawElectronRejection'),
368  key = cms.InputTag('hpsPFTauDiscriminationByMVA5rawElectronRejection:category'),
369  loadMVAfromDB = cms.bool(True),
370  mapping = cms.VPSet(
371  cms.PSet(
372  category = cms.uint32(0), # minMVANoEleMatchWOgWOgsfBL
373  cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_BL_WPeff99"),
374  variable = cms.string("pt")
375  ),
376  cms.PSet(
377  category = cms.uint32(1), # minMVANoEleMatchWOgWgsfBL
378  cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_BL_WPeff99"),
379  variable = cms.string("pt")
380  ),
381  cms.PSet(
382  category = cms.uint32(2), # minMVANoEleMatchWgWOgsfBL
383  cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_BL_WPeff99"),
384  variable = cms.string("pt")
385  ),
386  cms.PSet(
387  category = cms.uint32(3), # minMVANoEleMatchWgWgsfBL
388  cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_BL_WPeff99"),
389  variable = cms.string("pt")
390  ),
391  cms.PSet(
392  category = cms.uint32(4), # minMVAWOgWOgsfBL
393  cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_BL_WPeff99"),
394  variable = cms.string("pt")
395  ),
396  cms.PSet(
397  category = cms.uint32(5), # minMVAWOgWgsfBL
398  cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_BL_WPeff99"),
399  variable = cms.string("pt")
400  ),
401  cms.PSet(
402  category = cms.uint32(6), # minMVAWgWOgsfBL
403  cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_BL_WPeff99"),
404  variable = cms.string("pt")
405  ),
406  cms.PSet(
407  category = cms.uint32(7), # minMVAWgWgsfBL
408  cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_BL_WPeff99"),
409  variable = cms.string("pt")
410  ),
411  cms.PSet(
412  category = cms.uint32(8), # minMVANoEleMatchWOgWOgsfEC
413  cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_EC_WPeff99"),
414  variable = cms.string("pt")
415  ),
416  cms.PSet(
417  category = cms.uint32(9), # minMVANoEleMatchWOgWgsfEC
418  cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_EC_WPeff99"),
419  variable = cms.string("pt")
420  ),
421  cms.PSet(
422  category = cms.uint32(10), # minMVANoEleMatchWgWOgsfEC
423  cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_EC_WPeff99"),
424  variable = cms.string("pt")
425  ),
426  cms.PSet(
427  category = cms.uint32(11), # minMVANoEleMatchWgWgsfEC
428  cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_EC_WPeff99"),
429  variable = cms.string("pt")
430  ),
431  cms.PSet(
432  category = cms.uint32(12), # minMVAWOgWOgsfEC
433  cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_EC_WPeff99"),
434  variable = cms.string("pt")
435  ),
436  cms.PSet(
437  category = cms.uint32(13), # minMVAWOgWgsfEC
438  cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_EC_WPeff99"),
439  variable = cms.string("pt")
440  ),
441  cms.PSet(
442  category = cms.uint32(14), # minMVAWgWOgsfEC
443  cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_EC_WPeff99"),
444  variable = cms.string("pt")
445  ),
446  cms.PSet(
447  category = cms.uint32(15), # minMVAWgWgsfEC
448  cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_EC_WPeff99"),
449  variable = cms.string("pt")
450  )
451  )
452 )
453 
454 hpsPFTauDiscriminationByMVA5LooseElectronRejection = copy.deepcopy(hpsPFTauDiscriminationByMVA5VLooseElectronRejection)
455 hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_BL_WPeff96")
456 hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_BL_WPeff96")
457 hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_BL_WPeff96")
458 hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_BL_WPeff96")
459 hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_BL_WPeff96")
460 hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_BL_WPeff96")
461 hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_BL_WPeff96")
462 hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_BL_WPeff96")
463 hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[8].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_EC_WPeff96")
464 hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[9].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_EC_WPeff96")
465 hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[10].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_EC_WPeff96")
466 hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[11].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_EC_WPeff96")
467 hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[12].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_EC_WPeff96")
468 hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[13].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_EC_WPeff96")
469 hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[14].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_EC_WPeff96")
470 hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[15].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_EC_WPeff96")
471 
472 hpsPFTauDiscriminationByMVA5MediumElectronRejection = copy.deepcopy(hpsPFTauDiscriminationByMVA5VLooseElectronRejection)
473 hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_BL_WPeff91")
474 hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_BL_WPeff91")
475 hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_BL_WPeff91")
476 hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_BL_WPeff91")
477 hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_BL_WPeff91")
478 hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_BL_WPeff91")
479 hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_BL_WPeff91")
480 hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_BL_WPeff91")
481 hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[8].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_EC_WPeff91")
482 hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[9].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_EC_WPeff91")
483 hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[10].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_EC_WPeff91")
484 hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[11].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_EC_WPeff91")
485 hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[12].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_EC_WPeff91")
486 hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[13].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_EC_WPeff91")
487 hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[14].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_EC_WPeff91")
488 hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[15].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_EC_WPeff91")
489 
490 hpsPFTauDiscriminationByMVA5TightElectronRejection = copy.deepcopy(hpsPFTauDiscriminationByMVA5VLooseElectronRejection)
491 hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_BL_WPeff85")
492 hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_BL_WPeff85")
493 hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_BL_WPeff85")
494 hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_BL_WPeff85")
495 hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_BL_WPeff85")
496 hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_BL_WPeff85")
497 hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_BL_WPeff85")
498 hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_BL_WPeff85")
499 hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[8].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_EC_WPeff85")
500 hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[9].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_EC_WPeff85")
501 hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[10].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_EC_WPeff85")
502 hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[11].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_EC_WPeff85")
503 hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[12].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_EC_WPeff85")
504 hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[13].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_EC_WPeff85")
505 hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[14].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_EC_WPeff85")
506 hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[15].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_EC_WPeff85")
507 
508 hpsPFTauDiscriminationByMVA5VTightElectronRejection = copy.deepcopy(hpsPFTauDiscriminationByMVA5VLooseElectronRejection)
509 hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_BL_WPeff79")
510 hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_BL_WPeff79")
511 hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_BL_WPeff79")
512 hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_BL_WPeff79")
513 hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_BL_WPeff79")
514 hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_BL_WPeff79")
515 hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_BL_WPeff79")
516 hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_BL_WPeff79")
517 hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[8].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_EC_WPeff79")
518 hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[9].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_EC_WPeff79")
519 hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[10].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_EC_WPeff79")
520 hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[11].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_EC_WPeff79")
521 hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[12].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_EC_WPeff79")
522 hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[13].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_EC_WPeff79")
523 hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[14].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_EC_WPeff79")
524 hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[15].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_EC_WPeff79")
525 
526 hpsPFTauDiscriminationByDeadECALElectronRejection = pfRecoTauDiscriminationAgainstElectronDeadECAL.clone(
527  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
528  Prediscriminants = requireDecayMode.clone()
529 )
530 
531 #Define new sequence that is using smaller number on hits cut
532 hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr.clone()
533 hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits = hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr.clone()
534 hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits = hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr.clone()
535 
536 hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits.qualityCuts.isolationQualityCuts.minTrackHits = cms.uint32(3)
537 hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits.qualityCuts.isolationQualityCuts.minTrackHits = cms.uint32(3)
538 hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits.qualityCuts.isolationQualityCuts.minTrackHits = cms.uint32(3)
539 
540 hpsPFTauDiscriminationByRawCombinedIsolationDBSumPtCorr3Hits = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits.clone(
541  applySumPtCut = False,
542  storeRawSumPt = cms.bool(True)
543 )
544 
545 hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr3Hits = cms.Sequence(
546  hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits*
547  hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits*
548  hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits*
549  hpsPFTauDiscriminationByRawCombinedIsolationDBSumPtCorr3Hits
550 )
551 
552 # Define the HPS selection discriminator used in cleaning
553 hpsSelectionDiscriminator.PFTauProducer = cms.InputTag("combinatoricRecoTaus")
554 
555 from RecoTauTag.RecoTau.RecoTauCleaner_cfi import RecoTauCleaner
556 hpsPFTauProducerSansRefs=RecoTauCleaner.clone(
557  src=cms.InputTag("combinatoricRecoTaus")
558 )
559 
560 
561 from RecoTauTag.RecoTau.RecoTauPiZeroUnembedder_cfi import RecoTauPiZeroUnembedder
562 hpsPFTauProducer=RecoTauPiZeroUnembedder.clone(
563  src = cms.InputTag("hpsPFTauProducerSansRefs")
564 )
565 
566 
570 hpsPFTauPrimaryVertexProducer = PFTauPrimaryVertexProducer.clone(
571  PFTauTag = cms.InputTag("hpsPFTauProducer"),
572  ElectronTag = cms.InputTag(""),
573  MuonTag = cms.InputTag(""),
574  PVTag = cms.InputTag("offlinePrimaryVertices"),
575  beamSpot = cms.InputTag("offlineBeamSpot"),
576  TrackCollectionTag = cms.InputTag("generalTracks"),
577  Algorithm = cms.int32(1),
578  useBeamSpot = cms.bool(True),
579  RemoveMuonTracks = cms.bool(False),
580  RemoveElectronTracks = cms.bool(False),
581  useSelectedTaus = cms.bool(False),
582  discriminators = cms.VPSet(
583  cms.PSet(
584  discriminator = cms.InputTag('hpsPFTauDiscriminationByDecayModeFindingNewDMs'),
585  selectionCut = cms.double(0.5)
586  )
587  ),
588  cut = cms.string("pt > 18.0 & abs(eta) < 2.4")
589 )
590 
591 hpsPFTauSecondaryVertexProducer = PFTauSecondaryVertexProducer.clone(
592  PFTauTag = cms.InputTag("hpsPFTauProducer")
593 )
594 hpsPFTauTransverseImpactParameters = PFTauTransverseImpactParameters.clone(
595  PFTauTag = cms.InputTag("hpsPFTauProducer"),
596  PFTauPVATag = cms.InputTag("hpsPFTauPrimaryVertexProducer"),
597  PFTauSVATag = cms.InputTag("hpsPFTauSecondaryVertexProducer"),
598  useFullCalculation = cms.bool(False)
599 )
600 hpsPFTauVertexAndImpactParametersSeq = cms.Sequence(
601  hpsPFTauPrimaryVertexProducer*
602  hpsPFTauSecondaryVertexProducer*
603  hpsPFTauTransverseImpactParameters
604 )
605 
607 hpsPFTauMVA3IsolationChargedIsoPtSum = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits.clone(
608  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
609  Prediscriminants = requireDecayMode.clone(),
610  ApplyDiscriminationByECALIsolation = cms.bool(False),
611  ApplyDiscriminationByTrackerIsolation = cms.bool(True),
612  applySumPtCut = cms.bool(False),
613  applyDeltaBetaCorrection = cms.bool(False),
614  storeRawSumPt = cms.bool(True),
615  storeRawPUsumPt = cms.bool(False),
616  customOuterCone = PFRecoTauPFJetInputs.isolationConeSize,
617  isoConeSizeForDeltaBeta = cms.double(0.8),
618  verbosity = cms.int32(0)
619 )
620 hpsPFTauMVA3IsolationNeutralIsoPtSum = hpsPFTauMVA3IsolationChargedIsoPtSum.clone(
621  ApplyDiscriminationByECALIsolation = cms.bool(True),
622  ApplyDiscriminationByTrackerIsolation = cms.bool(False),
623  verbosity = cms.int32(0)
624 )
625 hpsPFTauMVA3IsolationPUcorrPtSum = hpsPFTauMVA3IsolationChargedIsoPtSum.clone(
626  ApplyDiscriminationByECALIsolation = cms.bool(False),
627  ApplyDiscriminationByTrackerIsolation = cms.bool(False),
628  applyDeltaBetaCorrection = cms.bool(True),
629  storeRawSumPt = cms.bool(False),
630  storeRawPUsumPt = cms.bool(True),
631  verbosity = cms.int32(0)
632 )
633 hpsPFTauMVA3IsolationNeutralIsoPtSumWeight = hpsPFTauMVA3IsolationChargedIsoPtSum.clone(
634  ApplyDiscriminationByWeightedECALIsolation = cms.bool(True),
635  ApplyDiscriminationByTrackerIsolation = cms.bool(False),
636  UseAllPFCandsForWeights = cms.bool(True),
637  verbosity = cms.int32(0)
638 )
639 
640 hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw = discriminationByIsolationMVA2raw.clone(
641  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
642  Prediscriminants = requireDecayMode.clone(),
643  loadMVAfromDB = cms.bool(True),
644  mvaName = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1"),
645  mvaOpt = cms.string("oldDMwoLT"),
646  srcTauTransverseImpactParameters = cms.InputTag('hpsPFTauTransverseImpactParameters'),
647  srcChargedIsoPtSum = cms.InputTag('hpsPFTauMVA3IsolationChargedIsoPtSum'),
648  srcNeutralIsoPtSum = cms.InputTag('hpsPFTauMVA3IsolationNeutralIsoPtSum'),
649  srcPUcorrPtSum = cms.InputTag('hpsPFTauMVA3IsolationPUcorrPtSum'),
650  verbosity = cms.int32(0)
651 )
652 hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT = discriminationByIsolationMVA2VLoose.clone(
653  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
654  Prediscriminants = requireDecayMode.clone(),
655  toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw'),
656  key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw:category'),
657  loadMVAfromDB = cms.bool(True),
658  mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_mvaOutput_normalization"),
659  mapping = cms.VPSet(
660  cms.PSet(
661  category = cms.uint32(0),
662  cut = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_WPEff90"),
663  variable = cms.string("pt")
664  )
665  )
666 )
667 hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone()
668 hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_WPEff80")
669 hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone()
670 hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_WPEff70")
671 hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone()
672 hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_WPEff60")
673 hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone()
674 hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_WPEff50")
675 hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone()
676 hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_WPEff40")
677 hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw = hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw.clone(
678  mvaName = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1"),
679  mvaOpt = cms.string("oldDMwLT"),
680  verbosity = cms.int32(0)
681 )
682 hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone(
683  toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw'),
684  key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw:category'),
685  mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_mvaOutput_normalization"),
686  mapping = cms.VPSet(
687  cms.PSet(
688  category = cms.uint32(0),
689  cut = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_WPEff90"),
690  variable = cms.string("pt")
691  )
692  )
693 )
694 hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT.clone()
695 hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_WPEff80")
696 hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT.clone()
697 hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_WPEff70")
698 hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT.clone()
699 hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_WPEff60")
700 hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT.clone()
701 hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_WPEff50")
702 hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT.clone()
703 hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_WPEff40")
704 hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw = hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw.clone(
705  mvaName = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1"),
706  mvaOpt = cms.string("newDMwoLT"),
707  verbosity = cms.int32(0)
708 )
709 hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone(
710  toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw'),
711  key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw:category'),
712  mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_mvaOutput_normalization"),
713  mapping = cms.VPSet(
714  cms.PSet(
715  category = cms.uint32(0),
716  cut = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_WPEff90"),
717  variable = cms.string("pt")
718  )
719  ),
720  verbosity = cms.int32(0)
721 )
722 hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT.clone()
723 hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_WPEff80")
724 ##hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT.verbosity = cms.int32(1)
725 hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT.clone()
726 hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_WPEff70")
727 hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT.clone()
728 hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_WPEff60")
729 hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT.clone()
730 hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_WPEff50")
731 hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT.clone()
732 hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_WPEff40")
733 hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw = hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw.clone(
734  mvaName = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1"),
735  mvaOpt = cms.string("newDMwLT"),
736  verbosity = cms.int32(0)
737 )
738 hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone(
739  toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw'),
740  key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw:category'),
741  mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_mvaOutput_normalization"),
742  mapping = cms.VPSet(
743  cms.PSet(
744  category = cms.uint32(0),
745  cut = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_WPEff90"),
746  variable = cms.string("pt")
747  )
748  )
749 )
750 hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT.clone()
751 hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_WPEff80")
752 hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT.clone()
753 hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_WPEff70")
754 hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT.clone()
755 hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_WPEff60")
756 hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT.clone()
757 hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_WPEff50")
758 hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT.clone()
759 hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_WPEff40")
760 
761 
762 hpsPFTauMVAIsolation2Seq = cms.Sequence(
763  hpsPFTauMVA3IsolationChargedIsoPtSum
764  + hpsPFTauMVA3IsolationNeutralIsoPtSum
765  + hpsPFTauMVA3IsolationPUcorrPtSum
766  + hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw
767  + hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT
768  + hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwoLT
769  + hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwoLT
770  + hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT
771  + hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT
772  + hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT
773  + hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw
774  + hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT
775  + hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT
776  + hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT
777  + hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT
778  + hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT
779  + hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT
780  + hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw
781  + hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT
782  + hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT
783  + hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT
784  + hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT
785  + hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT
786  + hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT
787  + hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw
788  + hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT
789  + hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT
790  + hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT
791  + hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT
792  + hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT
793  + hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT
794 )
795 
796 produceHPSPFTaus = cms.Sequence(
797  hpsSelectionDiscriminator
798  #*hpsTightIsolationCleaner
799  #*hpsMediumIsolationCleaner
800  #*hpsLooseIsolationCleaner
801  #*hpsVLooseIsolationCleaner
802  *hpsPFTauProducerSansRefs
803  *hpsPFTauProducer
804 )
805 
806 produceAndDiscriminateHPSPFTaus = cms.Sequence(
807  produceHPSPFTaus*
808  hpsPFTauDiscriminationByDecayModeFindingNewDMs*
809  hpsPFTauDiscriminationByDecayModeFindingOldDMs*
810  hpsPFTauDiscriminationByDecayModeFinding* # CV: kept for backwards compatibility
811  hpsPFTauDiscriminationByChargedIsolationSeq*
812  hpsPFTauDiscriminationByIsolationSeq*
813  #hpsPFTauDiscriminationByIsolationSeqRhoCorr*
814  #hpsPFTauDiscriminationByIsolationSeqCustomRhoCorr*
815  hpsPFTauDiscriminationByIsolationSeqDBSumPtCorr*
816 
817  hpsPFTauDiscriminationByRawCombinedIsolationDBSumPtCorr*
818  hpsPFTauDiscriminationByRawChargedIsolationDBSumPtCorr*
819  hpsPFTauDiscriminationByRawGammaIsolationDBSumPtCorr*
820 
821  hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr*
822  hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr3Hits*
823 
824  hpsPFTauDiscriminationByLooseElectronRejection*
825  hpsPFTauDiscriminationByMediumElectronRejection*
826  hpsPFTauDiscriminationByTightElectronRejection*
827  hpsPFTauDiscriminationByMVA5rawElectronRejection*
828  hpsPFTauDiscriminationByMVA5VLooseElectronRejection*
829  hpsPFTauDiscriminationByMVA5LooseElectronRejection*
830  hpsPFTauDiscriminationByMVA5MediumElectronRejection*
831  hpsPFTauDiscriminationByMVA5TightElectronRejection*
832  hpsPFTauDiscriminationByMVA5VTightElectronRejection*
833  hpsPFTauDiscriminationByDeadECALElectronRejection*
834  hpsPFTauDiscriminationByLooseMuonRejection*
835  hpsPFTauDiscriminationByMediumMuonRejection*
836  hpsPFTauDiscriminationByTightMuonRejection*
837  hpsPFTauDiscriminationByLooseMuonRejection2*
838  hpsPFTauDiscriminationByMediumMuonRejection2*
839  hpsPFTauDiscriminationByTightMuonRejection2*
840  hpsPFTauDiscriminationByLooseMuonRejection3*
841  hpsPFTauDiscriminationByTightMuonRejection3*
842  hpsPFTauDiscriminationByMVArawMuonRejection*
843  hpsPFTauDiscriminationByMVALooseMuonRejection*
844  hpsPFTauDiscriminationByMVAMediumMuonRejection*
845  hpsPFTauDiscriminationByMVATightMuonRejection*
846 
847  hpsPFTauVertexAndImpactParametersSeq*
848 
849  hpsPFTauMVAIsolation2Seq
850 )