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 = 0.8
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 = 0.5
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 = 0.5
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 = 0.5
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 = 0.5
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 hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr3Hits = cms.Sequence(
179  hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits *
180  hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits *
181  hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits *
182  hpsPFTauDiscriminationByRawCombinedIsolationDBSumPtCorr3Hits
183 )
184 ## Discrimination ByLooseCombinedIsolationDBSumPtCorr3HitsdR03
185 hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3HitsdR03 = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits.clone()
186 hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3HitsdR03.deltaBetaFactor = cms.string('0.0720') # 0.2*(0.3/0.5)^2
187 hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3HitsdR03.customOuterCone = cms.double(0.3)
188 ## Discrimination ByMediumCombinedIsolationDBSumPtCorr3HitsdR03
189 hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3HitsdR03 = hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits.clone()
190 hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3HitsdR03.deltaBetaFactor = cms.string('0.0720') # 0.2*(0.3/0.5)^2
191 hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3HitsdR03.customOuterCone = cms.double(0.3)
192 ## Discrimination ByTightCombinedIsolationDBSumPtCorr3HitsdR03
193 hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3HitsdR03 = hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits.clone()
194 hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3HitsdR03.deltaBetaFactor = cms.string('0.0720') # 0.2*(0.3/0.5)^2
195 hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3HitsdR03.customOuterCone = cms.double(0.3)
196 ## hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr3HitsdR03
197 hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr3HitsdR03 = cms.Sequence(
198  hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3HitsdR03 *
199  hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3HitsdR03 *
200  hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3HitsdR03
201 )
202 ## ByLoosePileupWeightedIsolation3Hits (kept for Validation)
203 hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits.clone(
204  ApplyDiscriminationByECALIsolation = cms.bool(False),
205  applyDeltaBetaCorrection = cms.bool(False),
206  ApplyDiscriminationByWeightedECALIsolation = cms.bool(True),
207  UseAllPFCandsForWeights = cms.bool(True),
208  applyFootprintCorrection = cms.bool(True),
209  applyPhotonPtSumOutsideSignalConeCut = cms.bool(True)
210 )
211 ## ByMediumPileupWeightedIsolation3Hits (kept for Validation)
212 hpsPFTauDiscriminationByMediumPileupWeightedIsolation3Hits = hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits.clone(
213  maximumSumPtCut = hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits.maximumSumPtCut
214 )
215 ## ByTightPileupWeightedIsolation3Hits (kept for Validation)
216 hpsPFTauDiscriminationByTightPileupWeightedIsolation3Hits = hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits.clone(
217  maximumSumPtCut = hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits.maximumSumPtCut
218 )
219 ## ByRawPileupWeightedIsolation3Hits (kept for Validation)
220 hpsPFTauDiscriminationByRawPileupWeightedIsolation3Hits = hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits.clone(
221  Prediscriminants = cms.PSet(
222  BooleanOperator = cms.string("and"),
223  decayMode = cms.PSet(
224  Producer = cms.InputTag('hpsPFTauDiscriminationByPhotonPtSumOutsideSignalCone'),
225  cut = cms.double(0.5)
226  )
227  ),
228  applySumPtCut = cms.bool(False),
229  storeRawSumPt = cms.bool(True)
230 )
231 ## hpsPFTauDiscriminationByPhotonPtSumOutsideSignalCone
232 hpsPFTauDiscriminationByPhotonPtSumOutsideSignalCone = hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits.clone(
233  applySumPtCut = cms.bool(False)
234 )
235 ## hpsPFTauDiscriminationByPileupWeightedIsolationSeq3Hits
236 hpsPFTauDiscriminationByPileupWeightedIsolationSeq3Hits = cms.Sequence(
237  hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits *
238  hpsPFTauDiscriminationByMediumPileupWeightedIsolation3Hits *
239  hpsPFTauDiscriminationByTightPileupWeightedIsolation3Hits *
240  hpsPFTauDiscriminationByPhotonPtSumOutsideSignalCone *
241  hpsPFTauDiscriminationByRawPileupWeightedIsolation3Hits
242 )
243 
244 
245 
246 ## ByLooseMuonRejection3
247 hpsPFTauDiscriminationByLooseMuonRejection3 = pfRecoTauDiscriminationAgainstMuon2.clone(
248  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
249  Prediscriminants = noPrediscriminants,
250  discriminatorOption = cms.string('custom'),
251  maxNumberOfMatches = cms.int32(1),
252  doCaloMuonVeto = cms.bool(True),
253  maxNumberOfHitsLast2Stations = cms.int32(-1)
254 )
255 hpsPFTauDiscriminationByTightMuonRejection3 = hpsPFTauDiscriminationByLooseMuonRejection3.clone(
256  maxNumberOfHitsLast2Stations = cms.int32(0)
257 )
258 
259 
260 ## ByLooseElectronRejection
261 hpsPFTauDiscriminationByLooseElectronRejection = pfRecoTauDiscriminationAgainstElectron.clone(
262  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
263  Prediscriminants = noPrediscriminants,
264  PFElectronMVA_maxValue = cms.double(0.6)
265 )
266 ## ByMediumElectronRejection
267 hpsPFTauDiscriminationByMediumElectronRejection = pfRecoTauDiscriminationAgainstElectron.clone(
268  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
269  Prediscriminants = noPrediscriminants,
270  ApplyCut_EcalCrackCut = cms.bool(True)
271 )
272 ## ByTightElectronRejection
273 hpsPFTauDiscriminationByTightElectronRejection = pfRecoTauDiscriminationAgainstElectron.clone(
274  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
275  Prediscriminants = noPrediscriminants,
276  ApplyCut_EcalCrackCut = cms.bool(True),
277  ApplyCut_BremCombined = cms.bool(True)
278 )
279 ## ByDeadECALElectronRejection
280 hpsPFTauDiscriminationByDeadECALElectronRejection = pfRecoTauDiscriminationAgainstElectronDeadECAL.clone(
281  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
282  Prediscriminants = requireDecayMode.clone()
283 )
284 ## ByMVA6rawElectronRejection
285 hpsPFTauDiscriminationByMVA6rawElectronRejection = pfRecoTauDiscriminationAgainstElectronMVA6.clone(
286  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
287  Prediscriminants = requireDecayMode.clone(),
288  loadMVAfromDB = cms.bool(True),
289  mvaName_NoEleMatch_woGwoGSF_BL = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL"),
290  mvaName_NoEleMatch_wGwoGSF_BL = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL"),
291  mvaName_woGwGSF_BL = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_BL"),
292  mvaName_wGwGSF_BL = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_BL"),
293  mvaName_NoEleMatch_woGwoGSF_EC = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_EC"),
294  mvaName_NoEleMatch_wGwoGSF_EC = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_EC"),
295  mvaName_woGwGSF_EC = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_EC"),
296  mvaName_wGwGSF_EC = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC")
297 )
298 ## ByMVA6VLooseElectronRejection
299 hpsPFTauDiscriminationByMVA6VLooseElectronRejection = recoTauDiscriminantCutMultiplexer.clone(
300  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
301  Prediscriminants = requireDecayMode.clone(),
302  toMultiplex = cms.InputTag('hpsPFTauDiscriminationByMVA6rawElectronRejection'),
303  key = cms.InputTag('hpsPFTauDiscriminationByMVA6rawElectronRejection:category'),
304  loadMVAfromDB = cms.bool(True),
305  mapping = cms.VPSet(
306  cms.PSet(
307  category = cms.uint32(0), # minMVANoEleMatchWOgWOgsfBL
308  cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL_WPEff99"),
309  variable = cms.string("pt")
310  ),
311  cms.PSet(
312  category = cms.uint32(2), # minMVANoEleMatchWgWOgsfBL
313  cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL_WPEff99"),
314  variable = cms.string("pt")
315  ),
316  cms.PSet(
317  category = cms.uint32(5), # minMVAWOgWgsfBL
318  cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_BL_WPEff99"),
319  variable = cms.string("pt")
320  ),
321  cms.PSet(
322  category = cms.uint32(7), # minMVAWgWgsfBL
323  cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_BL_WPEff99"),
324  variable = cms.string("pt")
325  ),
326  cms.PSet(
327  category = cms.uint32(8), # minMVANoEleMatchWOgWOgsfEC
328  cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_EC_WPEff99"),
329  variable = cms.string("pt")
330  ),
331  cms.PSet(
332  category = cms.uint32(10), # minMVANoEleMatchWgWOgsfEC
333  cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_EC_WPEff99"),
334  variable = cms.string("pt")
335  ),
336  cms.PSet(
337  category = cms.uint32(13), # minMVAWOgWgsfEC
338  cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_EC_WPEff99"),
339  variable = cms.string("pt")
340  ),
341  cms.PSet(
342  category = cms.uint32(15), # minMVAWgWgsfEC
343  cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC_WPEff99"),
344  variable = cms.string("pt")
345  )
346  )
347 )
348 ## ByMVA6LooseElectronRejection
349 hpsPFTauDiscriminationByMVA6LooseElectronRejection = copy.deepcopy(hpsPFTauDiscriminationByMVA6VLooseElectronRejection)
350 hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL_WPEff96")
351 hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL_WPEff96")
352 hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_BL_WPEff96")
353 hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_BL_WPEff96")
354 hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_EC_WPEff96")
355 hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_EC_WPEff96")
356 hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_EC_WPEff96")
357 hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC_WPEff96")
358 ## ByMVA6VMediumElectronRejection
359 hpsPFTauDiscriminationByMVA6MediumElectronRejection = copy.deepcopy(hpsPFTauDiscriminationByMVA6VLooseElectronRejection)
360 hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL_WPEff91")
361 hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL_WPEff91")
362 hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_BL_WPEff91")
363 hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_BL_WPEff91")
364 hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_EC_WPEff91")
365 hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_EC_WPEff91")
366 hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_EC_WPEff91")
367 hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC_WPEff91")
368 ## ByMVA6TightElectronRejection
369 hpsPFTauDiscriminationByMVA6TightElectronRejection = copy.deepcopy(hpsPFTauDiscriminationByMVA6VLooseElectronRejection)
370 hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL_WPEff85")
371 hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL_WPEff85")
372 hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_BL_WPEff85")
373 hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_BL_WPEff85")
374 hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_EC_WPEff85")
375 hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_EC_WPEff85")
376 hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_EC_WPEff85")
377 hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC_WPEff85")
378 ## ByMVA6VTightElectronRejection
379 hpsPFTauDiscriminationByMVA6VTightElectronRejection = copy.deepcopy(hpsPFTauDiscriminationByMVA6VLooseElectronRejection)
380 hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL_WPEff79")
381 hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL_WPEff79")
382 hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_BL_WPEff79")
383 hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_BL_WPEff79")
384 hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_EC_WPEff79")
385 hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_EC_WPEff79")
386 hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_EC_WPEff79")
387 hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC_WPEff79")
388 
389 # Define the HPS selection discriminator used in cleaning
390 hpsSelectionDiscriminator.PFTauProducer = cms.InputTag("combinatoricRecoTaus")
391 #----------------------------------------------------------------------------
392 # CV: disable 3Prong1Pi0 decay mode
393 hpsSelectionDiscriminator.decayModes = cms.VPSet(
394  decayMode_1Prong0Pi0,
395  decayMode_1Prong1Pi0,
396  decayMode_1Prong2Pi0,
397  decayMode_2Prong0Pi0,
398  decayMode_2Prong1Pi0,
399  decayMode_3Prong0Pi0,
400  decayMode_3Prong1Pi0,
401 )
402 #----------------------------------------------------------------------------
403 
404 from RecoTauTag.RecoTau.RecoTauCleaner_cfi import RecoTauCleaner
405 hpsPFTauProducerSansRefs = RecoTauCleaner.clone(
406  src = cms.InputTag("combinatoricRecoTaus")
407 )
408 hpsPFTauProducerSansRefs.cleaners[1].src = cms.InputTag("hpsSelectionDiscriminator")
409 
410 from RecoTauTag.RecoTau.RecoTauPiZeroUnembedder_cfi import RecoTauPiZeroUnembedder
411 hpsPFTauProducer = RecoTauPiZeroUnembedder.clone(
412  src = cms.InputTag("hpsPFTauProducerSansRefs")
413 )
414 
418 hpsPFTauPrimaryVertexProducer = PFTauPrimaryVertexProducer.clone(
419  PFTauTag = cms.InputTag("hpsPFTauProducer"),
420  ElectronTag = cms.InputTag(""),
421  MuonTag = cms.InputTag(""),
422  PVTag = cms.InputTag("offlinePrimaryVertices"),
423  beamSpot = cms.InputTag("offlineBeamSpot"),
424  TrackCollectionTag = cms.InputTag("generalTracks"),
425  Algorithm = cms.int32(0),
426  useBeamSpot = cms.bool(True),
427  RemoveMuonTracks = cms.bool(False),
428  RemoveElectronTracks = cms.bool(False),
429  useSelectedTaus = cms.bool(False),
430  discriminators = cms.VPSet(
431  cms.PSet(
432  discriminator = cms.InputTag('hpsPFTauDiscriminationByDecayModeFindingNewDMs'),
433  selectionCut = cms.double(0.5)
434  )
435  ),
436  cut = cms.string("pt > 18.0 & abs(eta) < 2.4")
437 )
438 
439 hpsPFTauSecondaryVertexProducer = PFTauSecondaryVertexProducer.clone(
440  PFTauTag = cms.InputTag("hpsPFTauProducer")
441 )
442 hpsPFTauTransverseImpactParameters = PFTauTransverseImpactParameters.clone(
443  PFTauTag = cms.InputTag("hpsPFTauProducer"),
444  PFTauPVATag = cms.InputTag("hpsPFTauPrimaryVertexProducer"),
445  PFTauSVATag = cms.InputTag("hpsPFTauSecondaryVertexProducer"),
446  useFullCalculation = cms.bool(True)
447 )
448 hpsPFTauVertexAndImpactParametersSeq = cms.Sequence(
449  hpsPFTauPrimaryVertexProducer*
450  hpsPFTauSecondaryVertexProducer*
451  hpsPFTauTransverseImpactParameters
452 )
453 
455 hpsPFTauChargedIsoPtSum = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits.clone(
456  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
457  Prediscriminants = requireDecayMode.clone(),
458  ApplyDiscriminationByECALIsolation = cms.bool(False),
459  ApplyDiscriminationByTrackerIsolation = cms.bool(True),
460  applySumPtCut = cms.bool(False),
461  applyDeltaBetaCorrection = cms.bool(False),
462  storeRawSumPt = cms.bool(True),
463  storeRawPUsumPt = cms.bool(False),
464  customOuterCone = PFRecoTauPFJetInputs.isolationConeSize,
465  isoConeSizeForDeltaBeta = cms.double(0.8),
466  verbosity = cms.int32(0)
467 )
468 hpsPFTauNeutralIsoPtSum = hpsPFTauChargedIsoPtSum.clone(
469  ApplyDiscriminationByECALIsolation = cms.bool(True),
470  ApplyDiscriminationByTrackerIsolation = cms.bool(False),
471  verbosity = cms.int32(0)
472 )
473 hpsPFTauPUcorrPtSum = hpsPFTauChargedIsoPtSum.clone(
474  ApplyDiscriminationByECALIsolation = cms.bool(False),
475  ApplyDiscriminationByTrackerIsolation = cms.bool(False),
476  applyDeltaBetaCorrection = cms.bool(True),
477  storeRawSumPt = cms.bool(False),
478  storeRawPUsumPt = cms.bool(True),
479  verbosity = cms.int32(0)
480 )
481 hpsPFTauNeutralIsoPtSumWeight = hpsPFTauChargedIsoPtSum.clone(
482  ApplyDiscriminationByWeightedECALIsolation = cms.bool(True),
483  ApplyDiscriminationByTrackerIsolation = cms.bool(False),
484  UseAllPFCandsForWeights = cms.bool(True),
485  verbosity = cms.int32(0)
486 )
487 hpsPFTauFootprintCorrection = hpsPFTauChargedIsoPtSum.clone(
488  ApplyDiscriminationByTrackerIsolation = cms.bool(False),
489  storeRawSumPt = cms.bool(False),
490  storeRawFootprintCorrection = cms.bool(True),
491  verbosity = cms.int32(0)
492 )
493 hpsPFTauPhotonPtSumOutsideSignalCone = hpsPFTauChargedIsoPtSum.clone(
494  ApplyDiscriminationByTrackerIsolation = cms.bool(False),
495  storeRawSumPt = cms.bool(False),
496  storeRawPhotonSumPt_outsideSignalCone = cms.bool(True),
497  verbosity = cms.int32(0)
498 )
499 
500 #Define new Run2 MVA isolations
502 hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw = discriminationByIsolationMVArun2v1raw.clone(
503  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
504  Prediscriminants = requireDecayMode.clone(),
505  loadMVAfromDB = cms.bool(True),
506  mvaName = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1"),
507  mvaOpt = cms.string("DBoldDMwLT"),
508  srcTauTransverseImpactParameters = cms.InputTag('hpsPFTauTransverseImpactParameters'),
509  srcChargedIsoPtSum = cms.InputTag('hpsPFTauChargedIsoPtSum'),
510  srcNeutralIsoPtSum = cms.InputTag('hpsPFTauNeutralIsoPtSum'),
511  srcPUcorrPtSum = cms.InputTag('hpsPFTauPUcorrPtSum'),
512  srcPhotonPtSumOutsideSignalCone = cms.InputTag('hpsPFTauPhotonPtSumOutsideSignalCone'),
513  srcFootprintCorrection = cms.InputTag('hpsPFTauFootprintCorrection'),
514  verbosity = cms.int32(0)
515 )
516 
517 hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT = discriminationByIsolationMVArun2v1VLoose.clone(
518  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
519  Prediscriminants = requireDecayMode.clone(),
520  toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw'),
521  key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw:category'),
522  loadMVAfromDB = cms.bool(True),
523  mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_mvaOutput_normalization"),
524  mapping = cms.VPSet(
525  cms.PSet(
526  category = cms.uint32(0),
527  cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff90"),
528  variable = cms.string("pt")
529  )
530  )
531 )
532 hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT.clone()
533 hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff80")
534 hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT.clone()
535 hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff70")
536 hpsPFTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT.clone()
537 hpsPFTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff60")
538 hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT.clone()
539 hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff50")
540 hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT.clone()
541 hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff40")
542 
543 hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw = hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw.clone(
544  mvaName = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1"),
545  mvaOpt = cms.string("DBnewDMwLT"),
546  verbosity = cms.int32(0)
547 )
548 
549 hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT.clone(
550  toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw'),
551  key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw:category'),
552  loadMVAfromDB = cms.bool(True),
553  mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_mvaOutput_normalization"),
554  mapping = cms.VPSet(
555  cms.PSet(
556  category = cms.uint32(0),
557  cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff90"),
558  variable = cms.string("pt")
559  )
560  )
561 )
562 hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT.clone()
563 hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff80")
564 hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT.clone()
565 hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff70")
566 hpsPFTauDiscriminationByTightIsolationMVArun2v1DBnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT.clone()
567 hpsPFTauDiscriminationByTightIsolationMVArun2v1DBnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff60")
568 hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT.clone()
569 hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff50")
570 hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT.clone()
571 hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff40")
572 
573 hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw = hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw.clone(
574  mvaName = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1"),
575  mvaOpt = cms.string("PWoldDMwLT"),
576  srcPUcorrPtSum = cms.InputTag('hpsPFTauNeutralIsoPtSumWeight'),
577  verbosity = cms.int32(0)
578 )
579 
580 hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT.clone(
581  toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw'),
582  key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw:category'),
583  loadMVAfromDB = cms.bool(True),
584  mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_mvaOutput_normalization"),
585  mapping = cms.VPSet(
586  cms.PSet(
587  category = cms.uint32(0),
588  cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff90"),
589  variable = cms.string("pt")
590  )
591  )
592 )
593 hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT.clone()
594 hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff80")
595 hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT.clone()
596 hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff70")
597 hpsPFTauDiscriminationByTightIsolationMVArun2v1PWoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT.clone()
598 hpsPFTauDiscriminationByTightIsolationMVArun2v1PWoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff60")
599 hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT.clone()
600 hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff50")
601 hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT.clone()
602 hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff40")
603 
604 hpsPFTauDiscriminationByIsolationMVArun2v1PWnewDMwLTraw = hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw.clone(
605  mvaName = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1"),
606  mvaOpt = cms.string("PWnewDMwLT"),
607  verbosity = cms.int32(0)
608 )
609 
610 hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT.clone(
611  toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWnewDMwLTraw'),
612  key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWnewDMwLTraw:category'),
613  loadMVAfromDB = cms.bool(True),
614  mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_mvaOutput_normalization"),
615  mapping = cms.VPSet(
616  cms.PSet(
617  category = cms.uint32(0),
618  cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff90"),
619  variable = cms.string("pt")
620  )
621  )
622 )
623 hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT.clone()
624 hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff80")
625 hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT.clone()
626 hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff70")
627 hpsPFTauDiscriminationByTightIsolationMVArun2v1PWnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT.clone()
628 hpsPFTauDiscriminationByTightIsolationMVArun2v1PWnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff60")
629 hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT.clone()
630 hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff50")
631 hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT.clone()
632 hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff40")
633 
634 hpsPFTauChargedIsoPtSumdR03 = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits.clone(
635  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
636  Prediscriminants = requireDecayMode.clone(),
637  ApplyDiscriminationByECALIsolation = cms.bool(False),
638  ApplyDiscriminationByTrackerIsolation = cms.bool(True),
639  applySumPtCut = cms.bool(False),
640  applyDeltaBetaCorrection = cms.bool(False),
641  storeRawSumPt = cms.bool(True),
642  storeRawPUsumPt = cms.bool(False),
643  customOuterCone = cms.double(0.3),
644  isoConeSizeForDeltaBeta = cms.double(0.8),
645  verbosity = cms.int32(0)
646 )
647 hpsPFTauNeutralIsoPtSumdR03 = hpsPFTauChargedIsoPtSumdR03.clone(
648  ApplyDiscriminationByECALIsolation = cms.bool(True),
649  ApplyDiscriminationByTrackerIsolation = cms.bool(False),
650  verbosity = cms.int32(0)
651 )
652 hpsPFTauPUcorrPtSumdR03 = hpsPFTauChargedIsoPtSumdR03.clone(
653  ApplyDiscriminationByECALIsolation = cms.bool(False),
654  ApplyDiscriminationByTrackerIsolation = cms.bool(False),
655  applyDeltaBetaCorrection = cms.bool(True),
656  storeRawSumPt = cms.bool(False),
657  storeRawPUsumPt = cms.bool(True),
658  verbosity = cms.int32(0)
659 )
660 hpsPFTauNeutralIsoPtSumWeightdR03 = hpsPFTauChargedIsoPtSumdR03.clone(
661  ApplyDiscriminationByWeightedECALIsolation = cms.bool(True),
662  ApplyDiscriminationByTrackerIsolation = cms.bool(False),
663  UseAllPFCandsForWeights = cms.bool(True),
664  verbosity = cms.int32(0)
665 )
666 hpsPFTauFootprintCorrectiondR03 = hpsPFTauChargedIsoPtSumdR03.clone(
667  ApplyDiscriminationByTrackerIsolation = cms.bool(False),
668  storeRawSumPt = cms.bool(False),
669  storeRawFootprintCorrection = cms.bool(True),
670  verbosity = cms.int32(0)
671 )
672 hpsPFTauPhotonPtSumOutsideSignalConedR03 = hpsPFTauChargedIsoPtSumdR03.clone(
673  ApplyDiscriminationByTrackerIsolation = cms.bool(False),
674  storeRawSumPt = cms.bool(False),
675  storeRawPhotonSumPt_outsideSignalCone = cms.bool(True),
676  verbosity = cms.int32(0)
677 )
678 
679 hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw = hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw.clone(
680  mvaName = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1"),
681  mvaOpt = cms.string("DBoldDMwLT"),
682  srcChargedIsoPtSum = cms.InputTag('hpsPFTauChargedIsoPtSumdR03'),
683  srcNeutralIsoPtSum = cms.InputTag('hpsPFTauNeutralIsoPtSumdR03'),
684  srcPUcorrPtSum = cms.InputTag('hpsPFTauPUcorrPtSumdR03'),
685  srcPhotonPtSumOutsideSignalCone = cms.InputTag('hpsPFTauPhotonPtSumOutsideSignalConedR03'),
686  srcFootprintCorrection = cms.InputTag('hpsPFTauFootprintCorrectiondR03'),
687  verbosity = cms.int32(0)
688 )
689 hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT.clone(
690  PFTauProducer = cms.InputTag('hpsPFTauProducer'),
691  Prediscriminants = requireDecayMode.clone(),
692  toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw'),
693  key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw:category'),
694  loadMVAfromDB = cms.bool(True),
695  mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_mvaOutput_normalization"),
696  mapping = cms.VPSet(
697  cms.PSet(
698  category = cms.uint32(0),
699  cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff90"),
700  variable = cms.string("pt")
701  )
702  )
703 )
704 hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT.clone()
705 hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff80")
706 hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT.clone()
707 hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff70")
708 hpsPFTauDiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT.clone()
709 hpsPFTauDiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff60")
710 hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT.clone()
711 hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff50")
712 hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT.clone()
713 hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff40")
714 
715 hpsPFTauDiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw = hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw.clone(
716  mvaName = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1"),
717  mvaOpt = cms.string("PWoldDMwLT"),
718  srcPUcorrPtSum = cms.InputTag('hpsPFTauNeutralIsoPtSumWeightdR03'),
719  verbosity = cms.int32(0)
720 )
721 hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT.clone(
722  toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw'),
723  key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw:category'),
724  loadMVAfromDB = cms.bool(True),
725  mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_mvaOutput_normalization"),
726  mapping = cms.VPSet(
727  cms.PSet(
728  category = cms.uint32(0),
729  cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff90"),
730  variable = cms.string("pt")
731  )
732  )
733 )
734 hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT.clone()
735 hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff80")
736 hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT.clone()
737 hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff70")
738 hpsPFTauDiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT.clone()
739 hpsPFTauDiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff60")
740 hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT.clone()
741 hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff50")
742 hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT.clone()
743 hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff40")
744 
745 hpsPFTauMVAIsolation2Seq = cms.Sequence(
746  hpsPFTauChargedIsoPtSum
747  + hpsPFTauNeutralIsoPtSum
748  + hpsPFTauPUcorrPtSum
749  + hpsPFTauNeutralIsoPtSumWeight
750  + hpsPFTauFootprintCorrection
751  + hpsPFTauPhotonPtSumOutsideSignalCone
752  + hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw
753  + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT
754  + hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT
755  + hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT
756  + hpsPFTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT
757  + hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT
758  + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT
759  + hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw
760  + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT
761  + hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBnewDMwLT
762  + hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBnewDMwLT
763  + hpsPFTauDiscriminationByTightIsolationMVArun2v1DBnewDMwLT
764  + hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBnewDMwLT
765  + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT
766  + hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw
767  + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT
768  + hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWoldDMwLT
769  + hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWoldDMwLT
770  + hpsPFTauDiscriminationByTightIsolationMVArun2v1PWoldDMwLT
771  + hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWoldDMwLT
772  + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT
773  + hpsPFTauDiscriminationByIsolationMVArun2v1PWnewDMwLTraw
774  + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT
775  + hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWnewDMwLT
776  + hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWnewDMwLT
777  + hpsPFTauDiscriminationByTightIsolationMVArun2v1PWnewDMwLT
778  + hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWnewDMwLT
779  + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT
780  + hpsPFTauChargedIsoPtSumdR03
781  + hpsPFTauNeutralIsoPtSumdR03
782  + hpsPFTauPUcorrPtSumdR03
783  + hpsPFTauNeutralIsoPtSumWeightdR03
784  + hpsPFTauFootprintCorrectiondR03
785  + hpsPFTauPhotonPtSumOutsideSignalConedR03
786  + hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw
787  + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT
788  + hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT
789  + hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT
790  + hpsPFTauDiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT
791  + hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT
792  + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT
793  + hpsPFTauDiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw
794  + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT
795  + hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT
796  + hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT
797  + hpsPFTauDiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT
798  + hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT
799  + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT
800 )
801 
802 produceHPSPFTaus = cms.Sequence(
803  hpsSelectionDiscriminator
804  #*hpsTightIsolationCleaner
805  #*hpsMediumIsolationCleaner
806  #*hpsLooseIsolationCleaner
807  #*hpsVLooseIsolationCleaner
808  *hpsPFTauProducerSansRefs
809  *hpsPFTauProducer
810 )
811 
812 produceAndDiscriminateHPSPFTaus = cms.Sequence(
813  produceHPSPFTaus*
814  hpsPFTauDiscriminationByDecayModeFindingNewDMs*
815  hpsPFTauDiscriminationByDecayModeFindingOldDMs*
816  hpsPFTauDiscriminationByDecayModeFinding* # CV: kept for backwards compatibility
817  hpsPFTauDiscriminationByLooseChargedIsolation*
818  hpsPFTauDiscriminationByLooseIsolation*
819  hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr3Hits*
820  hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr3HitsdR03*
821  hpsPFTauDiscriminationByPileupWeightedIsolationSeq3Hits*
822  hpsPFTauDiscriminationByLooseElectronRejection*
823  hpsPFTauDiscriminationByMediumElectronRejection*
824  hpsPFTauDiscriminationByTightElectronRejection*
825  hpsPFTauDiscriminationByMVA6rawElectronRejection*
826  hpsPFTauDiscriminationByMVA6VLooseElectronRejection*
827  hpsPFTauDiscriminationByMVA6LooseElectronRejection*
828  hpsPFTauDiscriminationByMVA6MediumElectronRejection*
829  hpsPFTauDiscriminationByMVA6TightElectronRejection*
830  hpsPFTauDiscriminationByMVA6VTightElectronRejection*
831  hpsPFTauDiscriminationByDeadECALElectronRejection*
832  hpsPFTauDiscriminationByLooseMuonRejection3*
833  hpsPFTauDiscriminationByTightMuonRejection3*
834  hpsPFTauVertexAndImpactParametersSeq*
835  hpsPFTauMVAIsolation2Seq
836 )
MVAs from SQLlite file/prep.