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
29 ak4dBetaCorrection=0.20
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"%(ak4dBetaCorrection),
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)*(ak4dBetaCorrection)),
154  applyOccupancyCut = False,
155  applySumPtCut = True,
156  maximumSumPtCut = 3.5,
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"%(ak4dBetaCorrection),
166  applyOccupancyCut = False,
167  applySumPtCut = True,
168  maximumSumPtCut = 2.5,
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"%(ak4dBetaCorrection),
195  applyOccupancyCut = False,
196  applySumPtCut = True,
197  maximumSumPtCut = 1.5,
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"%(ak4dBetaCorrection),
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 hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits.applyPhotonPtSumOutsideSignalConeCut = cms.bool(True)
538 hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits.qualityCuts.isolationQualityCuts.minTrackHits = cms.uint32(3)
539 hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits.applyPhotonPtSumOutsideSignalConeCut = cms.bool(True)
540 hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits.qualityCuts.isolationQualityCuts.minTrackHits = cms.uint32(3)
541 hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits.applyPhotonPtSumOutsideSignalConeCut = cms.bool(True)
542 
543 hpsPFTauDiscriminationByRawCombinedIsolationDBSumPtCorr3Hits = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits.clone(
544  applySumPtCut = False,
545  storeRawSumPt = cms.bool(True)
546 )
547 
548 hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr3Hits = cms.Sequence(
549  hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits*
550  hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits*
551  hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits*
552  hpsPFTauDiscriminationByRawCombinedIsolationDBSumPtCorr3Hits
553 )
554 
555 hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits.clone(
556  ApplyDiscriminationByECALIsolation = cms.bool(False),
557  applyDeltaBetaCorrection = cms.bool(False),
558  ApplyDiscriminationByWeightedECALIsolation = cms.bool(True),
559  UseAllPFCandsForWeights = cms.bool(True),
560  applyFootprintCorrection = cms.bool(True),
561  applyPhotonPtSumOutsideSignalConeCut = cms.bool(True)
562 )
563 
564 hpsPFTauDiscriminationByMediumPileupWeightedIsolation3Hits = hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits.clone(
565  maximumSumPtCut = hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits.maximumSumPtCut
566 )
567 
568 hpsPFTauDiscriminationByTightPileupWeightedIsolation3Hits = hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits.clone(
569  maximumSumPtCut = hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits.maximumSumPtCut
570 )
571 
572 hpsPFTauDiscriminationByPhotonPtSumOutsideSignalCone = hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits.clone(
573  applySumPtCut = cms.bool(False)
574 )
575 
576 hpsPFTauDiscriminationByRawPileupWeightedIsolation3Hits = hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits.clone(
577  Prediscriminants = cms.PSet(
578  BooleanOperator = cms.string("and"),
579  decayMode = cms.PSet(
580  Producer = cms.InputTag('hpsPFTauDiscriminationByPhotonPtSumOutsideSignalCone'),
581  cut = cms.double(0.5)
582  )
583  ),
584  applySumPtCut = cms.bool(False),
585  storeRawSumPt = cms.bool(True)
586 )
587 
588 hpsPFTauDiscriminationByPileupWeightedIsolationSeq3Hits = cms.Sequence(
589  hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits*
590  hpsPFTauDiscriminationByMediumPileupWeightedIsolation3Hits*
591  hpsPFTauDiscriminationByTightPileupWeightedIsolation3Hits*
592  hpsPFTauDiscriminationByPhotonPtSumOutsideSignalCone*
593  hpsPFTauDiscriminationByRawPileupWeightedIsolation3Hits
594 )
595 
596 # Define the HPS selection discriminator used in cleaning
597 hpsSelectionDiscriminator.PFTauProducer = cms.InputTag("combinatoricRecoTaus")
598 
599 from RecoTauTag.RecoTau.RecoTauCleaner_cfi import RecoTauCleaner
600 hpsPFTauProducerSansRefs = RecoTauCleaner.clone(
601  src = cms.InputTag("combinatoricRecoTaus")
602 )
603 
604 
605 from RecoTauTag.RecoTau.RecoTauPiZeroUnembedder_cfi import RecoTauPiZeroUnembedder
606 hpsPFTauProducer = RecoTauPiZeroUnembedder.clone(
607  src = cms.InputTag("hpsPFTauProducerSansRefs")
608 )
609 
610 
614 hpsPFTauPrimaryVertexProducer = PFTauPrimaryVertexProducer.clone(
615  PFTauTag = cms.InputTag("hpsPFTauProducer"),
616  ElectronTag = cms.InputTag(""),
617  MuonTag = cms.InputTag(""),
618  PVTag = cms.InputTag("offlinePrimaryVertices"),
619  beamSpot = cms.InputTag("offlineBeamSpot"),
620  TrackCollectionTag = cms.InputTag("generalTracks"),
621  Algorithm = cms.int32(1),
622  useBeamSpot = cms.bool(True),
623  RemoveMuonTracks = cms.bool(False),
624  RemoveElectronTracks = cms.bool(False),
625  useSelectedTaus = cms.bool(False),
626  discriminators = cms.VPSet(
627  cms.PSet(
628  discriminator = cms.InputTag('hpsPFTauDiscriminationByDecayModeFindingNewDMs'),
629  selectionCut = cms.double(0.5)
630  )
631  ),
632  cut = cms.string("pt > 18.0 & abs(eta) < 2.4")
633 )
634 
635 hpsPFTauSecondaryVertexProducer = PFTauSecondaryVertexProducer.clone(
636  PFTauTag = cms.InputTag("hpsPFTauProducer")
637 )
638 hpsPFTauTransverseImpactParameters = PFTauTransverseImpactParameters.clone(
639  PFTauTag = cms.InputTag("hpsPFTauProducer"),
640  PFTauPVATag = cms.InputTag("hpsPFTauPrimaryVertexProducer"),
641  PFTauSVATag = cms.InputTag("hpsPFTauSecondaryVertexProducer"),
642  useFullCalculation = cms.bool(False)
643 )
644 hpsPFTauVertexAndImpactParametersSeq = cms.Sequence(
645  hpsPFTauPrimaryVertexProducer*
646  hpsPFTauSecondaryVertexProducer*
647  hpsPFTauTransverseImpactParameters
648 )
649 
651 hpsPFTauChargedIsoPtSum = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits.clone(
652  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
653  Prediscriminants = requireDecayMode.clone(),
654  ApplyDiscriminationByECALIsolation = cms.bool(False),
655  ApplyDiscriminationByTrackerIsolation = cms.bool(True),
656  applySumPtCut = cms.bool(False),
657  applyDeltaBetaCorrection = cms.bool(False),
658  storeRawSumPt = cms.bool(True),
659  storeRawPUsumPt = cms.bool(False),
660  customOuterCone = PFRecoTauPFJetInputs.isolationConeSize,
661  isoConeSizeForDeltaBeta = cms.double(0.8),
662  verbosity = cms.int32(0)
663 )
664 hpsPFTauNeutralIsoPtSum = hpsPFTauChargedIsoPtSum.clone(
665  ApplyDiscriminationByECALIsolation = cms.bool(True),
666  ApplyDiscriminationByTrackerIsolation = cms.bool(False),
667  verbosity = cms.int32(0)
668 )
669 hpsPFTauPUcorrPtSum = hpsPFTauChargedIsoPtSum.clone(
670  ApplyDiscriminationByECALIsolation = cms.bool(False),
671  ApplyDiscriminationByTrackerIsolation = cms.bool(False),
672  applyDeltaBetaCorrection = cms.bool(True),
673  storeRawSumPt = cms.bool(False),
674  storeRawPUsumPt = cms.bool(True),
675  verbosity = cms.int32(0)
676 )
677 hpsPFTauNeutralIsoPtSumWeight = hpsPFTauChargedIsoPtSum.clone(
678  ApplyDiscriminationByWeightedECALIsolation = cms.bool(True),
679  ApplyDiscriminationByTrackerIsolation = cms.bool(False),
680  UseAllPFCandsForWeights = cms.bool(True),
681  verbosity = cms.int32(0)
682 )
683 hpsPFTauFootprintCorrection = hpsPFTauChargedIsoPtSum.clone(
684  ApplyDiscriminationByTrackerIsolation = cms.bool(False),
685  storeRawSumPt = cms.bool(False),
686  storeRawFootprintCorrection = cms.bool(True),
687  verbosity = cms.int32(0)
688 )
689 hpsPFTauPhotonPtSumOutsideSignalCone = hpsPFTauChargedIsoPtSum.clone(
690  ApplyDiscriminationByTrackerIsolation = cms.bool(False),
691  storeRawSumPt = cms.bool(False),
692  storeRawPhotonSumPt_outsideSignalCone = cms.bool(True),
693  verbosity = cms.int32(0)
694 )
695 
696 hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw = discriminationByIsolationMVA2raw.clone(
697  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
698  Prediscriminants = requireDecayMode.clone(),
699  loadMVAfromDB = cms.bool(True),
700  mvaName = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1"),
701  mvaOpt = cms.string("oldDMwoLT"),
702  srcTauTransverseImpactParameters = cms.InputTag('hpsPFTauTransverseImpactParameters'),
703  srcChargedIsoPtSum = cms.InputTag('hpsPFTauChargedIsoPtSum'),
704  srcNeutralIsoPtSum = cms.InputTag('hpsPFTauNeutralIsoPtSum'),
705  srcPUcorrPtSum = cms.InputTag('hpsPFTauPUcorrPtSum'),
706  verbosity = cms.int32(0)
707 )
708 hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT = discriminationByIsolationMVA2VLoose.clone(
709  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
710  Prediscriminants = requireDecayMode.clone(),
711  toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw'),
712  key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw:category'),
713  loadMVAfromDB = cms.bool(True),
714  mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_mvaOutput_normalization"),
715  mapping = cms.VPSet(
716  cms.PSet(
717  category = cms.uint32(0),
718  cut = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_WPEff90"),
719  variable = cms.string("pt")
720  )
721  )
722 )
723 hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone()
724 hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_WPEff80")
725 hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone()
726 hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_WPEff70")
727 hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone()
728 hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_WPEff60")
729 hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone()
730 hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_WPEff50")
731 hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone()
732 hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_WPEff40")
733 hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw = hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw.clone(
734  mvaName = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1"),
735  mvaOpt = cms.string("oldDMwLT"),
736  verbosity = cms.int32(0)
737 )
738 hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone(
739  toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw'),
740  key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw:category'),
741  mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_mvaOutput_normalization"),
742  mapping = cms.VPSet(
743  cms.PSet(
744  category = cms.uint32(0),
745  cut = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_WPEff90"),
746  variable = cms.string("pt")
747  )
748  )
749 )
750 hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT.clone()
751 hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_WPEff80")
752 hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT.clone()
753 hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_WPEff70")
754 hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT.clone()
755 hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_WPEff60")
756 hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT.clone()
757 hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_WPEff50")
758 hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT.clone()
759 hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_WPEff40")
760 hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw = hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw.clone(
761  mvaName = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1"),
762  mvaOpt = cms.string("newDMwoLT"),
763  verbosity = cms.int32(0)
764 )
765 hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone(
766  toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw'),
767  key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw:category'),
768  mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_mvaOutput_normalization"),
769  mapping = cms.VPSet(
770  cms.PSet(
771  category = cms.uint32(0),
772  cut = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_WPEff90"),
773  variable = cms.string("pt")
774  )
775  ),
776  verbosity = cms.int32(0)
777 )
778 hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT.clone()
779 hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_WPEff80")
780 ##hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT.verbosity = cms.int32(1)
781 hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT.clone()
782 hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_WPEff70")
783 hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT.clone()
784 hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_WPEff60")
785 hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT.clone()
786 hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_WPEff50")
787 hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT.clone()
788 hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_WPEff40")
789 hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw = hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw.clone(
790  mvaName = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1"),
791  mvaOpt = cms.string("newDMwLT"),
792  verbosity = cms.int32(0)
793 )
794 hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone(
795  toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw'),
796  key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw:category'),
797  mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_mvaOutput_normalization"),
798  mapping = cms.VPSet(
799  cms.PSet(
800  category = cms.uint32(0),
801  cut = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_WPEff90"),
802  variable = cms.string("pt")
803  )
804  )
805 )
806 hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT.clone()
807 hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_WPEff80")
808 hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT.clone()
809 hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_WPEff70")
810 hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT.clone()
811 hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_WPEff60")
812 hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT.clone()
813 hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_WPEff50")
814 hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT.clone()
815 hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_WPEff40")
816 
817 hpsPFTauMVAIsolation2Seq = cms.Sequence(
818  hpsPFTauChargedIsoPtSum
819  + hpsPFTauNeutralIsoPtSum
820  + hpsPFTauPUcorrPtSum
821  + hpsPFTauNeutralIsoPtSumWeight
822  + hpsPFTauFootprintCorrection
823  + hpsPFTauPhotonPtSumOutsideSignalCone
824  + hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw
825  + hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT
826  + hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwoLT
827  + hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwoLT
828  + hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT
829  + hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT
830  + hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT
831  + hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw
832  + hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT
833  + hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT
834  + hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT
835  + hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT
836  + hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT
837  + hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT
838  + hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw
839  + hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT
840  + hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT
841  + hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT
842  + hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT
843  + hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT
844  + hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT
845  + hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw
846  + hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT
847  + hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT
848  + hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT
849  + hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT
850  + hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT
851  + hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT
852 )
853 
854 produceHPSPFTaus = cms.Sequence(
855  hpsSelectionDiscriminator
856  #*hpsTightIsolationCleaner
857  #*hpsMediumIsolationCleaner
858  #*hpsLooseIsolationCleaner
859  #*hpsVLooseIsolationCleaner
860  *hpsPFTauProducerSansRefs
861  *hpsPFTauProducer
862 )
863 
864 produceAndDiscriminateHPSPFTaus = cms.Sequence(
865  produceHPSPFTaus*
866  hpsPFTauDiscriminationByDecayModeFindingNewDMs*
867  hpsPFTauDiscriminationByDecayModeFindingOldDMs*
868  hpsPFTauDiscriminationByDecayModeFinding* # CV: kept for backwards compatibility
869  hpsPFTauDiscriminationByChargedIsolationSeq*
870  hpsPFTauDiscriminationByIsolationSeq*
871  #hpsPFTauDiscriminationByIsolationSeqRhoCorr*
872  #hpsPFTauDiscriminationByIsolationSeqCustomRhoCorr*
873  hpsPFTauDiscriminationByIsolationSeqDBSumPtCorr*
874 
875  hpsPFTauDiscriminationByRawCombinedIsolationDBSumPtCorr*
876  hpsPFTauDiscriminationByRawChargedIsolationDBSumPtCorr*
877  hpsPFTauDiscriminationByRawGammaIsolationDBSumPtCorr*
878 
879  hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr*
880  hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr3Hits*
881  hpsPFTauDiscriminationByPileupWeightedIsolationSeq3Hits*
882 
883  hpsPFTauDiscriminationByLooseElectronRejection*
884  hpsPFTauDiscriminationByMediumElectronRejection*
885  hpsPFTauDiscriminationByTightElectronRejection*
886  hpsPFTauDiscriminationByMVA5rawElectronRejection*
887  hpsPFTauDiscriminationByMVA5VLooseElectronRejection*
888  hpsPFTauDiscriminationByMVA5LooseElectronRejection*
889  hpsPFTauDiscriminationByMVA5MediumElectronRejection*
890  hpsPFTauDiscriminationByMVA5TightElectronRejection*
891  hpsPFTauDiscriminationByMVA5VTightElectronRejection*
892  hpsPFTauDiscriminationByDeadECALElectronRejection*
893  hpsPFTauDiscriminationByLooseMuonRejection*
894  hpsPFTauDiscriminationByMediumMuonRejection*
895  hpsPFTauDiscriminationByTightMuonRejection*
896  hpsPFTauDiscriminationByLooseMuonRejection2*
897  hpsPFTauDiscriminationByMediumMuonRejection2*
898  hpsPFTauDiscriminationByTightMuonRejection2*
899  hpsPFTauDiscriminationByLooseMuonRejection3*
900  hpsPFTauDiscriminationByTightMuonRejection3*
901  hpsPFTauDiscriminationByMVArawMuonRejection*
902  hpsPFTauDiscriminationByMVALooseMuonRejection*
903  hpsPFTauDiscriminationByMVAMediumMuonRejection*
904  hpsPFTauDiscriminationByMVATightMuonRejection*
905 
906  hpsPFTauVertexAndImpactParametersSeq*
907 
908  hpsPFTauMVAIsolation2Seq
909 )