1 import FWCore.ParameterSet.Config
as cms
5 from math
import ceil,log
8 photon_id_modules_WorkingPoints_nanoAOD = cms.PSet(
10 'RecoEgamma.PhotonIdentification.Identification.cutBasedPhotonID_Fall17_94X_V1_TrueVtx_cff',
11 'RecoEgamma.PhotonIdentification.Identification.cutBasedPhotonID_Fall17_94X_V2_cff',
12 'RecoEgamma.PhotonIdentification.Identification.mvaPhotonID_Fall17_94X_V1p1_cff',
13 'RecoEgamma.PhotonIdentification.Identification.mvaPhotonID_Fall17_94X_V2_cff',
14 'RecoEgamma.PhotonIdentification.Identification.cutBasedPhotonID_Spring16_V2p2_cff',
15 'RecoEgamma.PhotonIdentification.Identification.mvaPhotonID_Spring16_nonTrig_V1_cff',
17 WorkingPoints = cms.vstring(
18 "egmPhotonIDs:cutBasedPhotonID-Fall17-94X-V2-loose",
19 "egmPhotonIDs:cutBasedPhotonID-Fall17-94X-V2-medium",
20 "egmPhotonIDs:cutBasedPhotonID-Fall17-94X-V2-tight",
23 photon_id_modules_WorkingPoints_nanoAOD_Spring16V2p2 = cms.PSet(
24 modules = photon_id_modules_WorkingPoints_nanoAOD.modules,
25 WorkingPoints = cms.vstring(
26 "egmPhotonIDs:cutBasedPhotonID-Spring16-V2p2-loose",
27 "egmPhotonIDs:cutBasedPhotonID-Spring16-V2p2-medium",
28 "egmPhotonIDs:cutBasedPhotonID-Spring16-V2p2-tight",
33 pset = id_modules_working_points_pset
35 for modname
in pset.modules:
36 ids = __import__(modname, globals(), locals(), [
'idName',
'cutFlow'])
38 _id = getattr(ids,name)
39 if hasattr(_id,
'idName')
and hasattr(_id,
'cutFlow'):
40 if (len(pset.WorkingPoints)>0
and _id.idName == pset.WorkingPoints[0].
split(
':')[-1]):
41 cut_names =
','.
join([cut.cutName.value()
for cut
in _id.cutFlow])
42 n_bits_per_cut =
int(
ceil(
log(len(pset.WorkingPoints)+1,2)))
43 return 'VID compressed bitmap (%s), %d bits per cut'%(cut_names, n_bits_per_cut)
44 raise ValueError(
"Something is wrong in the photon ID modules parameter set!")
46 bitmapVIDForPho = cms.EDProducer(
"PhoVIDNestedWPBitmapProducer",
47 src = cms.InputTag(
"slimmedPhotons"),
48 srcForID = cms.InputTag(
"reducedEgamma",
"reducedGedPhotons"),
49 WorkingPoints = photon_id_modules_WorkingPoints_nanoAOD.WorkingPoints,
52 bitmapVIDForPhoSpring16V2p2 = cms.EDProducer(
"PhoVIDNestedWPBitmapProducer",
53 src = cms.InputTag(
"slimmedPhotons"),
54 WorkingPoints = photon_id_modules_WorkingPoints_nanoAOD_Spring16V2p2.WorkingPoints,
57 isoForPho = cms.EDProducer(
"PhoIsoValueMapProducer",
58 src = cms.InputTag(
"slimmedPhotons"),
59 relative = cms.bool(
False),
60 rho_PFIso = cms.InputTag(
"fixedGridRhoFastjetAll"),
61 mapIsoChg = cms.InputTag(
"photonIDValueMapProducer:phoChargedIsolation"),
62 mapIsoNeu = cms.InputTag(
"photonIDValueMapProducer:phoNeutralHadronIsolation"),
63 mapIsoPho = cms.InputTag(
"photonIDValueMapProducer:phoPhotonIsolation"),
64 EAFile_PFIso_Chg = cms.FileInPath(
"RecoEgamma/PhotonIdentification/data/Fall17/effAreaPhotons_cone03_pfChargedHadrons_90percentBased_V2.txt"),
65 EAFile_PFIso_Neu = cms.FileInPath(
"RecoEgamma/PhotonIdentification/data/Fall17/effAreaPhotons_cone03_pfNeutralHadrons_90percentBased_V2.txt"),
66 EAFile_PFIso_Pho = cms.FileInPath(
"RecoEgamma/PhotonIdentification/data/Fall17/effAreaPhotons_cone03_pfPhotons_90percentBased_V2.txt"),
68 for modifier
in run2_miniAOD_80XLegacy, run2_nanoAOD_94X2016:
69 modifier.toModify(isoForPho,
70 EAFile_PFIso_Chg = cms.FileInPath(
"RecoEgamma/PhotonIdentification/data/Spring16/effAreaPhotons_cone03_pfChargedHadrons_90percentBased.txt"),
71 EAFile_PFIso_Neu = cms.FileInPath(
"RecoEgamma/PhotonIdentification/data/Spring16/effAreaPhotons_cone03_pfNeutralHadrons_90percentBased.txt"),
72 EAFile_PFIso_Pho = cms.FileInPath(
"RecoEgamma/PhotonIdentification/data/Spring16/effAreaPhotons_cone03_pfPhotons_90percentBased.txt"),
75 seedGainPho = cms.EDProducer(
"PhotonSeedGainProducer", src = cms.InputTag(
"slimmedPhotons"))
77 import RecoEgamma.EgammaTools.calibratedEgammas_cff
79 calibratedPatPhotonsNano = RecoEgamma.EgammaTools.calibratedEgammas_cff.calibratedPatPhotons.clone(
80 produceCalibratedObjs =
False,
81 correctionFile = cms.string(
"EgammaAnalysis/ElectronTools/data/ScalesSmearings/Run2016_UltraLegacy_preVFP_RunFineEtaR9Gain"),
84 (run2_egamma_2016 & tracker_apv_vfp30_2016).toModify(calibratedPatPhotonsNano,
85 correctionFile = cms.string(
"EgammaAnalysis/ElectronTools/data/ScalesSmearings/Run2016_UltraLegacy_preVFP_RunFineEtaR9Gain")
88 (run2_egamma_2016 & ~tracker_apv_vfp30_2016).toModify(calibratedPatPhotonsNano,
89 correctionFile = cms.string(
"EgammaAnalysis/ElectronTools/data/ScalesSmearings/Run2016_UltraLegacy_postVFP_RunFineEtaR9Gain"),
92 run2_egamma_2017.toModify(calibratedPatPhotonsNano,
93 correctionFile = cms.string(
"EgammaAnalysis/ElectronTools/data/ScalesSmearings/Run2017_24Feb2020_runEtaR9Gain_v2")
96 run2_egamma_2018.toModify(calibratedPatPhotonsNano,
97 correctionFile = cms.string(
"EgammaAnalysis/ElectronTools/data/ScalesSmearings/Run2018_29Sep2020_RunFineEtaR9Gain")
100 run2_nanoAOD_102Xv1.toModify(calibratedPatPhotonsNano,
101 correctionFile = cms.string(
"EgammaAnalysis/ElectronTools/data/ScalesSmearings/Run2018_Step2Closure_CoarseEtaR9Gain_v2")
104 run2_nanoAOD_94XMiniAODv1.toModify(calibratedPatPhotonsNano,
105 correctionFile = cms.string(
"EgammaAnalysis/ElectronTools/data/ScalesSmearings/Run2017_17Nov2017_v1_ele_unc")
108 run2_nanoAOD_94XMiniAODv2.toModify(calibratedPatPhotonsNano,
109 correctionFile = cms.string(
"EgammaAnalysis/ElectronTools/data/ScalesSmearings/Run2017_17Nov2017_v1_ele_unc")
113 run2_miniAOD_80XLegacy.toModify(calibratedPatPhotonsNano,
114 correctionFile = cms.string(
"EgammaAnalysis/ElectronTools/data/ScalesSmearings/Legacy2016_07Aug2017_FineEtaR9_v3_ele_unc")
118 slimmedPhotonsWithUserData = cms.EDProducer(
"PATPhotonUserDataEmbedder",
119 src = cms.InputTag(
"slimmedPhotons"),
120 parentSrcs = cms.VInputTag(
"reducedEgamma:reducedGedPhotons"),
121 userFloats = cms.PSet(
122 mvaID = cms.InputTag(
"photonMVAValueMapProducer:PhotonMVAEstimatorRunIIFall17v2Values"),
123 PFIsoChg = cms.InputTag(
"isoForPho:PFIsoChg"),
124 PFIsoAll = cms.InputTag(
"isoForPho:PFIsoAll"),
126 userIntFromBools = cms.PSet(
127 cutbasedID_loose = cms.InputTag(
"egmPhotonIDs:cutBasedPhotonID-Fall17-94X-V2-loose"),
128 cutbasedID_medium = cms.InputTag(
"egmPhotonIDs:cutBasedPhotonID-Fall17-94X-V2-medium"),
129 cutbasedID_tight = cms.InputTag(
"egmPhotonIDs:cutBasedPhotonID-Fall17-94X-V2-tight"),
130 mvaID_WP90 = cms.InputTag(
"egmPhotonIDs:mvaPhoID-RunIIFall17-v2-wp90"),
131 mvaID_WP80 = cms.InputTag(
"egmPhotonIDs:mvaPhoID-RunIIFall17-v2-wp80"),
132 cutbasedIDV1_loose = cms.InputTag(
"egmPhotonIDs:cutBasedPhotonID-Fall17-94X-V1-loose"),
133 cutbasedIDV1_medium = cms.InputTag(
"egmPhotonIDs:cutBasedPhotonID-Fall17-94X-V1-medium"),
134 cutbasedIDV1_tight = cms.InputTag(
"egmPhotonIDs:cutBasedPhotonID-Fall17-94X-V1-tight"),
137 VIDNestedWPBitmap = cms.InputTag(
"bitmapVIDForPho"),
138 seedGain = cms.InputTag(
"seedGainPho"),
143 for modifier
in run2_egamma_2016, run2_egamma_2017, run2_egamma_2018:
144 modifier.toModify(slimmedPhotonsWithUserData.userFloats,
145 ecalEnergyErrPostCorrNew = cms.InputTag(
"calibratedPatPhotonsNano",
"ecalEnergyErrPostCorr"),
146 ecalEnergyPreCorrNew = cms.InputTag(
"calibratedPatPhotonsNano",
"ecalEnergyPreCorr"),
147 ecalEnergyPostCorrNew = cms.InputTag(
"calibratedPatPhotonsNano",
"ecalEnergyPostCorr"),
148 energyScaleUpNew = cms.InputTag(
"calibratedPatPhotonsNano",
"energyScaleUp"),
149 energyScaleDownNew = cms.InputTag(
"calibratedPatPhotonsNano",
"energyScaleDown"),
150 energySigmaUpNew = cms.InputTag(
"calibratedPatPhotonsNano",
"energySigmaUp"),
151 energySigmaDownNew = cms.InputTag(
"calibratedPatPhotonsNano",
"energySigmaDown"),
155 run2_nanoAOD_94X2016.toModify(slimmedPhotonsWithUserData.userFloats,
156 ecalEnergyErrPostCorrNew =
None,
157 ecalEnergyPreCorrNew =
None,
158 ecalEnergyPostCorrNew =
None,
159 energyScaleUpNew =
None,
160 energyScaleDownNew =
None,
161 energySigmaUpNew =
None,
162 energySigmaDownNew =
None 166 finalPhotons = cms.EDFilter(
"PATPhotonRefSelector",
167 src = cms.InputTag(
"slimmedPhotonsWithUserData"),
168 cut = cms.string(
"pt > 5 ")
171 photonTable = cms.EDProducer(
"SimpleCandidateFlatTableProducer",
172 src = cms.InputTag(
"linkedObjects",
"photons"),
173 cut = cms.string(
""),
174 name= cms.string(
"Photon"),
175 doc = cms.string(
"slimmedPhotons after basic selection (" + finalPhotons.cut.value()+
")"),
176 singleton = cms.bool(
False),
177 extension = cms.bool(
False),
178 variables = cms.PSet(P3Vars,
179 jetIdx =
Var(
"?hasUserCand('jet')?userCand('jet').key():-1", int, doc=
"index of the associated jet (-1 if none)"),
180 electronIdx =
Var(
"?hasUserCand('electron')?userCand('electron').key():-1", int, doc=
"index of the associated electron (-1 if none)"),
181 energyErr =
Var(
"getCorrectedEnergyError('regression2')",float,doc=
"energy error of the cluster from regression",precision=6),
182 energyRaw =
Var(
"superCluster().rawEnergy()",float,doc=
"raw energy of photon supercluster", precision=10),
183 r9 =
Var(
"full5x5_r9()",float,doc=
"R9 of the supercluster, calculated with full 5x5 region",precision=8),
184 sieie =
Var(
"full5x5_sigmaIetaIeta()",float,doc=
"sigma_IetaIeta of the supercluster, calculated with full 5x5 region",precision=8),
185 sipip =
Var(
"showerShapeVariables().sigmaIphiIphi", float, doc=
"sigmaIphiIphi of the supercluster", precision=8),
186 sieip =
Var(
"full5x5_showerShapeVariables().sigmaIetaIphi",float,doc=
"sigma_IetaIphi of the supercluster, calculated with full 5x5 region",precision=8),
187 s4 =
Var(
"full5x5_showerShapeVariables().e2x2/full5x5_showerShapeVariables().e5x5",float,doc=
"e2x2/e5x5 of the supercluster, calculated with full 5x5 region",precision=8),
188 etaWidth =
Var(
"superCluster().etaWidth()",float,doc=
"Width of the photon supercluster in eta", precision=8),
189 phiWidth =
Var(
"superCluster().phiWidth()",float,doc=
"Width of the photon supercluster in phi", precision=8),
191 "userInt('cutbasedID_loose')+userInt('cutbasedID_medium')+userInt('cutbasedID_tight')",
193 doc=
"cut-based ID bitmap, Fall17V2, (0:fail, 1:loose, 2:medium, 3:tight)",
195 cutBased_Fall17V1Bitmap =
Var(
196 "userInt('cutbasedIDV1_loose')+2*userInt('cutbasedIDV1_medium')+4*userInt('cutbasedIDV1_tight')",
198 doc=
"cut-based ID bitmap, Fall17V1, 2^(0:loose, 1:medium, 2:tight).",
201 "userInt('VIDNestedWPBitmap')",
205 electronVeto =
Var(
"passElectronVeto()",bool,doc=
"pass electron veto"),
206 pixelSeed =
Var(
"hasPixelSeed()",bool,doc=
"has pixel seed"),
207 mvaID =
Var(
"userFloat('mvaID')",float,doc=
"MVA ID score, Fall17V2",precision=10),
208 mvaID_WP90 =
Var(
"userInt('mvaID_WP90')",bool,doc=
"MVA ID WP90, Fall17V2"),
209 mvaID_WP80 =
Var(
"userInt('mvaID_WP80')",bool,doc=
"MVA ID WP80, Fall17V2"),
210 pfPhoIso03 =
Var(
"photonIso()",float,doc=
"PF absolute isolation dR=0.3, photon component (uncorrected)"),
211 pfChargedIsoPFPV =
Var(
"chargedHadronPFPVIso()",float,doc=
"PF absolute isolation dR=0.3, charged component (PF PV only)"),
212 pfChargedIsoWorstVtx =
Var(
"chargedHadronWorstVtxIso()",float,doc=
"PF absolute isolation dR=0.3, charged component (Vertex with largest isolation)"),
213 pfRelIso03_chg =
Var(
"userFloat('PFIsoChg')/pt",float,doc=
"PF relative isolation dR=0.3, charged component (with rho*EA PU corrections)"),
214 pfRelIso03_all =
Var(
"userFloat('PFIsoAll')/pt",float,doc=
"PF relative isolation dR=0.3, total (with rho*EA PU corrections)"),
215 hoe =
Var(
"hadronicOverEm()",float,doc=
"H over E",precision=8),
216 isScEtaEB =
Var(
"abs(superCluster().eta()) < 1.4442",bool,doc=
"is supercluster eta within barrel acceptance"),
217 isScEtaEE =
Var(
"abs(superCluster().eta()) > 1.566 && abs(superCluster().eta()) < 2.5",bool,doc=
"is supercluster eta within endcap acceptance"),
218 seedGain =
Var(
"userInt('seedGain')",
"uint8",doc=
"Gain of the seed crystal"),
220 x_calo =
Var(
"superCluster().seed().position().x()",float,doc=
"photon supercluster position on calorimeter, x coordinate (cm)",precision=10),
221 y_calo =
Var(
"superCluster().seed().position().y()",float,doc=
"photon supercluster position on calorimeter, y coordinate (cm)",precision=10),
222 z_calo =
Var(
"superCluster().seed().position().z()",float,doc=
"photon supercluster position on calorimeter, z coordinate (cm)",precision=10),
224 esEffSigmaRR =
Var(
"full5x5_showerShapeVariables().effSigmaRR()", float, doc=
"preshower sigmaRR"),
225 esEnergyOverRawE =
Var(
"superCluster().preshowerEnergy()/superCluster().rawEnergy()", float, doc=
"ratio of preshower energy to raw supercluster energy"),
226 haloTaggerMVAVal =
Var(
"haloTaggerMVAVal()",float,doc=
"Value of MVA based BDT based beam halo tagger in the Ecal endcap (valid for pT > 200 GeV)",precision=8),
232 for modifier
in run2_egamma_2016, run2_egamma_2017, run2_egamma_2018 :
233 modifier.toModify(photonTable.variables,
234 pt =
Var(
"pt*userFloat('ecalEnergyPostCorrNew')/userFloat('ecalEnergyPreCorrNew')", float, precision=-1, doc=
"p_{T}"),
235 energyErr =
Var(
"userFloat('ecalEnergyErrPostCorrNew')",float,doc=
"energy error of the cluster from regression",precision=6),
236 eCorr =
Var(
"userFloat('ecalEnergyPostCorrNew')/userFloat('ecalEnergyPreCorrNew')",float,doc=
"ratio of the calibrated energy/miniaod energy"),
237 hoe =
Var(
"hadTowOverEm()",float,doc=
"H over E (Run2)",precision=8),
241 for modifier
in run2_nanoAOD_94X2016,:
242 modifier.toModify(photonTable.variables,
243 pt =
Var(
"pt*userFloat('ecalEnergyPostCorr')/userFloat('ecalEnergyPreCorr')", float, precision=-1, doc=
"p_{T}"),
244 energyErr =
Var(
"userFloat('ecalEnergyErrPostCorr')",float,doc=
"energy error of the cluster from regression",precision=6),
245 eCorr =
Var(
"userFloat('ecalEnergyPostCorr')/userFloat('ecalEnergyPreCorr')",float,doc=
"ratio of the calibrated energy/miniaod energy"),
249 for modifier
in run2_nanoAOD_94X2016, run2_miniAOD_80XLegacy:
250 modifier.toModify(slimmedPhotonsWithUserData.userFloats,
251 mvaID_Spring16nonTrigV1 = cms.InputTag(
"photonMVAValueMapProducer:PhotonMVAEstimatorRun2Spring16NonTrigV1Values"),
253 modifier.toModify(slimmedPhotonsWithUserData.userIntFromBools,
254 cutID_Spring16_loose = cms.InputTag(
"egmPhotonIDs:cutBasedPhotonID-Spring16-V2p2-loose"),
255 cutID_Spring16_medium = cms.InputTag(
"egmPhotonIDs:cutBasedPhotonID-Spring16-V2p2-medium"),
256 cutID_Spring16_tight = cms.InputTag(
"egmPhotonIDs:cutBasedPhotonID-Spring16-V2p2-tight"),
257 mvaID_Spring16nonTrigV1_WP90 = cms.InputTag(
"egmPhotonIDs:mvaPhoID-Spring16-nonTrig-V1-wp90"),
258 mvaID_Spring16nonTrigV1_WP80 = cms.InputTag(
"egmPhotonIDs:mvaPhoID-Spring16-nonTrig-V1-wp80"),
261 modifier.toModify(slimmedPhotonsWithUserData.userInts,
262 VIDNestedWPBitmap_Spring16V2p2 = cms.InputTag(
"bitmapVIDForPhoSpring16V2p2"),
265 for modifier
in run2_nanoAOD_94X2016, run2_miniAOD_80XLegacy:
266 modifier.toModify(photonTable.variables,
267 cutBased_Spring16V2p2 =
Var(
268 "userInt('cutID_Spring16_loose')+userInt('cutID_Spring16_medium')+userInt('cutID_Spring16_tight')",
270 doc=
"cut-based ID bitmap, Spring16V2p2, (0:fail, 1:loose, 2:medium, 3:tight)" 272 vidNestedWPBitmap_Spring16V2p2 =
Var(
273 "userInt('VIDNestedWPBitmap_Spring16V2p2')",
277 mvaID_Spring16nonTrigV1 =
Var(
278 "userFloat('mvaID_Spring16nonTrigV1')",
280 doc=
"MVA ID score, Spring16nonTrigV1",
285 photonsMCMatchForTable = cms.EDProducer(
"MCMatcher",
286 src = photonTable.src,
287 matched = cms.InputTag(
"finalGenParticles"),
288 mcPdgId = cms.vint32(11,22),
289 checkCharge = cms.bool(
False),
290 mcStatus = cms.vint32(1),
291 maxDeltaR = cms.double(0.3),
292 maxDPtRel = cms.double(0.5),
293 resolveAmbiguities = cms.bool(
True),
294 resolveByMatchQuality = cms.bool(
True),
297 photonMCTable = cms.EDProducer(
"CandMCMatchTableProducer",
298 src = photonTable.src,
299 mcMap = cms.InputTag(
"photonsMCMatchForTable"),
300 objName = photonTable.name,
301 objType = photonTable.name,
302 branchName = cms.string(
"genPart"),
303 docString = cms.string(
"MC matching to status==1 photons or electrons"),
306 from RecoEgamma.EgammaTools.egammaObjectModificationsInMiniAOD_cff
import egamma8XObjectUpdateModifier,egamma9X105XUpdateModifier,prependEgamma8XObjectUpdateModifier
308 slimmedPhotonsTo106X = cms.EDProducer(
"ModifiedPhotonProducer",
309 src = cms.InputTag(
"slimmedPhotons"),
310 modifierConfig = cms.PSet( modifications = cms.VPSet(egamma9X105XUpdateModifier) )
313 run2_miniAOD_80XLegacy.toModify( slimmedPhotonsTo106X.modifierConfig.modifications, prependEgamma8XObjectUpdateModifier )
315 for modifier
in run2_miniAOD_80XLegacy,run2_nanoAOD_94XMiniAODv1,run2_nanoAOD_94XMiniAODv2,run2_nanoAOD_94X2016 ,run2_nanoAOD_102Xv1:
316 modifier.toModify(bitmapVIDForPho, src =
"slimmedPhotonsTo106X")
317 modifier.toModify(bitmapVIDForPhoSpring16V2p2, src =
"slimmedPhotonsTo106X")
318 modifier.toModify(isoForPho, src =
"slimmedPhotonsTo106X")
319 modifier.toModify(calibratedPatPhotonsNano, src =
"slimmedPhotonsTo106X")
320 modifier.toModify(slimmedPhotonsWithUserData, src =
"slimmedPhotonsTo106X")
321 modifier.toModify(seedGainPho, src =
"slimmedPhotonsTo106X")
325 for modifier
in run2_egamma_2016, run2_egamma_2017, run2_egamma_2018:
326 modifier.toModify(photonTable.variables,
327 dEscaleUp=
Var(
"userFloat('ecalEnergyPostCorrNew') - userFloat('energyScaleUpNew')", float, doc=
"ecal energy scale shifted 1 sigma up (adding gain/stat/syst in quadrature)", precision=8),
328 dEscaleDown=
Var(
"userFloat('ecalEnergyPostCorrNew') - userFloat('energyScaleDownNew')", float, doc=
"ecal energy scale shifted 1 sigma down (adding gain/stat/syst in quadrature)", precision=8),
329 dEsigmaUp=
Var(
"userFloat('ecalEnergyPostCorrNew') - userFloat('energySigmaUpNew')", float, doc=
"ecal energy smearing value shifted 1 sigma up", precision=8),
330 dEsigmaDown=
Var(
"userFloat('ecalEnergyPostCorrNew') - userFloat('energySigmaDownNew')", float, doc=
"ecal energy smearing value shifted 1 sigma up", precision=8),
333 for modifier
in run2_nanoAOD_94X2016,:
334 modifier.toModify(photonTable.variables,
335 dEscaleUp=
Var(
"userFloat('ecalEnergyPostCorr') - userFloat('energyScaleUp')", float, doc=
"ecal energy scale shifted 1 sigma up (adding gain/stat/syst in quadrature)", precision=8),
336 dEscaleDown=
Var(
"userFloat('ecalEnergyPostCorr') - userFloat('energyScaleDown')", float, doc=
"ecal energy scale shifted 1 sigma down (adding gain/stat/syst in quadrature)", precision=8),
337 dEsigmaUp=
Var(
"userFloat('ecalEnergyPostCorr') - userFloat('energySigmaUp')", float, doc=
"ecal energy smearing value shifted 1 sigma up", precision=8),
338 dEsigmaDown=
Var(
"userFloat('ecalEnergyPostCorr') - userFloat('energySigmaDown')", float, doc=
"ecal energy smearing value shifted 1 sigma up", precision=8),
341 photonTask = cms.Task(bitmapVIDForPho, isoForPho, seedGainPho, calibratedPatPhotonsNano, slimmedPhotonsWithUserData, finalPhotons)
342 photonTablesTask = cms.Task(photonTable)
343 photonMCTask = cms.Task(photonsMCMatchForTable, photonMCTable)
347 from RecoEgamma.EgammaIsolationAlgos.egmPhotonIsolationMiniAOD_cff
import egmPhotonIsolation
348 from RecoEgamma.PhotonIdentification.photonIDValueMapProducer_cff
import photonIDValueMapProducer
350 _withUpdatePho_Task = cms.Task(egmPhotonIsolation,photonIDValueMapProducer,slimmedPhotonsTo106X)
351 _withUpdatePho_Task.add(photonTask.copy())
353 for modifier
in run2_nanoAOD_94XMiniAODv2,run2_nanoAOD_94X2016 ,run2_nanoAOD_102Xv1,run2_nanoAOD_94XMiniAODv1:
354 modifier.toReplaceWith(photonTask, _withUpdatePho_Task)
356 for modifier
in run2_miniAOD_80XLegacy, run2_nanoAOD_94X2016:
357 _withSpring16V2p2_Task = cms.Task(bitmapVIDForPhoSpring16V2p2)
358 _withSpring16V2p2_Task.add(_withUpdatePho_Task.copy())
359 modifier.toReplaceWith(photonTask, _withSpring16V2p2_Task)
constexpr int32_t ceil(float num)
def Var(expr, valtype, compression=None, doc=None, mcOnly=False, precision=-1)
def make_bitmapVID_docstring(id_modules_working_points_pset)
def split(sequence, size)
static std::string join(char **cmd)