CMS 3D CMS Logo

HPSPFTaus_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 import copy
3 
4 '''
5 
6 Sequences for HPS taus
7 
8 '''
9 
10 ## Discriminator sources
19 
21 ## Helper functions to change the source of the discriminants
23 ## PFjet input parameters
24 from RecoTauTag.RecoTau.PFRecoTauPFJetInputs_cfi import PFRecoTauPFJetInputs
25 ## DeltaBeta correction factor
26 ak4dBetaCorrection = 0.20
27 ## MVAs from SQLlite file/prep. DB
29 
30 ## Selection of taus that pass the HPS selections: pt > 15, mass cuts, tauCone cut
31 from RecoTauTag.RecoTau.PFRecoTauDiscriminationByHPSSelection_cfi import hpsSelectionDiscriminator, decayMode_1Prong0Pi0, decayMode_1Prong1Pi0, decayMode_1Prong2Pi0, decayMode_2Prong0Pi0, decayMode_2Prong1Pi0, decayMode_3Prong0Pi0, decayMode_3Prong1Pi0
32 
33 hpsPFTauDiscriminationByDecayModeFindingNewDMs = hpsSelectionDiscriminator.clone(
34  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
35  #----------------------------------------------------------------------------
36  # CV: disable 3Prong1Pi0 decay mode
37  decayModes = cms.VPSet(
38  decayMode_1Prong0Pi0,
39  decayMode_1Prong1Pi0,
40  decayMode_1Prong2Pi0,
41  decayMode_2Prong0Pi0,
42  decayMode_2Prong1Pi0,
43  decayMode_3Prong0Pi0,
44  decayMode_3Prong1Pi0,
45  )
46  #----------------------------------------------------------------------------
47 )
48 hpsPFTauDiscriminationByDecayModeFindingOldDMs = hpsSelectionDiscriminator.clone(
49  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
50  decayModes = cms.VPSet(
51  decayMode_1Prong0Pi0,
52  decayMode_1Prong1Pi0,
53  decayMode_1Prong2Pi0,
54  decayMode_3Prong0Pi0
55  ),
56  requireTauChargedHadronsToBeChargedPFCands = cms.bool(True)
57 )
58 hpsPFTauDiscriminationByDecayModeFinding = hpsPFTauDiscriminationByDecayModeFindingOldDMs.clone() ## CV: kept for backwards compatibility
59 
60 ## Decay mode prediscriminant
61 requireDecayMode = cms.PSet(
62  BooleanOperator = cms.string("and"),
63  decayMode = cms.PSet(
64  Producer = cms.InputTag('hpsPFTauDiscriminationByDecayModeFindingNewDMs'),
65  cut = cms.double(0.5)
66  )
67 )
68 ## ByLooseIsolation
69 hpsPFTauDiscriminationByLooseIsolation = pfRecoTauDiscriminationByIsolation.clone(
70  PFTauProducer = cms.InputTag("hpsPFTauProducer"),
71  Prediscriminants = requireDecayMode.clone(),
72  ApplyDiscriminationByTrackerIsolation = False,
73  ApplyDiscriminationByECALIsolation = True,
74  applyOccupancyCut = True
75 )
76 hpsPFTauDiscriminationByLooseIsolation.Prediscriminants.preIso = cms.PSet(
77  Producer = cms.InputTag("hpsPFTauDiscriminationByLooseChargedIsolation"),
78  cut = cms.double(0.5)
79 )
80 ## ByMediumIsolation
81 hpsPFTauDiscriminationByMediumIsolation = hpsPFTauDiscriminationByLooseIsolation.clone()
82 hpsPFTauDiscriminationByMediumIsolation.qualityCuts.isolationQualityCuts.minTrackPt = 0.8
83 hpsPFTauDiscriminationByMediumIsolation.qualityCuts.isolationQualityCuts.minGammaEt = 1.0
84 hpsPFTauDiscriminationByMediumIsolation.Prediscriminants.preIso.Producer = cms.InputTag("hpsPFTauDiscriminationByMediumChargedIsolation")
85 ## ByTightIsolation
86 hpsPFTauDiscriminationByTightIsolation = hpsPFTauDiscriminationByLooseIsolation.clone()
87 hpsPFTauDiscriminationByTightIsolation.qualityCuts.isolationQualityCuts.minTrackPt = 0.5
88 hpsPFTauDiscriminationByTightIsolation.qualityCuts.isolationQualityCuts.minGammaEt = 1.0
89 hpsPFTauDiscriminationByTightIsolation.Prediscriminants.preIso.Producer = cms.InputTag("hpsPFTauDiscriminationByTightChargedIsolation")
90 ## ByLooseIsolationDBSumPtCorr
91 hpsPFTauDiscriminationByLooseIsolationDBSumPtCorr = hpsPFTauDiscriminationByLooseIsolation.clone(
92  deltaBetaPUTrackPtCutOverride = cms.double(0.5),
93  applyDeltaBetaCorrection = True,
94  isoConeSizeForDeltaBeta = 0.8,
95  deltaBetaFactor = "%0.4f"%(0.0123/0.1687),
96  applyOccupancyCut = False,
97  applySumPtCut = True,
98 )
99 hpsPFTauDiscriminationByLooseIsolationDBSumPtCorr.maximumSumPtCut = hpsPFTauDiscriminationByLooseIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minGammaEt
100 ## ByMediumIsolationDBSumPtCorr
101 hpsPFTauDiscriminationByMediumIsolationDBSumPtCorr = hpsPFTauDiscriminationByMediumIsolation.clone(
102  deltaBetaPUTrackPtCutOverride = cms.double(0.5),
103  applyDeltaBetaCorrection = True,
104  isoConeSizeForDeltaBeta = 0.8,
105  deltaBetaFactor = "%0.4f"%(0.0462/0.1687),
106  applyOccupancyCut = False,
107  applySumPtCut = True,
108 )
109 hpsPFTauDiscriminationByMediumIsolationDBSumPtCorr.maximumSumPtCut = hpsPFTauDiscriminationByMediumIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minGammaEt
110 ## ByTightIsolationDBSumPtCorr
111 hpsPFTauDiscriminationByTightIsolationDBSumPtCorr = hpsPFTauDiscriminationByTightIsolation.clone(
112  deltaBetaPUTrackPtCutOverride = cms.double(0.5),
113  applyDeltaBetaCorrection = True,
114  isoConeSizeForDeltaBeta = 0.8,
115  deltaBetaFactor = "%0.4f"%(ak4dBetaCorrection),
116  applyOccupancyCut = False,
117  applySumPtCut = True,
118 )
119 hpsPFTauDiscriminationByTightIsolationDBSumPtCorr.maximumSumPtCut = hpsPFTauDiscriminationByTightIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minGammaEt
120 ## ByLooseCombinedIsolationDBSumPtCorr
121 hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr = hpsPFTauDiscriminationByLooseIsolationDBSumPtCorr.clone(
122  ApplyDiscriminationByTrackerIsolation = True,
123  ApplyDiscriminationByECALIsolation = True,
124  deltaBetaFactor = "%0.4f"%(ak4dBetaCorrection),
125  applyOccupancyCut = False,
126  applySumPtCut = True,
127  maximumSumPtCut = 2.5,
128  Prediscriminants = requireDecayMode.clone()
129 )
130 hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minTrackPt = 0.5
131 hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minGammaEt = 1.0
132 ## ByMediumCombinedIsolationDBSumPtCorr
133 hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr = hpsPFTauDiscriminationByMediumIsolationDBSumPtCorr.clone(
134  ApplyDiscriminationByTrackerIsolation = True,
135  ApplyDiscriminationByECALIsolation = True,
136  deltaBetaFactor = "%0.4f"%(ak4dBetaCorrection),
137  applyOccupancyCut = False,
138  applySumPtCut = True,
139  maximumSumPtCut = 1.5,
140  Prediscriminants = requireDecayMode.clone()
141 )
142 hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minTrackPt = 0.5
143 hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minGammaEt = 1.0
144 ## ByTightCombinedIsolationDBSumPtCorr
145 hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr = hpsPFTauDiscriminationByTightIsolationDBSumPtCorr.clone(
146  ApplyDiscriminationByTrackerIsolation = True,
147  ApplyDiscriminationByECALIsolation = True,
148  deltaBetaFactor = "%0.4f"%(ak4dBetaCorrection),
149  applyOccupancyCut = False,
150  applySumPtCut = True,
151  maximumSumPtCut = 0.8,
152  Prediscriminants = requireDecayMode.clone()
153 )
154 hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minTrackPt = 0.5
155 hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minGammaEt = 1.0
156 ## ByLooseChargedIsolation
157 hpsPFTauDiscriminationByLooseChargedIsolation = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr.clone(
158  ApplyDiscriminationByECALIsolation = False
159 )
160 ## ByLooseCombinedIsolationDBSumPtCorr3Hits
161 hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr.clone()
162 hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits.qualityCuts.isolationQualityCuts.minTrackHits = cms.uint32(3)
163 hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits.applyPhotonPtSumOutsideSignalConeCut = cms.bool(True)
164 ## ByMediumCombinedIsolationDBSumPtCorr3Hits
165 hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits = hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr.clone()
166 hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits.qualityCuts.isolationQualityCuts.minTrackHits = cms.uint32(3)
167 hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits.applyPhotonPtSumOutsideSignalConeCut = cms.bool(True)
168 ## ByTightCombinedIsolationDBSumPtCorr3Hits
169 hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits = hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr.clone()
170 hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits.qualityCuts.isolationQualityCuts.minTrackHits = cms.uint32(3)
171 hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits.applyPhotonPtSumOutsideSignalConeCut = cms.bool(True)
172 ## ByRawCombinedIsolationDBSumPtCorr3Hits
173 hpsPFTauDiscriminationByRawCombinedIsolationDBSumPtCorr3Hits = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits.clone(
174  applySumPtCut = False,
175  storeRawSumPt = cms.bool(True)
176 )
177 ## hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr3Hits
178 hpsPFTauDiscriminationByCombinedIsolationDBSumPtCorr3HitsTask = cms.Task(
179  hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits,
180  hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits,
181  hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits,
182  hpsPFTauDiscriminationByRawCombinedIsolationDBSumPtCorr3Hits
183 )
184 hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr3Hits = cms.Sequence(
185  hpsPFTauDiscriminationByCombinedIsolationDBSumPtCorr3HitsTask
186 )
187 ## Discrimination ByLooseCombinedIsolationDBSumPtCorr3HitsdR03
188 hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3HitsdR03 = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits.clone()
189 hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3HitsdR03.deltaBetaFactor = cms.string('0.0720') # 0.2*(0.3/0.5)^2
190 hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3HitsdR03.customOuterCone = cms.double(0.3)
191 ## Discrimination ByMediumCombinedIsolationDBSumPtCorr3HitsdR03
192 hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3HitsdR03 = hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits.clone()
193 hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3HitsdR03.deltaBetaFactor = cms.string('0.0720') # 0.2*(0.3/0.5)^2
194 hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3HitsdR03.customOuterCone = cms.double(0.3)
195 ## Discrimination ByTightCombinedIsolationDBSumPtCorr3HitsdR03
196 hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3HitsdR03 = hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits.clone()
197 hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3HitsdR03.deltaBetaFactor = cms.string('0.0720') # 0.2*(0.3/0.5)^2
198 hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3HitsdR03.customOuterCone = cms.double(0.3)
199 ## hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr3HitsdR03
200 hpsPFTauDiscriminationByCombinedIsolationDBSumPtCorr3HitsdR03Task = cms.Task(
201  hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3HitsdR03,
202  hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3HitsdR03,
203  hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3HitsdR03
204 )
205 hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr3HitsdR03 = cms.Sequence(
206  hpsPFTauDiscriminationByCombinedIsolationDBSumPtCorr3HitsdR03Task
207 )
208 ## ByLoosePileupWeightedIsolation3Hits (kept for Validation)
209 hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits.clone(
210  ApplyDiscriminationByECALIsolation = cms.bool(False),
211  applyDeltaBetaCorrection = cms.bool(False),
212  ApplyDiscriminationByWeightedECALIsolation = cms.bool(True),
213  UseAllPFCandsForWeights = cms.bool(True),
214  applyFootprintCorrection = cms.bool(True),
215  applyPhotonPtSumOutsideSignalConeCut = cms.bool(True)
216 )
217 ## ByMediumPileupWeightedIsolation3Hits (kept for Validation)
218 hpsPFTauDiscriminationByMediumPileupWeightedIsolation3Hits = hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits.clone(
219  maximumSumPtCut = hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits.maximumSumPtCut
220 )
221 ## ByTightPileupWeightedIsolation3Hits (kept for Validation)
222 hpsPFTauDiscriminationByTightPileupWeightedIsolation3Hits = hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits.clone(
223  maximumSumPtCut = hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits.maximumSumPtCut
224 )
225 ## ByRawPileupWeightedIsolation3Hits (kept for Validation)
226 hpsPFTauDiscriminationByRawPileupWeightedIsolation3Hits = hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits.clone(
227  Prediscriminants = cms.PSet(
228  BooleanOperator = cms.string("and"),
229  decayMode = cms.PSet(
230  Producer = cms.InputTag('hpsPFTauDiscriminationByPhotonPtSumOutsideSignalCone'),
231  cut = cms.double(0.5)
232  )
233  ),
234  applySumPtCut = cms.bool(False),
235  storeRawSumPt = cms.bool(True)
236 )
237 ## hpsPFTauDiscriminationByPhotonPtSumOutsideSignalCone
238 hpsPFTauDiscriminationByPhotonPtSumOutsideSignalCone = hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits.clone(
239  applySumPtCut = cms.bool(False)
240 )
241 ## hpsPFTauDiscriminationByPileupWeightedIsolationSeq3Hits
242 hpsPFTauDiscriminationByPileupWeightedIsolation3HitsTask = cms.Task(
243  hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits,
244  hpsPFTauDiscriminationByMediumPileupWeightedIsolation3Hits,
245  hpsPFTauDiscriminationByTightPileupWeightedIsolation3Hits,
246  hpsPFTauDiscriminationByPhotonPtSumOutsideSignalCone,
247  hpsPFTauDiscriminationByRawPileupWeightedIsolation3Hits
248 )
249 hpsPFTauDiscriminationByPileupWeightedIsolationSeq3Hits = cms.Sequence(
250  hpsPFTauDiscriminationByPileupWeightedIsolation3HitsTask
251 )
252 
253 
254 ## ByLooseMuonRejection3
255 hpsPFTauDiscriminationByLooseMuonRejection3 = pfRecoTauDiscriminationAgainstMuon2.clone(
256  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
257  Prediscriminants = noPrediscriminants,
258  discriminatorOption = cms.string('custom'),
259  maxNumberOfMatches = cms.int32(1),
260  doCaloMuonVeto = cms.bool(True),
261  maxNumberOfHitsLast2Stations = cms.int32(-1)
262 )
263 hpsPFTauDiscriminationByTightMuonRejection3 = hpsPFTauDiscriminationByLooseMuonRejection3.clone(
264  maxNumberOfHitsLast2Stations = cms.int32(0)
265 )
266 
267 
268 ## ByLooseElectronRejection
269 hpsPFTauDiscriminationByLooseElectronRejection = pfRecoTauDiscriminationAgainstElectron.clone(
270  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
271  Prediscriminants = noPrediscriminants,
272  PFElectronMVA_maxValue = cms.double(0.6)
273 )
274 ## ByMediumElectronRejection
275 hpsPFTauDiscriminationByMediumElectronRejection = pfRecoTauDiscriminationAgainstElectron.clone(
276  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
277  Prediscriminants = noPrediscriminants,
278  ApplyCut_EcalCrackCut = cms.bool(True)
279 )
280 ## ByTightElectronRejection
281 hpsPFTauDiscriminationByTightElectronRejection = pfRecoTauDiscriminationAgainstElectron.clone(
282  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
283  Prediscriminants = noPrediscriminants,
284  ApplyCut_EcalCrackCut = cms.bool(True),
285  ApplyCut_BremCombined = cms.bool(True)
286 )
287 ## ByDeadECALElectronRejection
288 hpsPFTauDiscriminationByDeadECALElectronRejection = pfRecoTauDiscriminationAgainstElectronDeadECAL.clone(
289  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
290  Prediscriminants = requireDecayMode.clone()
291 )
292 ## ByMVA6rawElectronRejection
293 hpsPFTauDiscriminationByMVA6rawElectronRejection = pfRecoTauDiscriminationAgainstElectronMVA6.clone(
294  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
295  Prediscriminants = requireDecayMode.clone(),
296  loadMVAfromDB = cms.bool(True),
297  mvaName_NoEleMatch_woGwoGSF_BL = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL"),
298  mvaName_NoEleMatch_wGwoGSF_BL = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL"),
299  mvaName_woGwGSF_BL = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_BL"),
300  mvaName_wGwGSF_BL = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_BL"),
301  mvaName_NoEleMatch_woGwoGSF_EC = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_EC"),
302  mvaName_NoEleMatch_wGwoGSF_EC = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_EC"),
303  mvaName_woGwGSF_EC = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_EC"),
304  mvaName_wGwGSF_EC = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC")
305 )
306 ## ByMVA6VLooseElectronRejection
307 hpsPFTauDiscriminationByMVA6VLooseElectronRejection = recoTauDiscriminantCutMultiplexer.clone(
308  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
309  Prediscriminants = requireDecayMode.clone(),
310  toMultiplex = cms.InputTag('hpsPFTauDiscriminationByMVA6rawElectronRejection'),
311  key = cms.InputTag('hpsPFTauDiscriminationByMVA6rawElectronRejection:category'),
312  loadMVAfromDB = cms.bool(True),
313  mapping = cms.VPSet(
314  cms.PSet(
315  category = cms.uint32(0), # minMVANoEleMatchWOgWOgsfBL
316  cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL_WPEff99"),
317  variable = cms.string("pt")
318  ),
319  cms.PSet(
320  category = cms.uint32(2), # minMVANoEleMatchWgWOgsfBL
321  cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL_WPEff99"),
322  variable = cms.string("pt")
323  ),
324  cms.PSet(
325  category = cms.uint32(5), # minMVAWOgWgsfBL
326  cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_BL_WPEff99"),
327  variable = cms.string("pt")
328  ),
329  cms.PSet(
330  category = cms.uint32(7), # minMVAWgWgsfBL
331  cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_BL_WPEff99"),
332  variable = cms.string("pt")
333  ),
334  cms.PSet(
335  category = cms.uint32(8), # minMVANoEleMatchWOgWOgsfEC
336  cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_EC_WPEff99"),
337  variable = cms.string("pt")
338  ),
339  cms.PSet(
340  category = cms.uint32(10), # minMVANoEleMatchWgWOgsfEC
341  cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_EC_WPEff99"),
342  variable = cms.string("pt")
343  ),
344  cms.PSet(
345  category = cms.uint32(13), # minMVAWOgWgsfEC
346  cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_EC_WPEff99"),
347  variable = cms.string("pt")
348  ),
349  cms.PSet(
350  category = cms.uint32(15), # minMVAWgWgsfEC
351  cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC_WPEff99"),
352  variable = cms.string("pt")
353  )
354  )
355 )
356 ## ByMVA6LooseElectronRejection
357 hpsPFTauDiscriminationByMVA6LooseElectronRejection = copy.deepcopy(hpsPFTauDiscriminationByMVA6VLooseElectronRejection)
358 hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL_WPEff96")
359 hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL_WPEff96")
360 hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_BL_WPEff96")
361 hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_BL_WPEff96")
362 hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_EC_WPEff96")
363 hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_EC_WPEff96")
364 hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_EC_WPEff96")
365 hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC_WPEff96")
366 ## ByMVA6VMediumElectronRejection
367 hpsPFTauDiscriminationByMVA6MediumElectronRejection = copy.deepcopy(hpsPFTauDiscriminationByMVA6VLooseElectronRejection)
368 hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL_WPEff91")
369 hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL_WPEff91")
370 hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_BL_WPEff91")
371 hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_BL_WPEff91")
372 hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_EC_WPEff91")
373 hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_EC_WPEff91")
374 hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_EC_WPEff91")
375 hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC_WPEff91")
376 ## ByMVA6TightElectronRejection
377 hpsPFTauDiscriminationByMVA6TightElectronRejection = copy.deepcopy(hpsPFTauDiscriminationByMVA6VLooseElectronRejection)
378 hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL_WPEff85")
379 hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL_WPEff85")
380 hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_BL_WPEff85")
381 hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_BL_WPEff85")
382 hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_EC_WPEff85")
383 hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_EC_WPEff85")
384 hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_EC_WPEff85")
385 hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC_WPEff85")
386 ## ByMVA6VTightElectronRejection
387 hpsPFTauDiscriminationByMVA6VTightElectronRejection = copy.deepcopy(hpsPFTauDiscriminationByMVA6VLooseElectronRejection)
388 hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL_WPEff79")
389 hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL_WPEff79")
390 hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_BL_WPEff79")
391 hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_BL_WPEff79")
392 hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_EC_WPEff79")
393 hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_EC_WPEff79")
394 hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_EC_WPEff79")
395 hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC_WPEff79")
396 
397 # Define the HPS selection discriminator used in cleaning
398 hpsSelectionDiscriminator.PFTauProducer = cms.InputTag("combinatoricRecoTaus")
399 #----------------------------------------------------------------------------
400 # CV: disable 3Prong1Pi0 decay mode
401 hpsSelectionDiscriminator.decayModes = cms.VPSet(
402  decayMode_1Prong0Pi0,
403  decayMode_1Prong1Pi0,
404  decayMode_1Prong2Pi0,
405  decayMode_2Prong0Pi0,
406  decayMode_2Prong1Pi0,
407  decayMode_3Prong0Pi0,
408  decayMode_3Prong1Pi0,
409 )
410 #----------------------------------------------------------------------------
411 
412 from RecoTauTag.RecoTau.RecoTauCleaner_cfi import RecoTauCleaner
413 hpsPFTauProducerSansRefs = RecoTauCleaner.clone(
414  src = cms.InputTag("combinatoricRecoTaus")
415 )
416 hpsPFTauProducerSansRefs.cleaners[1].src = cms.InputTag("hpsSelectionDiscriminator")
417 
418 from RecoTauTag.RecoTau.RecoTauPiZeroUnembedder_cfi import RecoTauPiZeroUnembedder
419 hpsPFTauProducer = RecoTauPiZeroUnembedder.clone(
420  src = cms.InputTag("hpsPFTauProducerSansRefs")
421 )
422 
426 hpsPFTauPrimaryVertexProducer = PFTauPrimaryVertexProducer.clone(
427  PFTauTag = cms.InputTag("hpsPFTauProducer"),
428  ElectronTag = cms.InputTag(""),
429  MuonTag = cms.InputTag(""),
430  PVTag = cms.InputTag("offlinePrimaryVertices"),
431  beamSpot = cms.InputTag("offlineBeamSpot"),
432  Algorithm = cms.int32(0),
433  useBeamSpot = cms.bool(True),
434  RemoveMuonTracks = cms.bool(False),
435  RemoveElectronTracks = cms.bool(False),
436  useSelectedTaus = cms.bool(False),
437  discriminators = cms.VPSet(
438  cms.PSet(
439  discriminator = cms.InputTag('hpsPFTauDiscriminationByDecayModeFindingNewDMs'),
440  selectionCut = cms.double(0.5)
441  )
442  ),
443  cut = cms.string("pt > 18.0 & abs(eta) < 2.4")
444 )
445 
446 hpsPFTauSecondaryVertexProducer = PFTauSecondaryVertexProducer.clone(
447  PFTauTag = cms.InputTag("hpsPFTauProducer")
448 )
449 hpsPFTauTransverseImpactParameters = PFTauTransverseImpactParameters.clone(
450  PFTauTag = cms.InputTag("hpsPFTauProducer"),
451  PFTauPVATag = cms.InputTag("hpsPFTauPrimaryVertexProducer"),
452  PFTauSVATag = cms.InputTag("hpsPFTauSecondaryVertexProducer"),
453  useFullCalculation = cms.bool(True)
454 )
455 hpsPFTauVertexAndImpactParametersTask = cms.Task(
456  hpsPFTauPrimaryVertexProducer,
457  hpsPFTauSecondaryVertexProducer,
458  hpsPFTauTransverseImpactParameters
459 )
460 hpsPFTauVertexAndImpactParametersSeq = cms.Sequence(
461  hpsPFTauVertexAndImpactParametersTask
462 )
464 hpsPFTauChargedIsoPtSum = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits.clone(
465  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
466  Prediscriminants = requireDecayMode.clone(),
467  ApplyDiscriminationByECALIsolation = cms.bool(False),
468  ApplyDiscriminationByTrackerIsolation = cms.bool(True),
469  applySumPtCut = cms.bool(False),
470  applyDeltaBetaCorrection = cms.bool(False),
471  storeRawSumPt = cms.bool(True),
472  storeRawPUsumPt = cms.bool(False),
473  customOuterCone = PFRecoTauPFJetInputs.isolationConeSize,
474  isoConeSizeForDeltaBeta = cms.double(0.8),
475  verbosity = cms.int32(0)
476 )
477 hpsPFTauNeutralIsoPtSum = hpsPFTauChargedIsoPtSum.clone(
478  ApplyDiscriminationByECALIsolation = cms.bool(True),
479  ApplyDiscriminationByTrackerIsolation = cms.bool(False),
480  verbosity = cms.int32(0)
481 )
482 hpsPFTauPUcorrPtSum = hpsPFTauChargedIsoPtSum.clone(
483  ApplyDiscriminationByECALIsolation = cms.bool(False),
484  ApplyDiscriminationByTrackerIsolation = cms.bool(False),
485  applyDeltaBetaCorrection = cms.bool(True),
486  storeRawSumPt = cms.bool(False),
487  storeRawPUsumPt = cms.bool(True),
488  verbosity = cms.int32(0)
489 )
490 hpsPFTauNeutralIsoPtSumWeight = hpsPFTauChargedIsoPtSum.clone(
491  ApplyDiscriminationByWeightedECALIsolation = cms.bool(True),
492  ApplyDiscriminationByTrackerIsolation = cms.bool(False),
493  UseAllPFCandsForWeights = cms.bool(True),
494  verbosity = cms.int32(0)
495 )
496 hpsPFTauFootprintCorrection = hpsPFTauChargedIsoPtSum.clone(
497  ApplyDiscriminationByTrackerIsolation = cms.bool(False),
498  storeRawSumPt = cms.bool(False),
499  storeRawFootprintCorrection = cms.bool(True),
500  verbosity = cms.int32(0)
501 )
502 hpsPFTauPhotonPtSumOutsideSignalCone = hpsPFTauChargedIsoPtSum.clone(
503  ApplyDiscriminationByTrackerIsolation = cms.bool(False),
504  storeRawSumPt = cms.bool(False),
505  storeRawPhotonSumPt_outsideSignalCone = cms.bool(True),
506  verbosity = cms.int32(0)
507 )
508 
509 #Define new Run2 MVA isolations
511 hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw = discriminationByIsolationMVArun2v1raw.clone(
512  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
513  Prediscriminants = requireDecayMode.clone(),
514  loadMVAfromDB = cms.bool(True),
515  mvaName = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMwLT2017v1"),
516  mvaOpt = cms.string("DBoldDMwLTwGJ"),
517  srcTauTransverseImpactParameters = cms.InputTag('hpsPFTauTransverseImpactParameters'),
518  srcChargedIsoPtSum = cms.InputTag('hpsPFTauChargedIsoPtSum'),
519  srcNeutralIsoPtSum = cms.InputTag('hpsPFTauNeutralIsoPtSum'),
520  srcPUcorrPtSum = cms.InputTag('hpsPFTauPUcorrPtSum'),
521  srcPhotonPtSumOutsideSignalCone = cms.InputTag('hpsPFTauPhotonPtSumOutsideSignalCone'),
522  srcFootprintCorrection = cms.InputTag('hpsPFTauFootprintCorrection'),
523  verbosity = cms.int32(0)
524 )
525 
526 hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT = discriminationByIsolationMVArun2v1VLoose.clone(
527  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
528  Prediscriminants = requireDecayMode.clone(),
529  toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw'),
530  key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw:category'),
531  loadMVAfromDB = cms.bool(True),
532  mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMwLT2017v1_mvaOutput_normalization"),
533  mapping = cms.VPSet(
534  cms.PSet(
535  category = cms.uint32(0),
536  cut = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMwLT2017v1_WPEff90"),
537  variable = cms.string("pt")
538  )
539  )
540 )
541 hpsPFTauDiscriminationByVVLooseIsolationMVArun2v1DBoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT.clone()
542 hpsPFTauDiscriminationByVVLooseIsolationMVArun2v1DBoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMwLT2017v1_WPEff95")
543 hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT.clone()
544 hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMwLT2017v1_WPEff80")
545 hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT.clone()
546 hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMwLT2017v1_WPEff70")
547 hpsPFTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT.clone()
548 hpsPFTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMwLT2017v1_WPEff60")
549 hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT.clone()
550 hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMwLT2017v1_WPEff50")
551 hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT.clone()
552 hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMwLT2017v1_WPEff40")
553 
554 hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw = hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw.clone(
555  mvaName = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1"),
556  mvaOpt = cms.string("DBnewDMwLT"),
557  verbosity = cms.int32(0)
558 )
559 
560 hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT.clone(
561  toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw'),
562  key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw:category'),
563  loadMVAfromDB = cms.bool(True),
564  mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_mvaOutput_normalization"),
565  mapping = cms.VPSet(
566  cms.PSet(
567  category = cms.uint32(0),
568  cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff90"),
569  variable = cms.string("pt")
570  )
571  )
572 )
573 hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT.clone()
574 hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff80")
575 hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT.clone()
576 hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff70")
577 hpsPFTauDiscriminationByTightIsolationMVArun2v1DBnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT.clone()
578 hpsPFTauDiscriminationByTightIsolationMVArun2v1DBnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff60")
579 hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT.clone()
580 hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff50")
581 hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT.clone()
582 hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff40")
583 
584 hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw = hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw.clone(
585  mvaName = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1"),
586  mvaOpt = cms.string("PWoldDMwLT"),
587  srcPUcorrPtSum = cms.InputTag('hpsPFTauNeutralIsoPtSumWeight'),
588  verbosity = cms.int32(0)
589 )
590 
591 hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT.clone(
592  toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw'),
593  key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw:category'),
594  loadMVAfromDB = cms.bool(True),
595  mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_mvaOutput_normalization"),
596  mapping = cms.VPSet(
597  cms.PSet(
598  category = cms.uint32(0),
599  cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff90"),
600  variable = cms.string("pt")
601  )
602  )
603 )
604 hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT.clone()
605 hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff80")
606 hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT.clone()
607 hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff70")
608 hpsPFTauDiscriminationByTightIsolationMVArun2v1PWoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT.clone()
609 hpsPFTauDiscriminationByTightIsolationMVArun2v1PWoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff60")
610 hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT.clone()
611 hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff50")
612 hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT.clone()
613 hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff40")
614 
615 hpsPFTauDiscriminationByIsolationMVArun2v1PWnewDMwLTraw = hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw.clone(
616  mvaName = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1"),
617  mvaOpt = cms.string("PWnewDMwLT"),
618  verbosity = cms.int32(0)
619 )
620 
621 hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT.clone(
622  toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWnewDMwLTraw'),
623  key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWnewDMwLTraw:category'),
624  loadMVAfromDB = cms.bool(True),
625  mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_mvaOutput_normalization"),
626  mapping = cms.VPSet(
627  cms.PSet(
628  category = cms.uint32(0),
629  cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff90"),
630  variable = cms.string("pt")
631  )
632  )
633 )
634 hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT.clone()
635 hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff80")
636 hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT.clone()
637 hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff70")
638 hpsPFTauDiscriminationByTightIsolationMVArun2v1PWnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT.clone()
639 hpsPFTauDiscriminationByTightIsolationMVArun2v1PWnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff60")
640 hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT.clone()
641 hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff50")
642 hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT.clone()
643 hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff40")
644 
645 hpsPFTauChargedIsoPtSumdR03 = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits.clone(
646  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
647  Prediscriminants = requireDecayMode.clone(),
648  ApplyDiscriminationByECALIsolation = cms.bool(False),
649  ApplyDiscriminationByTrackerIsolation = cms.bool(True),
650  applySumPtCut = cms.bool(False),
651  applyDeltaBetaCorrection = cms.bool(False),
652  storeRawSumPt = cms.bool(True),
653  storeRawPUsumPt = cms.bool(False),
654  customOuterCone = cms.double(0.3),
655  isoConeSizeForDeltaBeta = cms.double(0.8),
656  verbosity = cms.int32(0)
657 )
658 hpsPFTauNeutralIsoPtSumdR03 = hpsPFTauChargedIsoPtSumdR03.clone(
659  ApplyDiscriminationByECALIsolation = cms.bool(True),
660  ApplyDiscriminationByTrackerIsolation = cms.bool(False),
661  verbosity = cms.int32(0)
662 )
663 hpsPFTauPUcorrPtSumdR03 = hpsPFTauChargedIsoPtSumdR03.clone(
664  ApplyDiscriminationByECALIsolation = cms.bool(False),
665  ApplyDiscriminationByTrackerIsolation = cms.bool(False),
666  applyDeltaBetaCorrection = cms.bool(True),
667  storeRawSumPt = cms.bool(False),
668  storeRawPUsumPt = cms.bool(True),
669  verbosity = cms.int32(0)
670 )
671 hpsPFTauNeutralIsoPtSumWeightdR03 = hpsPFTauChargedIsoPtSumdR03.clone(
672  ApplyDiscriminationByWeightedECALIsolation = cms.bool(True),
673  ApplyDiscriminationByTrackerIsolation = cms.bool(False),
674  UseAllPFCandsForWeights = cms.bool(True),
675  verbosity = cms.int32(0)
676 )
677 hpsPFTauFootprintCorrectiondR03 = hpsPFTauChargedIsoPtSumdR03.clone(
678  ApplyDiscriminationByTrackerIsolation = cms.bool(False),
679  storeRawSumPt = cms.bool(False),
680  storeRawFootprintCorrection = cms.bool(True),
681  verbosity = cms.int32(0)
682 )
683 hpsPFTauPhotonPtSumOutsideSignalConedR03 = hpsPFTauChargedIsoPtSumdR03.clone(
684  ApplyDiscriminationByTrackerIsolation = cms.bool(False),
685  storeRawSumPt = cms.bool(False),
686  storeRawPhotonSumPt_outsideSignalCone = cms.bool(True),
687  verbosity = cms.int32(0)
688 )
689 
690 hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw = hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw.clone(
691  mvaName = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1"),
692  mvaOpt = cms.string("DBoldDMwLT"),
693  srcChargedIsoPtSum = cms.InputTag('hpsPFTauChargedIsoPtSumdR03'),
694  srcNeutralIsoPtSum = cms.InputTag('hpsPFTauNeutralIsoPtSumdR03'),
695  srcPUcorrPtSum = cms.InputTag('hpsPFTauPUcorrPtSumdR03'),
696  srcPhotonPtSumOutsideSignalCone = cms.InputTag('hpsPFTauPhotonPtSumOutsideSignalConedR03'),
697  srcFootprintCorrection = cms.InputTag('hpsPFTauFootprintCorrectiondR03'),
698  verbosity = cms.int32(0)
699 )
700 hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT.clone(
701  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
702  Prediscriminants = requireDecayMode.clone(),
703  toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw'),
704  key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw:category'),
705  loadMVAfromDB = cms.bool(True),
706  mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_mvaOutput_normalization"),
707  mapping = cms.VPSet(
708  cms.PSet(
709  category = cms.uint32(0),
710  cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff90"),
711  variable = cms.string("pt")
712  )
713  )
714 )
715 hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT.clone()
716 hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff80")
717 hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT.clone()
718 hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff70")
719 hpsPFTauDiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT.clone()
720 hpsPFTauDiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff60")
721 hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT.clone()
722 hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff50")
723 hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT.clone()
724 hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff40")
725 
726 hpsPFTauDiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw = hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw.clone(
727  mvaName = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1"),
728  mvaOpt = cms.string("PWoldDMwLT"),
729  srcPUcorrPtSum = cms.InputTag('hpsPFTauNeutralIsoPtSumWeightdR03'),
730  verbosity = cms.int32(0)
731 )
732 hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT.clone(
733  toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw'),
734  key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw:category'),
735  loadMVAfromDB = cms.bool(True),
736  mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_mvaOutput_normalization"),
737  mapping = cms.VPSet(
738  cms.PSet(
739  category = cms.uint32(0),
740  cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff90"),
741  variable = cms.string("pt")
742  )
743  )
744 )
745 hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT.clone()
746 hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff80")
747 hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT.clone()
748 hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff70")
749 hpsPFTauDiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT.clone()
750 hpsPFTauDiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff60")
751 hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT.clone()
752 hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff50")
753 hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT.clone()
754 hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff40")
755 
756 hpsPFTauMVAIsolation2Task = cms.Task(
757  hpsPFTauChargedIsoPtSum,
758  hpsPFTauNeutralIsoPtSum,
759  hpsPFTauPUcorrPtSum,
760  hpsPFTauNeutralIsoPtSumWeight,
761  hpsPFTauFootprintCorrection,
762  hpsPFTauPhotonPtSumOutsideSignalCone,
763  hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw,
764  hpsPFTauDiscriminationByVVLooseIsolationMVArun2v1DBoldDMwLT,
765  hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT,
766  hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT,
767  hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT,
768  hpsPFTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT,
769  hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT,
770  hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT,
771  hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw,
772  hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT,
773  hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBnewDMwLT,
774  hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBnewDMwLT,
775  hpsPFTauDiscriminationByTightIsolationMVArun2v1DBnewDMwLT,
776  hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBnewDMwLT,
777  hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT,
778  hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw,
779  hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT,
780  hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWoldDMwLT,
781  hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWoldDMwLT,
782  hpsPFTauDiscriminationByTightIsolationMVArun2v1PWoldDMwLT,
783  hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWoldDMwLT,
784  hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT,
785  hpsPFTauDiscriminationByIsolationMVArun2v1PWnewDMwLTraw,
786  hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT,
787  hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWnewDMwLT,
788  hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWnewDMwLT,
789  hpsPFTauDiscriminationByTightIsolationMVArun2v1PWnewDMwLT,
790  hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWnewDMwLT,
791  hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT,
792  hpsPFTauChargedIsoPtSumdR03,
793  hpsPFTauNeutralIsoPtSumdR03,
794  hpsPFTauPUcorrPtSumdR03,
795  hpsPFTauNeutralIsoPtSumWeightdR03,
796  hpsPFTauFootprintCorrectiondR03,
797  hpsPFTauPhotonPtSumOutsideSignalConedR03,
798  hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw,
799  hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT,
800  hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT,
801  hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT,
802  hpsPFTauDiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT,
803  hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT,
804  hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT,
805  hpsPFTauDiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw,
806  hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT,
807  hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT,
808  hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT,
809  hpsPFTauDiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT,
810  hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT,
811  hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT
812 )
813 hpsPFTauMVAIsolation2Seq = cms.Sequence(
814  hpsPFTauMVAIsolation2Task
815 )
816 
817 produceHPSPFTausTask = cms.Task(
818  hpsSelectionDiscriminator,
819  #hpsTightIsolationCleaner,
820  #hpsMediumIsolationCleaner,
821  #hpsLooseIsolationCleaner,
822  #hpsVLooseIsolationCleaner,
823  hpsPFTauProducerSansRefs,
824  hpsPFTauProducer
825 )
826 produceHPSPFTaus = cms.Sequence(
827  produceHPSPFTausTask
828 )
829 produceAndDiscriminateHPSPFTausTask = cms.Task(
830  produceHPSPFTausTask,
831  hpsPFTauDiscriminationByDecayModeFindingNewDMs,
832  hpsPFTauDiscriminationByDecayModeFindingOldDMs,
833  hpsPFTauDiscriminationByDecayModeFinding, # CV: kept for backwards compatibility
834  hpsPFTauDiscriminationByLooseChargedIsolation,
835  hpsPFTauDiscriminationByLooseIsolation,
836  hpsPFTauDiscriminationByCombinedIsolationDBSumPtCorr3HitsTask,
837  hpsPFTauDiscriminationByCombinedIsolationDBSumPtCorr3HitsdR03Task,
838  hpsPFTauDiscriminationByPileupWeightedIsolation3HitsTask,
839  hpsPFTauDiscriminationByLooseElectronRejection,
840  hpsPFTauDiscriminationByMediumElectronRejection,
841  hpsPFTauDiscriminationByTightElectronRejection,
842  hpsPFTauDiscriminationByMVA6rawElectronRejection,
843  hpsPFTauDiscriminationByMVA6VLooseElectronRejection,
844  hpsPFTauDiscriminationByMVA6LooseElectronRejection,
845  hpsPFTauDiscriminationByMVA6MediumElectronRejection,
846  hpsPFTauDiscriminationByMVA6TightElectronRejection,
847  hpsPFTauDiscriminationByMVA6VTightElectronRejection,
848  hpsPFTauDiscriminationByDeadECALElectronRejection,
849  hpsPFTauDiscriminationByLooseMuonRejection3,
850  hpsPFTauDiscriminationByTightMuonRejection3,
851  hpsPFTauVertexAndImpactParametersTask,
852  hpsPFTauMVAIsolation2Task
853 )
854 produceAndDiscriminateHPSPFTaus = cms.Sequence(
855  produceAndDiscriminateHPSPFTausTask
856 )
MVAs from SQLlite file/prep.