1 import FWCore.ParameterSet.Config
as cms
5 from math
import ceil,log
8 from RecoEgamma.EgammaTools.egammaObjectModificationsInMiniAOD_cff
import egamma8XObjectUpdateModifier,egamma9X105XUpdateModifier,prependEgamma8XObjectUpdateModifier
9 ele9X105XUpdateModifier=egamma9X105XUpdateModifier.clone(
11 phoNeutralHadIso =
"",
12 phoChargedHadIso =
"",
13 phoChargedHadWorstVtxIso =
"",
14 phoChargedHadWorstVtxConeVetoIso =
"",
15 phoChargedHadPFPVIso =
""
18 slimmedElectronsTo106X = cms.EDProducer(
"ModifiedElectronProducer",
19 src = cms.InputTag(
"slimmedElectrons"),
20 modifierConfig = cms.PSet( modifications = cms.VPSet(ele9X105XUpdateModifier) )
23 run2_miniAOD_80XLegacy.toModify( slimmedElectronsTo106X.modifierConfig.modifications, prependEgamma8XObjectUpdateModifier )
26 slimmedElectronsUpdated = cms.EDProducer(
"PATElectronUpdater",
27 src = cms.InputTag(
"slimmedElectrons"),
28 vertices = cms.InputTag(
"offlineSlimmedPrimaryVertices"),
29 computeMiniIso = cms.bool(
False),
30 fixDxySign = cms.bool(
True),
31 pfCandsForMiniIso = cms.InputTag(
"packedPFCandidates"),
32 miniIsoParamsB = PhysicsTools.PatAlgos.producersLayer1.electronProducer_cfi.patElectrons.miniIsoParamsB,
33 miniIsoParamsE = PhysicsTools.PatAlgos.producersLayer1.electronProducer_cfi.patElectrons.miniIsoParamsE,
35 run2_miniAOD_80XLegacy.toModify( slimmedElectronsUpdated, computeMiniIso =
True )
37 for modifier
in run2_miniAOD_80XLegacy,run2_nanoAOD_94X2016,run2_nanoAOD_94XMiniAODv1,run2_nanoAOD_94XMiniAODv2,run2_nanoAOD_102Xv1:
38 modifier.toModify(slimmedElectronsUpdated, src = cms.InputTag(
"slimmedElectronsTo106X"))
40 electron_id_modules_WorkingPoints_nanoAOD = cms.PSet(
41 modules = cms.vstring(
42 'RecoEgamma.ElectronIdentification.Identification.cutBasedElectronID_Fall17_94X_V1_cff',
43 'RecoEgamma.ElectronIdentification.Identification.cutBasedElectronID_Fall17_94X_V2_cff',
44 'RecoEgamma.ElectronIdentification.Identification.heepElectronID_HEEPV70_cff',
45 'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_Fall17_iso_V1_cff',
46 'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_Fall17_noIso_V1_cff',
47 'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_Fall17_iso_V2_cff',
48 'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_Fall17_noIso_V2_cff',
50 WorkingPoints = cms.vstring(
51 "egmGsfElectronIDs:cutBasedElectronID-Fall17-94X-V2-veto",
52 "egmGsfElectronIDs:cutBasedElectronID-Fall17-94X-V2-loose",
53 "egmGsfElectronIDs:cutBasedElectronID-Fall17-94X-V2-medium",
54 "egmGsfElectronIDs:cutBasedElectronID-Fall17-94X-V2-tight",
57 for modifier
in run2_miniAOD_80XLegacy,run2_nanoAOD_94X2016:
58 modifier.toModify(electron_id_modules_WorkingPoints_nanoAOD,
59 modules = cms.vstring(
60 'RecoEgamma.ElectronIdentification.Identification.cutBasedElectronID_Fall17_94X_V1_cff',
61 'RecoEgamma.ElectronIdentification.Identification.cutBasedElectronID_Fall17_94X_V2_cff',
62 'RecoEgamma.ElectronIdentification.Identification.heepElectronID_HEEPV70_cff',
63 'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_Fall17_iso_V1_cff',
64 'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_Fall17_noIso_V1_cff',
65 'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_Fall17_iso_V2_cff',
66 'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_Fall17_noIso_V2_cff',
67 'RecoEgamma.ElectronIdentification.Identification.cutBasedElectronID_Summer16_80X_V1_cff',
68 'RecoEgamma.ElectronIdentification.Identification.cutBasedElectronHLTPreselecition_Summer16_V1_cff',
69 'RecoEgamma.ElectronIdentification.Identification.cutBasedElectronID_Spring15_25ns_V1_cff',
70 'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_Spring16_GeneralPurpose_V1_cff',
71 'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_Spring16_HZZ_V1_cff',
73 WorkingPoints = cms.vstring(
74 "egmGsfElectronIDs:cutBasedElectronID-Fall17-94X-V2-veto",
75 "egmGsfElectronIDs:cutBasedElectronID-Fall17-94X-V2-loose",
76 "egmGsfElectronIDs:cutBasedElectronID-Fall17-94X-V2-medium",
77 "egmGsfElectronIDs:cutBasedElectronID-Fall17-94X-V2-tight",
83 for modname
in modules:
84 ids= __import__(modname, globals(), locals(), [
'idName',
'cutFlow'])
86 _id = getattr(ids,name)
87 if hasattr(_id,
'idName')
and hasattr(_id,
'cutFlow'):
88 if (len(WorkingPoints)>0
and _id.idName==WorkingPoints[0].
split(
':')[-1]):
89 docstring =
'VID compressed bitmap (%s), %d bits per cut'%(
','.
join([cut.cutName.value()
for cut
in _id.cutFlow]),int(
ceil(
log(len(WorkingPoints)+1,2))))
92 bitmapVIDForEle = cms.EDProducer(
"EleVIDNestedWPBitmapProducer",
93 src = cms.InputTag(
"slimmedElectrons"),
94 WorkingPoints = electron_id_modules_WorkingPoints_nanoAOD.WorkingPoints,
98 bitmapVIDForEleSpring15 = bitmapVIDForEle.clone(
99 WorkingPoints = cms.vstring(
100 "egmGsfElectronIDs:cutBasedElectronID-Spring15-25ns-V1-standalone-veto",
101 "egmGsfElectronIDs:cutBasedElectronID-Spring15-25ns-V1-standalone-loose",
102 "egmGsfElectronIDs:cutBasedElectronID-Spring15-25ns-V1-standalone-medium",
108 bitmapVIDForEleSum16 = bitmapVIDForEle.clone(
109 WorkingPoints = cms.vstring(
110 "egmGsfElectronIDs:cutBasedElectronID-Summer16-80X-V1-veto",
111 "egmGsfElectronIDs:cutBasedElectronID-Summer16-80X-V1-loose",
112 "egmGsfElectronIDs:cutBasedElectronID-Summer16-80X-V1-medium",
113 "egmGsfElectronIDs:cutBasedElectronID-Summer16-80X-V1-tight",
118 bitmapVIDForEleHEEP = bitmapVIDForEle.clone(
119 WorkingPoints = cms.vstring(
"egmGsfElectronIDs:heepElectronID-HEEPV70"
126 isoForEle = cms.EDProducer(
"EleIsoValueMapProducer",
127 src = cms.InputTag(
"slimmedElectrons"),
128 relative = cms.bool(
False),
129 rho_MiniIso = cms.InputTag(
"fixedGridRhoFastjetAll"),
130 rho_PFIso = cms.InputTag(
"fixedGridRhoFastjetAll"),
131 EAFile_MiniIso = cms.FileInPath(
"RecoEgamma/ElectronIdentification/data/Fall17/effAreaElectrons_cone03_pfNeuHadronsAndPhotons_94X.txt"),
132 EAFile_PFIso = cms.FileInPath(
"RecoEgamma/ElectronIdentification/data/Fall17/effAreaElectrons_cone03_pfNeuHadronsAndPhotons_94X.txt"),
134 run2_miniAOD_80XLegacy.toModify(isoForEle,
135 EAFile_MiniIso =
"RecoEgamma/ElectronIdentification/data/Spring15/effAreaElectrons_cone03_pfNeuHadronsAndPhotons_25ns.txt",
136 EAFile_PFIso =
"RecoEgamma/ElectronIdentification/data/Summer16/effAreaElectrons_cone03_pfNeuHadronsAndPhotons_80X.txt")
137 run2_nanoAOD_94X2016.toModify(isoForEle,
138 EAFile_MiniIso =
"RecoEgamma/ElectronIdentification/data/Spring15/effAreaElectrons_cone03_pfNeuHadronsAndPhotons_25ns.txt",
139 EAFile_PFIso =
"RecoEgamma/ElectronIdentification/data/Summer16/effAreaElectrons_cone03_pfNeuHadronsAndPhotons_80X.txt")
143 ptRatioRelForEle = cms.EDProducer(
"ElectronJetVarProducer",
144 srcJet = cms.InputTag(
"updatedJets"),
145 srcLep = cms.InputTag(
"slimmedElectrons"),
146 srcVtx = cms.InputTag(
"offlineSlimmedPrimaryVertices"),
150 seedGainEle = cms.EDProducer(
"ElectronSeedGainProducer", src = cms.InputTag(
"slimmedElectrons"))
154 import RecoEgamma.EgammaTools.calibratedEgammas_cff
156 calibratedPatElectronsNano = RecoEgamma.EgammaTools.calibratedEgammas_cff.calibratedPatElectrons.clone(
157 produceCalibratedObjs =
False,
158 src =
"slimmedElectrons"
161 (run2_egamma_2016 & tracker_apv_vfp30_2016).toModify(calibratedPatElectronsNano,
162 correctionFile = cms.string(
"EgammaAnalysis/ElectronTools/data/ScalesSmearings/Run2016_UltraLegacy_preVFP_RunFineEtaR9Gain")
165 (run2_egamma_2016 & ~tracker_apv_vfp30_2016).toModify(calibratedPatElectronsNano,
166 correctionFile = cms.string(
"EgammaAnalysis/ElectronTools/data/ScalesSmearings/Run2016_UltraLegacy_postVFP_RunFineEtaR9Gain")
169 run2_egamma_2017.toModify(calibratedPatElectronsNano,
170 correctionFile = cms.string(
"EgammaAnalysis/ElectronTools/data/ScalesSmearings/Run2017_24Feb2020_runEtaR9Gain_v2")
173 run2_egamma_2018.toModify(calibratedPatElectronsNano,
174 correctionFile = cms.string(
"EgammaAnalysis/ElectronTools/data/ScalesSmearings/Run2018_29Sep2020_RunFineEtaR9Gain")
177 run2_miniAOD_80XLegacy.toModify(calibratedPatElectronsNano,
178 correctionFile = cms.string(
"EgammaAnalysis/ElectronTools/data/ScalesSmearings/Legacy2016_07Aug2017_FineEtaR9_v3_ele_unc")
181 for modifier
in run2_nanoAOD_94XMiniAODv1,run2_nanoAOD_94XMiniAODv2:
182 modifier.toModify(calibratedPatElectronsNano,
183 correctionFile = cms.string(
"EgammaAnalysis/ElectronTools/data/ScalesSmearings/Run2017_17Nov2017_v1_ele_unc")
186 run2_nanoAOD_102Xv1.toModify(calibratedPatElectronsNano,
187 correctionFile = cms.string(
"EgammaAnalysis/ElectronTools/data/ScalesSmearings/Run2018_Step2Closure_CoarseEtaR9Gain_v2")
192 slimmedElectronsWithUserData = cms.EDProducer(
"PATElectronUserDataEmbedder",
193 src = cms.InputTag(
"slimmedElectrons"),
194 userFloats = cms.PSet(
195 mvaFall17V1Iso = cms.InputTag(
"electronMVAValueMapProducer:ElectronMVAEstimatorRun2Fall17IsoV1Values"),
196 mvaFall17V1noIso = cms.InputTag(
"electronMVAValueMapProducer:ElectronMVAEstimatorRun2Fall17NoIsoV1Values"),
197 mvaFall17V2Iso = cms.InputTag(
"electronMVAValueMapProducer:ElectronMVAEstimatorRun2Fall17IsoV2Values"),
198 mvaFall17V2noIso = cms.InputTag(
"electronMVAValueMapProducer:ElectronMVAEstimatorRun2Fall17NoIsoV2Values"),
199 miniIsoChg = cms.InputTag(
"isoForEle:miniIsoChg"),
200 miniIsoAll = cms.InputTag(
"isoForEle:miniIsoAll"),
201 PFIsoChg = cms.InputTag(
"isoForEle:PFIsoChg"),
202 PFIsoAll = cms.InputTag(
"isoForEle:PFIsoAll"),
203 PFIsoAll04 = cms.InputTag(
"isoForEle:PFIsoAll04"),
204 ptRatio = cms.InputTag(
"ptRatioRelForEle:ptRatio"),
205 ptRel = cms.InputTag(
"ptRatioRelForEle:ptRel"),
206 jetNDauChargedMVASel = cms.InputTag(
"ptRatioRelForEle:jetNDauChargedMVASel"),
207 ecalTrkEnergyErrPostCorrNew = cms.InputTag(
"calibratedPatElectronsNano",
"ecalTrkEnergyErrPostCorr"),
208 ecalTrkEnergyPreCorrNew = cms.InputTag(
"calibratedPatElectronsNano",
"ecalTrkEnergyPreCorr"),
209 ecalTrkEnergyPostCorrNew = cms.InputTag(
"calibratedPatElectronsNano",
"ecalTrkEnergyPostCorr"),
210 energyScaleUpNew = cms.InputTag(
"calibratedPatElectronsNano",
"energyScaleUp"),
211 energyScaleDownNew = cms.InputTag(
"calibratedPatElectronsNano",
"energyScaleDown"),
212 energySigmaUpNew = cms.InputTag(
"calibratedPatElectronsNano",
"energySigmaUp"),
213 energySigmaDownNew = cms.InputTag(
"calibratedPatElectronsNano",
"energySigmaDown"),
216 userIntFromBools = cms.PSet(
218 mvaFall17V1Iso_WP90 = cms.InputTag(
"egmGsfElectronIDs:mvaEleID-Fall17-iso-V1-wp90"),
219 mvaFall17V1Iso_WP80 = cms.InputTag(
"egmGsfElectronIDs:mvaEleID-Fall17-iso-V1-wp80"),
220 mvaFall17V1Iso_WPL = cms.InputTag(
"egmGsfElectronIDs:mvaEleID-Fall17-iso-V1-wpLoose"),
221 mvaFall17V1noIso_WP90 = cms.InputTag(
"egmGsfElectronIDs:mvaEleID-Fall17-noIso-V1-wp90"),
222 mvaFall17V1noIso_WP80 = cms.InputTag(
"egmGsfElectronIDs:mvaEleID-Fall17-noIso-V1-wp80"),
223 mvaFall17V1noIso_WPL = cms.InputTag(
"egmGsfElectronIDs:mvaEleID-Fall17-noIso-V1-wpLoose"),
225 mvaFall17V2Iso_WP90 = cms.InputTag(
"egmGsfElectronIDs:mvaEleID-Fall17-iso-V2-wp90"),
226 mvaFall17V2Iso_WP80 = cms.InputTag(
"egmGsfElectronIDs:mvaEleID-Fall17-iso-V2-wp80"),
227 mvaFall17V2Iso_WPL = cms.InputTag(
"egmGsfElectronIDs:mvaEleID-Fall17-iso-V2-wpLoose"),
228 mvaFall17V2noIso_WP90 = cms.InputTag(
"egmGsfElectronIDs:mvaEleID-Fall17-noIso-V2-wp90"),
229 mvaFall17V2noIso_WP80 = cms.InputTag(
"egmGsfElectronIDs:mvaEleID-Fall17-noIso-V2-wp80"),
230 mvaFall17V2noIso_WPL = cms.InputTag(
"egmGsfElectronIDs:mvaEleID-Fall17-noIso-V2-wpLoose"),
232 cutbasedID_Fall17_V1_veto = cms.InputTag(
"egmGsfElectronIDs:cutBasedElectronID-Fall17-94X-V1-veto"),
233 cutbasedID_Fall17_V1_loose = cms.InputTag(
"egmGsfElectronIDs:cutBasedElectronID-Fall17-94X-V1-loose"),
234 cutbasedID_Fall17_V1_medium = cms.InputTag(
"egmGsfElectronIDs:cutBasedElectronID-Fall17-94X-V1-medium"),
235 cutbasedID_Fall17_V1_tight = cms.InputTag(
"egmGsfElectronIDs:cutBasedElectronID-Fall17-94X-V1-tight"),
236 cutbasedID_Fall17_V2_veto = cms.InputTag(
"egmGsfElectronIDs:cutBasedElectronID-Fall17-94X-V2-veto"),
237 cutbasedID_Fall17_V2_loose = cms.InputTag(
"egmGsfElectronIDs:cutBasedElectronID-Fall17-94X-V2-loose"),
238 cutbasedID_Fall17_V2_medium = cms.InputTag(
"egmGsfElectronIDs:cutBasedElectronID-Fall17-94X-V2-medium"),
239 cutbasedID_Fall17_V2_tight = cms.InputTag(
"egmGsfElectronIDs:cutBasedElectronID-Fall17-94X-V2-tight"),
240 cutbasedID_HEEP = cms.InputTag(
"egmGsfElectronIDs:heepElectronID-HEEPV70"),
243 VIDNestedWPBitmap = cms.InputTag(
"bitmapVIDForEle"),
244 VIDNestedWPBitmapHEEP = cms.InputTag(
"bitmapVIDForEleHEEP"),
245 seedGain = cms.InputTag(
"seedGainEle"),
247 userCands = cms.PSet(
248 jetForLepJetVar = cms.InputTag(
"ptRatioRelForEle:jetForLepJetVar")
253 run2_nanoAOD_94X2016.toModify(slimmedElectronsWithUserData.userFloats,
254 ecalTrkEnergyErrPostCorrNew =
None,
255 ecalTrkEnergyPreCorrNew =
None,
256 ecalTrkEnergyPostCorrNew =
None,
257 energyScaleUpNew =
None,
258 energyScaleDownNew =
None,
259 energySigmaUpNew =
None,
260 energySigmaDownNew =
None
265 run2_nanoAOD_94X2016.toModify(slimmedElectronsWithUserData.userIntFromBools,
267 cutbasedID_Sum16_veto = cms.InputTag(
"egmGsfElectronIDs:cutBasedElectronID-Summer16-80X-V1-veto"),
268 cutbasedID_Sum16_loose = cms.InputTag(
"egmGsfElectronIDs:cutBasedElectronID-Summer16-80X-V1-loose"),
269 cutbasedID_Sum16_medium = cms.InputTag(
"egmGsfElectronIDs:cutBasedElectronID-Summer16-80X-V1-medium"),
270 cutbasedID_Sum16_tight = cms.InputTag(
"egmGsfElectronIDs:cutBasedElectronID-Summer16-80X-V1-tight"),
271 cutbasedID_HLT = cms.InputTag(
"egmGsfElectronIDs:cutBasedElectronHLTPreselection-Summer16-V1"),
272 cutbasedID_Spring15_veto = cms.InputTag(
"egmGsfElectronIDs:cutBasedElectronID-Spring15-25ns-V1-standalone-veto"),
273 cutbasedID_Spring15_loose = cms.InputTag(
"egmGsfElectronIDs:cutBasedElectronID-Spring15-25ns-V1-standalone-loose"),
274 cutbasedID_Spring15_medium = cms.InputTag(
"egmGsfElectronIDs:cutBasedElectronID-Spring15-25ns-V1-standalone-medium"),
275 cutbasedID_Spring15_tight = cms.InputTag(
"egmGsfElectronIDs:cutBasedElectronID-Spring15-25ns-V1-standalone-tight"),
276 cutbasedID_Fall17_V2_veto = cms.InputTag(
"egmGsfElectronIDs:cutBasedElectronID-Fall17-94X-V2-veto"),
277 cutbasedID_Fall17_V2_loose = cms.InputTag(
"egmGsfElectronIDs:cutBasedElectronID-Fall17-94X-V2-loose"),
278 cutbasedID_Fall17_V2_medium = cms.InputTag(
"egmGsfElectronIDs:cutBasedElectronID-Fall17-94X-V2-medium"),
279 cutbasedID_Fall17_V2_tight = cms.InputTag(
"egmGsfElectronIDs:cutBasedElectronID-Fall17-94X-V2-tight"),
283 run2_miniAOD_80XLegacy.toModify(slimmedElectronsWithUserData.userFloats,
284 mvaSpring16GP = cms.InputTag(
"electronMVAValueMapProducer:ElectronMVAEstimatorRun2Spring16GeneralPurposeV1Values"),
285 mvaSpring16HZZ = cms.InputTag(
"electronMVAValueMapProducer:ElectronMVAEstimatorRun2Spring16HZZV1Values"),
288 run2_miniAOD_80XLegacy.toModify(slimmedElectronsWithUserData.userIntFromBools,
289 mvaSpring16GP_WP90 = cms.InputTag(
"egmGsfElectronIDs:mvaEleID-Spring16-GeneralPurpose-V1-wp90"),
290 mvaSpring16GP_WP80 = cms.InputTag(
"egmGsfElectronIDs:mvaEleID-Spring16-GeneralPurpose-V1-wp80"),
291 mvaSpring16HZZ_WPL = cms.InputTag(
"egmGsfElectronIDs:mvaEleID-Spring16-HZZ-V1-wpLoose"),
292 cutbasedID_Sum16_veto = cms.InputTag(
"egmGsfElectronIDs:cutBasedElectronID-Summer16-80X-V1-veto"),
293 cutbasedID_Sum16_loose = cms.InputTag(
"egmGsfElectronIDs:cutBasedElectronID-Summer16-80X-V1-loose"),
294 cutbasedID_Sum16_medium = cms.InputTag(
"egmGsfElectronIDs:cutBasedElectronID-Summer16-80X-V1-medium"),
295 cutbasedID_Sum16_tight = cms.InputTag(
"egmGsfElectronIDs:cutBasedElectronID-Summer16-80X-V1-tight"),
296 cutbasedID_HLT = cms.InputTag(
"egmGsfElectronIDs:cutBasedElectronHLTPreselection-Summer16-V1"),
297 cutbasedID_Spring15_veto = cms.InputTag(
"egmGsfElectronIDs:cutBasedElectronID-Spring15-25ns-V1-standalone-veto"),
298 cutbasedID_Spring15_loose = cms.InputTag(
"egmGsfElectronIDs:cutBasedElectronID-Spring15-25ns-V1-standalone-loose"),
299 cutbasedID_Spring15_medium = cms.InputTag(
"egmGsfElectronIDs:cutBasedElectronID-Spring15-25ns-V1-standalone-medium"),
300 cutbasedID_Spring15_tight = cms.InputTag(
"egmGsfElectronIDs:cutBasedElectronID-Spring15-25ns-V1-standalone-tight"),
303 for modifier
in run2_miniAOD_80XLegacy, run2_nanoAOD_94X2016:
304 modifier.toModify(slimmedElectronsWithUserData.userInts,
305 VIDNestedWPBitmapSpring15 = cms.InputTag(
"bitmapVIDForEleSpring15"),
306 VIDNestedWPBitmapSum16 = cms.InputTag(
"bitmapVIDForEleSum16"),
310 finalElectrons = cms.EDFilter(
"PATElectronRefSelector",
311 src = cms.InputTag(
"slimmedElectronsWithUserData"),
312 cut = cms.string(
"pt > 5 ")
316 electronMVATTH= cms.EDProducer(
"EleBaseMVAValueMapProducer",
317 src = cms.InputTag(
"linkedObjects",
"electrons"),
318 weightFile = cms.FileInPath(
"PhysicsTools/NanoAOD/data/el_BDTG_2017.weights.xml"),
319 name = cms.string(
"electronMVATTH"),
320 isClassifier = cms.bool(
True),
321 variablesOrder = cms.vstring([
"LepGood_pt",
"LepGood_eta",
"LepGood_jetNDauChargedMVASel",
"LepGood_miniRelIsoCharged",
"LepGood_miniRelIsoNeutral",
"LepGood_jetPtRelv2",
"LepGood_jetDF",
"LepGood_jetPtRatio",
"LepGood_dxy",
"LepGood_sip3d",
"LepGood_dz",
"LepGood_mvaFall17V2noIso"]),
322 variables = cms.PSet(
323 LepGood_pt = cms.string(
"pt"),
324 LepGood_eta = cms.string(
"eta"),
325 LepGood_jetNDauChargedMVASel = cms.string(
"?userCand('jetForLepJetVar').isNonnull()?userFloat('jetNDauChargedMVASel'):0"),
326 LepGood_miniRelIsoCharged = cms.string(
"userFloat('miniIsoChg')/pt"),
327 LepGood_miniRelIsoNeutral = cms.string(
"(userFloat('miniIsoAll')-userFloat('miniIsoChg'))/pt"),
328 LepGood_jetPtRelv2 = cms.string(
"?userCand('jetForLepJetVar').isNonnull()?userFloat('ptRel'):0"),
329 LepGood_jetDF = cms.string(
"?userCand('jetForLepJetVar').isNonnull()?max(userCand('jetForLepJetVar').bDiscriminator('pfDeepFlavourJetTags:probbb')+userCand('jetForLepJetVar').bDiscriminator('pfDeepFlavourJetTags:probb')+userCand('jetForLepJetVar').bDiscriminator('pfDeepFlavourJetTags:problepb'),0.0):0.0"),
330 LepGood_jetPtRatio = cms.string(
"?userCand('jetForLepJetVar').isNonnull()?min(userFloat('ptRatio'),1.5):1.0/(1.0+userFloat('PFIsoAll04')/pt)"),
331 LepGood_dxy = cms.string(
"log(abs(dB('PV2D')))"),
332 LepGood_sip3d = cms.string(
"abs(dB('PV3D')/edB('PV3D'))"),
333 LepGood_dz = cms.string(
"log(abs(dB('PVDZ')))"),
334 LepGood_mvaFall17V2noIso = cms.string(
"userFloat('mvaFall17V2noIso')"),
337 run2_egamma_2016.toModify(electronMVATTH,
338 weightFile =
"PhysicsTools/NanoAOD/data/el_BDTG_2016.weights.xml",
342 electronTable = cms.EDProducer(
"SimpleCandidateFlatTableProducer",
343 src = cms.InputTag(
"linkedObjects",
"electrons"),
344 cut = cms.string(
""),
345 name= cms.string(
"Electron"),
346 doc = cms.string(
"slimmedElectrons after basic selection (" + finalElectrons.cut.value()+
")"),
347 singleton = cms.bool(
False),
348 extension = cms.bool(
False),
349 variables = cms.PSet(CandVars,
350 jetIdx =
Var(
"?hasUserCand('jet')?userCand('jet').key():-1", int, doc=
"index of the associated jet (-1 if none)"),
351 photonIdx =
Var(
"?overlaps('photons').size()>0?overlaps('photons')[0].key():-1", int, doc=
"index of the associated photon (-1 if none)"),
352 energyErr =
Var(
"p4Error('P4_COMBINATION')",float,doc=
"energy error of the cluster-track combination",precision=6),
353 dz =
Var(
"dB('PVDZ')",float,doc=
"dz (with sign) wrt first PV, in cm",precision=10),
354 dzErr =
Var(
"abs(edB('PVDZ'))",float,doc=
"dz uncertainty, in cm",precision=6),
355 dxy =
Var(
"dB('PV2D')",float,doc=
"dxy (with sign) wrt first PV, in cm",precision=10),
356 dxyErr =
Var(
"edB('PV2D')",float,doc=
"dxy uncertainty, in cm",precision=6),
357 ip3d =
Var(
"abs(dB('PV3D'))",float,doc=
"3D impact parameter wrt first PV, in cm",precision=10),
358 sip3d =
Var(
"abs(dB('PV3D')/edB('PV3D'))",float,doc=
"3D impact parameter significance wrt first PV, in cm",precision=10),
359 deltaEtaSC =
Var(
"superCluster().eta()-eta()",float,doc=
"delta eta (SC,ele) with sign",precision=10),
360 r9 =
Var(
"full5x5_r9()",float,doc=
"R9 of the supercluster, calculated with full 5x5 region",precision=10),
361 sieie =
Var(
"full5x5_sigmaIetaIeta()",float,doc=
"sigma_IetaIeta of the supercluster, calculated with full 5x5 region",precision=10),
362 eInvMinusPInv =
Var(
"(1-eSuperClusterOverP())/ecalEnergy()",float,doc=
"1/E_SC - 1/p_trk",precision=10),
363 scEtOverPt =
Var(
"(superCluster().energy()/(pt*cosh(superCluster().eta())))-1",float,doc=
"(supercluster transverse energy)/pt-1",precision=8),
365 mvaFall17V2Iso =
Var(
"userFloat('mvaFall17V2Iso')",float,doc=
"MVA Iso ID V2 score"),
366 mvaFall17V2Iso_WP80 =
Var(
"userInt('mvaFall17V2Iso_WP80')",bool,doc=
"MVA Iso ID V2 WP80"),
367 mvaFall17V2Iso_WP90 =
Var(
"userInt('mvaFall17V2Iso_WP90')",bool,doc=
"MVA Iso ID V2 WP90"),
368 mvaFall17V2Iso_WPL =
Var(
"userInt('mvaFall17V2Iso_WPL')",bool,doc=
"MVA Iso ID V2 loose WP"),
369 mvaFall17V2noIso =
Var(
"userFloat('mvaFall17V2noIso')",float,doc=
"MVA noIso ID V2 score"),
370 mvaFall17V2noIso_WP80 =
Var(
"userInt('mvaFall17V2noIso_WP80')",bool,doc=
"MVA noIso ID V2 WP80"),
371 mvaFall17V2noIso_WP90 =
Var(
"userInt('mvaFall17V2noIso_WP90')",bool,doc=
"MVA noIso ID V2 WP90"),
372 mvaFall17V2noIso_WPL =
Var(
"userInt('mvaFall17V2noIso_WPL')",bool,doc=
"MVA noIso ID V2 loose WP"),
374 cutBased =
Var(
"userInt('cutbasedID_Fall17_V2_veto')+userInt('cutbasedID_Fall17_V2_loose')+userInt('cutbasedID_Fall17_V2_medium')+userInt('cutbasedID_Fall17_V2_tight')",int,doc=
"cut-based ID Fall17 V2 (0:fail, 1:veto, 2:loose, 3:medium, 4:tight)"),
375 vidNestedWPBitmap =
Var(
"userInt('VIDNestedWPBitmap')",int,doc=_bitmapVIDForEle_docstring),
376 vidNestedWPBitmapHEEP =
Var(
"userInt('VIDNestedWPBitmapHEEP')",int,doc=_bitmapVIDForEleHEEP_docstring),
377 cutBased_HEEP =
Var(
"userInt('cutbasedID_HEEP')",bool,doc=
"cut-based HEEP ID"),
378 miniPFRelIso_chg =
Var(
"userFloat('miniIsoChg')/pt",float,doc=
"mini PF relative isolation, charged component"),
379 miniPFRelIso_all =
Var(
"userFloat('miniIsoAll')/pt",float,doc=
"mini PF relative isolation, total (with scaled rho*EA PU corrections)"),
380 pfRelIso03_chg =
Var(
"userFloat('PFIsoChg')/pt",float,doc=
"PF relative isolation dR=0.3, charged component"),
381 pfRelIso03_all =
Var(
"userFloat('PFIsoAll')/pt",float,doc=
"PF relative isolation dR=0.3, total (with rho*EA PU corrections)"),
382 jetRelIso =
Var(
"?userCand('jetForLepJetVar').isNonnull()?(1./userFloat('ptRatio'))-1.:userFloat('PFIsoAll04')/pt",float,doc=
"Relative isolation in matched jet (1/ptRatio-1, pfRelIso04_all if no matched jet)",precision=8),
383 jetPtRelv2 =
Var(
"?userCand('jetForLepJetVar').isNonnull()?userFloat('ptRel'):0",float,doc=
"Relative momentum of the lepton with respect to the closest jet after subtracting the lepton",precision=8),
384 dr03TkSumPt =
Var(
"?pt>35?dr03TkSumPt():0",float,doc=
"Non-PF track isolation within a delta R cone of 0.3 with electron pt > 35 GeV",precision=8),
385 dr03TkSumPtHEEP =
Var(
"?pt>35?dr03TkSumPtHEEP():0",float,doc=
"Non-PF track isolation within a delta R cone of 0.3 with electron pt > 35 GeV used in HEEP ID",precision=8),
386 dr03EcalRecHitSumEt =
Var(
"?pt>35?dr03EcalRecHitSumEt():0",float,doc=
"Non-PF Ecal isolation within a delta R cone of 0.3 with electron pt > 35 GeV",precision=8),
387 dr03HcalDepth1TowerSumEt =
Var(
"?pt>35?dr03HcalTowerSumEt(1):0",float,doc=
"Non-PF Hcal isolation within a delta R cone of 0.3 with electron pt > 35 GeV",precision=8),
388 hoe =
Var(
"hadronicOverEm()",float,doc=
"H over E",precision=8),
389 tightCharge =
Var(
"isGsfCtfScPixChargeConsistent() + isGsfScPixChargeConsistent()",int,doc=
"Tight charge criteria (0:none, 1:isGsfScPixChargeConsistent, 2:isGsfCtfScPixChargeConsistent)"),
390 convVeto =
Var(
"passConversionVeto()",bool,doc=
"pass conversion veto"),
391 lostHits =
Var(
"gsfTrack.hitPattern.numberOfLostHits('MISSING_INNER_HITS')",
"uint8",doc=
"number of missing inner hits"),
392 isPFcand =
Var(
"pfCandidateRef().isNonnull()",bool,doc=
"electron is PF candidate"),
393 seedGain =
Var(
"userInt('seedGain')",
"uint8",doc=
"Gain of the seed crystal"),
394 jetNDauCharged =
Var(
"?userCand('jetForLepJetVar').isNonnull()?userFloat('jetNDauChargedMVASel'):0",
"uint8", doc=
"number of charged daughters of the closest jet"),
396 externalVariables = cms.PSet(
397 mvaTTH =
ExtVar(cms.InputTag(
"electronMVATTH"),float, doc=
"TTH MVA lepton ID score",precision=14),
402 for modifier
in run2_nanoAOD_94XMiniAODv1,run2_nanoAOD_94XMiniAODv2,run2_miniAOD_80XLegacy,run2_nanoAOD_102Xv1,run2_nanoAOD_106Xv1,run2_nanoAOD_106Xv2:
403 modifier.toModify(electronTable.variables,
404 pt =
Var(
"pt*userFloat('ecalTrkEnergyPostCorrNew')/userFloat('ecalTrkEnergyPreCorrNew')", float, precision=-1, doc=
"p_{T}"),
405 energyErr =
Var(
"userFloat('ecalTrkEnergyErrPostCorrNew')", float, precision=6, doc=
"energy error of the cluster-track combination"),
406 eCorr =
Var(
"userFloat('ecalTrkEnergyPostCorrNew')/userFloat('ecalTrkEnergyPreCorrNew')", float, doc=
"ratio of the calibrated energy/miniaod energy"),
407 scEtOverPt =
Var(
"(superCluster().energy()/(pt*userFloat('ecalTrkEnergyPostCorrNew')/userFloat('ecalTrkEnergyPreCorrNew')*cosh(superCluster().eta())))-1",float,doc=
"(supercluster transverse energy)/pt-1",precision=8),
408 dEscaleUp=
Var(
"userFloat('ecalTrkEnergyPostCorrNew')-userFloat('energyScaleUpNew')", float, doc=
"ecal energy scale shifted 1 sigma up(adding gain/stat/syst in quadrature)", precision=8),
409 dEscaleDown=
Var(
"userFloat('ecalTrkEnergyPostCorrNew')-userFloat('energyScaleDownNew')", float, doc=
"ecal energy scale shifted 1 sigma down (adding gain/stat/syst in quadrature)", precision=8),
410 dEsigmaUp=
Var(
"userFloat('ecalTrkEnergyPostCorrNew')-userFloat('energySigmaUpNew')", float, doc=
"ecal energy smearing value shifted 1 sigma up", precision=8),
411 dEsigmaDown=
Var(
"userFloat('ecalTrkEnergyPostCorrNew')-userFloat('energySigmaDownNew')", float, doc=
"ecal energy smearing value shifted 1 sigma up", precision=8),
415 (run2_nanoAOD_92X | run2_nanoAOD_94XMiniAODv1 | run2_nanoAOD_94XMiniAODv2 | run2_nanoAOD_94X2016 | run2_nanoAOD_102Xv1).toModify(electronTable.variables,
416 mvaFall17V1Iso =
Var(
"userFloat('mvaFall17V1Iso')",float,doc=
"MVA Iso ID V1 score"),
417 mvaFall17V1Iso_WP80 =
Var(
"userInt('mvaFall17V1Iso_WP80')",bool,doc=
"MVA Iso ID V1 WP80"),
418 mvaFall17V1Iso_WP90 =
Var(
"userInt('mvaFall17V1Iso_WP90')",bool,doc=
"MVA Iso ID V1 WP90"),
419 mvaFall17V1Iso_WPL =
Var(
"userInt('mvaFall17V1Iso_WPL')",bool,doc=
"MVA Iso ID V1 loose WP"),
420 mvaFall17V1noIso =
Var(
"userFloat('mvaFall17V1noIso')",float,doc=
"MVA noIso ID V1 score"),
421 mvaFall17V1noIso_WP80 =
Var(
"userInt('mvaFall17V1noIso_WP80')",bool,doc=
"MVA noIso ID V1 WP80"),
422 mvaFall17V1noIso_WP90 =
Var(
"userInt('mvaFall17V1noIso_WP90')",bool,doc=
"MVA noIso ID V1 WP90"),
423 mvaFall17V1noIso_WPL =
Var(
"userInt('mvaFall17V1noIso_WPL')",bool,doc=
"MVA noIso ID V1 loose WP"),
424 cutBased_Fall17_V1 =
Var(
"userInt('cutbasedID_Fall17_V1_veto')+userInt('cutbasedID_Fall17_V1_loose')+userInt('cutbasedID_Fall17_V1_medium')+userInt('cutbasedID_Fall17_V1_tight')",int,doc=
"cut-based ID Fall17 V1 (0:fail, 1:veto, 2:loose, 3:medium, 4:tight)"),
430 run2_nanoAOD_94X2016.toModify(electronTable.variables,
431 cutBased_Sum16 =
Var(
"userInt('cutbasedID_Sum16_veto')+userInt('cutbasedID_Sum16_loose')+userInt('cutbasedID_Sum16_medium')+userInt('cutbasedID_Sum16_tight')",int,doc=
"cut-based Summer16 ID (0:fail, 1:veto, 2:loose, 3:medium, 4:tight)"),
432 cutBased_Fall17_V1 =
Var(
"electronID('cutBasedElectronID-Fall17-94X-V1-veto')+electronID('cutBasedElectronID-Fall17-94X-V1-loose')+electronID('cutBasedElectronID-Fall17-94X-V1-medium')+electronID('cutBasedElectronID-Fall17-94X-V1-tight')",int,doc=
"cut-based Fall17 ID (0:fail, 1:veto, 2:loose, 3:medium, 4:tight)"),
435 cutBased =
Var(
"userInt('cutbasedID_Fall17_V2_veto')+userInt('cutbasedID_Fall17_V2_loose')+userInt('cutbasedID_Fall17_V2_medium')+userInt('cutbasedID_Fall17_V2_tight')",int,doc=
"cut-based ID Fall17 V2 (0:fail, 1:veto, 2:loose, 3:medium, 4:tight)"),
436 cutBased_HLTPreSel =
Var(
"userInt('cutbasedID_HLT')",int,doc=
"cut-based HLT pre-selection ID"),
437 cutBased_HEEP =
Var(
"electronID('heepElectronID-HEEPV70')",bool,doc=
"cut-based HEEP ID"),
438 cutBased_Spring15 =
Var(
"userInt('cutbasedID_Spring15_veto')+userInt('cutbasedID_Spring15_loose')+userInt('cutbasedID_Spring15_medium')+userInt('cutbasedID_Spring15_tight')",int,doc=
"cut-based Spring15 ID (0:fail, 1:veto, 2:loose, 3:medium, 4:tight)"),
439 mvaSpring16GP =
Var(
"userFloat('ElectronMVAEstimatorRun2Spring16GeneralPurposeV1Values')",float,doc=
"MVA Spring16 general-purpose ID score"),
440 mvaSpring16GP_WP80 =
Var(
"electronID('mvaEleID-Spring16-GeneralPurpose-V1-wp80')",bool,doc=
"MVA Spring16 general-purpose ID WP80"),
441 mvaSpring16GP_WP90 =
Var(
"electronID('mvaEleID-Spring16-GeneralPurpose-V1-wp90')",bool,doc=
"MVA Spring16 general-purpose ID WP90"),
442 mvaSpring16HZZ =
Var(
"userFloat('ElectronMVAEstimatorRun2Spring16HZZV1Values')",float,doc=
"MVA Spring16 HZZ ID score"),
443 mvaSpring16HZZ_WPL =
Var(
"electronID('mvaEleID-Spring16-HZZ-V1-wpLoose')",bool,doc=
"MVA Spring16 HZZ ID loose WP"),
444 mvaFall17V1Iso =
Var(
"userFloat('ElectronMVAEstimatorRun2Fall17IsoV1Values')",float,doc=
"MVA Fall17 V1 Iso ID score"),
445 mvaFall17V1Iso_WP80 =
Var(
"electronID('mvaEleID-Fall17-iso-V1-wp80')",bool,doc=
"MVA Fall17 V1 Iso ID WP80"),
446 mvaFall17V1Iso_WP90 =
Var(
"electronID('mvaEleID-Fall17-iso-V1-wp90')",bool,doc=
"MVA Fall17 V1 Iso ID WP90"),
447 mvaFall17V1Iso_WPL =
Var(
"electronID('mvaEleID-Fall17-iso-V1-wpLoose')",bool,doc=
"MVA Fall17 V1 Iso ID loose WP"),
448 mvaFall17V1noIso =
Var(
"userFloat('ElectronMVAEstimatorRun2Fall17NoIsoV1Values')",float,doc=
"MVA Fall17 V1 noIso ID score"),
449 mvaFall17V1noIso_WP80 =
Var(
"electronID('mvaEleID-Fall17-noIso-V1-wp80')",bool,doc=
"MVA Fall17 V1 noIso ID WP80"),
450 mvaFall17V1noIso_WP90 =
Var(
"electronID('mvaEleID-Fall17-noIso-V1-wp90')",bool,doc=
"MVA Fall17 V1 noIso ID WP90"),
451 mvaFall17V1noIso_WPL =
Var(
"electronID('mvaEleID-Fall17-noIso-V1-wpLoose')",bool,doc=
"MVA Fall17 V1 noIso ID loose WP"),
452 vidNestedWPBitmapSpring15 =
Var(
"userInt('VIDNestedWPBitmapSpring15')",int,doc=_bitmapVIDForEleSpring15_docstring),
453 vidNestedWPBitmapSum16 =
Var(
"userInt('VIDNestedWPBitmapSum16')",int,doc=_bitmapVIDForEleSum16_docstring),
454 pt =
Var(
"pt*userFloat('ecalTrkEnergyPostCorr')/userFloat('ecalTrkEnergyPreCorr')", float, precision=-1, doc=
"p_{T}"),
455 energyErr =
Var(
"userFloat('ecalTrkEnergyErrPostCorr')", float, precision=6, doc=
"energy error of the cluster-track combination"),
456 eCorr =
Var(
"userFloat('ecalTrkEnergyPostCorr')/userFloat('ecalTrkEnergyPreCorr')", float, doc=
"ratio of the calibrated energy/miniaod energy"),
457 scEtOverPt =
Var(
"(superCluster().energy()/(pt*userFloat('ecalTrkEnergyPostCorr')/userFloat('ecalTrkEnergyPreCorr')*cosh(superCluster().eta())))-1",float,doc=
"(supercluster transverse energy)/pt-1",precision=8),
458 dEscaleUp=
Var(
"userFloat('ecalTrkEnergyPostCorr')-userFloat('energyScaleUp')", float, doc=
"ecal energy scale shifted 1 sigma up (adding gain/stat/syst in quadrature)", precision=8),
459 dEscaleDown=
Var(
"userFloat('ecalTrkEnergyPostCorr')-userFloat('energyScaleDown')", float, doc=
"ecal energy scale shifted 1 sigma down (adding gain/stat/syst in quadrature)", precision=8),
460 dEsigmaUp=
Var(
"userFloat('ecalTrkEnergyPostCorr')-userFloat('energySigmaUp')", float, doc=
"ecal energy smearing value shifted 1 sigma up", precision=8),
461 dEsigmaDown=
Var(
"userFloat('ecalTrkEnergyPostCorr')-userFloat('energySigmaDown')", float, doc=
"ecal energy smearing value shifted 1 sigma up", precision=8),
464 run2_miniAOD_80XLegacy.toModify(electronTable.variables,
465 cutBased_Sum16 =
Var(
"userInt('cutbasedID_Sum16_veto')+userInt('cutbasedID_Sum16_loose')+userInt('cutbasedID_Sum16_medium')+userInt('cutbasedID_Sum16_tight')",int,doc=
"cut-based Summer16 ID (0:fail, 1:veto, 2:loose, 3:medium, 4:tight)"),
466 cutBased_HLTPreSel =
Var(
"userInt('cutbasedID_HLT')",int,doc=
"cut-based HLT pre-selection ID"),
467 cutBased_Spring15 =
Var(
"userInt('cutbasedID_Spring15_veto')+userInt('cutbasedID_Spring15_loose')+userInt('cutbasedID_Spring15_medium')+userInt('cutbasedID_Spring15_tight')",int,doc=
"cut-based Spring15 ID (0:fail, 1:veto, 2:loose, 3:medium, 4:tight)"),
468 mvaSpring16GP =
Var(
"userFloat('mvaSpring16GP')",float,doc=
"MVA general-purpose ID score"),
469 mvaSpring16GP_WP80 =
Var(
"userInt('mvaSpring16GP_WP80')",bool,doc=
"MVA general-purpose ID WP80"),
470 mvaSpring16GP_WP90 =
Var(
"userInt('mvaSpring16GP_WP90')",bool,doc=
"MVA general-purpose ID WP90"),
471 mvaSpring16HZZ =
Var(
"userFloat('mvaSpring16HZZ')",float,doc=
"MVA HZZ ID score"),
472 mvaSpring16HZZ_WPL =
Var(
"userInt('mvaSpring16HZZ_WPL')",bool,doc=
"MVA HZZ ID loose WP"),
474 vidNestedWPBitmapSpring15 =
Var(
"userInt('VIDNestedWPBitmapSpring15')",int,doc=_bitmapVIDForEleSpring15_docstring),
475 vidNestedWPBitmapSum16 =
Var(
"userInt('VIDNestedWPBitmapSum16')",int,doc=_bitmapVIDForEleSum16_docstring),
480 tautaggerForMatching = cms.EDProducer(
"GenJetTauTaggerProducer",
481 src = cms.InputTag(
'particleLevel:leptons')
484 matchingElecPhoton = cms.EDProducer(
"GenJetGenPartMerger",
485 srcJet =cms.InputTag(
"particleLevel:leptons"),
486 srcPart=cms.InputTag(
"particleLevel:photons"),
487 cut = cms.string(
"pt > 3"),
488 hasTauAnc=cms.InputTag(
"tautaggerForMatching"),
490 electronsMCMatchForTableAlt = cms.EDProducer(
"GenJetMatcherDRPtByDR",
491 src = electronTable.src,
492 matched = cms.InputTag(
"matchingElecPhoton:merged"),
493 mcPdgId = cms.vint32(11,22),
494 checkCharge = cms.bool(
False),
495 mcStatus = cms.vint32(),
496 maxDeltaR = cms.double(0.3),
497 maxDPtRel = cms.double(0.5),
498 resolveAmbiguities = cms.bool(
True),
499 resolveByMatchQuality = cms.bool(
True),
501 electronsMCMatchForTable = cms.EDProducer(
"MCMatcher",
502 src = electronTable.src,
503 matched = cms.InputTag(
"finalGenParticles"),
504 mcPdgId = cms.vint32(11,22),
505 checkCharge = cms.bool(
False),
506 mcStatus = cms.vint32(1),
507 maxDeltaR = cms.double(0.3),
508 maxDPtRel = cms.double(0.5),
509 resolveAmbiguities = cms.bool(
True),
510 resolveByMatchQuality = cms.bool(
True),
513 electronMCTable = cms.EDProducer(
"CandMCMatchTableProducer",
514 src = electronTable.src,
515 mcMapDressedLep = cms.InputTag(
"electronsMCMatchForTableAlt"),
516 mcMap = cms.InputTag(
"electronsMCMatchForTable"),
517 mapTauAnc = cms.InputTag(
"matchingElecPhoton:hasTauAnc"),
518 objName = electronTable.name,
519 objType = electronTable.name,
520 branchName = cms.string(
"genPart"),
521 docString = cms.string(
"MC matching to status==1 electrons or photons"),
522 genparticles = cms.InputTag(
"finalGenParticles"),
525 electronTask = cms.Task(bitmapVIDForEle,bitmapVIDForEleHEEP,isoForEle,ptRatioRelForEle,seedGainEle,calibratedPatElectronsNano,slimmedElectronsWithUserData,finalElectrons)
526 electronTablesTask = cms.Task(electronMVATTH, electronTable)
527 electronMCTask = cms.Task(tautaggerForMatching, matchingElecPhoton, electronsMCMatchForTable, electronsMCMatchForTableAlt, electronMCTable)
530 (run3_nanoAOD_devel).toReplaceWith(electronTask, electronTask.copyAndExclude([bitmapVIDForEle,bitmapVIDForEleHEEP]))
531 (run3_nanoAOD_devel).toModify(slimmedElectronsWithUserData, userIntFromBools = cms.PSet())
532 (run3_nanoAOD_devel).toModify(slimmedElectronsWithUserData.userInts,
533 VIDNestedWPBitmap =
None,
534 VIDNestedWPBitmapHEEP =
None)
535 (run3_nanoAOD_devel).toModify(slimmedElectronsWithUserData.userFloats,
536 mvaFall17V1Iso =
None,
537 mvaFall17V1noIso =
None,
538 mvaFall17V2Iso =
None,
539 mvaFall17V2noIso =
None,
541 (run3_nanoAOD_devel).toModify(electronTable.variables,
542 mvaFall17V2Iso =
None,
543 mvaFall17V2Iso_WP80 =
None,
544 mvaFall17V2Iso_WP90 =
None,
545 mvaFall17V2Iso_WPL =
None,
546 mvaFall17V2noIso =
None,
547 mvaFall17V2noIso_WP80 =
None,
548 mvaFall17V2noIso_WP90 =
None,
549 mvaFall17V2noIso_WPL =
None,
550 vidNestedWPBitmapHEEP =
None,
551 vidNestedWPBitmap =
None,
553 cutBased_HEEP =
None,
556 (run3_nanoAOD_devel).toReplaceWith(electronTablesTask, electronTablesTask.copyAndExclude([electronMVATTH]))
557 (run3_nanoAOD_devel).toModify(electronTable, externalVariables =
None)
562 for modifier
in run2_miniAOD_80XLegacy,run2_nanoAOD_94XMiniAODv1,run2_nanoAOD_94XMiniAODv2,run2_nanoAOD_94X2016,run2_nanoAOD_102Xv1,run2_nanoAOD_106Xv1:
563 modifier.toModify(bitmapVIDForEle, src =
"slimmedElectronsUpdated")
564 modifier.toModify(bitmapVIDForEleSpring15, src =
"slimmedElectronsUpdated")
565 modifier.toModify(bitmapVIDForEleSum16, src =
"slimmedElectronsUpdated")
566 modifier.toModify(bitmapVIDForEleHEEP, src =
"slimmedElectronsUpdated")
567 modifier.toModify(isoForEle, src =
"slimmedElectronsUpdated")
568 modifier.toModify(ptRatioRelForEle, srcLep =
"slimmedElectronsUpdated")
569 modifier.toModify(seedGainEle, src =
"slimmedElectronsUpdated")
570 modifier.toModify(slimmedElectronsWithUserData, src =
"slimmedElectronsUpdated")
571 modifier.toModify(calibratedPatElectronsNano, src =
"slimmedElectronsUpdated")
573 _withULAndUpdate_Task = cms.Task(slimmedElectronsUpdated)
574 _withULAndUpdate_Task.add(electronTask.copy())
575 modifier.toReplaceWith(electronTask, _withULAndUpdate_Task)
577 from RecoEgamma.ElectronIdentification.heepIdVarValueMapProducer_cfi
import heepIDVarValueMaps
578 _withTo106XAndUpdate_Task = cms.Task(heepIDVarValueMaps,slimmedElectronsTo106X)
579 _withTo106XAndUpdate_Task.add(electronTask.copy())
580 heepIDVarValueMaps.dataFormat = 2
582 for modifier
in run2_nanoAOD_94XMiniAODv2, run2_nanoAOD_94X2016, run2_nanoAOD_102Xv1, run2_nanoAOD_94XMiniAODv1:
583 modifier.toReplaceWith(electronTask, _withTo106XAndUpdate_Task)
585 for modifier
in run2_miniAOD_80XLegacy, run2_nanoAOD_94X2016:
586 _withTo106XAndUpdateAnd80XLegacyScale_Task = cms.Task(bitmapVIDForEleSpring15,bitmapVIDForEleSum16)
587 _withTo106XAndUpdateAnd80XLegacyScale_Task.add(_withTo106XAndUpdate_Task.copy())
588 modifier.toReplaceWith(electronTask, _withTo106XAndUpdateAnd80XLegacyScale_Task)
590 _withTo106XAndUpdateAnd94XScale_Task = _withTo106XAndUpdate_Task.copy()
591 for modifier
in run2_nanoAOD_94XMiniAODv1, run2_nanoAOD_94XMiniAODv2,run2_nanoAOD_102Xv1:
592 modifier.toReplaceWith(electronTask, _withTo106XAndUpdate_Task)
constexpr int32_t ceil(float num)
static std::vector< std::string > checklist log
def _get_bitmapVIDForEle_docstring
static std::string join(char **cmd)