1 from __future__
import print_function
2 import FWCore.ParameterSet.Config
as cms
9 """class to rerun the tau seq and acces trainings from the database"""
10 availableDiscriminators = [
11 "2017v1",
"2017v2",
"newDM2017v2",
"dR0p32017v2",
"2016v1",
"newDM2016v1",
12 "deepTau2017v1",
"deepTau2017v2",
"deepTau2017v2p1",
13 "DPFTau_2016_v0",
"DPFTau_2016_v1",
19 def __init__(self, process, debug = False,
20 originalTauName =
"slimmedTaus",
21 updatedTauName =
"slimmedTausNewID",
23 toKeep = [
"deepTau2017v2p1"],
24 tauIdDiscrMVA_trainings_run2_2017 = {
'tauIdMVAIsoDBoldDMwLT2017' :
"tauIdMVAIsoDBoldDMwLT2017", },
25 tauIdDiscrMVA_WPs_run2_2017 = {
26 'tauIdMVAIsoDBoldDMwLT2017' : {
27 'Eff95' :
"DBoldDMwLTEff95",
28 'Eff90' :
"DBoldDMwLTEff90",
29 'Eff80' :
"DBoldDMwLTEff80",
30 'Eff70' :
"DBoldDMwLTEff70",
31 'Eff60' :
"DBoldDMwLTEff60",
32 'Eff50' :
"DBoldDMwLTEff50",
33 'Eff40' :
"DBoldDMwLTEff40"
36 tauIdDiscrMVA_2017_version =
"v1",
39 super(TauIDEmbedder, self).
__init__()
45 self.process.load(
'RecoTauTag.Configuration.loadRecoTauTagMVAsFromPrepDB_cfi')
46 if len(conditionDB) != 0:
47 self.process.CondDBTauConnection.connect = cms.string(conditionDB)
48 self.process.loadRecoTauTagMVAsFromPrepDB.connect = cms.string(conditionDB)
58 if discr
not in TauIDEmbedder.availableDiscriminators:
59 raise RuntimeError(
'TauIDEmbedder: discriminator "{}" is not supported'.
format(discr))
65 """returns 'CMSSW_X_Y_Z'"""
66 cmssw_version = os.environ[
"CMSSW_VERSION"]
67 if debug:
print (
"get_cmssw_version:", cmssw_version)
72 """returns '(release, subversion, patch)' (without 'CMSSW_')"""
73 v = klass.get_cmssw_version().
split(
"CMSSW_")[1].
split(
"_")[0:3]
74 if debug:
print (
"get_cmssw_version_number:", v)
79 return int(v[0]), int(v[1]), patch
83 version = release * 10000 + subversion * 100 + patch + 1
84 if debug:
print (
"versionToInt:", version)
90 split_cmssw_version = klass.get_cmssw_version_number()
91 if klass.versionToInt(release, subversion, patch) > klass.versionToInt(split_cmssw_version[0], split_cmssw_version[1], split_cmssw_version[2]):
92 if debug:
print (
"is_above_cmssw_version:",
False)
95 if debug:
print (
"is_above_cmssw_version:",
True)
99 return cms.PSet(inputTag = cms.InputTag(module), workingPointIndex = cms.int32(-1
if wp==
"raw" else -2
if wp==
"category" else getattr(self.
process, module).workingPoints.index(wp)))
102 if self.
debug:
print (
"loadMVA_WPs_run2_2017: performed")
104 for training, gbrForestName
in self.tauIdDiscrMVA_trainings_run2_2017.items():
106 self.process.loadRecoTauTagMVAsFromPrepDB.toGet.append(
108 record = cms.string(
'GBRWrapperRcd'),
115 self.process.loadRecoTauTagMVAsFromPrepDB.toGet.append(
117 record = cms.string(
'PhysicsTGraphPayloadRcd'),
123 self.process.loadRecoTauTagMVAsFromPrepDB.toGet.append(
125 record = cms.string(
'PhysicsTFormulaPayloadRcd'),
132 _rerunMvaIsolationTask = cms.Task()
133 _rerunMvaIsolationSequence = cms.Sequence()
134 tauIDSources = cms.PSet()
137 if "2017v1" in self.
toKeep:
140 'tauIdMVAIsoDBoldDMwLT2017' :
"tauIdMVAIsoDBoldDMwLT2017",
143 'tauIdMVAIsoDBoldDMwLT2017' : {
144 'Eff95' :
"DBoldDMwLTEff95",
145 'Eff90' :
"DBoldDMwLTEff90",
146 'Eff80' :
"DBoldDMwLTEff80",
147 'Eff70' :
"DBoldDMwLTEff70",
148 'Eff60' :
"DBoldDMwLTEff60",
149 'Eff50' :
"DBoldDMwLTEff50",
150 'Eff40' :
"DBoldDMwLTEff40"
155 if self.
debug:
print (
"runTauID: not is_above_cmssw_version(9, 4, 4). Will update the list of available in DB samples to access 2017v1")
158 _byIsolationOldDMMVArun2017v1raw =
"rerunDiscriminationByIsolationOldDMMVArun2017v1raw"+self.
postfix
159 setattr(self.
process,_byIsolationOldDMMVArun2017v1raw,patDiscriminationByIsolationMVArun2v1raw.clone(
161 Prediscriminants = noPrediscriminants,
162 loadMVAfromDB = cms.bool(
True),
163 mvaName = cms.string(
"RecoTauTag_tauIdMVAIsoDBoldDMwLT2017v1"),
164 mvaOpt = cms.string(
"DBoldDMwLTwGJ"),
165 verbosity = cms.int32(0)
168 _byIsolationOldDMMVArun2017v1 =
"rerunDiscriminationByIsolationOldDMMVArun2017v1"+self.
postfix
169 setattr(self.
process,_byIsolationOldDMMVArun2017v1,patDiscriminationByIsolationMVArun2v1.clone(
171 Prediscriminants = noPrediscriminants,
172 toMultiplex = _byIsolationOldDMMVArun2017v1raw,
173 loadMVAfromDB = cms.bool(
True),
174 mvaOutput_normalization = cms.string(
"RecoTauTag_tauIdMVAIsoDBoldDMwLT2017v1_mvaOutput_normalization"),
177 category = cms.uint32(0),
178 cut = cms.string(
"RecoTauTag_tauIdMVAIsoDBoldDMwLT2017v1"),
179 variable = cms.string(
"pt"),
182 workingPoints = cms.vstring(
193 _rerunIsolationOldDMMVArun2017v1Task = cms.Task(
194 getattr(self.
process,_byIsolationOldDMMVArun2017v1raw),
195 getattr(self.
process,_byIsolationOldDMMVArun2017v1)
197 _rerunMvaIsolationTask.add(_rerunIsolationOldDMMVArun2017v1Task)
198 _rerunMvaIsolationSequence += cms.Sequence(_rerunIsolationOldDMMVArun2017v1Task)
200 tauIDSources.byIsolationMVArun2017v1DBoldDMwLTraw2017 = self.
tauIDMVAinputs(_byIsolationOldDMMVArun2017v1,
"raw")
201 tauIDSources.byVVLooseIsolationMVArun2017v1DBoldDMwLT2017 = self.
tauIDMVAinputs(_byIsolationOldDMMVArun2017v1,
"_WPEff95")
202 tauIDSources.byVLooseIsolationMVArun2017v1DBoldDMwLT2017 = self.
tauIDMVAinputs(_byIsolationOldDMMVArun2017v1,
"_WPEff90")
203 tauIDSources.byLooseIsolationMVArun2017v1DBoldDMwLT2017 = self.
tauIDMVAinputs(_byIsolationOldDMMVArun2017v1,
"_WPEff80")
204 tauIDSources.byMediumIsolationMVArun2017v1DBoldDMwLT2017 = self.
tauIDMVAinputs(_byIsolationOldDMMVArun2017v1,
"_WPEff70")
205 tauIDSources.byTightIsolationMVArun2017v1DBoldDMwLT2017 = self.
tauIDMVAinputs(_byIsolationOldDMMVArun2017v1,
"_WPEff60")
206 tauIDSources.byVTightIsolationMVArun2017v1DBoldDMwLT2017 = self.
tauIDMVAinputs(_byIsolationOldDMMVArun2017v1,
"_WPEff50")
207 tauIDSources.byVVTightIsolationMVArun2017v1DBoldDMwLT2017 = self.
tauIDMVAinputs(_byIsolationOldDMMVArun2017v1,
"_WPEff40")
210 if "2017v2" in self.
toKeep:
213 'tauIdMVAIsoDBoldDMwLT2017' :
"tauIdMVAIsoDBoldDMwLT2017",
216 'tauIdMVAIsoDBoldDMwLT2017' : {
217 'Eff95' :
"DBoldDMwLTEff95",
218 'Eff90' :
"DBoldDMwLTEff90",
219 'Eff80' :
"DBoldDMwLTEff80",
220 'Eff70' :
"DBoldDMwLTEff70",
221 'Eff60' :
"DBoldDMwLTEff60",
222 'Eff50' :
"DBoldDMwLTEff50",
223 'Eff40' :
"DBoldDMwLTEff40"
228 if self.
debug:
print (
"runTauID: not is_above_cmssw_version(9, 4, 5). Will update the list of available in DB samples to access 2017v2")
231 _byIsolationOldDMMVArun2017v2raw =
"rerunDiscriminationByIsolationOldDMMVArun2017v2raw"+self.
postfix
232 setattr(self.
process,_byIsolationOldDMMVArun2017v2raw,patDiscriminationByIsolationMVArun2v1raw.clone(
234 Prediscriminants = noPrediscriminants,
235 loadMVAfromDB = cms.bool(
True),
236 mvaName = cms.string(
"RecoTauTag_tauIdMVAIsoDBoldDMwLT2017v2"),
237 mvaOpt = cms.string(
"DBoldDMwLTwGJ"),
238 verbosity = cms.int32(0)
241 _byIsolationOldDMMVArun2017v2 =
"rerunDiscriminationByIsolationOldDMMVArun2017v2"+self.
postfix
242 setattr(self.
process,_byIsolationOldDMMVArun2017v2,patDiscriminationByIsolationMVArun2v1.clone(
244 Prediscriminants = noPrediscriminants,
245 toMultiplex = _byIsolationOldDMMVArun2017v2raw,
246 loadMVAfromDB = cms.bool(
True),
247 mvaOutput_normalization = cms.string(
"RecoTauTag_tauIdMVAIsoDBoldDMwLT2017v2_mvaOutput_normalization"),
250 category = cms.uint32(0),
251 cut = cms.string(
"RecoTauTag_tauIdMVAIsoDBoldDMwLT2017v2"),
252 variable = cms.string(
"pt"),
255 workingPoints = cms.vstring(
264 verbosity = cms.int32(0)
267 _rerunIsolationOldDMMVArun2017v2Task = cms.Task(
268 getattr(self.
process,_byIsolationOldDMMVArun2017v2raw),
269 getattr(self.
process,_byIsolationOldDMMVArun2017v2)
271 _rerunMvaIsolationTask.add(_rerunIsolationOldDMMVArun2017v2Task)
272 _rerunMvaIsolationSequence += cms.Sequence(_rerunIsolationOldDMMVArun2017v2Task)
274 tauIDSources.byIsolationMVArun2017v2DBoldDMwLTraw2017 = self.
tauIDMVAinputs(_byIsolationOldDMMVArun2017v2,
"raw")
275 tauIDSources.byVVLooseIsolationMVArun2017v2DBoldDMwLT2017 = self.
tauIDMVAinputs(_byIsolationOldDMMVArun2017v2,
"_WPEff95")
276 tauIDSources.byVLooseIsolationMVArun2017v2DBoldDMwLT2017 = self.
tauIDMVAinputs(_byIsolationOldDMMVArun2017v2,
"_WPEff90")
277 tauIDSources.byLooseIsolationMVArun2017v2DBoldDMwLT2017 = self.
tauIDMVAinputs(_byIsolationOldDMMVArun2017v2,
"_WPEff80")
278 tauIDSources.byMediumIsolationMVArun2017v2DBoldDMwLT2017 = self.
tauIDMVAinputs(_byIsolationOldDMMVArun2017v2,
"_WPEff70")
279 tauIDSources.byTightIsolationMVArun2017v2DBoldDMwLT2017 = self.
tauIDMVAinputs(_byIsolationOldDMMVArun2017v2,
"_WPEff60")
280 tauIDSources.byVTightIsolationMVArun2017v2DBoldDMwLT2017 = self.
tauIDMVAinputs(_byIsolationOldDMMVArun2017v2,
"_WPEff50")
281 tauIDSources.byVVTightIsolationMVArun2017v2DBoldDMwLT2017 = self.
tauIDMVAinputs(_byIsolationOldDMMVArun2017v2,
"_WPEff40")
283 if "newDM2017v2" in self.
toKeep:
286 'tauIdMVAIsoDBnewDMwLT2017' :
"tauIdMVAIsoDBnewDMwLT2017",
289 'tauIdMVAIsoDBnewDMwLT2017' : {
290 'Eff95' :
"DBnewDMwLTEff95",
291 'Eff90' :
"DBnewDMwLTEff90",
292 'Eff80' :
"DBnewDMwLTEff80",
293 'Eff70' :
"DBnewDMwLTEff70",
294 'Eff60' :
"DBnewDMwLTEff60",
295 'Eff50' :
"DBnewDMwLTEff50",
296 'Eff40' :
"DBnewDMwLTEff40"
301 if self.
debug:
print (
"runTauID: not is_above_cmssw_version(9, 4, 5). Will update the list of available in DB samples to access newDM2017v2")
304 _byIsolationNewDMMVArun2017v2raw =
"rerunDiscriminationByIsolationNewDMMVArun2017v2raw"+self.
postfix
305 setattr(self.
process,_byIsolationNewDMMVArun2017v2raw,patDiscriminationByIsolationMVArun2v1raw.clone(
307 Prediscriminants = noPrediscriminants,
308 loadMVAfromDB = cms.bool(
True),
309 mvaName = cms.string(
"RecoTauTag_tauIdMVAIsoDBnewDMwLT2017v2"),
310 mvaOpt = cms.string(
"DBnewDMwLTwGJ"),
311 verbosity = cms.int32(0)
314 _byIsolationNewDMMVArun2017v2 =
"rerunDiscriminationByIsolationNewDMMVArun2017v2"+self.
postfix
315 setattr(self.
process,_byIsolationNewDMMVArun2017v2,patDiscriminationByIsolationMVArun2v1.clone(
317 Prediscriminants = noPrediscriminants,
318 toMultiplex = _byIsolationNewDMMVArun2017v2raw,
319 loadMVAfromDB = cms.bool(
True),
320 mvaOutput_normalization = cms.string(
"RecoTauTag_tauIdMVAIsoDBnewDMwLT2017v2_mvaOutput_normalization"),
323 category = cms.uint32(0),
324 cut = cms.string(
"RecoTauTag_tauIdMVAIsoDBnewDMwLT2017v2"),
325 variable = cms.string(
"pt"),
328 workingPoints = cms.vstring(
337 verbosity = cms.int32(0)
340 _rerunIsolationNewDMMVArun2017v2Task = cms.Task(
341 getattr(self.
process,_byIsolationNewDMMVArun2017v2raw),
342 getattr(self.
process,_byIsolationNewDMMVArun2017v2)
344 _rerunMvaIsolationTask.add(_rerunIsolationNewDMMVArun2017v2Task)
345 _rerunMvaIsolationSequence += cms.Sequence(_rerunIsolationNewDMMVArun2017v2Task)
347 tauIDSources.byIsolationMVArun2017v2DBnewDMwLTraw2017 = self.
tauIDMVAinputs(_byIsolationNewDMMVArun2017v2,
"raw")
348 tauIDSources.byVVLooseIsolationMVArun2017v2DBnewDMwLT2017 = self.
tauIDMVAinputs(_byIsolationNewDMMVArun2017v2,
"_WPEff95")
349 tauIDSources.byVLooseIsolationMVArun2017v2DBnewDMwLT2017 = self.
tauIDMVAinputs(_byIsolationNewDMMVArun2017v2,
"_WPEff90")
350 tauIDSources.byLooseIsolationMVArun2017v2DBnewDMwLT2017 = self.
tauIDMVAinputs(_byIsolationNewDMMVArun2017v2,
"_WPEff80")
351 tauIDSources.byMediumIsolationMVArun2017v2DBnewDMwLT2017 = self.
tauIDMVAinputs(_byIsolationNewDMMVArun2017v2,
"_WPEff70")
352 tauIDSources.byTightIsolationMVArun2017v2DBnewDMwLT2017 = self.
tauIDMVAinputs(_byIsolationNewDMMVArun2017v2,
"_WPEff60")
353 tauIDSources.byVTightIsolationMVArun2017v2DBnewDMwLT2017 = self.
tauIDMVAinputs(_byIsolationNewDMMVArun2017v2,
"_WPEff50")
354 tauIDSources.byVVTightIsolationMVArun2017v2DBnewDMwLT2017 = self.
tauIDMVAinputs(_byIsolationNewDMMVArun2017v2,
"_WPEff40")
356 if "dR0p32017v2" in self.
toKeep:
359 'tauIdMVAIsoDBoldDMdR0p3wLT2017' :
"tauIdMVAIsoDBoldDMdR0p3wLT2017",
362 'tauIdMVAIsoDBoldDMdR0p3wLT2017' : {
363 'Eff95' :
"DBoldDMdR0p3wLTEff95",
364 'Eff90' :
"DBoldDMdR0p3wLTEff90",
365 'Eff80' :
"DBoldDMdR0p3wLTEff80",
366 'Eff70' :
"DBoldDMdR0p3wLTEff70",
367 'Eff60' :
"DBoldDMdR0p3wLTEff60",
368 'Eff50' :
"DBoldDMdR0p3wLTEff50",
369 'Eff40' :
"DBoldDMdR0p3wLTEff40"
374 if self.
debug:
print (
"runTauID: not is_above_cmssw_version(9, 4, 5). Will update the list of available in DB samples to access dR0p32017v2")
377 _byIsolationOldDMdR0p3MVArun2017v2raw =
"rerunDiscriminationByIsolationOldDMdR0p3MVArun2017v2raw"+self.
postfix
378 setattr(self.
process,_byIsolationOldDMdR0p3MVArun2017v2raw,patDiscriminationByIsolationMVArun2v1raw.clone(
380 Prediscriminants = noPrediscriminants,
381 loadMVAfromDB = cms.bool(
True),
382 mvaName = cms.string(
"RecoTauTag_tauIdMVAIsoDBoldDMdR0p3wLT2017v2"),
383 mvaOpt = cms.string(
"DBoldDMwLTwGJ"),
384 srcChargedIsoPtSum = cms.string(
'chargedIsoPtSumdR03'),
385 srcFootprintCorrection = cms.string(
'footprintCorrectiondR03'),
386 srcNeutralIsoPtSum = cms.string(
'neutralIsoPtSumdR03'),
387 srcPhotonPtSumOutsideSignalCone = cms.string(
'photonPtSumOutsideSignalConedR03'),
388 verbosity = cms.int32(0)
391 _byIsolationOldDMdR0p3MVArun2017v2 =
"rerunDiscriminationByIsolationOldDMdR0p3MVArun2017v2"+self.
postfix
392 setattr(self.
process,_byIsolationOldDMdR0p3MVArun2017v2,patDiscriminationByIsolationMVArun2v1.clone(
394 Prediscriminants = noPrediscriminants,
395 toMultiplex = _byIsolationOldDMdR0p3MVArun2017v2raw,
396 loadMVAfromDB = cms.bool(
True),
397 mvaOutput_normalization = cms.string(
"RecoTauTag_tauIdMVAIsoDBoldDMdR0p3wLT2017v2_mvaOutput_normalization"),
400 category = cms.uint32(0),
401 cut = cms.string(
"RecoTauTag_tauIdMVAIsoDBoldDMdR0p3wLT2017v2"),
402 variable = cms.string(
"pt"),
405 workingPoints = cms.vstring(
414 verbosity = cms.int32(0)
417 _rerunIsolationOldDMdR0p3MVArun2017v2Task = cms.Task(
418 getattr(self.
process,_byIsolationOldDMdR0p3MVArun2017v2raw),
419 getattr(self.
process,_byIsolationOldDMdR0p3MVArun2017v2)
421 _rerunMvaIsolationTask.add(_rerunIsolationOldDMdR0p3MVArun2017v2Task)
422 _rerunMvaIsolationSequence += cms.Sequence(_rerunIsolationOldDMdR0p3MVArun2017v2Task)
424 tauIDSources.byIsolationMVArun2017v2DBoldDMdR0p3wLTraw2017 = self.
tauIDMVAinputs(_byIsolationOldDMdR0p3MVArun2017v2,
"raw")
425 tauIDSources.byVVLooseIsolationMVArun2017v2DBoldDMdR0p3wLT2017 = self.
tauIDMVAinputs(_byIsolationOldDMdR0p3MVArun2017v2,
"_WPEff95")
426 tauIDSources.byVLooseIsolationMVArun2017v2DBoldDMdR0p3wLT2017 = self.
tauIDMVAinputs(_byIsolationOldDMdR0p3MVArun2017v2,
"_WPEff90")
427 tauIDSources.byLooseIsolationMVArun2017v2DBoldDMdR0p3wLT2017 = self.
tauIDMVAinputs(_byIsolationOldDMdR0p3MVArun2017v2,
"_WPEff80")
428 tauIDSources.byMediumIsolationMVArun2017v2DBoldDMdR0p3wLT2017 = self.
tauIDMVAinputs(_byIsolationOldDMdR0p3MVArun2017v2,
"_WPEff70")
429 tauIDSources.byTightIsolationMVArun2017v2DBoldDMdR0p3wLT2017 = self.
tauIDMVAinputs(_byIsolationOldDMdR0p3MVArun2017v2,
"_WPEff60")
430 tauIDSources.byVTightIsolationMVArun2017v2DBoldDMdR0p3wLT2017 = self.
tauIDMVAinputs(_byIsolationOldDMdR0p3MVArun2017v2,
"_WPEff50")
431 tauIDSources.byVVTightIsolationMVArun2017v2DBoldDMdR0p3wLT2017 = self.
tauIDMVAinputs(_byIsolationOldDMdR0p3MVArun2017v2,
"_WPEff40")
460 if "2016v1" in self.
toKeep:
461 _byIsolationOldDMMVArun2016v1raw =
"rerunDiscriminationByIsolationOldDMMVArun2v1raw"+self.
postfix
462 setattr(self.
process,_byIsolationOldDMMVArun2016v1raw,patDiscriminationByIsolationMVArun2v1raw.clone(
464 Prediscriminants = noPrediscriminants,
465 loadMVAfromDB = cms.bool(
True),
466 mvaName = cms.string(
"RecoTauTag_tauIdMVAIsoDBoldDMwLT2016v1"),
467 mvaOpt = cms.string(
"DBoldDMwLT"),
468 verbosity = cms.int32(0)
471 _byIsolationOldDMMVArun2016v1 =
"rerunDiscriminationByIsolationOldDMMVArun2v1"+self.
postfix
472 setattr(self.
process,_byIsolationOldDMMVArun2016v1,patDiscriminationByIsolationMVArun2v1.clone(
474 Prediscriminants = noPrediscriminants,
475 toMultiplex = _byIsolationOldDMMVArun2016v1raw,
476 loadMVAfromDB = cms.bool(
True),
477 mvaOutput_normalization = cms.string(
"RecoTauTag_tauIdMVAIsoDBoldDMwLT2016v1_mvaOutput_normalization"),
480 category = cms.uint32(0),
481 cut = cms.string(
"RecoTauTag_tauIdMVAIsoDBoldDMwLT2016v1"),
482 variable = cms.string(
"pt"),
485 workingPoints = cms.vstring(
495 _rerunIsolationOldDMMVArun2016v1Task = cms.Task(
496 getattr(self.
process,_byIsolationOldDMMVArun2016v1raw),
497 getattr(self.
process,_byIsolationOldDMMVArun2016v1)
499 _rerunMvaIsolationTask.add(_rerunIsolationOldDMMVArun2016v1Task)
500 _rerunMvaIsolationSequence += cms.Sequence(_rerunIsolationOldDMMVArun2016v1Task)
502 tauIDSources.byIsolationMVArun2v1DBoldDMwLTraw2016 = self.
tauIDMVAinputs(_byIsolationOldDMMVArun2016v1,
"raw")
503 tauIDSources.byVLooseIsolationMVArun2v1DBoldDMwLT2016 = self.
tauIDMVAinputs(_byIsolationOldDMMVArun2016v1,
"_WPEff90")
504 tauIDSources.byLooseIsolationMVArun2v1DBoldDMwLT2016 = self.
tauIDMVAinputs(_byIsolationOldDMMVArun2016v1,
"_WPEff80")
505 tauIDSources.byMediumIsolationMVArun2v1DBoldDMwLT2016 = self.
tauIDMVAinputs(_byIsolationOldDMMVArun2016v1,
"_WPEff70")
506 tauIDSources.byTightIsolationMVArun2v1DBoldDMwLT2016 = self.
tauIDMVAinputs(_byIsolationOldDMMVArun2016v1,
"_WPEff60")
507 tauIDSources.byVTightIsolationMVArun2v1DBoldDMwLT2016 = self.
tauIDMVAinputs(_byIsolationOldDMMVArun2016v1,
"_WPEff50")
508 tauIDSources.byVVTightIsolationMVArun2v1DBoldDMwLT2016 = self.
tauIDMVAinputs(_byIsolationOldDMMVArun2016v1,
"_WPEff40")
511 if "newDM2016v1" in self.
toKeep:
512 _byIsolationNewDMMVArun2016v1raw =
"rerunDiscriminationByIsolationNewDMMVArun2v1raw"+self.
postfix
513 setattr(self.
process,_byIsolationNewDMMVArun2016v1raw,patDiscriminationByIsolationMVArun2v1raw.clone(
515 Prediscriminants = noPrediscriminants,
516 loadMVAfromDB = cms.bool(
True),
517 mvaName = cms.string(
"RecoTauTag_tauIdMVAIsoDBnewDMwLT2016v1"),
518 mvaOpt = cms.string(
"DBnewDMwLT"),
519 verbosity = cms.int32(0)
522 _byIsolationNewDMMVArun2016v1 =
"rerunDiscriminationByIsolationNewDMMVArun2v1"+self.
postfix
523 setattr(self.
process,_byIsolationNewDMMVArun2016v1,patDiscriminationByIsolationMVArun2v1.clone(
525 Prediscriminants = noPrediscriminants,
526 toMultiplex = _byIsolationNewDMMVArun2016v1raw,
527 loadMVAfromDB = cms.bool(
True),
528 mvaOutput_normalization = cms.string(
"RecoTauTag_tauIdMVAIsoDBnewDMwLT2016v1_mvaOutput_normalization"),
531 category = cms.uint32(0),
532 cut = cms.string(
"RecoTauTag_tauIdMVAIsoDBnewDMwLT2016v1_WPEff90"),
533 variable = cms.string(
"pt"),
536 workingPoints = cms.vstring(
546 _rerunIsolationNewDMMVArun2016v1Task = cms.Task(
547 getattr(self.
process,_byIsolationNewDMMVArun2016v1raw),
548 getattr(self.
process,_byIsolationNewDMMVArun2016v1)
550 _rerunMvaIsolationTask.add(_rerunIsolationNewDMMVArun2016v1Task)
551 _rerunMvaIsolationSequence += cms.Sequence(_rerunIsolationNewDMMVArun2016v1Task)
553 tauIDSources.byIsolationMVArun2v1DBnewDMwLTraw2016 = self.
tauIDMVAinputs(_byIsolationNewDMMVArun2016v1,
"raw")
554 tauIDSources.byVLooseIsolationMVArun2v1DBnewDMwLT2016 = self.
tauIDMVAinputs(_byIsolationNewDMMVArun2016v1,
"_WPEff90")
555 tauIDSources.byLooseIsolationMVArun2v1DBnewDMwLT2016 = self.
tauIDMVAinputs(_byIsolationNewDMMVArun2016v1,
"_WPEff80")
556 tauIDSources.byMediumIsolationMVArun2v1DBnewDMwLT2016 = self.
tauIDMVAinputs(_byIsolationNewDMMVArun2016v1,
"_WPEff70")
557 tauIDSources.byTightIsolationMVArun2v1DBnewDMwLT2016 = self.
tauIDMVAinputs(_byIsolationNewDMMVArun2016v1,
"_WPEff60")
558 tauIDSources.byVTightIsolationMVArun2v1DBnewDMwLT2016 = self.
tauIDMVAinputs(_byIsolationNewDMMVArun2016v1,
"_WPEff50")
559 tauIDSources.byVVTightIsolationMVArun2v1DBnewDMwLT2016 = self.
tauIDMVAinputs(_byIsolationNewDMMVArun2016v1,
"_WPEff40")
561 if "deepTau2017v1" in self.
toKeep:
562 if self.
debug:
print (
"Adding DeepTau IDs")
564 _deepTauName =
"deepTau2017v1"
567 "VVVLoose" : 0.96424,
577 "VVVLoose" : 0.959619,
578 "VVLoose" : 0.997687,
598 file_names = [
'RecoTauTag/TrainingFiles/data/DeepTauId/deepTau_2017v1_20L1024N_quantized.pb']
599 setattr(self.
process,_deepTauName+self.
postfix,cms.EDProducer(
"DeepTauId",
600 electrons = cms.InputTag(
'slimmedElectrons'),
601 muons = cms.InputTag(
'slimmedMuons'),
603 pfcands = cms.InputTag(
'packedPFCandidates'),
604 vertices = cms.InputTag(
'offlineSlimmedPrimaryVertices'),
605 rho = cms.InputTag(
'fixedGridRhoAll'),
606 graph_file = cms.vstring(file_names),
607 mem_mapped = cms.bool(
False),
609 debug_level = cms.int32(0),
610 disable_dxy_pca = cms.bool(
False)
615 _deepTauProducer = getattr(self.
process,_deepTauName+self.
postfix)
616 _rerunMvaIsolationTask.add(_deepTauProducer)
617 _rerunMvaIsolationSequence += _deepTauProducer
620 if "deepTau2017v2" in self.
toKeep:
621 if self.
debug:
print (
"Adding DeepTau IDs")
623 _deepTauName =
"deepTau2017v2"
626 "VVVLoose": 0.0630386,
627 "VVLoose": 0.1686942,
633 "VVTight": 0.9928449,
642 "VVVLoose": 0.2599605,
643 "VVLoose": 0.4249705,
649 "VVTight": 0.9733927,
654 'core:RecoTauTag/TrainingFiles/data/DeepTauId/deepTau_2017v2p6_e6_core.pb',
655 'inner:RecoTauTag/TrainingFiles/data/DeepTauId/deepTau_2017v2p6_e6_inner.pb',
656 'outer:RecoTauTag/TrainingFiles/data/DeepTauId/deepTau_2017v2p6_e6_outer.pb',
658 setattr(self.
process,_deepTauName+self.
postfix,cms.EDProducer(
"DeepTauId",
659 electrons = cms.InputTag(
'slimmedElectrons'),
660 muons = cms.InputTag(
'slimmedMuons'),
662 pfcands = cms.InputTag(
'packedPFCandidates'),
663 vertices = cms.InputTag(
'offlineSlimmedPrimaryVertices'),
664 rho = cms.InputTag(
'fixedGridRhoAll'),
665 graph_file = cms.vstring(file_names),
666 mem_mapped = cms.bool(
False),
668 debug_level = cms.int32(0),
669 disable_dxy_pca = cms.bool(
False)
674 _deepTauProducer = getattr(self.
process,_deepTauName+self.
postfix)
675 _rerunMvaIsolationTask.add(_deepTauProducer)
676 _rerunMvaIsolationSequence += _deepTauProducer
679 if "deepTau2017v2p1" in self.
toKeep:
680 if self.
debug:
print (
"Adding DeepTau IDs")
682 _deepTauName =
"deepTau2017v2p1"
685 "VVVLoose": 0.0630386,
686 "VVLoose": 0.1686942,
692 "VVTight": 0.9928449,
701 "VVVLoose": 0.2599605,
702 "VVLoose": 0.4249705,
708 "VVTight": 0.9733927,
713 'core:RecoTauTag/TrainingFiles/data/DeepTauId/deepTau_2017v2p6_e6_core.pb',
714 'inner:RecoTauTag/TrainingFiles/data/DeepTauId/deepTau_2017v2p6_e6_inner.pb',
715 'outer:RecoTauTag/TrainingFiles/data/DeepTauId/deepTau_2017v2p6_e6_outer.pb',
717 setattr(self.
process,_deepTauName+self.
postfix,cms.EDProducer(
"DeepTauId",
718 electrons = cms.InputTag(
'slimmedElectrons'),
719 muons = cms.InputTag(
'slimmedMuons'),
721 pfcands = cms.InputTag(
'packedPFCandidates'),
722 vertices = cms.InputTag(
'offlineSlimmedPrimaryVertices'),
723 rho = cms.InputTag(
'fixedGridRhoAll'),
724 graph_file = cms.vstring(file_names),
725 mem_mapped = cms.bool(
False),
727 debug_level = cms.int32(0),
728 disable_dxy_pca = cms.bool(
True),
729 is_online = cms.bool(
False)
734 _deepTauProducer = getattr(self.
process,_deepTauName+self.
postfix)
735 _rerunMvaIsolationTask.add(_deepTauProducer)
736 _rerunMvaIsolationSequence += _deepTauProducer
739 if "DPFTau_2016_v0" in self.
toKeep:
740 if self.
debug:
print (
"Adding DPFTau isolation (v0)")
742 _deepTauName =
"DPFTau_2016_v0"
745 "Tight" :
"if(decayMode == 0) return (0.898328 - 0.000160992 * pt);" + \
746 "if(decayMode == 1) return (0.910138 - 0.000229923 * pt);" + \
747 "if(decayMode == 10) return (0.873958 - 0.0002328 * pt);" + \
757 file_names = [
'RecoTauTag/TrainingFiles/data/DPFTauId/DPFIsolation_2017v0_quantized.pb' ]
758 setattr(self.
process,_deepTauName+self.
postfix,cms.EDProducer(
"DPFIsolation",
759 pfcands = cms.InputTag(
'packedPFCandidates'),
761 vertices = cms.InputTag(
'offlineSlimmedPrimaryVertices'),
762 graph_file = cms.vstring(file_names),
764 mem_mapped = cms.bool(
False)
769 _deepTauProducer = getattr(self.
process,_deepTauName+self.
postfix)
770 _rerunMvaIsolationTask.add(_deepTauProducer)
771 _rerunMvaIsolationSequence += _deepTauProducer
774 if "DPFTau_2016_v1" in self.
toKeep:
775 print (
"Adding DPFTau isolation (v1)")
776 print (
"WARNING: WPs are not defined for DPFTau_2016_v1")
777 print (
"WARNING: The score of DPFTau_2016_v1 is inverted: i.e. for Sig->0, for Bkg->1 with -1 for undefined input (preselection not passed).")
779 _deepTauName =
"DPFTau_2016_v1"
781 "all": {
"Tight" : 0.123}
784 file_names = [
'RecoTauTag/TrainingFiles/data/DPFTauId/DPFIsolation_2017v1_quantized.pb' ]
785 setattr(self.
process,_deepTauName+self.
postfix,cms.EDProducer(
"DPFIsolation",
786 pfcands = cms.InputTag(
'packedPFCandidates'),
788 vertices = cms.InputTag(
'offlineSlimmedPrimaryVertices'),
789 graph_file = cms.vstring(file_names),
791 mem_mapped = cms.bool(
False)
796 _deepTauProducer = getattr(self.
process,_deepTauName+self.
postfix)
797 _rerunMvaIsolationTask.add(_deepTauProducer)
798 _rerunMvaIsolationSequence += _deepTauProducer
801 if "againstEle2018" in self.
toKeep:
802 antiElectronDiscrMVA6_version =
"MVA6v3_noeveto"
806 _byElectronRejectionMVA62018Raw =
"patTauDiscriminationByElectronRejectionMVA62018Raw"+self.
postfix
807 setattr(self.
process,_byElectronRejectionMVA62018Raw,patTauDiscriminationAgainstElectronMVA6.clone(
809 Prediscriminants = noPrediscriminants,
810 srcElectrons = cms.InputTag(
'slimmedElectrons'),
811 vetoEcalCracks = cms.bool(
False),
812 mvaName_NoEleMatch_wGwoGSF_BL =
'RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+
'_gbr_NoEleMatch_wGwoGSF_BL',
813 mvaName_NoEleMatch_wGwoGSF_EC =
'RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+
'_gbr_NoEleMatch_wGwoGSF_EC',
814 mvaName_NoEleMatch_woGwoGSF_BL =
'RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+
'_gbr_NoEleMatch_woGwoGSF_BL',
815 mvaName_NoEleMatch_woGwoGSF_EC =
'RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+
'_gbr_NoEleMatch_woGwoGSF_EC',
816 mvaName_wGwGSF_BL =
'RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+
'_gbr_wGwGSF_BL',
817 mvaName_wGwGSF_EC =
'RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+
'_gbr_wGwGSF_EC',
818 mvaName_woGwGSF_BL =
'RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+
'_gbr_woGwGSF_BL',
819 mvaName_woGwGSF_EC =
'RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+
'_gbr_woGwGSF_EC'
823 _byElectronRejectionMVA62018 =
"patTauDiscriminationByElectronRejectionMVA62018"+self.
postfix
824 setattr(self.
process,
"patTauDiscriminationByElectronRejectionMVA62018"+self.
postfix,patTauDiscriminantCutMultiplexer.clone(
826 Prediscriminants = noPrediscriminants,
827 toMultiplex = _byElectronRejectionMVA62018Raw,
830 category = cms.uint32(0),
831 cut = cms.string(
'RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+
'_gbr_NoEleMatch_woGwoGSF_BL'),
832 variable = cms.string(
'pt')
835 category = cms.uint32(2),
836 cut = cms.string(
'RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+
'_gbr_NoEleMatch_wGwoGSF_BL'),
837 variable = cms.string(
'pt')
840 category = cms.uint32(5),
841 cut = cms.string(
'RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+
'_gbr_woGwGSF_BL'),
842 variable = cms.string(
'pt')
845 category = cms.uint32(7),
846 cut = cms.string(
'RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+
'_gbr_wGwGSF_BL'),
847 variable = cms.string(
'pt')
850 category = cms.uint32(8),
851 cut = cms.string(
'RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+
'_gbr_NoEleMatch_woGwoGSF_EC'),
852 variable = cms.string(
'pt')
855 category = cms.uint32(10),
856 cut = cms.string(
'RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+
'_gbr_NoEleMatch_wGwoGSF_EC'),
857 variable = cms.string(
'pt')
860 category = cms.uint32(13),
861 cut = cms.string(
'RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+
'_gbr_woGwGSF_EC'),
862 variable = cms.string(
'pt')
865 category = cms.uint32(15),
866 cut = cms.string(
'RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+
'_gbr_wGwGSF_EC'),
867 variable = cms.string(
'pt')
870 workingPoints = cms.vstring(
879 _patTauDiscriminationByElectronRejectionMVA62018Task = cms.Task(
880 getattr(self.
process,_byElectronRejectionMVA62018Raw),
881 getattr(self.
process,_byElectronRejectionMVA62018)
883 _rerunMvaIsolationTask.add(_patTauDiscriminationByElectronRejectionMVA62018Task)
884 _rerunMvaIsolationSequence += cms.Sequence(_patTauDiscriminationByElectronRejectionMVA62018Task)
886 _againstElectronTauIDSources = cms.PSet(
887 againstElectronMVA6Raw2018 = self.
tauIDMVAinputs(_byElectronRejectionMVA62018,
"raw"),
888 againstElectronMVA6category2018 = self.
tauIDMVAinputs(_byElectronRejectionMVA62018,
"category"),
889 againstElectronVLooseMVA62018 = self.
tauIDMVAinputs(_byElectronRejectionMVA62018,
"_WPeff98"),
890 againstElectronLooseMVA62018 = self.
tauIDMVAinputs(_byElectronRejectionMVA62018,
"_WPeff90"),
891 againstElectronMediumMVA62018 = self.
tauIDMVAinputs(_byElectronRejectionMVA62018,
"_WPeff80"),
892 againstElectronTightMVA62018 = self.
tauIDMVAinputs(_byElectronRejectionMVA62018,
"_WPeff70"),
893 againstElectronVTightMVA62018 = self.
tauIDMVAinputs(_byElectronRejectionMVA62018,
"_WPeff60")
895 _tauIDSourcesWithAgainistEle = cms.PSet(
896 tauIDSources.clone(),
897 _againstElectronTauIDSources
899 tauIDSources =_tauIDSourcesWithAgainistEle.clone()
901 if "newDMPhase2v1" in self.
toKeep:
902 if self.
debug:
print (
"Adding newDMPhase2v1 ID")
904 return cms.PSet(inputTag = cms.InputTag(module), workingPointIndex = cms.int32(-1
if wp==
"raw" else -2
if wp==
"category" else getattr(self.
process, module).workingPoints.index(wp)))
905 _byIsolationNewDMMVAPhase2raw =
"rerunDiscriminationByIsolationMVADBnewDMwLTPhase2raw"+self.
postfix
906 setattr(self.
process,_byIsolationNewDMMVAPhase2raw,patDiscriminationByIsolationMVArun2v1raw.clone(
908 Prediscriminants = noPrediscriminants,
909 loadMVAfromDB =
True,
910 mvaName =
'RecoTauTag_tauIdMVAIsoPhase2',
911 mvaOpt =
'DBnewDMwLTwGJPhase2',
915 _byIsolationNewDMMVAPhase2 =
"rerunDiscriminationByIsolationMVADBnewDMwLTPhase2"+self.
postfix
916 setattr(self.
process,_byIsolationNewDMMVAPhase2,patDiscriminationByIsolationMVArun2v1.clone(
918 Prediscriminants = noPrediscriminants,
919 toMultiplex = _byIsolationNewDMMVAPhase2raw,
920 loadMVAfromDB =
True,
921 mvaOutput_normalization =
'RecoTauTag_tauIdMVAIsoPhase2_mvaOutput_normalization',
924 category = cms.uint32(0),
925 cut = cms.string(
"RecoTauTag_tauIdMVAIsoPhase2"),
926 variable = cms.string(
"pt"),
929 workingPoints = cms.vstring(
939 _rerunIsolationMVADBnewDMwLTPhase2Task = cms.Task(
940 getattr(self.
process,_byIsolationNewDMMVAPhase2raw),
941 getattr(self.
process,_byIsolationNewDMMVAPhase2)
943 _rerunMvaIsolationTask.add(_rerunIsolationMVADBnewDMwLTPhase2Task)
944 _rerunMvaIsolationSequence += cms.Sequence(_rerunIsolationMVADBnewDMwLTPhase2Task)
946 tauIDSources.byIsolationMVADBnewDMwLTPhase2raw =
tauIDMVAinputs(_byIsolationNewDMMVAPhase2,
"raw")
947 tauIDSources.byVVLooseIsolationMVADBnewDMwLTPhase2 =
tauIDMVAinputs(_byIsolationNewDMMVAPhase2,
"_VVLoose")
948 tauIDSources.byVLooseIsolationMVADBnewDMwLTPhase2 =
tauIDMVAinputs(_byIsolationNewDMMVAPhase2,
"_VLoose")
949 tauIDSources.byLooseIsolationMVADBnewDMwLTPhase2 =
tauIDMVAinputs(_byIsolationNewDMMVAPhase2,
"_Loose")
950 tauIDSources.byMediumIsolationMVADBnewDMwLTPhase2 =
tauIDMVAinputs(_byIsolationNewDMMVAPhase2,
"_Medium")
951 tauIDSources.byTightIsolationMVADBnewDMwLTPhase2 =
tauIDMVAinputs(_byIsolationNewDMMVAPhase2,
"_Tight")
952 tauIDSources.byVTightIsolationMVADBnewDMwLTPhase2 =
tauIDMVAinputs(_byIsolationNewDMMVAPhase2,
"_VTight")
953 tauIDSources.byVVTightIsolationMVADBnewDMwLTPhase2 =
tauIDMVAinputs(_byIsolationNewDMMVAPhase2,
"_VVTight")
955 if "againstElePhase2v1" in self.
toKeep:
956 if self.
debug:
print (
"Adding anti-e Phase2v1 ID")
959 from RecoTauTag.RecoTau.PATTauDiscriminationAgainstElectronMVA6Phase2_cff
import patTauDiscriminationAgainstElectronMVA6Phase2Raw, patTauDiscriminationAgainstElectronMVA6Phase2, mergedSlimmedElectronsForTauId
960 _byElectronRejectionMVA6Phase2v1Raw =
"patTauDiscriminationByElectronRejectionMVA6Phase2v1Raw"+self.
postfix
961 setattr(self.
process,_byElectronRejectionMVA6Phase2v1Raw,patTauDiscriminationAgainstElectronMVA6Phase2Raw.clone(
963 Prediscriminants = noPrediscriminants
966 _byElectronRejectionMVA6Phase2v1 =
"patTauDiscriminationByElectronRejectionMVA6Phase2v1"+self.
postfix
967 setattr(self.
process,_byElectronRejectionMVA6Phase2v1,patTauDiscriminationAgainstElectronMVA6Phase2.clone(
969 Prediscriminants = noPrediscriminants,
970 toMultiplex = _byElectronRejectionMVA6Phase2v1Raw
973 if not hasattr(self.
process,
"mergedSlimmedElectronsForTauId"):
974 self.process.mergedSlimmedElectronsForTauId = mergedSlimmedElectronsForTauId
975 _patTauDiscriminationByElectronRejectionMVA6Phase2v1Task = cms.Task(
976 self.process.mergedSlimmedElectronsForTauId,
977 getattr(self.
process,_byElectronRejectionMVA6Phase2v1Raw),
978 getattr(self.
process,_byElectronRejectionMVA6Phase2v1)
980 _rerunMvaIsolationTask.add(_patTauDiscriminationByElectronRejectionMVA6Phase2v1Task)
981 _rerunMvaIsolationSequence += cms.Sequence(_patTauDiscriminationByElectronRejectionMVA6Phase2v1Task)
983 _againstElectronTauIDPhase2v1Sources = cms.PSet(
984 againstElectronMVA6RawPhase2v1 = self.
tauIDMVAinputs(_byElectronRejectionMVA6Phase2v1,
"raw"),
985 againstElectronMVA6categoryPhase2v1 = self.
tauIDMVAinputs(_byElectronRejectionMVA6Phase2v1,
"category"),
986 againstElectronVLooseMVA6Phase2v1 = self.
tauIDMVAinputs(_byElectronRejectionMVA6Phase2v1,
"_VLoose"),
987 againstElectronLooseMVA6Phase2v1 = self.
tauIDMVAinputs(_byElectronRejectionMVA6Phase2v1,
"_Loose"),
988 againstElectronMediumMVA6Phase2v1 = self.
tauIDMVAinputs(_byElectronRejectionMVA6Phase2v1,
"_Medium"),
989 againstElectronTightMVA6Phase2v1 = self.
tauIDMVAinputs(_byElectronRejectionMVA6Phase2v1,
"_Tight"),
990 againstElectronVTightMVA6Phase2v1 = self.
tauIDMVAinputs(_byElectronRejectionMVA6Phase2v1,
"_VTight")
992 _tauIDSourcesWithAgainistElePhase2v1 = cms.PSet(
993 tauIDSources.clone(),
994 _againstElectronTauIDPhase2v1Sources
996 tauIDSources =_tauIDSourcesWithAgainistElePhase2v1.clone()
1000 embedID = cms.EDProducer(
"PATTauIDEmbedder",
1002 tauIDSources = tauIDSources
1006 tauIDSources = cms.PSet(
1010 setattr(self.
process,
"rerunMvaIsolationTask"+self.
postfix,_rerunMvaIsolationTask)
1011 setattr(self.
process,
"rerunMvaIsolationSequence"+self.
postfix,_rerunMvaIsolationSequence)
1015 for target,points
in workingPoints_.items():
1016 setattr(tauIDSources,
'by{}VS{}raw'.
format(producer_name[0].upper()+producer_name[1:], target),
1017 cms.PSet(inputTag = cms.InputTag(producer_name+self.
postfix,
'VS{}'.
format(target)), workingPointIndex = cms.int32(-1)))
1019 cut_expressions = []
1020 for index, (point,cut)
in enumerate(points.items()):
1021 cut_expressions.append(
str(cut))
1023 setattr(tauIDSources,
'by{}{}VS{}'.
format(point, producer_name[0].upper()+producer_name[1:], target),
1024 cms.PSet(inputTag = cms.InputTag(producer_name+self.
postfix,
'VS{}'.
format(target)), workingPointIndex = cms.int32(index)))
1026 setattr(getattr(self.
process, producer_name+self.
postfix),
'VS{}WP'.
format(target), cms.vstring(*cut_expressions))
1030 """returns the DNN version. File name should contain a version label with data takig year (2011-2, 2015-8) and \
1031 version number (vX), e.g. 2017v0, in general the following format: {year}v{version}"""
1032 version_search = re.search(
'201[125678]v([0-9]+)[\._]', file_name)
1033 if not version_search:
1034 raise RuntimeError(
'File "{}" has an invalid name pattern, should be in the format "{year}v{version}". \
1035 Unable to extract version number.'.
format(file_name))
1036 version = version_search.group(1)
1040 """returns the DeepTau year, version, subversion. File name should contain a version label with data takig year \
1041 (2011-2, 2015-8), version number (vX) and subversion (pX), e.g. 2017v0p6, in general the following format: \
1042 {year}v{version}p{subversion}"""
1043 version_search = re.search(
'(201[125678])v([0-9]+)(p[0-9]+|)[\._]', file_name)
1044 if not version_search:
1045 raise RuntimeError(
'File "{}" has an invalid name pattern, should be in the format "{year}v{version}p{subversion}". \
1046 Unable to extract version number.'.
format(file_name))
1047 year = version_search.group(1)
1048 version = version_search.group(2)
1049 subversion = version_search.group(3)
1050 if len(subversion) > 0:
1051 subversion = subversion[1:]
1054 return int(year), int(version), int(subversion)
tauIdDiscrMVA_2017_version
tauIdDiscrMVA_WPs_run2_2017
tauIdDiscrMVA_trainings_run2_2017
def get_cmssw_version_number
def is_above_cmssw_version
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
def loadMVA_WPs_run2_2017