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 # Select those taus that pass the HPS selections
32 # - pt > 15, mass cuts, tauCone cut
33 from RecoTauTag.RecoTau.PFRecoTauDiscriminationByHPSSelection_cfi import hpsSelectionDiscriminator, decayMode_1Prong0Pi0, decayMode_1Prong1Pi0, decayMode_1Prong2Pi0, decayMode_3Prong0Pi0
34 hpsPFTauDiscriminationByDecayModeFindingNewDMs = hpsSelectionDiscriminator.clone(
35  PFTauProducer = cms.InputTag('hpsPFTauProducer')
36 )
37 hpsPFTauDiscriminationByDecayModeFindingOldDMs = hpsSelectionDiscriminator.clone(
38  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
39  decayModes = cms.VPSet(
40  decayMode_1Prong0Pi0,
41  decayMode_1Prong1Pi0,
42  decayMode_1Prong2Pi0,
43  decayMode_3Prong0Pi0
44  ),
45  requireTauChargedHadronsToBeChargedPFCands = cms.bool(True)
46 )
47 hpsPFTauDiscriminationByDecayModeFinding = hpsPFTauDiscriminationByDecayModeFindingOldDMs.clone() # CV: kept for backwards compatibility
48 
49 # Define decay mode prediscriminant
50 requireDecayMode = cms.PSet(
51  BooleanOperator = cms.string("and"),
52  decayMode = cms.PSet(
53  Producer = cms.InputTag('hpsPFTauDiscriminationByDecayModeFindingNewDMs'),
54  cut = cms.double(0.5)
55  )
56 )
57 
58 #Building the prototype for the Discriminator by Isolation
59 hpsPFTauDiscriminationByLooseIsolation = pfRecoTauDiscriminationByIsolation.clone(
60  PFTauProducer = cms.InputTag("hpsPFTauProducer"),
61  Prediscriminants = requireDecayMode.clone(),
62  ApplyDiscriminationByTrackerIsolation = False,
63  ApplyDiscriminationByECALIsolation = True,
64  applyOccupancyCut = True
65 )
66 hpsPFTauDiscriminationByLooseIsolation.Prediscriminants.preIso = cms.PSet(
67  Producer = cms.InputTag("hpsPFTauDiscriminationByLooseChargedIsolation"),
68  cut = cms.double(0.5))
69 
70 # Make an even looser discriminator
71 hpsPFTauDiscriminationByVLooseIsolation = hpsPFTauDiscriminationByLooseIsolation.clone(
72  customOuterCone = cms.double(0.3),
73  isoConeSizeForDeltaBeta = cms.double(0.3),
74 )
75 hpsPFTauDiscriminationByVLooseIsolation.qualityCuts.isolationQualityCuts.minTrackPt = 1.5
76 hpsPFTauDiscriminationByVLooseIsolation.qualityCuts.isolationQualityCuts.minGammaEt = 2.0
77 hpsPFTauDiscriminationByVLooseIsolation.Prediscriminants.preIso.Producer = cms.InputTag("hpsPFTauDiscriminationByVLooseChargedIsolation")
78 
79 hpsPFTauDiscriminationByMediumIsolation = hpsPFTauDiscriminationByLooseIsolation.clone()
80 hpsPFTauDiscriminationByMediumIsolation.qualityCuts.isolationQualityCuts.minTrackPt = 0.8
81 hpsPFTauDiscriminationByMediumIsolation.qualityCuts.isolationQualityCuts.minGammaEt = 0.8
82 hpsPFTauDiscriminationByMediumIsolation.Prediscriminants.preIso.Producer = cms.InputTag("hpsPFTauDiscriminationByMediumChargedIsolation")
83 
84 hpsPFTauDiscriminationByTightIsolation = hpsPFTauDiscriminationByLooseIsolation.clone()
85 hpsPFTauDiscriminationByTightIsolation.qualityCuts.isolationQualityCuts.minTrackPt = 0.5
86 hpsPFTauDiscriminationByTightIsolation.qualityCuts.isolationQualityCuts.minGammaEt = 0.5
87 hpsPFTauDiscriminationByTightIsolation.Prediscriminants.preIso.Producer = cms.InputTag("hpsPFTauDiscriminationByTightChargedIsolation")
88 
89 hpsPFTauDiscriminationByIsolationSeq = cms.Sequence(
90  hpsPFTauDiscriminationByVLooseIsolation*
91  hpsPFTauDiscriminationByLooseIsolation*
92  hpsPFTauDiscriminationByMediumIsolation*
93  hpsPFTauDiscriminationByTightIsolation
94 )
95 
96 _isolation_types = ['VLoose', 'Loose', 'Medium', 'Tight']
97 # Now build the sequences that apply PU corrections
98 
99 # Make Delta Beta corrections (on SumPt quantity)
100 hpsPFTauDiscriminationByVLooseIsolationDBSumPtCorr = hpsPFTauDiscriminationByVLooseIsolation.clone(
101  deltaBetaPUTrackPtCutOverride = cms.double(0.5),
102  applyDeltaBetaCorrection = True,
103  isoConeSizeForDeltaBeta = 0.8,
104  deltaBetaFactor = "%0.4f"%(0.0123/0.1687),
105  applyOccupancyCut = False,
106  applySumPtCut = True,
107 )
108 hpsPFTauDiscriminationByVLooseIsolationDBSumPtCorr.maximumSumPtCut=hpsPFTauDiscriminationByVLooseIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minGammaEt
109 
110 hpsPFTauDiscriminationByLooseIsolationDBSumPtCorr = hpsPFTauDiscriminationByLooseIsolation.clone(
111  deltaBetaPUTrackPtCutOverride = cms.double(0.5),
112  applyDeltaBetaCorrection = True,
113  isoConeSizeForDeltaBeta = 0.8,
114  deltaBetaFactor = "%0.4f"%(0.0123/0.1687),
115  applyOccupancyCut = False,
116  applySumPtCut = True,
117 )
118 hpsPFTauDiscriminationByLooseIsolationDBSumPtCorr.maximumSumPtCut=hpsPFTauDiscriminationByLooseIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minGammaEt
119 
120 hpsPFTauDiscriminationByMediumIsolationDBSumPtCorr = hpsPFTauDiscriminationByMediumIsolation.clone(
121  deltaBetaPUTrackPtCutOverride = cms.double(0.5),
122  applyDeltaBetaCorrection = True,
123  isoConeSizeForDeltaBeta = 0.8,
124  deltaBetaFactor = "%0.4f"%(0.0462/0.1687),
125  applyOccupancyCut = False,
126  applySumPtCut = True,
127 )
128 hpsPFTauDiscriminationByMediumIsolationDBSumPtCorr.maximumSumPtCut=hpsPFTauDiscriminationByMediumIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minGammaEt
129 
130 hpsPFTauDiscriminationByTightIsolationDBSumPtCorr = hpsPFTauDiscriminationByTightIsolation.clone(
131  deltaBetaPUTrackPtCutOverride = cms.double(0.5),
132  applyDeltaBetaCorrection = True,
133  isoConeSizeForDeltaBeta = 0.8,
134  deltaBetaFactor = "%0.4f"%(0.0772/0.1687),
135  applyOccupancyCut = False,
136  applySumPtCut = True,
137 )
138 hpsPFTauDiscriminationByTightIsolationDBSumPtCorr.maximumSumPtCut=hpsPFTauDiscriminationByTightIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minGammaEt
139 
140 hpsPFTauDiscriminationByIsolationSeqDBSumPtCorr = cms.Sequence(
141  hpsPFTauDiscriminationByVLooseIsolationDBSumPtCorr*
142  hpsPFTauDiscriminationByLooseIsolationDBSumPtCorr*
143  hpsPFTauDiscriminationByMediumIsolationDBSumPtCorr*
144  hpsPFTauDiscriminationByTightIsolationDBSumPtCorr
145 )
146 
147 hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr = hpsPFTauDiscriminationByVLooseIsolationDBSumPtCorr.clone(
148  ApplyDiscriminationByTrackerIsolation = True,
149  ApplyDiscriminationByECALIsolation = True,
150  deltaBetaFactor = "%0.4f"%((0.09/0.25)*(0.0772/0.1687)),
151  applyOccupancyCut = False,
152  applySumPtCut = True,
153  maximumSumPtCut = 3.0,
154  Prediscriminants = requireDecayMode.clone()
155 )
156 hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minTrackPt = 0.5
157 hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minGammaEt = 0.5
158 
159 hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr = hpsPFTauDiscriminationByLooseIsolationDBSumPtCorr.clone(
160  ApplyDiscriminationByTrackerIsolation = True,
161  ApplyDiscriminationByECALIsolation = True,
162  deltaBetaFactor = "%0.4f"%(ak5dBetaCorrection),
163  applyOccupancyCut = False,
164  applySumPtCut = True,
165  maximumSumPtCut = 2.0,
166  Prediscriminants = requireDecayMode.clone()
167 )
168 hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minTrackPt = 0.5
169 hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minGammaEt = 0.5
170 
171 hpsPFTauDiscriminationByRawCombinedIsolationDBSumPtCorr = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr.clone(
172  applySumPtCut = False,
173  storeRawSumPt = cms.bool(True)
174 )
175 
176 hpsPFTauDiscriminationByRawChargedIsolationDBSumPtCorr = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr.clone(
177  applySumPtCut = False,
178  ApplyDiscriminationByECALIsolation = False,
179  storeRawSumPt = cms.bool(True)
180 )
181 
182 hpsPFTauDiscriminationByRawGammaIsolationDBSumPtCorr = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr.clone(
183  applySumPtCut = False,
184  ApplyDiscriminationByTrackerIsolation = False,
185  storeRawSumPt = cms.bool(True)
186 )
187 
188 hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr = hpsPFTauDiscriminationByMediumIsolationDBSumPtCorr.clone(
189  ApplyDiscriminationByTrackerIsolation = True,
190  ApplyDiscriminationByECALIsolation = True,
191  deltaBetaFactor = "%0.4f"%(ak5dBetaCorrection),
192  applyOccupancyCut = False,
193  applySumPtCut = True,
194  maximumSumPtCut = 1.0,
195  Prediscriminants = requireDecayMode.clone()
196 )
197 hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minTrackPt = 0.5
198 hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minGammaEt = 0.5
199 
200 hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr = hpsPFTauDiscriminationByTightIsolationDBSumPtCorr.clone(
201  ApplyDiscriminationByTrackerIsolation = True,
202  ApplyDiscriminationByECALIsolation = True,
203  deltaBetaFactor = "%0.4f"%(ak5dBetaCorrection),
204  applyOccupancyCut = False,
205  applySumPtCut = True,
206  maximumSumPtCut = 0.8,
207  Prediscriminants = requireDecayMode.clone()
208 )
209 hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minTrackPt = 0.5
210 hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minGammaEt = 0.5
211 
212 hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr = cms.Sequence(
213  hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr*
214  hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr*
215  hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr*
216  hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr
217 )
218 
219 #Charge isolation based on combined isolation
220 hpsPFTauDiscriminationByVLooseChargedIsolation = hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr.clone(
221  ApplyDiscriminationByECALIsolation = False
222 )
223 
224 hpsPFTauDiscriminationByLooseChargedIsolation = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr.clone(
225  ApplyDiscriminationByECALIsolation = False
226 )
227 
228 hpsPFTauDiscriminationByMediumChargedIsolation = hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr.clone(
229  ApplyDiscriminationByECALIsolation = False
230 )
231 hpsPFTauDiscriminationByTightChargedIsolation = hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr.clone(
232  ApplyDiscriminationByECALIsolation = False
233 )
234 
235 hpsPFTauDiscriminationByChargedIsolationSeq = cms.Sequence(
236  hpsPFTauDiscriminationByVLooseChargedIsolation*
237  hpsPFTauDiscriminationByLooseChargedIsolation*
238  hpsPFTauDiscriminationByMediumChargedIsolation*
239  hpsPFTauDiscriminationByTightChargedIsolation
240 )
241 
242 #copying discriminator against electrons and muons
243 hpsPFTauDiscriminationByLooseElectronRejection = pfRecoTauDiscriminationAgainstElectron.clone(
244  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
245  Prediscriminants = noPrediscriminants,
246  PFElectronMVA_maxValue = cms.double(0.6)
247 )
248 hpsPFTauDiscriminationByMediumElectronRejection = pfRecoTauDiscriminationAgainstElectron.clone(
249  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
250  Prediscriminants = noPrediscriminants,
251  ApplyCut_EcalCrackCut = cms.bool(True)
252 )
253 hpsPFTauDiscriminationByTightElectronRejection = pfRecoTauDiscriminationAgainstElectron.clone(
254  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
255  Prediscriminants = noPrediscriminants,
256  ApplyCut_EcalCrackCut = cms.bool(True),
257  ApplyCut_BremCombined = cms.bool(True)
258 )
259 
260 hpsPFTauDiscriminationByLooseMuonRejection = pfRecoTauDiscriminationAgainstMuon.clone(
261  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
262  Prediscriminants = noPrediscriminants
263 )
264 hpsPFTauDiscriminationByMediumMuonRejection = pfRecoTauDiscriminationAgainstMuon.clone(
265  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
266  Prediscriminants = noPrediscriminants,
267  discriminatorOption = cms.string('noAllArbitrated')
268 )
269 hpsPFTauDiscriminationByTightMuonRejection = pfRecoTauDiscriminationAgainstMuon.clone(
270  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
271  Prediscriminants = noPrediscriminants,
272  discriminatorOption = cms.string('noAllArbitratedWithHOP')
273 )
274 
275 hpsPFTauDiscriminationByLooseMuonRejection2 = pfRecoTauDiscriminationAgainstMuon2.clone(
276  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
277  Prediscriminants = noPrediscriminants
278 )
279 hpsPFTauDiscriminationByMediumMuonRejection2 = pfRecoTauDiscriminationAgainstMuon2.clone(
280  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
281  Prediscriminants = noPrediscriminants,
282  discriminatorOption = cms.string('medium')
283 )
284 hpsPFTauDiscriminationByTightMuonRejection2 = pfRecoTauDiscriminationAgainstMuon2.clone(
285  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
286  Prediscriminants = noPrediscriminants,
287  discriminatorOption = cms.string('tight')
288 )
289 
290 hpsPFTauDiscriminationByLooseMuonRejection3 = pfRecoTauDiscriminationAgainstMuon2.clone(
291  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
292  Prediscriminants = noPrediscriminants,
293  discriminatorOption = cms.string('custom'),
294  maxNumberOfMatches = cms.int32(1),
295  doCaloMuonVeto = cms.bool(True),
296  maxNumberOfHitsLast2Stations = cms.int32(-1)
297 )
298 hpsPFTauDiscriminationByTightMuonRejection3 = hpsPFTauDiscriminationByLooseMuonRejection3.clone(
299  maxNumberOfHitsLast2Stations = cms.int32(0)
300 )
301 
302 hpsPFTauDiscriminationByMVArawMuonRejection = pfRecoTauDiscriminationAgainstMuonMVA.clone(
303  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
304  Prediscriminants = requireDecayMode.clone(),
305  returnMVA = cms.bool(True)
306 )
307 ##hpsPFTauDiscriminationByMVALooseMuonRejection = hpsPFTauDiscriminationByMVArawMuonRejection.clone(
308 ## returnMVA = cms.bool(False),
309 ## mvaMin = cms.double(0.75)
310 ##)
311 ##hpsPFTauDiscriminationByMVAMediumMuonRejection = hpsPFTauDiscriminationByMVALooseMuonRejection.clone(
312 ## mvaMin = cms.double(0.950)
313 ##)
314 ##hpsPFTauDiscriminationByMVATightMuonRejection = hpsPFTauDiscriminationByMVALooseMuonRejection.clone(
315 ## mvaMin = cms.double(0.975)
316 ##)
317 hpsPFTauDiscriminationByMVALooseMuonRejection = recoTauDiscriminantCutMultiplexer.clone(
318  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
319  Prediscriminants = requireDecayMode.clone(),
320  toMultiplex = cms.InputTag('hpsPFTauDiscriminationByMVArawMuonRejection'),
321  key = cms.InputTag('hpsPFTauDiscriminationByMVArawMuonRejection:category'),
322  inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/wpDiscriminationByMVAMuonRejection.root'),
323  mvaOutput_normalization = cms.string("mvaOutput_normalization_opt2"),
324  mapping = cms.VPSet(
325  cms.PSet(
326  category = cms.uint32(0),
327  cut = cms.string("opt2eff99_5"),
328  variable = cms.string("pt")
329  )
330  )
331 )
332 hpsPFTauDiscriminationByMVAMediumMuonRejection = hpsPFTauDiscriminationByMVALooseMuonRejection.clone()
333 hpsPFTauDiscriminationByMVAMediumMuonRejection.mapping[0].cut = cms.string("opt2eff99_0")
334 hpsPFTauDiscriminationByMVATightMuonRejection = hpsPFTauDiscriminationByMVALooseMuonRejection.clone()
335 hpsPFTauDiscriminationByMVATightMuonRejection.mapping[0].cut = cms.string("opt2eff98_0")
336 
337 hpsPFTauDiscriminationByMVA5rawElectronRejection = pfRecoTauDiscriminationAgainstElectronMVA5GBR.clone(
338  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
339  Prediscriminants = requireDecayMode.clone(),
340  method = cms.string("BDTG"),
341  gbrFile = cms.FileInPath('RecoTauTag/RecoTau/data/gbrDiscriminationAgainstElectronMVA5.root'),
342 )
343 
344 hpsPFTauDiscriminationByMVA5VLooseElectronRejection = recoTauDiscriminantCutMultiplexer.clone(
345  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
346  Prediscriminants = requireDecayMode.clone(),
347  toMultiplex = cms.InputTag('hpsPFTauDiscriminationByMVA5rawElectronRejection'),
348  key = cms.InputTag('hpsPFTauDiscriminationByMVA5rawElectronRejection:category'),
349  inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/wpDiscriminationAgainstElectronMVA5.root'),
350  mapping = cms.VPSet(
351  cms.PSet(
352  category = cms.uint32(0), # minMVANoEleMatchWOgWOgsfBL
353  cut = cms.string("eff99cat0"),
354  variable = cms.string("pt")
355  ),
356  cms.PSet(
357  category = cms.uint32(1), # minMVANoEleMatchWOgWgsfBL
358  cut = cms.string("eff99cat1"),
359  variable = cms.string("pt")
360  ),
361  cms.PSet(
362  category = cms.uint32(2), # minMVANoEleMatchWgWOgsfBL
363  cut = cms.string("eff99cat2"),
364  variable = cms.string("pt")
365  ),
366  cms.PSet(
367  category = cms.uint32(3), # minMVANoEleMatchWgWgsfBL
368  cut = cms.string("eff99cat3"),
369  variable = cms.string("pt")
370  ),
371  cms.PSet(
372  category = cms.uint32(4), # minMVAWOgWOgsfBL
373  cut = cms.string("eff99cat4"),
374  variable = cms.string("pt")
375  ),
376  cms.PSet(
377  category = cms.uint32(5), # minMVAWOgWgsfBL
378  cut = cms.string("eff99cat5"),
379  variable = cms.string("pt")
380  ),
381  cms.PSet(
382  category = cms.uint32(6), # minMVAWgWOgsfBL
383  cut = cms.string("eff99cat6"),
384  variable = cms.string("pt")
385  ),
386  cms.PSet(
387  category = cms.uint32(7), # minMVAWgWgsfBL
388  cut = cms.string("eff99cat7"),
389  variable = cms.string("pt")
390  ),
391  cms.PSet(
392  category = cms.uint32(8), # minMVANoEleMatchWOgWOgsfEC
393  cut = cms.string("eff99cat8"),
394  variable = cms.string("pt")
395  ),
396  cms.PSet(
397  category = cms.uint32(9), # minMVANoEleMatchWOgWgsfEC
398  cut = cms.string("eff99cat9"),
399  variable = cms.string("pt")
400  ),
401  cms.PSet(
402  category = cms.uint32(10), # minMVANoEleMatchWgWOgsfEC
403  cut = cms.string("eff99cat10"),
404  variable = cms.string("pt")
405  ),
406  cms.PSet(
407  category = cms.uint32(11), # minMVANoEleMatchWgWgsfEC
408  cut = cms.string("eff99cat11"),
409  variable = cms.string("pt")
410  ),
411  cms.PSet(
412  category = cms.uint32(12), # minMVAWOgWOgsfEC
413  cut = cms.string("eff99cat12"),
414  variable = cms.string("pt")
415  ),
416  cms.PSet(
417  category = cms.uint32(13), # minMVAWOgWgsfEC
418  cut = cms.string("eff99cat13"),
419  variable = cms.string("pt")
420  ),
421  cms.PSet(
422  category = cms.uint32(14), # minMVAWgWOgsfEC
423  cut = cms.string("eff99cat14"),
424  variable = cms.string("pt")
425  ),
426  cms.PSet(
427  category = cms.uint32(15), # minMVAWgWgsfEC
428  cut = cms.string("eff99cat15"),
429  variable = cms.string("pt")
430  )
431  )
432 )
433 
434 hpsPFTauDiscriminationByMVA5LooseElectronRejection = copy.deepcopy(hpsPFTauDiscriminationByMVA5VLooseElectronRejection)
435 hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[0].cut = cms.string("eff96cat0")
436 hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[1].cut = cms.string("eff96cat1")
437 hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[2].cut = cms.string("eff96cat2")
438 hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[3].cut = cms.string("eff96cat3")
439 hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[4].cut = cms.string("eff96cat4")
440 hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[5].cut = cms.string("eff96cat5")
441 hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[6].cut = cms.string("eff96cat6")
442 hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[7].cut = cms.string("eff96cat7")
443 hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[8].cut = cms.string("eff96cat8")
444 hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[9].cut = cms.string("eff96cat9")
445 hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[10].cut = cms.string("eff96cat10")
446 hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[11].cut = cms.string("eff96cat11")
447 hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[12].cut = cms.string("eff96cat12")
448 hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[13].cut = cms.string("eff96cat13")
449 hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[14].cut = cms.string("eff96cat14")
450 hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[15].cut = cms.string("eff96cat15")
451 
452 hpsPFTauDiscriminationByMVA5MediumElectronRejection = copy.deepcopy(hpsPFTauDiscriminationByMVA5VLooseElectronRejection)
453 hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[0].cut = cms.string("eff91cat0")
454 hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[1].cut = cms.string("eff91cat1")
455 hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[2].cut = cms.string("eff91cat2")
456 hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[3].cut = cms.string("eff91cat3")
457 hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[4].cut = cms.string("eff91cat4")
458 hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[5].cut = cms.string("eff91cat5")
459 hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[6].cut = cms.string("eff91cat6")
460 hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[7].cut = cms.string("eff91cat7")
461 hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[8].cut = cms.string("eff91cat8")
462 hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[9].cut = cms.string("eff91cat9")
463 hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[10].cut = cms.string("eff91cat10")
464 hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[11].cut = cms.string("eff91cat11")
465 hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[12].cut = cms.string("eff91cat12")
466 hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[13].cut = cms.string("eff91cat13")
467 hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[14].cut = cms.string("eff91cat14")
468 hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[15].cut = cms.string("eff91cat15")
469 
470 hpsPFTauDiscriminationByMVA5TightElectronRejection = copy.deepcopy(hpsPFTauDiscriminationByMVA5VLooseElectronRejection)
471 hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[0].cut = cms.string("eff85cat0")
472 hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[1].cut = cms.string("eff85cat1")
473 hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[2].cut = cms.string("eff85cat2")
474 hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[3].cut = cms.string("eff85cat3")
475 hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[4].cut = cms.string("eff85cat4")
476 hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[5].cut = cms.string("eff85cat5")
477 hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[6].cut = cms.string("eff85cat6")
478 hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[7].cut = cms.string("eff85cat7")
479 hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[8].cut = cms.string("eff85cat8")
480 hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[9].cut = cms.string("eff85cat9")
481 hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[10].cut = cms.string("eff85cat10")
482 hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[11].cut = cms.string("eff85cat11")
483 hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[12].cut = cms.string("eff85cat12")
484 hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[13].cut = cms.string("eff85cat13")
485 hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[14].cut = cms.string("eff85cat14")
486 hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[15].cut = cms.string("eff85cat15")
487 
488 hpsPFTauDiscriminationByMVA5VTightElectronRejection = copy.deepcopy(hpsPFTauDiscriminationByMVA5VLooseElectronRejection)
489 hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[0].cut = cms.string("eff79cat0")
490 hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[1].cut = cms.string("eff79cat1")
491 hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[2].cut = cms.string("eff79cat2")
492 hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[3].cut = cms.string("eff79cat3")
493 hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[4].cut = cms.string("eff79cat4")
494 hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[5].cut = cms.string("eff79cat5")
495 hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[6].cut = cms.string("eff79cat6")
496 hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[7].cut = cms.string("eff79cat7")
497 hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[8].cut = cms.string("eff79cat8")
498 hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[9].cut = cms.string("eff79cat9")
499 hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[10].cut = cms.string("eff79cat10")
500 hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[11].cut = cms.string("eff79cat11")
501 hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[12].cut = cms.string("eff79cat12")
502 hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[13].cut = cms.string("eff79cat13")
503 hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[14].cut = cms.string("eff79cat14")
504 hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[15].cut = cms.string("eff79cat15")
505 
506 hpsPFTauDiscriminationByDeadECALElectronRejection = pfRecoTauDiscriminationAgainstElectronDeadECAL.clone(
507  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
508  Prediscriminants = requireDecayMode.clone()
509 )
510 
511 #Define new sequence that is using smaller number on hits cut
512 hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr.clone()
513 hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits = hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr.clone()
514 hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits = hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr.clone()
515 
516 hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits.qualityCuts.isolationQualityCuts.minTrackHits = cms.uint32(3)
517 hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits.qualityCuts.isolationQualityCuts.minTrackHits = cms.uint32(3)
518 hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits.qualityCuts.isolationQualityCuts.minTrackHits = cms.uint32(3)
519 
520 hpsPFTauDiscriminationByRawCombinedIsolationDBSumPtCorr3Hits = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits.clone(
521  applySumPtCut = False,
522  storeRawSumPt = cms.bool(True)
523 )
524 
525 hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr3Hits = cms.Sequence(
526  hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits*
527  hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits*
528  hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits*
529  hpsPFTauDiscriminationByRawCombinedIsolationDBSumPtCorr3Hits
530 )
531 
532 # Define the HPS selection discriminator used in cleaning
533 hpsSelectionDiscriminator.PFTauProducer = cms.InputTag("combinatoricRecoTaus")
534 
535 from RecoTauTag.RecoTau.RecoTauCleaner_cfi import RecoTauCleaner
536 hpsPFTauProducerSansRefs=RecoTauCleaner.clone(
537  src=cms.InputTag("combinatoricRecoTaus")
538 )
539 
540 
541 from RecoTauTag.RecoTau.RecoTauPiZeroUnembedder_cfi import RecoTauPiZeroUnembedder
542 hpsPFTauProducer=RecoTauPiZeroUnembedder.clone(
543  src = cms.InputTag("hpsPFTauProducerSansRefs")
544 )
545 
546 
550 hpsPFTauPrimaryVertexProducer = PFTauPrimaryVertexProducer.clone(
551  PFTauTag = cms.InputTag("hpsPFTauProducer"),
552  ElectronTag = cms.InputTag(""),
553  MuonTag = cms.InputTag(""),
554  PVTag = cms.InputTag("offlinePrimaryVertices"),
555  beamSpot = cms.InputTag("offlineBeamSpot"),
556  TrackCollectionTag = cms.InputTag("generalTracks"),
557  Algorithm = cms.int32(1),
558  useBeamSpot = cms.bool(True),
559  RemoveMuonTracks = cms.bool(False),
560  RemoveElectronTracks = cms.bool(False),
561  useSelectedTaus = cms.bool(False),
562  discriminators = cms.VPSet(
563  cms.PSet(
564  discriminator = cms.InputTag('hpsPFTauDiscriminationByDecayModeFindingNewDMs'),
565  selectionCut = cms.double(0.5)
566  )
567  ),
568  cut = cms.string("pt > 18.0 & abs(eta) < 2.4")
569 )
570 
571 hpsPFTauSecondaryVertexProducer = PFTauSecondaryVertexProducer.clone(
572  PFTauTag = cms.InputTag("hpsPFTauProducer")
573 )
574 hpsPFTauTransverseImpactParameters = PFTauTransverseImpactParameters.clone(
575  PFTauTag = cms.InputTag("hpsPFTauProducer"),
576  PFTauPVATag = cms.InputTag("hpsPFTauPrimaryVertexProducer"),
577  PFTauSVATag = cms.InputTag("hpsPFTauSecondaryVertexProducer"),
578  useFullCalculation = cms.bool(False)
579 )
580 hpsPFTauVertexAndImpactParametersSeq = cms.Sequence(
581  hpsPFTauPrimaryVertexProducer*
582  hpsPFTauSecondaryVertexProducer*
583  hpsPFTauTransverseImpactParameters
584 )
585 
587 hpsPFTauMVA3IsolationChargedIsoPtSum = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits.clone(
588  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
589  Prediscriminants = requireDecayMode.clone(),
590  ApplyDiscriminationByECALIsolation = cms.bool(False),
591  ApplyDiscriminationByTrackerIsolation = cms.bool(True),
592  applySumPtCut = cms.bool(False),
593  applyDeltaBetaCorrection = cms.bool(False),
594  storeRawSumPt = cms.bool(True),
595  storeRawPUsumPt = cms.bool(False),
596  customOuterCone = PFRecoTauPFJetInputs.isolationConeSize,
597  isoConeSizeForDeltaBeta = cms.double(0.8),
598  verbosity = cms.int32(0)
599 )
600 hpsPFTauMVA3IsolationNeutralIsoPtSum = hpsPFTauMVA3IsolationChargedIsoPtSum.clone(
601  ApplyDiscriminationByECALIsolation = cms.bool(True),
602  ApplyDiscriminationByTrackerIsolation = cms.bool(False),
603  verbosity = cms.int32(0)
604 )
605 hpsPFTauMVA3IsolationPUcorrPtSum = hpsPFTauMVA3IsolationChargedIsoPtSum.clone(
606  ApplyDiscriminationByECALIsolation = cms.bool(False),
607  ApplyDiscriminationByTrackerIsolation = cms.bool(False),
608  applyDeltaBetaCorrection = cms.bool(True),
609  storeRawSumPt = cms.bool(False),
610  storeRawPUsumPt = cms.bool(True),
611  verbosity = cms.int32(0)
612 )
613 hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw = discriminationByIsolationMVA2raw.clone(
614  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
615  Prediscriminants = requireDecayMode.clone(),
616  inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/gbrDiscriminationByIsolationMVA3_oldDMwoLT.root'),
617  mvaName = cms.string("tauIdMVAoldDMwoLT"),
618  mvaOpt = cms.string("oldDMwoLT"),
619  srcTauTransverseImpactParameters = cms.InputTag('hpsPFTauTransverseImpactParameters'),
620  srcChargedIsoPtSum = cms.InputTag('hpsPFTauMVA3IsolationChargedIsoPtSum'),
621  srcNeutralIsoPtSum = cms.InputTag('hpsPFTauMVA3IsolationNeutralIsoPtSum'),
622  srcPUcorrPtSum = cms.InputTag('hpsPFTauMVA3IsolationPUcorrPtSum'),
623  verbosity = cms.int32(0)
624 )
625 hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT = discriminationByIsolationMVA2VLoose.clone(
626  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
627  Prediscriminants = requireDecayMode.clone(),
628  toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw'),
629  key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw:category'),
630  inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/wpDiscriminationByIsolationMVA3_oldDMwoLT.root'),
631  mvaOutput_normalization = cms.string("mvaOutput_normalization_oldDMwoLT"),
632  mapping = cms.VPSet(
633  cms.PSet(
634  category = cms.uint32(0),
635  cut = cms.string("oldDMwoLTEff90"),
636  variable = cms.string("pt")
637  )
638  )
639 )
640 hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone()
641 hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwoLT.mapping[0].cut = cms.string("oldDMwoLTEff80")
642 hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone()
643 hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwoLT.mapping[0].cut = cms.string("oldDMwoLTEff70")
644 hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone()
645 hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT.mapping[0].cut = cms.string("oldDMwoLTEff60")
646 hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone()
647 hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT.mapping[0].cut = cms.string("oldDMwoLTEff50")
648 hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone()
649 hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT.mapping[0].cut = cms.string("oldDMwoLTEff40")
650 hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw = hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw.clone(
651  inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/gbrDiscriminationByIsolationMVA3_oldDMwLT.root'),
652  mvaName = cms.string("tauIdMVAoldDMwLT"),
653  mvaOpt = cms.string("oldDMwLT"),
654  verbosity = cms.int32(0)
655 )
656 hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone(
657  toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw'),
658  key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw:category'),
659  inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/wpDiscriminationByIsolationMVA3_oldDMwLT.root'),
660  mvaOutput_normalization = cms.string("mvaOutput_normalization_oldDMwLT"),
661  mapping = cms.VPSet(
662  cms.PSet(
663  category = cms.uint32(0),
664  cut = cms.string("oldDMwLTEff90"),
665  variable = cms.string("pt")
666  )
667  )
668 )
669 hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT.clone()
670 hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT.mapping[0].cut = cms.string("oldDMwLTEff80")
671 hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT.clone()
672 hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT.mapping[0].cut = cms.string("oldDMwLTEff70")
673 hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT.clone()
674 hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT.mapping[0].cut = cms.string("oldDMwLTEff60")
675 hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT.clone()
676 hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT.mapping[0].cut = cms.string("oldDMwLTEff50")
677 hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT.clone()
678 hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT.mapping[0].cut = cms.string("oldDMwLTEff40")
679 hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw = hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw.clone(
680  inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/gbrDiscriminationByIsolationMVA3_newDMwoLT.root'),
681  mvaName = cms.string("tauIdMVAnewDMwoLT"),
682  mvaOpt = cms.string("newDMwoLT"),
683  verbosity = cms.int32(0)
684 )
685 hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone(
686  toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw'),
687  key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw:category'),
688  inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/wpDiscriminationByIsolationMVA3_newDMwoLT.root'),
689  mvaOutput_normalization = cms.string("mvaOutput_normalization_newDMwoLT"),
690  mapping = cms.VPSet(
691  cms.PSet(
692  category = cms.uint32(0),
693  cut = cms.string("newDMwoLTEff90"),
694  variable = cms.string("pt")
695  )
696  ),
697  verbosity = cms.int32(0)
698 )
699 hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT.clone()
700 hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT.mapping[0].cut = cms.string("newDMwoLTEff80")
701 ##hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT.verbosity = cms.int32(1)
702 hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT.clone()
703 hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT.mapping[0].cut = cms.string("newDMwoLTEff70")
704 hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT.clone()
705 hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT.mapping[0].cut = cms.string("newDMwoLTEff60")
706 hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT.clone()
707 hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT.mapping[0].cut = cms.string("newDMwoLTEff50")
708 hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT.clone()
709 hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT.mapping[0].cut = cms.string("newDMwoLTEff40")
710 hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw = hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw.clone(
711  inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/gbrDiscriminationByIsolationMVA3_newDMwLT.root'),
712  mvaName = cms.string("tauIdMVAnewDMwLT"),
713  mvaOpt = cms.string("newDMwLT"),
714  verbosity = cms.int32(0)
715 )
716 hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone(
717  toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw'),
718  key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw:category'),
719  inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/wpDiscriminationByIsolationMVA3_newDMwLT.root'),
720  mvaOutput_normalization = cms.string("mvaOutput_normalization_newDMwLT"),
721  mapping = cms.VPSet(
722  cms.PSet(
723  category = cms.uint32(0),
724  cut = cms.string("newDMwLTEff90"),
725  variable = cms.string("pt")
726  )
727  )
728 )
729 hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT.clone()
730 hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT.mapping[0].cut = cms.string("newDMwLTEff80")
731 hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT.clone()
732 hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT.mapping[0].cut = cms.string("newDMwLTEff70")
733 hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT.clone()
734 hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT.mapping[0].cut = cms.string("newDMwLTEff60")
735 hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT.clone()
736 hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT.mapping[0].cut = cms.string("newDMwLTEff50")
737 hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT.clone()
738 hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT.mapping[0].cut = cms.string("newDMwLTEff40")
739 
740 hpsPFTauMVAIsolation2Seq = cms.Sequence(
741  hpsPFTauMVA3IsolationChargedIsoPtSum
742  + hpsPFTauMVA3IsolationNeutralIsoPtSum
743  + hpsPFTauMVA3IsolationPUcorrPtSum
744  + hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw
745  + hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT
746  + hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwoLT
747  + hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwoLT
748  + hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT
749  + hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT
750  + hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT
751  + hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw
752  + hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT
753  + hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT
754  + hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT
755  + hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT
756  + hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT
757  + hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT
758  + hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw
759  + hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT
760  + hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT
761  + hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT
762  + hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT
763  + hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT
764  + hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT
765  + hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw
766  + hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT
767  + hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT
768  + hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT
769  + hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT
770  + hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT
771  + hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT
772 )
773 
774 
775 produceHPSPFTaus = cms.Sequence(
776  hpsSelectionDiscriminator
777  #*hpsTightIsolationCleaner
778  #*hpsMediumIsolationCleaner
779  #*hpsLooseIsolationCleaner
780  #*hpsVLooseIsolationCleaner
781  *hpsPFTauProducerSansRefs
782  *hpsPFTauProducer
783 )
784 
785 produceAndDiscriminateHPSPFTaus = cms.Sequence(
786  produceHPSPFTaus*
787  hpsPFTauDiscriminationByDecayModeFindingNewDMs*
788  hpsPFTauDiscriminationByDecayModeFindingOldDMs*
789  hpsPFTauDiscriminationByDecayModeFinding* # CV: kept for backwards compatibility
790  hpsPFTauDiscriminationByChargedIsolationSeq*
791  hpsPFTauDiscriminationByIsolationSeq*
792  #hpsPFTauDiscriminationByIsolationSeqRhoCorr*
793  #hpsPFTauDiscriminationByIsolationSeqCustomRhoCorr*
794  hpsPFTauDiscriminationByIsolationSeqDBSumPtCorr*
795 
796  hpsPFTauDiscriminationByRawCombinedIsolationDBSumPtCorr*
797  hpsPFTauDiscriminationByRawChargedIsolationDBSumPtCorr*
798  hpsPFTauDiscriminationByRawGammaIsolationDBSumPtCorr*
799 
800  hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr*
801  hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr3Hits*
802 
803  hpsPFTauDiscriminationByLooseElectronRejection*
804  hpsPFTauDiscriminationByMediumElectronRejection*
805  hpsPFTauDiscriminationByTightElectronRejection*
806  hpsPFTauDiscriminationByMVA5rawElectronRejection*
807  hpsPFTauDiscriminationByMVA5VLooseElectronRejection*
808  hpsPFTauDiscriminationByMVA5LooseElectronRejection*
809  hpsPFTauDiscriminationByMVA5MediumElectronRejection*
810  hpsPFTauDiscriminationByMVA5TightElectronRejection*
811  hpsPFTauDiscriminationByMVA5VTightElectronRejection*
812  hpsPFTauDiscriminationByDeadECALElectronRejection*
813  hpsPFTauDiscriminationByLooseMuonRejection*
814  hpsPFTauDiscriminationByMediumMuonRejection*
815  hpsPFTauDiscriminationByTightMuonRejection*
816  hpsPFTauDiscriminationByLooseMuonRejection2*
817  hpsPFTauDiscriminationByMediumMuonRejection2*
818  hpsPFTauDiscriminationByTightMuonRejection2*
819  hpsPFTauDiscriminationByLooseMuonRejection3*
820  hpsPFTauDiscriminationByTightMuonRejection3*
821  hpsPFTauDiscriminationByMVArawMuonRejection*
822  hpsPFTauDiscriminationByMVALooseMuonRejection*
823  hpsPFTauDiscriminationByMVAMediumMuonRejection*
824  hpsPFTauDiscriminationByMVATightMuonRejection*
825 
826  hpsPFTauVertexAndImpactParametersSeq*
827 
828  hpsPFTauMVAIsolation2Seq
829 )