test
CMS 3D CMS Logo

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