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