CMS 3D CMS Logo

taus_updatedMVAIds_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 ##################### Updated tau collection with MVA-based tau-Ids rerun #######
4 # Used only in some eras
7 
8 ### MVAIso 2017v2
9 ## DBoldDM
10 # Raw
11 patTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw = patDiscriminationByIsolationMVArun2v1raw.clone(
12  PATTauProducer = cms.InputTag('slimmedTaus'),
13  Prediscriminants = noPrediscriminants,
14  loadMVAfromDB = cms.bool(True),
15  mvaName = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMwLT2017v2"), # name of the training you want to use
16  mvaOpt = cms.string("DBoldDMwLTwGJ"), # option you want to use for your training (i.e., which variables are used to compute the BDT score)
17  verbosity = cms.int32(0)
18 )
19 # VVLoose WP
20 patTauDiscriminationByVVLooseIsolationMVArun2v1DBoldDMwLT = patDiscriminationByIsolationMVArun2v1VLoose.clone(
21  PATTauProducer = cms.InputTag('slimmedTaus'),
22  Prediscriminants = noPrediscriminants,
23  toMultiplex = cms.InputTag('patTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw'),
24  key = cms.InputTag('patTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw','category'),
25  loadMVAfromDB = cms.bool(True),
26  mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMwLT2017v2_mvaOutput_normalization"), # normalization fo the training you want to use
27  mapping = cms.VPSet(
28  cms.PSet(
29  category = cms.uint32(0),
30  cut = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMwLT2017v2_WPEff95"), # this is the name of the working point you want to use
31  variable = cms.string("pt"),
32  )
33  )
34 )
35 # VLoose WP
36 patTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT = patTauDiscriminationByVVLooseIsolationMVArun2v1DBoldDMwLT.clone()
37 patTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMwLT2017v2_WPEff90")
38 # Loose WP
39 patTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT = patTauDiscriminationByVVLooseIsolationMVArun2v1DBoldDMwLT.clone()
40 patTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMwLT2017v2_WPEff80")
41 # Medium WP
42 patTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT = patTauDiscriminationByVVLooseIsolationMVArun2v1DBoldDMwLT.clone()
43 patTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMwLT2017v2_WPEff70")
44 # Tight WP
45 patTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT = patTauDiscriminationByVVLooseIsolationMVArun2v1DBoldDMwLT.clone()
46 patTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMwLT2017v2_WPEff60")
47 # VTight WP
48 patTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT = patTauDiscriminationByVVLooseIsolationMVArun2v1DBoldDMwLT.clone()
49 patTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMwLT2017v2_WPEff50")
50 # VVTights WP
51 patTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT = patTauDiscriminationByVVLooseIsolationMVArun2v1DBoldDMwLT.clone()
52 patTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMwLT2017v2_WPEff40")
53 # MVAIso DBoldDM Seqeunce
54 patTauDiscriminationByIsolationMVArun2v1DBoldDMwLTSeq = cms.Sequence(
55  patTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw
56  + patTauDiscriminationByVVLooseIsolationMVArun2v1DBoldDMwLT
57  + patTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT
58  + patTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT
59  + patTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT
60  + patTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT
61  + patTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT
62  + patTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT
63 )
64 ## DBnewDM
65 # Raw
66 patTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw = patDiscriminationByIsolationMVArun2v1raw.clone(
67  PATTauProducer = cms.InputTag('slimmedTaus'),
68  Prediscriminants = noPrediscriminants,
69  loadMVAfromDB = cms.bool(True),
70  mvaName = cms.string("RecoTauTag_tauIdMVAIsoDBnewDMwLT2017v2"), # name of the training you want to use
71  mvaOpt = cms.string("DBnewDMwLTwGJ"), # option you want to use for your training (i.e., which variables are used to compute the BDT score)
72  verbosity = cms.int32(0)
73 )
74 # VVLoose WP
75 patTauDiscriminationByVVLooseIsolationMVArun2v1DBnewDMwLT = patDiscriminationByIsolationMVArun2v1VLoose.clone(
76  PATTauProducer = cms.InputTag('slimmedTaus'),
77  Prediscriminants = noPrediscriminants,
78  toMultiplex = cms.InputTag('patTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw'),
79  key = cms.InputTag('patTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw','category'),
80  loadMVAfromDB = cms.bool(True),
81  mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAIsoDBnewDMwLT2017v2_mvaOutput_normalization"), # normalization fo the training you want to use
82  mapping = cms.VPSet(
83  cms.PSet(
84  category = cms.uint32(0),
85  cut = cms.string("RecoTauTag_tauIdMVAIsoDBnewDMwLT2017v2_WPEff95"), # this is the name of the working point you want to use
86  variable = cms.string("pt"),
87  )
88  )
89 )
90 # VLoose WP
91 patTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT = patTauDiscriminationByVVLooseIsolationMVArun2v1DBnewDMwLT.clone()
92 patTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAIsoDBnewDMwLT2017v2_WPEff90")
93 # Loose WP
94 patTauDiscriminationByLooseIsolationMVArun2v1DBnewDMwLT = patTauDiscriminationByVVLooseIsolationMVArun2v1DBnewDMwLT.clone()
95 patTauDiscriminationByLooseIsolationMVArun2v1DBnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAIsoDBnewDMwLT2017v2_WPEff80")
96 # Medium WP
97 patTauDiscriminationByMediumIsolationMVArun2v1DBnewDMwLT = patTauDiscriminationByVVLooseIsolationMVArun2v1DBnewDMwLT.clone()
98 patTauDiscriminationByMediumIsolationMVArun2v1DBnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAIsoDBnewDMwLT2017v2_WPEff70")
99 # Tight WP
100 patTauDiscriminationByTightIsolationMVArun2v1DBnewDMwLT = patTauDiscriminationByVVLooseIsolationMVArun2v1DBnewDMwLT.clone()
101 patTauDiscriminationByTightIsolationMVArun2v1DBnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAIsoDBnewDMwLT2017v2_WPEff60")
102 # VTight WP
103 patTauDiscriminationByVTightIsolationMVArun2v1DBnewDMwLT = patTauDiscriminationByVVLooseIsolationMVArun2v1DBnewDMwLT.clone()
104 patTauDiscriminationByVTightIsolationMVArun2v1DBnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAIsoDBnewDMwLT2017v2_WPEff50")
105 # VVTights WP
106 patTauDiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT = patTauDiscriminationByVVLooseIsolationMVArun2v1DBnewDMwLT.clone()
107 patTauDiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAIsoDBnewDMwLT2017v2_WPEff40")
108 # MVAIso DBnewDM Seqeunce
109 patTauDiscriminationByIsolationMVArun2v1DBnewDMwLTSeq = cms.Sequence(
110  patTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw
111  + patTauDiscriminationByVVLooseIsolationMVArun2v1DBnewDMwLT
112  + patTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT
113  + patTauDiscriminationByLooseIsolationMVArun2v1DBnewDMwLT
114  + patTauDiscriminationByMediumIsolationMVArun2v1DBnewDMwLT
115  + patTauDiscriminationByTightIsolationMVArun2v1DBnewDMwLT
116  + patTauDiscriminationByVTightIsolationMVArun2v1DBnewDMwLT
117  + patTauDiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT
118 )
119 ## DBoldDMdR0p3
120 # Raw
121 patTauDiscriminationByIsolationMVArun2v1DBoldDMdR0p3wLTraw = patDiscriminationByIsolationMVArun2v1raw.clone(
122  PATTauProducer = cms.InputTag('slimmedTaus'),
123  Prediscriminants = noPrediscriminants,
124  loadMVAfromDB = cms.bool(True),
125  mvaName = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMdR0p3wLT2017v2"), # name of the training you want to use
126  mvaOpt = cms.string("DBoldDMwLTwGJ"), # option you want to use for your training (i.e., which variables are used to compute the BDT score)
127  srcChargedIsoPtSum = cms.string('chargedIsoPtSumdR03'),
128  srcFootprintCorrection = cms.string('footprintCorrectiondR03'),
129  srcNeutralIsoPtSum = cms.string('neutralIsoPtSumdR03'),
130  srcPUcorrPtSum = cms.string('puCorrPtSum'),
131  srcPhotonPtSumOutsideSignalCone = cms.string('photonPtSumOutsideSignalConedR03'),
132  verbosity = cms.int32(0)
133 )
134 # VVLoose WP
135 patTauDiscriminationByVVLooseIsolationMVArun2v1DBoldDMdR0p3wLT = patDiscriminationByIsolationMVArun2v1VLoose.clone(
136  PATTauProducer = cms.InputTag('slimmedTaus'),
137  Prediscriminants = noPrediscriminants,
138  toMultiplex = cms.InputTag('patTauDiscriminationByIsolationMVArun2v1DBoldDMdR0p3wLTraw'),
139  key = cms.InputTag('patTauDiscriminationByIsolationMVArun2v1DBoldDMdR0p3wLTraw','category'),
140  loadMVAfromDB = cms.bool(True),
141  mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMdR0p3wLT2017v2_mvaOutput_normalization"), # normalization fo the training you want to use
142  mapping = cms.VPSet(
143  cms.PSet(
144  category = cms.uint32(0),
145  cut = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMdR0p3wLT2017v2_WPEff95"), # this is the name of the working point you want to use
146  variable = cms.string("pt"),
147  )
148  )
149 )
150 # VLoose WP
151 patTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMdR0p3wLT = patTauDiscriminationByVVLooseIsolationMVArun2v1DBoldDMdR0p3wLT.clone()
152 patTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMdR0p3wLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMdR0p3wLT2017v2_WPEff90")
153 # Loose WP
154 patTauDiscriminationByLooseIsolationMVArun2v1DBoldDMdR0p3wLT = patTauDiscriminationByVVLooseIsolationMVArun2v1DBoldDMdR0p3wLT.clone()
155 patTauDiscriminationByLooseIsolationMVArun2v1DBoldDMdR0p3wLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMdR0p3wLT2017v2_WPEff80")
156 # Medium WP
157 patTauDiscriminationByMediumIsolationMVArun2v1DBoldDMdR0p3wLT = patTauDiscriminationByVVLooseIsolationMVArun2v1DBoldDMdR0p3wLT.clone()
158 patTauDiscriminationByMediumIsolationMVArun2v1DBoldDMdR0p3wLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMdR0p3wLT2017v2_WPEff70")
159 # Tight WP
160 patTauDiscriminationByTightIsolationMVArun2v1DBoldDMdR0p3wLT = patTauDiscriminationByVVLooseIsolationMVArun2v1DBoldDMdR0p3wLT.clone()
161 patTauDiscriminationByTightIsolationMVArun2v1DBoldDMdR0p3wLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMdR0p3wLT2017v2_WPEff60")
162 # VTight WP
163 patTauDiscriminationByVTightIsolationMVArun2v1DBoldDMdR0p3wLT = patTauDiscriminationByVVLooseIsolationMVArun2v1DBoldDMdR0p3wLT.clone()
164 patTauDiscriminationByVTightIsolationMVArun2v1DBoldDMdR0p3wLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMdR0p3wLT2017v2_WPEff50")
165 # VVTights WP
166 patTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMdR0p3wLT = patTauDiscriminationByVVLooseIsolationMVArun2v1DBoldDMdR0p3wLT.clone()
167 patTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMdR0p3wLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMdR0p3wLT2017v2_WPEff40")
168 # MVAIso DBoldDMdR0p3 Seqeunce
169 patTauDiscriminationByIsolationMVArun2v1DBoldDMdR0p3wLTSeq = cms.Sequence(
170  patTauDiscriminationByIsolationMVArun2v1DBoldDMdR0p3wLTraw
171  + patTauDiscriminationByVVLooseIsolationMVArun2v1DBoldDMdR0p3wLT
172  + patTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMdR0p3wLT
173  + patTauDiscriminationByLooseIsolationMVArun2v1DBoldDMdR0p3wLT
174  + patTauDiscriminationByMediumIsolationMVArun2v1DBoldDMdR0p3wLT
175  + patTauDiscriminationByTightIsolationMVArun2v1DBoldDMdR0p3wLT
176  + patTauDiscriminationByVTightIsolationMVArun2v1DBoldDMdR0p3wLT
177  + patTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMdR0p3wLT
178 )
179 ### MVAIso 2017v1 for Nano on top of MiniAODv1
180 ## DBoldDM
181 # Raw
182 patTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw2017v1 = patDiscriminationByIsolationMVArun2v1raw.clone(
183  PATTauProducer = cms.InputTag('slimmedTaus'),
184  Prediscriminants = noPrediscriminants,
185  loadMVAfromDB = cms.bool(True),
186  mvaName = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMwLT2017v1"), # name of the training you want to use
187  mvaOpt = cms.string("DBoldDMwLTwGJ"), # option you want to use for your training (i.e., which variables are used to compute the BDT score)
188  verbosity = cms.int32(0)
189 )
190 # VVLoose WP
191 patTauDiscriminationByVVLooseIsolationMVArun2v1DBoldDMwLT2017v1 = patDiscriminationByIsolationMVArun2v1VLoose.clone(
192  PATTauProducer = cms.InputTag('slimmedTaus'),
193  Prediscriminants = noPrediscriminants,
194  toMultiplex = cms.InputTag('patTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw2017v1'),
195  key = cms.InputTag('patTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw2017v1','category'),
196  loadMVAfromDB = cms.bool(True),
197  mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMwLT2017v1_mvaOutput_normalization"), # normalization fo the training you want to use
198  mapping = cms.VPSet(
199  cms.PSet(
200  category = cms.uint32(0),
201  cut = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMwLT2017v1_WPEff95"), # this is the name of the working point you want to use
202  variable = cms.string("pt"),
203  )
204  )
205 )
206 # VLoose WP
207 patTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT2017v1 = patTauDiscriminationByVVLooseIsolationMVArun2v1DBoldDMwLT2017v1.clone()
208 patTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT2017v1.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMwLT2017v1_WPEff90")
209 # Loose WP
210 patTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT2017v1 = patTauDiscriminationByVVLooseIsolationMVArun2v1DBoldDMwLT2017v1.clone()
211 patTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT2017v1.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMwLT2017v1_WPEff80")
212 # Medium WP
213 patTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT2017v1 = patTauDiscriminationByVVLooseIsolationMVArun2v1DBoldDMwLT2017v1.clone()
214 patTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT2017v1.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMwLT2017v1_WPEff70")
215 # Tight WP
216 patTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT2017v1 = patTauDiscriminationByVVLooseIsolationMVArun2v1DBoldDMwLT2017v1.clone()
217 patTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT2017v1.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMwLT2017v1_WPEff60")
218 # VTight WP
219 patTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT2017v1 = patTauDiscriminationByVVLooseIsolationMVArun2v1DBoldDMwLT2017v1.clone()
220 patTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT2017v1.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMwLT2017v1_WPEff50")
221 # VVTights WP
222 patTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT2017v1 = patTauDiscriminationByVVLooseIsolationMVArun2v1DBoldDMwLT2017v1.clone()
223 patTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT2017v1.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAIsoDBoldDMwLT2017v1_WPEff40")
224 # MVAIso DBoldDM Seqeunce
225 patTauDiscriminationByIsolationMVArun2v1DBoldDMwLT2017v1Seq = cms.Sequence(
226  patTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw2017v1
227  + patTauDiscriminationByVVLooseIsolationMVArun2v1DBoldDMwLT2017v1
228  + patTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT2017v1
229  + patTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT2017v1
230  + patTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT2017v1
231  + patTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT2017v1
232  + patTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT2017v1
233  + patTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT2017v1
234 )
235 ### MVAIso 2015 for Nano on top of MiniAODv2
236 ## DBoldDM
237 # Raw
238 patTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw2015 = patDiscriminationByIsolationMVArun2v1raw.clone(
239  PATTauProducer = cms.InputTag('slimmedTaus'),
240  Prediscriminants = noPrediscriminants,
241  loadMVAfromDB = cms.bool(True),
242  mvaName = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1"), # name of the training you want to use
243  mvaOpt = cms.string("DBoldDMwLT"), # option you want to use for your training (i.e., which variables are used to compute the BDT score)
244  verbosity = cms.int32(0)
245 )
246 # VLoose WP
247 patTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT2015 = patDiscriminationByIsolationMVArun2v1VLoose.clone(
248  PATTauProducer = cms.InputTag('slimmedTaus'),
249  Prediscriminants = noPrediscriminants,
250  toMultiplex = cms.InputTag('patTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw2015'),
251  key = cms.InputTag('patTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw2015','category'),
252  loadMVAfromDB = cms.bool(True),
253  mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_mvaOutput_normalization"), # normalization fo the training you want to use
254  mapping = cms.VPSet(
255  cms.PSet(
256  category = cms.uint32(0),
257  cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff90"), # this is the name of the working point you want to use
258  variable = cms.string("pt"),
259  )
260  )
261 )
262 # Loose WP
263 patTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT2015 = patTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT2015.clone()
264 patTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT2015.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff80")
265 # Medium WP
266 patTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT2015 = patTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT2015.clone()
267 patTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT2015.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff70")
268 # Tight WP
269 patTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT2015 = patTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT2015.clone()
270 patTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT2015.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff60")
271 # VTight WP
272 patTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT2015 = patTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT2015.clone()
273 patTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT2015.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff50")
274 # VVTights WP
275 patTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT2015 = patTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT2015.clone()
276 patTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT2015.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff40")
277 # MVAIso DBoldDM Seqeunce
278 patTauDiscriminationByIsolationMVArun2v1DBoldDMwLT2015Seq = cms.Sequence(
279  patTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw2015
280  + patTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT2015
281  + patTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT2015
282  + patTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT2015
283  + patTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT2015
284  + patTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT2015
285  + patTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT2015
286 )
287 
288 
289 ### Define new anit-e discriminants
290 antiElectronDiscrMVA6_version = "MVA6v3_noeveto"
291 ## Raw
292 from RecoTauTag.RecoTau.PATTauDiscriminationAgainstElectronMVA6_cfi import patTauDiscriminationAgainstElectronMVA6
293 from RecoTauTag.RecoTau.TauDiscriminatorTools import noPrediscriminants
294 patTauDiscriminationByElectronRejectionMVA62018Raw = patTauDiscriminationAgainstElectronMVA6.clone(
295  Prediscriminants = noPrediscriminants, #already selected for MiniAOD
296  vetoEcalCracks = False, #keep tau candidates in EB-EE cracks
297  mvaName_NoEleMatch_wGwoGSF_BL = 'RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_NoEleMatch_wGwoGSF_BL',
298  mvaName_NoEleMatch_wGwoGSF_EC = 'RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_NoEleMatch_wGwoGSF_EC',
299  mvaName_NoEleMatch_woGwoGSF_BL = 'RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_NoEleMatch_woGwoGSF_BL',
300  mvaName_NoEleMatch_woGwoGSF_EC = 'RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_NoEleMatch_woGwoGSF_EC',
301  mvaName_wGwGSF_BL = 'RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_wGwGSF_BL',
302  mvaName_wGwGSF_EC = 'RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_wGwGSF_EC',
303  mvaName_woGwGSF_BL = 'RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_woGwGSF_BL',
304  mvaName_woGwGSF_EC = 'RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_woGwGSF_EC'
305 )
306 ## anti-e 2018 WPs
307 from RecoTauTag.RecoTau.PATTauDiscriminantCutMultiplexer_cfi import patTauDiscriminantCutMultiplexer
308 # VLoose
309 patTauDiscriminationByVLooseElectronRejectionMVA62018 = patTauDiscriminantCutMultiplexer.clone(
310  PATTauProducer = patTauDiscriminationByElectronRejectionMVA62018Raw.PATTauProducer,
311  Prediscriminants = patTauDiscriminationByElectronRejectionMVA62018Raw.Prediscriminants,
312  toMultiplex = cms.InputTag("patTauDiscriminationByElectronRejectionMVA62018Raw"),
313  key = cms.InputTag("patTauDiscriminationByElectronRejectionMVA62018Raw","category"),
314  mapping = cms.VPSet(
315  cms.PSet(
316  category = cms.uint32(0),
317  cut = cms.string('RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_NoEleMatch_woGwoGSF_BL_WPeff98'),
318  variable = cms.string('pt')
319  ),
320  cms.PSet(
321  category = cms.uint32(2),
322  cut = cms.string('RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_NoEleMatch_wGwoGSF_BL_WPeff98'),
323  variable = cms.string('pt')
324  ),
325  cms.PSet(
326  category = cms.uint32(5),
327  cut = cms.string('RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_woGwGSF_BL_WPeff98'),
328  variable = cms.string('pt')
329  ),
330  cms.PSet(
331  category = cms.uint32(7),
332  cut = cms.string('RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_wGwGSF_BL_WPeff98'),
333  variable = cms.string('pt')
334  ),
335  cms.PSet(
336  category = cms.uint32(8),
337  cut = cms.string('RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_NoEleMatch_woGwoGSF_EC_WPeff98'),
338  variable = cms.string('pt')
339  ),
340  cms.PSet(
341  category = cms.uint32(10),
342  cut = cms.string('RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_NoEleMatch_wGwoGSF_EC_WPeff98'),
343  variable = cms.string('pt')
344  ),
345  cms.PSet(
346  category = cms.uint32(13),
347  cut = cms.string('RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_woGwGSF_EC_WPeff98'),
348  variable = cms.string('pt')
349  ),
350  cms.PSet(
351  category = cms.uint32(15),
352  cut = cms.string('RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_wGwGSF_EC_WPeff98'),
353  variable = cms.string('pt')
354  )
355  )
356 )
357 # Loose
358 patTauDiscriminationByLooseElectronRejectionMVA62018 = patTauDiscriminationByVLooseElectronRejectionMVA62018.clone(
359  mapping = cms.VPSet(
360  cms.PSet(
361  category = cms.uint32(0),
362  cut = cms.string('RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_NoEleMatch_woGwoGSF_BL_WPeff90'),
363  variable = cms.string('pt')
364  ),
365  cms.PSet(
366  category = cms.uint32(2),
367  cut = cms.string('RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_NoEleMatch_wGwoGSF_BL_WPeff90'),
368  variable = cms.string('pt')
369  ),
370  cms.PSet(
371  category = cms.uint32(5),
372  cut = cms.string('RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_woGwGSF_BL_WPeff90'),
373  variable = cms.string('pt')
374  ),
375  cms.PSet(
376  category = cms.uint32(7),
377  cut = cms.string('RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_wGwGSF_BL_WPeff90'),
378  variable = cms.string('pt')
379  ),
380  cms.PSet(
381  category = cms.uint32(8),
382  cut = cms.string('RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_NoEleMatch_woGwoGSF_EC_WPeff90'),
383  variable = cms.string('pt')
384  ),
385  cms.PSet(
386  category = cms.uint32(10),
387  cut = cms.string('RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_NoEleMatch_wGwoGSF_EC_WPeff90'),
388  variable = cms.string('pt')
389  ),
390  cms.PSet(
391  category = cms.uint32(13),
392  cut = cms.string('RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_woGwGSF_EC_WPeff90'),
393  variable = cms.string('pt')
394  ),
395  cms.PSet(
396  category = cms.uint32(15),
397  cut = cms.string('RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_wGwGSF_EC_WPeff90'),
398  variable = cms.string('pt')
399  )
400  )
401 )
402 # Medium
403 patTauDiscriminationByMediumElectronRejectionMVA62018 = patTauDiscriminationByVLooseElectronRejectionMVA62018.clone(
404  mapping = cms.VPSet(
405  cms.PSet(
406  category = cms.uint32(0),
407  cut = cms.string('RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_NoEleMatch_woGwoGSF_BL_WPeff80'),
408  variable = cms.string('pt')
409  ),
410  cms.PSet(
411  category = cms.uint32(2),
412  cut = cms.string('RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_NoEleMatch_wGwoGSF_BL_WPeff80'),
413  variable = cms.string('pt')
414  ),
415  cms.PSet(
416  category = cms.uint32(5),
417  cut = cms.string('RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_woGwGSF_BL_WPeff80'),
418  variable = cms.string('pt')
419  ),
420  cms.PSet(
421  category = cms.uint32(7),
422  cut = cms.string('RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_wGwGSF_BL_WPeff80'),
423  variable = cms.string('pt')
424  ),
425  cms.PSet(
426  category = cms.uint32(8),
427  cut = cms.string('RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_NoEleMatch_woGwoGSF_EC_WPeff80'),
428  variable = cms.string('pt')
429  ),
430  cms.PSet(
431  category = cms.uint32(10),
432  cut = cms.string('RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_NoEleMatch_wGwoGSF_EC_WPeff80'),
433  variable = cms.string('pt')
434  ),
435  cms.PSet(
436  category = cms.uint32(13),
437  cut = cms.string('RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_woGwGSF_EC_WPeff80'),
438  variable = cms.string('pt')
439  ),
440  cms.PSet(
441  category = cms.uint32(15),
442  cut = cms.string('RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_wGwGSF_EC_WPeff80'),
443  variable = cms.string('pt')
444  )
445  )
446 )
447 # Tight
448 patTauDiscriminationByTightElectronRejectionMVA62018 = patTauDiscriminationByVLooseElectronRejectionMVA62018.clone(
449  mapping = cms.VPSet(
450  cms.PSet(
451  category = cms.uint32(0),
452  cut = cms.string('RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_NoEleMatch_woGwoGSF_BL_WPeff70'),
453  variable = cms.string('pt')
454  ),
455  cms.PSet(
456  category = cms.uint32(2),
457  cut = cms.string('RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_NoEleMatch_wGwoGSF_BL_WPeff70'),
458  variable = cms.string('pt')
459  ),
460  cms.PSet(
461  category = cms.uint32(5),
462  cut = cms.string('RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_woGwGSF_BL_WPeff70'),
463  variable = cms.string('pt')
464  ),
465  cms.PSet(
466  category = cms.uint32(7),
467  cut = cms.string('RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_wGwGSF_BL_WPeff70'),
468  variable = cms.string('pt')
469  ),
470  cms.PSet(
471  category = cms.uint32(8),
472  cut = cms.string('RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_NoEleMatch_woGwoGSF_EC_WPeff70'),
473  variable = cms.string('pt')
474  ),
475  cms.PSet(
476  category = cms.uint32(10),
477  cut = cms.string('RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_NoEleMatch_wGwoGSF_EC_WPeff70'),
478  variable = cms.string('pt')
479  ),
480  cms.PSet(
481  category = cms.uint32(13),
482  cut = cms.string('RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_woGwGSF_EC_WPeff70'),
483  variable = cms.string('pt')
484  ),
485  cms.PSet(
486  category = cms.uint32(15),
487  cut = cms.string('RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_wGwGSF_EC_WPeff70'),
488  variable = cms.string('pt')
489  )
490  )
491 )
492 # VTight
493 patTauDiscriminationByVTightElectronRejectionMVA62018 = patTauDiscriminationByVLooseElectronRejectionMVA62018.clone(
494  mapping = cms.VPSet(
495  cms.PSet(
496  category = cms.uint32(0),
497  cut = cms.string('RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_NoEleMatch_woGwoGSF_BL_WPeff60'),
498  variable = cms.string('pt')
499  ),
500  cms.PSet(
501  category = cms.uint32(2),
502  cut = cms.string('RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_NoEleMatch_wGwoGSF_BL_WPeff60'),
503  variable = cms.string('pt')
504  ),
505  cms.PSet(
506  category = cms.uint32(5),
507  cut = cms.string('RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_woGwGSF_BL_WPeff60'),
508  variable = cms.string('pt')
509  ),
510  cms.PSet(
511  category = cms.uint32(7),
512  cut = cms.string('RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_wGwGSF_BL_WPeff60'),
513  variable = cms.string('pt')
514  ),
515  cms.PSet(
516  category = cms.uint32(8),
517  cut = cms.string('RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_NoEleMatch_woGwoGSF_EC_WPeff60'),
518  variable = cms.string('pt')
519  ),
520  cms.PSet(
521  category = cms.uint32(10),
522  cut = cms.string('RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_NoEleMatch_wGwoGSF_EC_WPeff60'),
523  variable = cms.string('pt')
524  ),
525  cms.PSet(
526  category = cms.uint32(13),
527  cut = cms.string('RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_woGwGSF_EC_WPeff60'),
528  variable = cms.string('pt')
529  ),
530  cms.PSet(
531  category = cms.uint32(15),
532  cut = cms.string('RecoTauTag_antiElectron'+antiElectronDiscrMVA6_version+'_gbr_wGwGSF_EC_WPeff60'),
533  variable = cms.string('pt')
534  )
535  )
536 )
537 ### Put all anti-e tau-IDs into a sequence
538 patTauDiscriminationByElectronRejectionSeq = cms.Sequence(
539  patTauDiscriminationByElectronRejectionMVA62018Raw
540  +patTauDiscriminationByVLooseElectronRejectionMVA62018
541  +patTauDiscriminationByLooseElectronRejectionMVA62018
542  +patTauDiscriminationByMediumElectronRejectionMVA62018
543  +patTauDiscriminationByTightElectronRejectionMVA62018
544  +patTauDiscriminationByVTightElectronRejectionMVA62018
545 )
546 
547 ### put all new MVA tau-Id stuff to one Sequence
548 _patTauMVAIDsSeq2017v2 = cms.Sequence(
549  patTauDiscriminationByIsolationMVArun2v1DBoldDMwLTSeq
550  +patTauDiscriminationByIsolationMVArun2v1DBnewDMwLTSeq
551  +patTauDiscriminationByIsolationMVArun2v1DBoldDMdR0p3wLTSeq
552  +patTauDiscriminationByElectronRejectionSeq
553 )
554 patTauMVAIDsSeq = _patTauMVAIDsSeq2017v2.copy()
555 patTauMVAIDsSeq += patTauDiscriminationByIsolationMVArun2v1DBoldDMwLT2015Seq
556 
557 _patTauMVAIDsSeqWith2017v1 = _patTauMVAIDsSeq2017v2.copy()
558 _patTauMVAIDsSeqWith2017v1 += patTauDiscriminationByIsolationMVArun2v1DBoldDMwLT2017v1Seq
559 from Configuration.Eras.Modifier_run2_nanoAOD_94XMiniAODv1_cff import run2_nanoAOD_94XMiniAODv1
560 for era in [run2_nanoAOD_94XMiniAODv1,]:
561  era.toReplaceWith(patTauMVAIDsSeq,_patTauMVAIDsSeqWith2017v1)
562 
563 # embed new MVA tau-Ids into new tau collection
564 slimmedTausUpdated = cms.EDProducer("PATTauIDEmbedder",
565  src = cms.InputTag('slimmedTaus'),
566  tauIDSources = cms.PSet() # PSet defined below in era dependent way
567 )
568 _tauIDSources2017v2 = cms.PSet(
569  #oldDM
570  byIsolationMVArun2v1DBoldDMwLTraw2017v2 = cms.InputTag('patTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw'),
571  byVVLooseIsolationMVArun2v1DBoldDMwLT2017v2 = cms.InputTag('patTauDiscriminationByVVLooseIsolationMVArun2v1DBoldDMwLT'),
572  byVLooseIsolationMVArun2v1DBoldDMwLT2017v2 = cms.InputTag('patTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT'),
573  byLooseIsolationMVArun2v1DBoldDMwLT2017v2 = cms.InputTag('patTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT'),
574  byMediumIsolationMVArun2v1DBoldDMwLT2017v2 = cms.InputTag('patTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT'),
575  byTightIsolationMVArun2v1DBoldDMwLT2017v2 = cms.InputTag('patTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT'),
576  byVTightIsolationMVArun2v1DBoldDMwLT2017v2 = cms.InputTag('patTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT'),
577  byVVTightIsolationMVArun2v1DBoldDMwLT2017v2 = cms.InputTag('patTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT'),
578  #newDM
579  byIsolationMVArun2v1DBnewDMwLTraw2017v2 = cms.InputTag('patTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw'),
580  byVVLooseIsolationMVArun2v1DBnewDMwLT2017v2 = cms.InputTag('patTauDiscriminationByVVLooseIsolationMVArun2v1DBnewDMwLT'),
581  byVLooseIsolationMVArun2v1DBnewDMwLT2017v2 = cms.InputTag('patTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT'),
582  byLooseIsolationMVArun2v1DBnewDMwLT2017v2 = cms.InputTag('patTauDiscriminationByLooseIsolationMVArun2v1DBnewDMwLT'),
583  byMediumIsolationMVArun2v1DBnewDMwLT2017v2 = cms.InputTag('patTauDiscriminationByMediumIsolationMVArun2v1DBnewDMwLT'),
584  byTightIsolationMVArun2v1DBnewDMwLT2017v2 = cms.InputTag('patTauDiscriminationByTightIsolationMVArun2v1DBnewDMwLT'),
585  byVTightIsolationMVArun2v1DBnewDMwLT2017v2 = cms.InputTag('patTauDiscriminationByVTightIsolationMVArun2v1DBnewDMwLT'),
586  byVVTightIsolationMVArun2v1DBnewDMwLT2017v2 = cms.InputTag('patTauDiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT'),
587  #oldDMdR0p3
588  byIsolationMVArun2v1DBdR03oldDMwLTraw2017v2 = cms.InputTag('patTauDiscriminationByIsolationMVArun2v1DBoldDMdR0p3wLTraw'),
589  byVVLooseIsolationMVArun2v1DBdR03oldDMwLT2017v2 = cms.InputTag('patTauDiscriminationByVVLooseIsolationMVArun2v1DBoldDMdR0p3wLT'),
590  byVLooseIsolationMVArun2v1DBdR03oldDMwLT2017v2 = cms.InputTag('patTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMdR0p3wLT'),
591  byLooseIsolationMVArun2v1DBdR03oldDMwLT2017v2 = cms.InputTag('patTauDiscriminationByLooseIsolationMVArun2v1DBoldDMdR0p3wLT'),
592  byMediumIsolationMVArun2v1DBdR03oldDMwLT2017v2 = cms.InputTag('patTauDiscriminationByMediumIsolationMVArun2v1DBoldDMdR0p3wLT'),
593  byTightIsolationMVArun2v1DBdR03oldDMwLT2017v2 = cms.InputTag('patTauDiscriminationByTightIsolationMVArun2v1DBoldDMdR0p3wLT'),
594  byVTightIsolationMVArun2v1DBdR03oldDMwLT2017v2 = cms.InputTag('patTauDiscriminationByVTightIsolationMVArun2v1DBoldDMdR0p3wLT'),
595  byVVTightIsolationMVArun2v1DBdR03oldDMwLT2017v2 = cms.InputTag('patTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMdR0p3wLT'),
596 )
597 _tauIDSources2017v1 = cms.PSet(
598  byIsolationMVArun2v1DBoldDMwLTraw2017v1 = cms.InputTag('patTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw2017v1'),
599  byVVLooseIsolationMVArun2v1DBoldDMwLT2017v1 = cms.InputTag('patTauDiscriminationByVVLooseIsolationMVArun2v1DBoldDMwLT2017v1'),
600  byVLooseIsolationMVArun2v1DBoldDMwLT2017v1 = cms.InputTag('patTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT2017v1'),
601  byLooseIsolationMVArun2v1DBoldDMwLT2017v1 = cms.InputTag('patTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT2017v1'),
602  byMediumIsolationMVArun2v1DBoldDMwLT2017v1 = cms.InputTag('patTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT2017v1'),
603  byTightIsolationMVArun2v1DBoldDMwLT2017v1 = cms.InputTag('patTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT2017v1'),
604  byVTightIsolationMVArun2v1DBoldDMwLT2017v1 = cms.InputTag('patTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT2017v1'),
605  byVVTightIsolationMVArun2v1DBoldDMwLT2017v1 = cms.InputTag('patTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT2017v1')
606 )
607 _tauIDSourcesWith2017v1 = cms.PSet(
608  _tauIDSources2017v2.clone(),
609  _tauIDSources2017v1
610 )
611 _tauIDSources2015 = cms.PSet(
612  byIsolationMVArun2v1DBoldDMwLTraw2015 = cms.InputTag('patTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw2015'),
613  byVLooseIsolationMVArun2v1DBoldDMwLT2015 = cms.InputTag('patTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT2015'),
614  byLooseIsolationMVArun2v1DBoldDMwLT2015 = cms.InputTag('patTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT2015'),
615  byMediumIsolationMVArun2v1DBoldDMwLT2015 = cms.InputTag('patTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT2015'),
616  byTightIsolationMVArun2v1DBoldDMwLT2015 = cms.InputTag('patTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT2015'),
617  byVTightIsolationMVArun2v1DBoldDMwLT2015 = cms.InputTag('patTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT2015'),
618  byVVTightIsolationMVArun2v1DBoldDMwLT2015 = cms.InputTag('patTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT2015')
619 )
620 _tauIDSourcesWith2015 = cms.PSet(
621  _tauIDSources2017v2.clone(),
622  _tauIDSources2015
623 )
624 slimmedTausUpdated.tauIDSources=_tauIDSourcesWith2015
625 
626 for era in [run2_nanoAOD_94XMiniAODv1,]:
627  era.toModify(slimmedTausUpdated,
628  tauIDSources = _tauIDSourcesWith2017v1
629  )
630 
631 _antiETauIDSources = cms.PSet(
632  againstElectronMVA6Raw2018 = cms.InputTag("patTauDiscriminationByElectronRejectionMVA62018Raw"),
633  againstElectronMVA6category2018 = cms.InputTag("patTauDiscriminationByElectronRejectionMVA62018Raw","category"),
634  againstElectronVLooseMVA62018 = cms.InputTag("patTauDiscriminationByVLooseElectronRejectionMVA62018"),
635  againstElectronLooseMVA62018 = cms.InputTag("patTauDiscriminationByLooseElectronRejectionMVA62018"),
636  againstElectronMediumMVA62018 = cms.InputTag("patTauDiscriminationByMediumElectronRejectionMVA62018"),
637  againstElectronTightMVA62018 = cms.InputTag("patTauDiscriminationByTightElectronRejectionMVA62018"),
638  againstElectronVTightMVA62018 = cms.InputTag("patTauDiscriminationByVTightElectronRejectionMVA62018")
639 )
640 _tauIDSourcesWithAntiE = cms.PSet(
641  slimmedTausUpdated.tauIDSources.clone(),
642  _antiETauIDSources
643 )
644 slimmedTausUpdated.tauIDSources=_tauIDSourcesWithAntiE
645 
646 
647 
648 patTauMVAIDsSeq += slimmedTausUpdated
649 
Updated tau collection with MVA-based tau-Ids rerun ####### Used only in some eras.