CMS 3D CMS Logo

taus_updatedMVAIds_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 
7 from Configuration.Eras.Modifier_run2_miniAOD_80XLegacy_cff import run2_miniAOD_80XLegacy
8 from Configuration.Eras.Modifier_run2_nanoAOD_94XMiniAODv1_cff import run2_nanoAOD_94XMiniAODv1
9 
10 
13 patTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw = patDiscriminationByIsolationMVArun2v1raw.clone(
14  PATTauProducer = cms.InputTag('slimmedTaus'),
15  Prediscriminants = noPrediscriminants,
16  loadMVAfromDB = cms.bool(True),
17  mvaName = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMwLT"), # name of the training you want to use
18  mvaOpt = cms.string("DBoldDMwLTwGJ"), # option you want to use for your training (i.e., which variables are used to compute the BDT score)
19  verbosity = cms.int32(0)
20 )
21 # WPs
22 patTauDiscriminationByIsolationMVArun2v1DBoldDMwLT = patDiscriminationByIsolationMVArun2v1.clone(
23  PATTauProducer = cms.InputTag('slimmedTaus'),
24  Prediscriminants = noPrediscriminants,
25  toMultiplex = cms.InputTag('patTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw'),
26  loadMVAfromDB = cms.bool(True),
27  mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMwLT_mvaOutput_normalization"), # normalization fo the training you want to use
28  mapping = cms.VPSet(
29  cms.PSet(
30  category = cms.uint32(0),
31  cut = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMwLT"), # this is the name of the working point you want to use
32  variable = cms.string("pt"),
33  )
34  ),
35  workingPoints = cms.vstring(
36  "_VVLoose",
37  "_VLoose",
38  "_Loose",
39  "_Medium",
40  "_Tight",
41  "_VTight",
42  "_VVTight"
43  )
44 )
45 # MVAIso DBoldDM Seqeunce
46 patTauDiscriminationByIsolationMVArun2v1DBoldDMwLTSeq = cms.Sequence(
47  patTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw
48  + patTauDiscriminationByIsolationMVArun2v1DBoldDMwLT
49 )
50 
52 patTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw = patTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw.clone(
53  mvaName = cms.string("RecoTauTag_tauIdMVAIsoDBnewDMwLT"), # name of the training you want to use
54  mvaOpt = cms.string("DBnewDMwLTwGJ") # option you want to use for your training (i.e., which variables are used to compute the BDT score)
55 )
56 # WPs
57 patTauDiscriminationByIsolationMVArun2v1DBnewDMwLT = patTauDiscriminationByIsolationMVArun2v1DBoldDMwLT.clone(
58  toMultiplex = cms.InputTag('patTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw'),
59  mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAIsoDBnewDMwLT_mvaOutput_normalization"), # normalization fo the training you want to use
60  mapping = cms.VPSet(
61  cms.PSet(
62  category = cms.uint32(0),
63  cut = cms.string("RecoTauTag_tauIdMVAIsoDBnewDMwLT"), # this is the name of the working point you want to use
64  variable = cms.string("pt"),
65  )
66  )
67 )
68 # MVAIso DBnewDM Seqeunce
69 patTauDiscriminationByIsolationMVArun2v1DBnewDMwLTSeq = cms.Sequence(
70  patTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw
71  + patTauDiscriminationByIsolationMVArun2v1DBnewDMwLT
72 )
73 
75 patTauDiscriminationByIsolationMVArun2v1DBoldDMdR0p3wLTraw = patTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw.clone(
76  mvaName = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMdR0p3wLT"), # name of the training you want to use
77  mvaOpt = cms.string("DBoldDMwLTwGJ"), # option you want to use for your training (i.e., which variables are used to compute the BDT score)
78  srcChargedIsoPtSum = cms.string('chargedIsoPtSumdR03'),
79  srcFootprintCorrection = cms.string('footprintCorrectiondR03'),
80  srcNeutralIsoPtSum = cms.string('neutralIsoPtSumdR03'),
81  srcPUcorrPtSum = cms.string('puCorrPtSum'),
82  srcPhotonPtSumOutsideSignalCone = cms.string('photonPtSumOutsideSignalConedR03')
83 )
84 # WPs
85 patTauDiscriminationByIsolationMVArun2v1DBoldDMdR0p3wLT = patTauDiscriminationByIsolationMVArun2v1DBoldDMwLT.clone(
86  toMultiplex = cms.InputTag('patTauDiscriminationByIsolationMVArun2v1DBoldDMdR0p3wLTraw'),
87  mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMdR0p3wLT_mvaOutput_normalization"), # normalization fo the training you want to use
88  mapping = cms.VPSet(
89  cms.PSet(
90  category = cms.uint32(0),
91  cut = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMdR0p3wLT"), # this is the name of the working point you want to use
92  variable = cms.string("pt"),
93  )
94  )
95 )
96 # MVAIso DBoldDMdR0p3 Seqeunce
97 patTauDiscriminationByIsolationMVArun2v1DBoldDMdR0p3wLTSeq = cms.Sequence(
98  patTauDiscriminationByIsolationMVArun2v1DBoldDMdR0p3wLTraw
99  + patTauDiscriminationByIsolationMVArun2v1DBoldDMdR0p3wLT
100 )
101 
104 patTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw2017v1 = patTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw.clone(
105  mvaName = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMwLT2017v1"), # name of the training you want to use
106  mvaOpt = cms.string("DBoldDMwLTwGJ") # option you want to use for your training (i.e., which variables are used to compute the BDT score)
107 )
108 # WPs
109 patTauDiscriminationByIsolationMVArun2v1DBoldDMwLT2017v1 = patTauDiscriminationByIsolationMVArun2v1DBoldDMwLT.clone(
110  toMultiplex = cms.InputTag('patTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw2017v1'),
111  mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMwLT2017v1_mvaOutput_normalization"), # normalization fo the training you want to use
112  mapping = cms.VPSet(
113  cms.PSet(
114  category = cms.uint32(0),
115  cut = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMwLT2017v1"), # this is the name of the working point you want to use
116  variable = cms.string("pt"),
117  )
118  ),
119  workingPoints = cms.vstring(
120  "_WPEff95",
121  "_WPEff90",
122  "_WPEff80",
123  "_WPEff70",
124  "_WPEff60",
125  "_WPEff50",
126  "_WPEff40"
127  )
128 )
129 # MVAIso DBoldDM Seqeunce
130 patTauDiscriminationByIsolationMVArun2v1DBoldDMwLT2017v1Seq = cms.Sequence(
131  patTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw2017v1
132  + patTauDiscriminationByIsolationMVArun2v1DBoldDMwLT2017v1
133 )
134 
137 patTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw2015 = patTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw.clone(
138  mvaName = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1"), # name of the training you want to use
139  mvaOpt = cms.string("DBoldDMwLT") # option you want to use for your training (i.e., which variables are used to compute the BDT score)
140 )
141 # WPs
142 patTauDiscriminationByIsolationMVArun2v1DBoldDMwLT2015 = patTauDiscriminationByIsolationMVArun2v1DBoldDMwLT.clone(
143  toMultiplex = cms.InputTag('patTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw2015'),
144  mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_mvaOutput_normalization"), # normalization fo the training you want to use
145  mapping = cms.VPSet(
146  cms.PSet(
147  category = cms.uint32(0),
148  cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1"), # this is the name of the working point you want to use
149  variable = cms.string("pt"),
150  )
151  ),
152  workingPoints = cms.vstring(
153  "_WPEff90",
154  "_WPEff80",
155  "_WPEff70",
156  "_WPEff60",
157  "_WPEff50",
158  "_WPEff40"
159  )
160 )
161 # MVAIso DBoldDM Seqeunce
162 patTauDiscriminationByIsolationMVArun2v1DBoldDMwLT2015Seq = cms.Sequence(
163  patTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw2015
164  + patTauDiscriminationByIsolationMVArun2v1DBoldDMwLT2015
165 )
166 
167 
168 
169 antiElectronDiscrMVA6_version = "MVA"
170 
171 from RecoTauTag.RecoTau.PATTauDiscriminationAgainstElectronMVA6_cfi import patTauDiscriminationAgainstElectronMVA6
172 from RecoTauTag.RecoTau.TauDiscriminatorTools import noPrediscriminants
173 patTauDiscriminationByElectronRejectionMVA62018Raw = patTauDiscriminationAgainstElectronMVA6.clone(
174  Prediscriminants = noPrediscriminants, #already selected for MiniAOD
175  vetoEcalCracks = False, #keep tau candidates in EB-EE cracks
176  mvaName_NoEleMatch_wGwoGSF_BL = 'RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_NoEleMatch_wGwoGSF_BL',
177  mvaName_NoEleMatch_wGwoGSF_EC = 'RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_NoEleMatch_wGwoGSF_EC',
178  mvaName_NoEleMatch_woGwoGSF_BL = 'RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_NoEleMatch_woGwoGSF_BL',
179  mvaName_NoEleMatch_woGwoGSF_EC = 'RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_NoEleMatch_woGwoGSF_EC',
180  mvaName_wGwGSF_BL = 'RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_wGwGSF_BL',
181  mvaName_wGwGSF_EC = 'RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_wGwGSF_EC',
182  mvaName_woGwGSF_BL = 'RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_woGwGSF_BL',
183  mvaName_woGwGSF_EC = 'RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_woGwGSF_EC'
184 )
185 
186 from RecoTauTag.RecoTau.PATTauDiscriminantCutMultiplexer_cfi import patTauDiscriminantCutMultiplexer
187 # VLoose
188 patTauDiscriminationByElectronRejectionMVA62018 = patTauDiscriminantCutMultiplexer.clone(
189  PATTauProducer = patTauDiscriminationByElectronRejectionMVA62018Raw.PATTauProducer,
190  Prediscriminants = patTauDiscriminationByElectronRejectionMVA62018Raw.Prediscriminants,
191  toMultiplex = cms.InputTag("patTauDiscriminationByElectronRejectionMVA62018Raw"),
192  mapping = cms.VPSet(
193  cms.PSet(
194  category = cms.uint32(0),
195  cut = cms.string('RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_NoEleMatch_woGwoGSF_BL'),
196  variable = cms.string('pt')
197  ),
198  cms.PSet(
199  category = cms.uint32(2),
200  cut = cms.string('RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_NoEleMatch_wGwoGSF_BL'),
201  variable = cms.string('pt')
202  ),
203  cms.PSet(
204  category = cms.uint32(5),
205  cut = cms.string('RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_woGwGSF_BL'),
206  variable = cms.string('pt')
207  ),
208  cms.PSet(
209  category = cms.uint32(7),
210  cut = cms.string('RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_wGwGSF_BL'),
211  variable = cms.string('pt')
212  ),
213  cms.PSet(
214  category = cms.uint32(8),
215  cut = cms.string('RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_NoEleMatch_woGwoGSF_EC'),
216  variable = cms.string('pt')
217  ),
218  cms.PSet(
219  category = cms.uint32(10),
220  cut = cms.string('RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_NoEleMatch_wGwoGSF_EC'),
221  variable = cms.string('pt')
222  ),
223  cms.PSet(
224  category = cms.uint32(13),
225  cut = cms.string('RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_woGwGSF_EC'),
226  variable = cms.string('pt')
227  ),
228  cms.PSet(
229  category = cms.uint32(15),
230  cut = cms.string('RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_wGwGSF_EC'),
231  variable = cms.string('pt')
232  )
233  ),
234  rawValues = cms.vstring(
235  "discriminator",
236  "category"
237  ),
238  workingPoints = cms.vstring(
239  "_VLoose",
240  "_Loose",
241  "_Medium",
242  "_Tight",
243  "_VTight"
244  )
245 )
246 
247 antiElectronDiscrMVA6v1_version = "MVA6v1"
248 
249 patTauDiscriminationByElectronRejectionMVA62015Raw = patTauDiscriminationAgainstElectronMVA6.clone(
250  Prediscriminants = noPrediscriminants, #already selected for MiniAOD
251  vetoEcalCracks = True, #don't keep tau candidates in EB-EE cracks for v1
252  mvaName_NoEleMatch_wGwoGSF_BL = 'RecoTauTag_antiElectron'+antiElectronDiscrMVA6v1_version+'_gbr_NoEleMatch_wGwoGSF_BL',
253  mvaName_NoEleMatch_wGwoGSF_EC = 'RecoTauTag_antiElectron'+antiElectronDiscrMVA6v1_version+'_gbr_NoEleMatch_wGwoGSF_EC',
254  mvaName_NoEleMatch_woGwoGSF_BL = 'RecoTauTag_antiElectron'+antiElectronDiscrMVA6v1_version+'_gbr_NoEleMatch_woGwoGSF_BL',
255  mvaName_NoEleMatch_woGwoGSF_EC = 'RecoTauTag_antiElectron'+antiElectronDiscrMVA6v1_version+'_gbr_NoEleMatch_woGwoGSF_EC',
256  mvaName_wGwGSF_BL = 'RecoTauTag_antiElectron'+antiElectronDiscrMVA6v1_version+'_gbr_wGwGSF_BL',
257  mvaName_wGwGSF_EC = 'RecoTauTag_antiElectron'+antiElectronDiscrMVA6v1_version+'_gbr_wGwGSF_EC',
258  mvaName_woGwGSF_BL = 'RecoTauTag_antiElectron'+antiElectronDiscrMVA6v1_version+'_gbr_woGwGSF_BL',
259  mvaName_woGwGSF_EC = 'RecoTauTag_antiElectron'+antiElectronDiscrMVA6v1_version+'_gbr_woGwGSF_EC'
260 )
261 
262 patTauDiscriminationByElectronRejectionMVA62015 = patTauDiscriminationByElectronRejectionMVA62018.clone(
263  PATTauProducer = patTauDiscriminationByElectronRejectionMVA62015Raw.PATTauProducer,
264  Prediscriminants = patTauDiscriminationByElectronRejectionMVA62015Raw.Prediscriminants,
265  toMultiplex = cms.InputTag("patTauDiscriminationByElectronRejectionMVA62015Raw"),
266  rawValues = cms.vstring(
267  "discriminator",
268  "category"
269  ),
270  workingPoints = cms.vstring(
271  "_WPEff99",
272  "_WPEff96",
273  "_WPEff91",
274  "_WPEff85",
275  "_WPEff79"
276  )
277 )
278 for m in patTauDiscriminationByElectronRejectionMVA62015.mapping:
279  m.cut = m.cut.value().replace(antiElectronDiscrMVA6_version, antiElectronDiscrMVA6v1_version + "_gbr")
280 
281 _patTauDiscriminationByElectronRejection2018Seq = cms.Sequence(
282  patTauDiscriminationByElectronRejectionMVA62018Raw
283  +patTauDiscriminationByElectronRejectionMVA62018
284 )
285 _patTauDiscriminationByElectronRejection2015Seq = cms.Sequence(
286  patTauDiscriminationByElectronRejectionMVA62015Raw
287  +patTauDiscriminationByElectronRejectionMVA62015
288 )
289 patTauDiscriminationByElectronRejectionSeq = _patTauDiscriminationByElectronRejection2015Seq.copy()
290 (~run2_miniAOD_80XLegacy).toReplaceWith(patTauDiscriminationByElectronRejectionSeq,
291  _patTauDiscriminationByElectronRejection2018Seq)
292 
293 
294 
295 _patTauMVAIDsSeq2017v2 = cms.Sequence(
296  patTauDiscriminationByIsolationMVArun2v1DBoldDMwLTSeq
297  +patTauDiscriminationByIsolationMVArun2v1DBnewDMwLTSeq
298  +patTauDiscriminationByIsolationMVArun2v1DBoldDMdR0p3wLTSeq
299  +patTauDiscriminationByElectronRejectionSeq
300 )
301 patTauMVAIDsSeq = _patTauMVAIDsSeq2017v2.copy()
302 patTauMVAIDsSeq += patTauDiscriminationByIsolationMVArun2v1DBoldDMwLT2015Seq
303 
304 _patTauMVAIDsSeqWith2017v1 = _patTauMVAIDsSeq2017v2.copy()
305 _patTauMVAIDsSeqWith2017v1 += patTauDiscriminationByIsolationMVArun2v1DBoldDMwLT2017v1Seq
306 for era in [run2_nanoAOD_94XMiniAODv1,]:
307  era.toReplaceWith(patTauMVAIDsSeq,_patTauMVAIDsSeqWith2017v1)
308 
309 # embed new MVA tau-Ids into new tau collection
310 def tauIDMVAinputs(module, wp):
311  return cms.PSet(inputTag = cms.InputTag(module), workingPointIndex = cms.int32(-1 if wp=="raw" else -2 if wp=="category" else globals()[module].workingPoints.index(wp)))
312 slimmedTausUpdated = cms.EDProducer("PATTauIDEmbedder",
313  src = cms.InputTag('slimmedTaus'),
314  tauIDSources = cms.PSet() # PSet defined below in era dependent way
315 )
316 _tauIDSources2017v2 = cms.PSet(
317  #oldDM
318  byIsolationMVArun2v1DBoldDMwLTraw2017v2 = tauIDMVAinputs("patTauDiscriminationByIsolationMVArun2v1DBoldDMwLT", "raw"),
319  byVVLooseIsolationMVArun2v1DBoldDMwLT2017v2 = tauIDMVAinputs("patTauDiscriminationByIsolationMVArun2v1DBoldDMwLT", "_VVLoose"),
320  byVLooseIsolationMVArun2v1DBoldDMwLT2017v2 = tauIDMVAinputs("patTauDiscriminationByIsolationMVArun2v1DBoldDMwLT", "_VLoose"),
321  byLooseIsolationMVArun2v1DBoldDMwLT2017v2 = tauIDMVAinputs("patTauDiscriminationByIsolationMVArun2v1DBoldDMwLT", "_Loose"),
322  byMediumIsolationMVArun2v1DBoldDMwLT2017v2 = tauIDMVAinputs("patTauDiscriminationByIsolationMVArun2v1DBoldDMwLT", "_Medium"),
323  byTightIsolationMVArun2v1DBoldDMwLT2017v2 = tauIDMVAinputs("patTauDiscriminationByIsolationMVArun2v1DBoldDMwLT", "_Tight"),
324  byVTightIsolationMVArun2v1DBoldDMwLT2017v2 = tauIDMVAinputs("patTauDiscriminationByIsolationMVArun2v1DBoldDMwLT", "_VTight"),
325  byVVTightIsolationMVArun2v1DBoldDMwLT2017v2 = tauIDMVAinputs("patTauDiscriminationByIsolationMVArun2v1DBoldDMwLT", "_VVTight"),
326  #newDM
327  byIsolationMVArun2v1DBnewDMwLTraw2017v2 = tauIDMVAinputs("patTauDiscriminationByIsolationMVArun2v1DBnewDMwLT", "raw"),
328  byVVLooseIsolationMVArun2v1DBnewDMwLT2017v2 = tauIDMVAinputs("patTauDiscriminationByIsolationMVArun2v1DBnewDMwLT", "_VVLoose"),
329  byVLooseIsolationMVArun2v1DBnewDMwLT2017v2 = tauIDMVAinputs("patTauDiscriminationByIsolationMVArun2v1DBnewDMwLT", "_VLoose"),
330  byLooseIsolationMVArun2v1DBnewDMwLT2017v2 = tauIDMVAinputs("patTauDiscriminationByIsolationMVArun2v1DBnewDMwLT", "_Loose"),
331  byMediumIsolationMVArun2v1DBnewDMwLT2017v2 = tauIDMVAinputs("patTauDiscriminationByIsolationMVArun2v1DBnewDMwLT", "_Medium"),
332  byTightIsolationMVArun2v1DBnewDMwLT2017v2 = tauIDMVAinputs("patTauDiscriminationByIsolationMVArun2v1DBnewDMwLT", "_Tight"),
333  byVTightIsolationMVArun2v1DBnewDMwLT2017v2 = tauIDMVAinputs("patTauDiscriminationByIsolationMVArun2v1DBnewDMwLT", "_VTight"),
334  byVVTightIsolationMVArun2v1DBnewDMwLT2017v2 = tauIDMVAinputs("patTauDiscriminationByIsolationMVArun2v1DBnewDMwLT", "_VVTight"),
335  #oldDMdR0p3
336  byIsolationMVArun2v1DBdR03oldDMwLTraw2017v2 = tauIDMVAinputs("patTauDiscriminationByIsolationMVArun2v1DBoldDMdR0p3wLT", "raw"),
337  byVVLooseIsolationMVArun2v1DBdR03oldDMwLT2017v2 = tauIDMVAinputs("patTauDiscriminationByIsolationMVArun2v1DBoldDMdR0p3wLT", "_VVLoose"),
338  byVLooseIsolationMVArun2v1DBdR03oldDMwLT2017v2 = tauIDMVAinputs("patTauDiscriminationByIsolationMVArun2v1DBoldDMdR0p3wLT", "_VLoose"),
339  byLooseIsolationMVArun2v1DBdR03oldDMwLT2017v2 = tauIDMVAinputs("patTauDiscriminationByIsolationMVArun2v1DBoldDMdR0p3wLT", "_Loose"),
340  byMediumIsolationMVArun2v1DBdR03oldDMwLT2017v2 = tauIDMVAinputs("patTauDiscriminationByIsolationMVArun2v1DBoldDMdR0p3wLT", "_Medium"),
341  byTightIsolationMVArun2v1DBdR03oldDMwLT2017v2 = tauIDMVAinputs("patTauDiscriminationByIsolationMVArun2v1DBoldDMdR0p3wLT", "_Tight"),
342  byVTightIsolationMVArun2v1DBdR03oldDMwLT2017v2 = tauIDMVAinputs("patTauDiscriminationByIsolationMVArun2v1DBoldDMdR0p3wLT", "_VTight"),
343  byVVTightIsolationMVArun2v1DBdR03oldDMwLT2017v2 = tauIDMVAinputs("patTauDiscriminationByIsolationMVArun2v1DBoldDMdR0p3wLT", "_VVTight")
344 )
345 _tauIDSources2017v1 = cms.PSet(
346  byIsolationMVArun2v1DBoldDMwLTraw2017v1 = tauIDMVAinputs("patTauDiscriminationByIsolationMVArun2v1DBoldDMwLT2017v1", "raw"),
347  byVVLooseIsolationMVArun2v1DBoldDMwLT2017v1 = tauIDMVAinputs("patTauDiscriminationByIsolationMVArun2v1DBoldDMwLT2017v1", "_WPEff95"),
348  byVLooseIsolationMVArun2v1DBoldDMwLT2017v1 = tauIDMVAinputs("patTauDiscriminationByIsolationMVArun2v1DBoldDMwLT2017v1", "_WPEff90"),
349  byLooseIsolationMVArun2v1DBoldDMwLT2017v1 = tauIDMVAinputs("patTauDiscriminationByIsolationMVArun2v1DBoldDMwLT2017v1", "_WPEff80"),
350  byMediumIsolationMVArun2v1DBoldDMwLT2017v1 = tauIDMVAinputs("patTauDiscriminationByIsolationMVArun2v1DBoldDMwLT2017v1", "_WPEff70"),
351  byTightIsolationMVArun2v1DBoldDMwLT2017v1 = tauIDMVAinputs("patTauDiscriminationByIsolationMVArun2v1DBoldDMwLT2017v1", "_WPEff60"),
352  byVTightIsolationMVArun2v1DBoldDMwLT2017v1 = tauIDMVAinputs("patTauDiscriminationByIsolationMVArun2v1DBoldDMwLT2017v1", "_WPEff50"),
353  byVVTightIsolationMVArun2v1DBoldDMwLT2017v1 = tauIDMVAinputs("patTauDiscriminationByIsolationMVArun2v1DBoldDMwLT2017v1", "_WPEff40")
354 )
355 _tauIDSourcesWith2017v1 = cms.PSet(
356  _tauIDSources2017v2.clone(),
357  _tauIDSources2017v1
358 )
359 _tauIDSources2015 = cms.PSet(
360  byIsolationMVArun2v1DBoldDMwLTraw2015 = tauIDMVAinputs("patTauDiscriminationByIsolationMVArun2v1DBoldDMwLT2015", "raw"),
361  byVLooseIsolationMVArun2v1DBoldDMwLT2015 = tauIDMVAinputs("patTauDiscriminationByIsolationMVArun2v1DBoldDMwLT2015", "_WPEff90"),
362  byLooseIsolationMVArun2v1DBoldDMwLT2015 = tauIDMVAinputs("patTauDiscriminationByIsolationMVArun2v1DBoldDMwLT2015", "_WPEff80"),
363  byMediumIsolationMVArun2v1DBoldDMwLT2015 = tauIDMVAinputs("patTauDiscriminationByIsolationMVArun2v1DBoldDMwLT2015", "_WPEff70"),
364  byTightIsolationMVArun2v1DBoldDMwLT2015 = tauIDMVAinputs("patTauDiscriminationByIsolationMVArun2v1DBoldDMwLT2015", "_WPEff60"),
365  byVTightIsolationMVArun2v1DBoldDMwLT2015 = tauIDMVAinputs("patTauDiscriminationByIsolationMVArun2v1DBoldDMwLT2015", "_WPEff50"),
366  byVVTightIsolationMVArun2v1DBoldDMwLT2015 = tauIDMVAinputs("patTauDiscriminationByIsolationMVArun2v1DBoldDMwLT2015", "_WPEff40")
367 )
368 _tauIDSourcesWith2015 = cms.PSet(
369  _tauIDSources2017v2.clone(),
370  _tauIDSources2015
371 )
372 slimmedTausUpdated.tauIDSources=_tauIDSourcesWith2015
373 
374 for era in [run2_nanoAOD_94XMiniAODv1,]:
375  era.toModify(slimmedTausUpdated,
376  tauIDSources = _tauIDSourcesWith2017v1
377  )
378 
379 _antiETauIDSources2018 = cms.PSet(
380  againstElectronMVA6Raw2018 = tauIDMVAinputs("patTauDiscriminationByElectronRejectionMVA62018", "raw"),
381  againstElectronMVA6category2018 = tauIDMVAinputs("patTauDiscriminationByElectronRejectionMVA62018", "category"),
382  againstElectronVLooseMVA62018 = tauIDMVAinputs("patTauDiscriminationByElectronRejectionMVA62018", "_VLoose"),
383  againstElectronLooseMVA62018 = tauIDMVAinputs("patTauDiscriminationByElectronRejectionMVA62018", "_Loose"),
384  againstElectronMediumMVA62018 = tauIDMVAinputs("patTauDiscriminationByElectronRejectionMVA62018", "_Medium"),
385  againstElectronTightMVA62018 = tauIDMVAinputs("patTauDiscriminationByElectronRejectionMVA62018", "_Tight"),
386  againstElectronVTightMVA62018 = tauIDMVAinputs("patTauDiscriminationByElectronRejectionMVA62018", "_VTight")
387 )
388 _tauIDSourcesWithAntiE2018 = cms.PSet(
389  slimmedTausUpdated.tauIDSources.clone(),
390  _antiETauIDSources2018
391 )
392 _antiETauIDSources2015 = cms.PSet(
393  againstElectronMVA6Raw2015 = tauIDMVAinputs("patTauDiscriminationByElectronRejectionMVA62015", "raw"),
394  againstElectronMVA6category2015 = tauIDMVAinputs("patTauDiscriminationByElectronRejectionMVA62015", "category"),
395  againstElectronVLooseMVA62015 = tauIDMVAinputs("patTauDiscriminationByElectronRejectionMVA62015", "_WPEff99"),
396  againstElectronLooseMVA62015 = tauIDMVAinputs("patTauDiscriminationByElectronRejectionMVA62015", "_WPEff96"),
397  againstElectronMediumMVA62015 = tauIDMVAinputs("patTauDiscriminationByElectronRejectionMVA62015", "_WPEff91"),
398  againstElectronTightMVA62015 = tauIDMVAinputs("patTauDiscriminationByElectronRejectionMVA62015", "_WPEff85"),
399  againstElectronVTightMVA62015 = tauIDMVAinputs("patTauDiscriminationByElectronRejectionMVA62015", "_WPEff79")
400 )
401 _tauIDSourcesWithAntiE2015 = cms.PSet(
402  slimmedTausUpdated.tauIDSources.clone(),
403  _antiETauIDSources2015
404 )
405 slimmedTausUpdated.tauIDSources=_tauIDSourcesWithAntiE2015
406 (~run2_miniAOD_80XLegacy).toModify(slimmedTausUpdated,
407  tauIDSources = _tauIDSourcesWithAntiE2018
408  )
409 
410 
411 patTauMVAIDsSeq += slimmedTausUpdated
412 
taus_updatedMVAIds_cff.tauIDMVAinputs
def tauIDMVAinputs(module, wp)
Definition: taus_updatedMVAIds_cff.py:310
PATTauDiscriminantCutMultiplexer_cfi
loadRecoTauTagMVAsFromPrepDB_cfi
Updated tau collection with MVA-based tau-Ids rerun ####### Used only in some eras.
TauDiscriminatorTools
PATTauDiscriminationByMVAIsolationRun2_cff
python.rootplot.root2matplotlib.replace
def replace(string, replacements)
Definition: root2matplotlib.py:444