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"%(ak5dBetaCorrection),
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)*(ak5dBetaCorrection)),
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  loadMVAfromDB = cms.bool(False),
306  inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/gbrDiscriminationAgainstMuonMVA.root'),
307  returnMVA = cms.bool(True)
308 )
309 ##hpsPFTauDiscriminationByMVALooseMuonRejection = hpsPFTauDiscriminationByMVArawMuonRejection.clone(
310 ## returnMVA = cms.bool(False),
311 ## mvaMin = cms.double(0.75)
312 ##)
313 ##hpsPFTauDiscriminationByMVAMediumMuonRejection = hpsPFTauDiscriminationByMVALooseMuonRejection.clone(
314 ## mvaMin = cms.double(0.950)
315 ##)
316 ##hpsPFTauDiscriminationByMVATightMuonRejection = hpsPFTauDiscriminationByMVALooseMuonRejection.clone(
317 ## mvaMin = cms.double(0.975)
318 ##)
319 hpsPFTauDiscriminationByMVALooseMuonRejection = recoTauDiscriminantCutMultiplexer.clone(
320  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
321  Prediscriminants = requireDecayMode.clone(),
322  toMultiplex = cms.InputTag('hpsPFTauDiscriminationByMVArawMuonRejection'),
323  key = cms.InputTag('hpsPFTauDiscriminationByMVArawMuonRejection:category'),
324  loadMVAfromDB = cms.bool(False),
325  inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/wpDiscriminationByMVAMuonRejection.root'),
326  mvaOutput_normalization = cms.string("mvaOutput_normalization_opt2"),
327  mapping = cms.VPSet(
328  cms.PSet(
329  category = cms.uint32(0),
330  cut = cms.string("opt2eff99_5"),
331  variable = cms.string("pt")
332  )
333  )
334 )
335 hpsPFTauDiscriminationByMVAMediumMuonRejection = hpsPFTauDiscriminationByMVALooseMuonRejection.clone()
336 hpsPFTauDiscriminationByMVAMediumMuonRejection.mapping[0].cut = cms.string("opt2eff99_0")
337 hpsPFTauDiscriminationByMVATightMuonRejection = hpsPFTauDiscriminationByMVALooseMuonRejection.clone()
338 hpsPFTauDiscriminationByMVATightMuonRejection.mapping[0].cut = cms.string("opt2eff98_0")
339 
340 hpsPFTauDiscriminationByMVA5rawElectronRejection = pfRecoTauDiscriminationAgainstElectronMVA5.clone(
341  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
342  Prediscriminants = requireDecayMode.clone(),
343  loadMVAfromDB = cms.bool(False),
344  inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/gbrDiscriminationAgainstElectronMVA5.root'),
345  mvaName_NoEleMatch_woGwoGSF_BL = cms.string("gbr_NoEleMatch_woGwoGSF_BL"),
346  mvaName_NoEleMatch_woGwGSF_BL = cms.string("gbr_NoEleMatch_woGwGSF_BL"),
347  mvaName_NoEleMatch_wGwoGSF_BL = cms.string("gbr_NoEleMatch_wGwoGSF_BL"),
348  mvaName_NoEleMatch_wGwGSF_BL = cms.string("gbr_NoEleMatch_wGwGSF_BL"),
349  mvaName_woGwoGSF_BL = cms.string("gbr_woGwoGSF_BL"),
350  mvaName_woGwGSF_BL = cms.string("gbr_woGwGSF_BL"),
351  mvaName_wGwoGSF_BL = cms.string("gbr_wGwoGSF_BL"),
352  mvaName_wGwGSF_BL = cms.string("gbr_wGwGSF_BL"),
353  mvaName_NoEleMatch_woGwoGSF_EC = cms.string("gbr_NoEleMatch_woGwoGSF_EC"),
354  mvaName_NoEleMatch_woGwGSF_EC = cms.string("gbr_NoEleMatch_woGwGSF_EC"),
355  mvaName_NoEleMatch_wGwoGSF_EC = cms.string("gbr_NoEleMatch_wGwoGSF_EC"),
356  mvaName_NoEleMatch_wGwGSF_EC = cms.string("gbr_NoEleMatch_wGwGSF_EC"),
357  mvaName_woGwoGSF_EC = cms.string("gbr_woGwoGSF_EC"),
358  mvaName_woGwGSF_EC = cms.string("gbr_woGwGSF_EC"),
359  mvaName_wGwoGSF_EC = cms.string("gbr_wGwoGSF_EC"),
360  mvaName_wGwGSF_EC = cms.string("gbr_wGwGSF_EC")
361 )
362 
363 hpsPFTauDiscriminationByMVA5VLooseElectronRejection = recoTauDiscriminantCutMultiplexer.clone(
364  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
365  Prediscriminants = requireDecayMode.clone(),
366  toMultiplex = cms.InputTag('hpsPFTauDiscriminationByMVA5rawElectronRejection'),
367  key = cms.InputTag('hpsPFTauDiscriminationByMVA5rawElectronRejection:category'),
368  loadMVAfromDB = cms.bool(False),
369  inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/wpDiscriminationAgainstElectronMVA5.root'),
370  mapping = cms.VPSet(
371  cms.PSet(
372  category = cms.uint32(0), # minMVANoEleMatchWOgWOgsfBL
373  cut = cms.string("eff99cat0"),
374  variable = cms.string("pt")
375  ),
376  cms.PSet(
377  category = cms.uint32(1), # minMVANoEleMatchWOgWgsfBL
378  cut = cms.string("eff99cat1"),
379  variable = cms.string("pt")
380  ),
381  cms.PSet(
382  category = cms.uint32(2), # minMVANoEleMatchWgWOgsfBL
383  cut = cms.string("eff99cat2"),
384  variable = cms.string("pt")
385  ),
386  cms.PSet(
387  category = cms.uint32(3), # minMVANoEleMatchWgWgsfBL
388  cut = cms.string("eff99cat3"),
389  variable = cms.string("pt")
390  ),
391  cms.PSet(
392  category = cms.uint32(4), # minMVAWOgWOgsfBL
393  cut = cms.string("eff99cat4"),
394  variable = cms.string("pt")
395  ),
396  cms.PSet(
397  category = cms.uint32(5), # minMVAWOgWgsfBL
398  cut = cms.string("eff99cat5"),
399  variable = cms.string("pt")
400  ),
401  cms.PSet(
402  category = cms.uint32(6), # minMVAWgWOgsfBL
403  cut = cms.string("eff99cat6"),
404  variable = cms.string("pt")
405  ),
406  cms.PSet(
407  category = cms.uint32(7), # minMVAWgWgsfBL
408  cut = cms.string("eff99cat7"),
409  variable = cms.string("pt")
410  ),
411  cms.PSet(
412  category = cms.uint32(8), # minMVANoEleMatchWOgWOgsfEC
413  cut = cms.string("eff99cat8"),
414  variable = cms.string("pt")
415  ),
416  cms.PSet(
417  category = cms.uint32(9), # minMVANoEleMatchWOgWgsfEC
418  cut = cms.string("eff99cat9"),
419  variable = cms.string("pt")
420  ),
421  cms.PSet(
422  category = cms.uint32(10), # minMVANoEleMatchWgWOgsfEC
423  cut = cms.string("eff99cat10"),
424  variable = cms.string("pt")
425  ),
426  cms.PSet(
427  category = cms.uint32(11), # minMVANoEleMatchWgWgsfEC
428  cut = cms.string("eff99cat11"),
429  variable = cms.string("pt")
430  ),
431  cms.PSet(
432  category = cms.uint32(12), # minMVAWOgWOgsfEC
433  cut = cms.string("eff99cat12"),
434  variable = cms.string("pt")
435  ),
436  cms.PSet(
437  category = cms.uint32(13), # minMVAWOgWgsfEC
438  cut = cms.string("eff99cat13"),
439  variable = cms.string("pt")
440  ),
441  cms.PSet(
442  category = cms.uint32(14), # minMVAWgWOgsfEC
443  cut = cms.string("eff99cat14"),
444  variable = cms.string("pt")
445  ),
446  cms.PSet(
447  category = cms.uint32(15), # minMVAWgWgsfEC
448  cut = cms.string("eff99cat15"),
449  variable = cms.string("pt")
450  )
451  )
452 )
453 
454 hpsPFTauDiscriminationByMVA5LooseElectronRejection = copy.deepcopy(hpsPFTauDiscriminationByMVA5VLooseElectronRejection)
455 hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[0].cut = cms.string("eff96cat0")
456 hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[1].cut = cms.string("eff96cat1")
457 hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[2].cut = cms.string("eff96cat2")
458 hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[3].cut = cms.string("eff96cat3")
459 hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[4].cut = cms.string("eff96cat4")
460 hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[5].cut = cms.string("eff96cat5")
461 hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[6].cut = cms.string("eff96cat6")
462 hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[7].cut = cms.string("eff96cat7")
463 hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[8].cut = cms.string("eff96cat8")
464 hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[9].cut = cms.string("eff96cat9")
465 hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[10].cut = cms.string("eff96cat10")
466 hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[11].cut = cms.string("eff96cat11")
467 hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[12].cut = cms.string("eff96cat12")
468 hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[13].cut = cms.string("eff96cat13")
469 hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[14].cut = cms.string("eff96cat14")
470 hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[15].cut = cms.string("eff96cat15")
471 
472 hpsPFTauDiscriminationByMVA5MediumElectronRejection = copy.deepcopy(hpsPFTauDiscriminationByMVA5VLooseElectronRejection)
473 hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[0].cut = cms.string("eff91cat0")
474 hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[1].cut = cms.string("eff91cat1")
475 hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[2].cut = cms.string("eff91cat2")
476 hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[3].cut = cms.string("eff91cat3")
477 hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[4].cut = cms.string("eff91cat4")
478 hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[5].cut = cms.string("eff91cat5")
479 hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[6].cut = cms.string("eff91cat6")
480 hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[7].cut = cms.string("eff91cat7")
481 hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[8].cut = cms.string("eff91cat8")
482 hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[9].cut = cms.string("eff91cat9")
483 hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[10].cut = cms.string("eff91cat10")
484 hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[11].cut = cms.string("eff91cat11")
485 hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[12].cut = cms.string("eff91cat12")
486 hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[13].cut = cms.string("eff91cat13")
487 hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[14].cut = cms.string("eff91cat14")
488 hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[15].cut = cms.string("eff91cat15")
489 
490 hpsPFTauDiscriminationByMVA5TightElectronRejection = copy.deepcopy(hpsPFTauDiscriminationByMVA5VLooseElectronRejection)
491 hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[0].cut = cms.string("eff85cat0")
492 hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[1].cut = cms.string("eff85cat1")
493 hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[2].cut = cms.string("eff85cat2")
494 hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[3].cut = cms.string("eff85cat3")
495 hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[4].cut = cms.string("eff85cat4")
496 hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[5].cut = cms.string("eff85cat5")
497 hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[6].cut = cms.string("eff85cat6")
498 hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[7].cut = cms.string("eff85cat7")
499 hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[8].cut = cms.string("eff85cat8")
500 hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[9].cut = cms.string("eff85cat9")
501 hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[10].cut = cms.string("eff85cat10")
502 hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[11].cut = cms.string("eff85cat11")
503 hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[12].cut = cms.string("eff85cat12")
504 hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[13].cut = cms.string("eff85cat13")
505 hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[14].cut = cms.string("eff85cat14")
506 hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[15].cut = cms.string("eff85cat15")
507 
508 hpsPFTauDiscriminationByMVA5VTightElectronRejection = copy.deepcopy(hpsPFTauDiscriminationByMVA5VLooseElectronRejection)
509 hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[0].cut = cms.string("eff79cat0")
510 hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[1].cut = cms.string("eff79cat1")
511 hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[2].cut = cms.string("eff79cat2")
512 hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[3].cut = cms.string("eff79cat3")
513 hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[4].cut = cms.string("eff79cat4")
514 hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[5].cut = cms.string("eff79cat5")
515 hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[6].cut = cms.string("eff79cat6")
516 hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[7].cut = cms.string("eff79cat7")
517 hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[8].cut = cms.string("eff79cat8")
518 hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[9].cut = cms.string("eff79cat9")
519 hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[10].cut = cms.string("eff79cat10")
520 hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[11].cut = cms.string("eff79cat11")
521 hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[12].cut = cms.string("eff79cat12")
522 hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[13].cut = cms.string("eff79cat13")
523 hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[14].cut = cms.string("eff79cat14")
524 hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[15].cut = cms.string("eff79cat15")
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(False),
644  inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/gbrDiscriminationByIsolationMVA3_oldDMwoLT.root'),
645  mvaName = cms.string("tauIdMVAoldDMwoLT"),
646  mvaOpt = cms.string("oldDMwoLT"),
647  srcTauTransverseImpactParameters = cms.InputTag('hpsPFTauTransverseImpactParameters'),
648  srcChargedIsoPtSum = cms.InputTag('hpsPFTauMVA3IsolationChargedIsoPtSum'),
649  srcNeutralIsoPtSum = cms.InputTag('hpsPFTauMVA3IsolationNeutralIsoPtSum'),
650  srcPUcorrPtSum = cms.InputTag('hpsPFTauMVA3IsolationPUcorrPtSum'),
651  verbosity = cms.int32(0)
652 )
653 hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT = discriminationByIsolationMVA2VLoose.clone(
654  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
655  Prediscriminants = requireDecayMode.clone(),
656  toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw'),
657  key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw:category'),
658  loadMVAfromDB = cms.bool(False),
659  inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/wpDiscriminationByIsolationMVA3_oldDMwoLT.root'),
660  mvaOutput_normalization = cms.string("mvaOutput_normalization_oldDMwoLT"),
661  mapping = cms.VPSet(
662  cms.PSet(
663  category = cms.uint32(0),
664  cut = cms.string("oldDMwoLTEff90"),
665  variable = cms.string("pt")
666  )
667  )
668 )
669 hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone()
670 hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwoLT.mapping[0].cut = cms.string("oldDMwoLTEff80")
671 hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone()
672 hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwoLT.mapping[0].cut = cms.string("oldDMwoLTEff70")
673 hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone()
674 hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT.mapping[0].cut = cms.string("oldDMwoLTEff60")
675 hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone()
676 hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT.mapping[0].cut = cms.string("oldDMwoLTEff50")
677 hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone()
678 hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT.mapping[0].cut = cms.string("oldDMwoLTEff40")
679 hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw = hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw.clone(
680  inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/gbrDiscriminationByIsolationMVA3_oldDMwLT.root'),
681  mvaName = cms.string("tauIdMVAoldDMwLT"),
682  mvaOpt = cms.string("oldDMwLT"),
683  verbosity = cms.int32(0)
684 )
685 hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone(
686  toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw'),
687  key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw:category'),
688  inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/wpDiscriminationByIsolationMVA3_oldDMwLT.root'),
689  mvaOutput_normalization = cms.string("mvaOutput_normalization_oldDMwLT"),
690  mapping = cms.VPSet(
691  cms.PSet(
692  category = cms.uint32(0),
693  cut = cms.string("oldDMwLTEff90"),
694  variable = cms.string("pt")
695  )
696  )
697 )
698 hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT.clone()
699 hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT.mapping[0].cut = cms.string("oldDMwLTEff80")
700 hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT.clone()
701 hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT.mapping[0].cut = cms.string("oldDMwLTEff70")
702 hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT.clone()
703 hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT.mapping[0].cut = cms.string("oldDMwLTEff60")
704 hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT.clone()
705 hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT.mapping[0].cut = cms.string("oldDMwLTEff50")
706 hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT.clone()
707 hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT.mapping[0].cut = cms.string("oldDMwLTEff40")
708 hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw = hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw.clone(
709  inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/gbrDiscriminationByIsolationMVA3_newDMwoLT.root'),
710  mvaName = cms.string("tauIdMVAnewDMwoLT"),
711  mvaOpt = cms.string("newDMwoLT"),
712  verbosity = cms.int32(0)
713 )
714 hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone(
715  toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw'),
716  key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw:category'),
717  inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/wpDiscriminationByIsolationMVA3_newDMwoLT.root'),
718  mvaOutput_normalization = cms.string("mvaOutput_normalization_newDMwoLT"),
719  mapping = cms.VPSet(
720  cms.PSet(
721  category = cms.uint32(0),
722  cut = cms.string("newDMwoLTEff90"),
723  variable = cms.string("pt")
724  )
725  ),
726  verbosity = cms.int32(0)
727 )
728 hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT.clone()
729 hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT.mapping[0].cut = cms.string("newDMwoLTEff80")
730 ##hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT.verbosity = cms.int32(1)
731 hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT.clone()
732 hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT.mapping[0].cut = cms.string("newDMwoLTEff70")
733 hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT.clone()
734 hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT.mapping[0].cut = cms.string("newDMwoLTEff60")
735 hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT.clone()
736 hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT.mapping[0].cut = cms.string("newDMwoLTEff50")
737 hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT.clone()
738 hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT.mapping[0].cut = cms.string("newDMwoLTEff40")
739 hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw = hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw.clone(
740  inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/gbrDiscriminationByIsolationMVA3_newDMwLT.root'),
741  mvaName = cms.string("tauIdMVAnewDMwLT"),
742  mvaOpt = cms.string("newDMwLT"),
743  verbosity = cms.int32(0)
744 )
745 hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone(
746  toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw'),
747  key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw:category'),
748  inputFileName = cms.FileInPath('RecoTauTag/RecoTau/data/wpDiscriminationByIsolationMVA3_newDMwLT.root'),
749  mvaOutput_normalization = cms.string("mvaOutput_normalization_newDMwLT"),
750  mapping = cms.VPSet(
751  cms.PSet(
752  category = cms.uint32(0),
753  cut = cms.string("newDMwLTEff90"),
754  variable = cms.string("pt")
755  )
756  )
757 )
758 hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT.clone()
759 hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT.mapping[0].cut = cms.string("newDMwLTEff80")
760 hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT.clone()
761 hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT.mapping[0].cut = cms.string("newDMwLTEff70")
762 hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT.clone()
763 hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT.mapping[0].cut = cms.string("newDMwLTEff60")
764 hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT.clone()
765 hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT.mapping[0].cut = cms.string("newDMwLTEff50")
766 hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT.clone()
767 hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT.mapping[0].cut = cms.string("newDMwLTEff40")
768 
769 hpsPFTauMVAIsolation2Seq = cms.Sequence(
770  hpsPFTauMVA3IsolationChargedIsoPtSum
771  + hpsPFTauMVA3IsolationNeutralIsoPtSum
772  + hpsPFTauMVA3IsolationPUcorrPtSum
773  + hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw
774  + hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT
775  + hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwoLT
776  + hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwoLT
777  + hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT
778  + hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT
779  + hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT
780  + hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw
781  + hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT
782  + hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT
783  + hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT
784  + hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT
785  + hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT
786  + hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT
787  + hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw
788  + hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT
789  + hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT
790  + hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT
791  + hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT
792  + hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT
793  + hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT
794  + hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw
795  + hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT
796  + hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT
797  + hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT
798  + hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT
799  + hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT
800  + hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT
801 )
802 
803 produceHPSPFTaus = cms.Sequence(
804  hpsSelectionDiscriminator
805  #*hpsTightIsolationCleaner
806  #*hpsMediumIsolationCleaner
807  #*hpsLooseIsolationCleaner
808  #*hpsVLooseIsolationCleaner
809  *hpsPFTauProducerSansRefs
810  *hpsPFTauProducer
811 )
812 
813 produceAndDiscriminateHPSPFTaus = cms.Sequence(
814  produceHPSPFTaus*
815  hpsPFTauDiscriminationByDecayModeFindingNewDMs*
816  hpsPFTauDiscriminationByDecayModeFindingOldDMs*
817  hpsPFTauDiscriminationByDecayModeFinding* # CV: kept for backwards compatibility
818  hpsPFTauDiscriminationByChargedIsolationSeq*
819  hpsPFTauDiscriminationByIsolationSeq*
820  #hpsPFTauDiscriminationByIsolationSeqRhoCorr*
821  #hpsPFTauDiscriminationByIsolationSeqCustomRhoCorr*
822  hpsPFTauDiscriminationByIsolationSeqDBSumPtCorr*
823 
824  hpsPFTauDiscriminationByRawCombinedIsolationDBSumPtCorr*
825  hpsPFTauDiscriminationByRawChargedIsolationDBSumPtCorr*
826  hpsPFTauDiscriminationByRawGammaIsolationDBSumPtCorr*
827 
828  hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr*
829  hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr3Hits*
830 
831  hpsPFTauDiscriminationByLooseElectronRejection*
832  hpsPFTauDiscriminationByMediumElectronRejection*
833  hpsPFTauDiscriminationByTightElectronRejection*
834  hpsPFTauDiscriminationByMVA5rawElectronRejection*
835  hpsPFTauDiscriminationByMVA5VLooseElectronRejection*
836  hpsPFTauDiscriminationByMVA5LooseElectronRejection*
837  hpsPFTauDiscriminationByMVA5MediumElectronRejection*
838  hpsPFTauDiscriminationByMVA5TightElectronRejection*
839  hpsPFTauDiscriminationByMVA5VTightElectronRejection*
840  hpsPFTauDiscriminationByDeadECALElectronRejection*
841  hpsPFTauDiscriminationByLooseMuonRejection*
842  hpsPFTauDiscriminationByMediumMuonRejection*
843  hpsPFTauDiscriminationByTightMuonRejection*
844  hpsPFTauDiscriminationByLooseMuonRejection2*
845  hpsPFTauDiscriminationByMediumMuonRejection2*
846  hpsPFTauDiscriminationByTightMuonRejection2*
847  hpsPFTauDiscriminationByLooseMuonRejection3*
848  hpsPFTauDiscriminationByTightMuonRejection3*
849  hpsPFTauDiscriminationByMVArawMuonRejection*
850  hpsPFTauDiscriminationByMVALooseMuonRejection*
851  hpsPFTauDiscriminationByMVAMediumMuonRejection*
852  hpsPFTauDiscriminationByMVATightMuonRejection*
853 
854  hpsPFTauVertexAndImpactParametersSeq*
855 
856  hpsPFTauMVAIsolation2Seq
857 )