CMS 3D CMS Logo

photons_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
4 
5 from math import ceil,log
6 
7 
8 photon_id_modules_WorkingPoints_nanoAOD = cms.PSet(
9  modules = cms.vstring(
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',
16  ),
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",
21  )
22 )
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",
29  )
30 )
31 
32 def make_bitmapVID_docstring(id_modules_working_points_pset):
33  pset = id_modules_working_points_pset
34 
35  for modname in pset.modules:
36  ids = __import__(modname, globals(), locals(), ['idName','cutFlow'])
37  for name in dir(ids):
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!")
45 
46 bitmapVIDForPho = cms.EDProducer("PhoVIDNestedWPBitmapProducer",
47  src = cms.InputTag("slimmedPhotons"),
48  WorkingPoints = photon_id_modules_WorkingPoints_nanoAOD.WorkingPoints,
49 )
50 
51 bitmapVIDForPhoSpring16V2p2 = cms.EDProducer("PhoVIDNestedWPBitmapProducer",
52  src = cms.InputTag("slimmedPhotons"),
53  WorkingPoints = photon_id_modules_WorkingPoints_nanoAOD_Spring16V2p2.WorkingPoints,
54 )
55 
56 isoForPho = cms.EDProducer("PhoIsoValueMapProducer",
57  src = cms.InputTag("slimmedPhotons"),
58  relative = cms.bool(False),
59  rho_PFIso = cms.InputTag("fixedGridRhoFastjetAll"),
60  mapIsoChg = cms.InputTag("photonIDValueMapProducer:phoChargedIsolation"),
61  mapIsoNeu = cms.InputTag("photonIDValueMapProducer:phoNeutralHadronIsolation"),
62  mapIsoPho = cms.InputTag("photonIDValueMapProducer:phoPhotonIsolation"),
63  EAFile_PFIso_Chg = cms.FileInPath("RecoEgamma/PhotonIdentification/data/Fall17/effAreaPhotons_cone03_pfChargedHadrons_90percentBased_V2.txt"),
64  EAFile_PFIso_Neu = cms.FileInPath("RecoEgamma/PhotonIdentification/data/Fall17/effAreaPhotons_cone03_pfNeutralHadrons_90percentBased_V2.txt"),
65  EAFile_PFIso_Pho = cms.FileInPath("RecoEgamma/PhotonIdentification/data/Fall17/effAreaPhotons_cone03_pfPhotons_90percentBased_V2.txt"),
66 )
67 for modifier in run2_miniAOD_80XLegacy, run2_nanoAOD_94X2016:
68  modifier.toModify(isoForPho,
69  EAFile_PFIso_Chg = cms.FileInPath("RecoEgamma/PhotonIdentification/data/Spring16/effAreaPhotons_cone03_pfChargedHadrons_90percentBased.txt"),
70  EAFile_PFIso_Neu = cms.FileInPath("RecoEgamma/PhotonIdentification/data/Spring16/effAreaPhotons_cone03_pfNeutralHadrons_90percentBased.txt"),
71  EAFile_PFIso_Pho = cms.FileInPath("RecoEgamma/PhotonIdentification/data/Spring16/effAreaPhotons_cone03_pfPhotons_90percentBased.txt"),
72  )
73 
74 seedGainPho = cms.EDProducer("PhotonSeedGainProducer", src = cms.InputTag("slimmedPhotons"))
75 
76 import RecoEgamma.EgammaTools.calibratedEgammas_cff
77 
78 calibratedPatPhotonsUL17 = RecoEgamma.EgammaTools.calibratedEgammas_cff.calibratedPatPhotons.clone(
79  produceCalibratedObjs = False,
80  correctionFile = cms.string("EgammaAnalysis/ElectronTools/data/ScalesSmearings/Run2017_24Feb2020_runEtaR9Gain_v2")
81 )
82 
83 calibratedPatPhotonsUL18 = RecoEgamma.EgammaTools.calibratedEgammas_cff.calibratedPatPhotons.clone(
84  produceCalibratedObjs = False,
85  correctionFile = cms.string("EgammaAnalysis/ElectronTools/data/ScalesSmearings/Run2018_29Sep2020_RunFineEtaR9Gain")
86 )
87 
88 calibratedPatPhotons102Xv1 = RecoEgamma.EgammaTools.calibratedEgammas_cff.calibratedPatPhotons.clone(
89  produceCalibratedObjs = False,
90  correctionFile = cms.string("EgammaAnalysis/ElectronTools/data/ScalesSmearings/Run2018_Step2Closure_CoarseEtaR9Gain_v2")
91 )
92 
93 calibratedPatPhotons94Xv1 = RecoEgamma.EgammaTools.calibratedEgammas_cff.calibratedPatPhotons.clone(
94  produceCalibratedObjs = False,
95  correctionFile = cms.string("EgammaAnalysis/ElectronTools/data/ScalesSmearings/Run2017_17Nov2017_v1_ele_unc")
96 )
97 
98 calibratedPatPhotons94Xv2 = RecoEgamma.EgammaTools.calibratedEgammas_cff.calibratedPatPhotons.clone(
99  produceCalibratedObjs = False,
100  correctionFile = cms.string("EgammaAnalysis/ElectronTools/data/ScalesSmearings/Run2017_17Nov2017_v1_ele_unc")
101 )
102 
103 calibratedPatPhotons80XLegacy = RecoEgamma.EgammaTools.calibratedEgammas_cff.calibratedPatPhotons.clone(
104  produceCalibratedObjs = False,
105  correctionFile = cms.string("EgammaAnalysis/ElectronTools/data/ScalesSmearings/Legacy2016_07Aug2017_FineEtaR9_v3_ele_unc"),
106 )
107 
108 slimmedPhotonsWithUserData = cms.EDProducer("PATPhotonUserDataEmbedder",
109  src = cms.InputTag("slimmedPhotons"),
110  userFloats = cms.PSet(
111  mvaID = cms.InputTag("photonMVAValueMapProducer:PhotonMVAEstimatorRunIIFall17v2Values"),
112  mvaID_Fall17V1p1 = cms.InputTag("photonMVAValueMapProducer:PhotonMVAEstimatorRunIIFall17v1p1Values"),
113  mvaID_Spring16nonTrigV1 = cms.InputTag("photonMVAValueMapProducer:PhotonMVAEstimatorRun2Spring16NonTrigV1Values"),
114  PFIsoChg = cms.InputTag("isoForPho:PFIsoChg"),
115  PFIsoAll = cms.InputTag("isoForPho:PFIsoAll"),
116  ),
117  userIntFromBools = cms.PSet(
118  cutbasedID_loose = cms.InputTag("egmPhotonIDs:cutBasedPhotonID-Fall17-94X-V2-loose"),
119  cutbasedID_medium = cms.InputTag("egmPhotonIDs:cutBasedPhotonID-Fall17-94X-V2-medium"),
120  cutbasedID_tight = cms.InputTag("egmPhotonIDs:cutBasedPhotonID-Fall17-94X-V2-tight"),
121  mvaID_WP90 = cms.InputTag("egmPhotonIDs:mvaPhoID-RunIIFall17-v2-wp90"),
122  mvaID_WP80 = cms.InputTag("egmPhotonIDs:mvaPhoID-RunIIFall17-v2-wp80"),
123  cutbasedIDV1_loose = cms.InputTag("egmPhotonIDs:cutBasedPhotonID-Fall17-94X-V1-loose"),
124  cutbasedIDV1_medium = cms.InputTag("egmPhotonIDs:cutBasedPhotonID-Fall17-94X-V1-medium"),
125  cutbasedIDV1_tight = cms.InputTag("egmPhotonIDs:cutBasedPhotonID-Fall17-94X-V1-tight"),
126  cutID_Spring16_loose = cms.InputTag("egmPhotonIDs:cutBasedPhotonID-Spring16-V2p2-loose"),
127  cutID_Spring16_medium = cms.InputTag("egmPhotonIDs:cutBasedPhotonID-Spring16-V2p2-medium"),
128  cutID_Spring16_tight = cms.InputTag("egmPhotonIDs:cutBasedPhotonID-Spring16-V2p2-tight"),
129  mvaID_Spring16nonTrigV1_WP90 = cms.InputTag("egmPhotonIDs:mvaPhoID-Spring16-nonTrig-V1-wp90"),
130  mvaID_Spring16nonTrigV1_WP80 = cms.InputTag("egmPhotonIDs:mvaPhoID-Spring16-nonTrig-V1-wp80"),
131  ),
132  userInts = cms.PSet(
133  VIDNestedWPBitmap = cms.InputTag("bitmapVIDForPho"),
134  VIDNestedWPBitmap_Spring16V2p2 = cms.InputTag("bitmapVIDForPhoSpring16V2p2"),
135  seedGain = cms.InputTag("seedGainPho"),
136  ),
137 )
138 
139 run2_egamma_2017.toModify(slimmedPhotonsWithUserData.userFloats,
140  ecalEnergyErrPostCorrNew = cms.InputTag("calibratedPatPhotonsUL17","ecalEnergyErrPostCorr"),
141  ecalEnergyPreCorrNew = cms.InputTag("calibratedPatPhotonsUL17","ecalEnergyPreCorr"),
142  ecalEnergyPostCorrNew = cms.InputTag("calibratedPatPhotonsUL17","ecalEnergyPostCorr"),
143 )
144 
145 run2_egamma_2018.toModify(slimmedPhotonsWithUserData.userFloats,
146  ecalEnergyErrPostCorrNew = cms.InputTag("calibratedPatPhotonsUL18","ecalEnergyErrPostCorr"),
147  ecalEnergyPreCorrNew = cms.InputTag("calibratedPatPhotonsUL18","ecalEnergyPreCorr"),
148  ecalEnergyPostCorrNew = cms.InputTag("calibratedPatPhotonsUL18","ecalEnergyPostCorr"),
149 )
150 
151 run2_miniAOD_80XLegacy.toModify(slimmedPhotonsWithUserData.userFloats,
152  ecalEnergyErrPostCorrNew = cms.InputTag("calibratedPatPhotons80XLegacy","ecalEnergyErrPostCorr"),
153  ecalEnergyPreCorrNew = cms.InputTag("calibratedPatPhotons80XLegacy","ecalEnergyPreCorr"),
154  ecalEnergyPostCorrNew = cms.InputTag("calibratedPatPhotons80XLegacy","ecalEnergyPostCorr"),
155 )
156 run2_nanoAOD_94XMiniAODv1.toModify(slimmedPhotonsWithUserData.userFloats,
157  ecalEnergyErrPostCorrNew = cms.InputTag("calibratedPatPhotons94Xv1","ecalEnergyErrPostCorr"),
158  ecalEnergyPreCorrNew = cms.InputTag("calibratedPatPhotons94Xv1","ecalEnergyPreCorr"),
159  ecalEnergyPostCorrNew = cms.InputTag("calibratedPatPhotons94Xv1","ecalEnergyPostCorr"),
160 )
161 run2_nanoAOD_94XMiniAODv2.toModify(slimmedPhotonsWithUserData.userFloats,
162  ecalEnergyErrPostCorrNew = cms.InputTag("calibratedPatPhotons94Xv2","ecalEnergyErrPostCorr"),
163  ecalEnergyPreCorrNew = cms.InputTag("calibratedPatPhotons94Xv2","ecalEnergyPreCorr"),
164  ecalEnergyPostCorrNew = cms.InputTag("calibratedPatPhotons94Xv2","ecalEnergyPostCorr"),
165 )
166 
167 run2_nanoAOD_102Xv1.toModify(slimmedPhotonsWithUserData.userFloats,
168  ecalEnergyErrPostCorrNew = cms.InputTag("calibratedPatPhotons102Xv1","ecalEnergyErrPostCorr"),
169  ecalEnergyPreCorrNew = cms.InputTag("calibratedPatPhotons102Xv1","ecalEnergyPreCorr"),
170  ecalEnergyPostCorrNew = cms.InputTag("calibratedPatPhotons102Xv1","ecalEnergyPostCorr"),
171 )
172 
173 finalPhotons = cms.EDFilter("PATPhotonRefSelector",
174  src = cms.InputTag("slimmedPhotonsWithUserData"),
175  cut = cms.string("pt > 5 ")
176 )
177 
178 photonTable = cms.EDProducer("SimpleCandidateFlatTableProducer",
179  src = cms.InputTag("linkedObjects","photons"),
180  cut = cms.string(""), #we should not filter on cross linked collections
181  name= cms.string("Photon"),
182  doc = cms.string("slimmedPhotons after basic selection (" + finalPhotons.cut.value()+")"),
183  singleton = cms.bool(False), # the number of entries is variable
184  extension = cms.bool(False), # this is the main table for the photons
185  variables = cms.PSet(CandVars,
186  jetIdx = Var("?hasUserCand('jet')?userCand('jet').key():-1", int, doc="index of the associated jet (-1 if none)"),
187  electronIdx = Var("?hasUserCand('electron')?userCand('electron').key():-1", int, doc="index of the associated electron (-1 if none)"),
188  energyErr = Var("getCorrectedEnergyError('regression2')",float,doc="energy error of the cluster from regression",precision=6),
189  r9 = Var("full5x5_r9()",float,doc="R9 of the supercluster, calculated with full 5x5 region",precision=10),
190  sieie = Var("full5x5_sigmaIetaIeta()",float,doc="sigma_IetaIeta of the supercluster, calculated with full 5x5 region",precision=10),
191  cutBased = Var(
192  "userInt('cutbasedID_loose')+userInt('cutbasedID_medium')+userInt('cutbasedID_tight')",
193  int,
194  doc="cut-based ID bitmap, Fall17V2, (0:fail, 1:loose, 2:medium, 3:tight)"
195  ),
196  cutBased_Fall17V1Bitmap = Var(
197  "userInt('cutbasedIDV1_loose')+2*userInt('cutbasedIDV1_medium')+4*userInt('cutbasedIDV1_tight')",
198  int,
199  doc="cut-based ID bitmap, Fall17V1, 2^(0:loose, 1:medium, 2:tight).",
200  ),
201  vidNestedWPBitmap = Var(
202  "userInt('VIDNestedWPBitmap')",
203  int,
204  doc="Fall17V2 " + make_bitmapVID_docstring(photon_id_modules_WorkingPoints_nanoAOD)
205  ),
206  electronVeto = Var("passElectronVeto()",bool,doc="pass electron veto"),
207  pixelSeed = Var("hasPixelSeed()",bool,doc="has pixel seed"),
208  mvaID = Var("userFloat('mvaID')",float,doc="MVA ID score, Fall17V2",precision=10),
209  mvaID_Fall17V1p1 = Var("userFloat('mvaID_Fall17V1p1')",float,doc="MVA ID score, Fall17V1p1",precision=10),
210  mvaID_WP90 = Var("userInt('mvaID_WP90')",bool,doc="MVA ID WP90, Fall17V2"),
211  mvaID_WP80 = Var("userInt('mvaID_WP80')",bool,doc="MVA ID WP80, Fall17V2"),
212  cutBased_Spring16V2p2 = Var(
213  "userInt('cutID_Spring16_loose')+userInt('cutID_Spring16_medium')+userInt('cutID_Spring16_tight')",
214  int,
215  doc="cut-based ID bitmap, Spring16V2p2, (0:fail, 1:loose, 2:medium, 3:tight)"
216  ),
217  mvaID_Spring16nonTrigV1 = Var(
218  "userFloat('mvaID_Spring16nonTrigV1')",
219  float,
220  doc="MVA ID score, Spring16nonTrigV1",
221  precision=10
222  ),
223  vidNestedWPBitmap_Spring16V2p2 = Var(
224  "userInt('VIDNestedWPBitmap_Spring16V2p2')",
225  int,
226  doc="Spring16V2p2 " + make_bitmapVID_docstring(photon_id_modules_WorkingPoints_nanoAOD_Spring16V2p2)
227  ),
228  pfRelIso03_chg = Var("userFloat('PFIsoChg')/pt",float,doc="PF relative isolation dR=0.3, charged component (with rho*EA PU corrections)"),
229  pfRelIso03_all = Var("userFloat('PFIsoAll')/pt",float,doc="PF relative isolation dR=0.3, total (with rho*EA PU corrections)"),
230  hoe = Var("hadronicOverEm()",float,doc="H over E",precision=8),
231  isScEtaEB = Var("abs(superCluster().eta()) < 1.4442",bool,doc="is supercluster eta within barrel acceptance"),
232  isScEtaEE = Var("abs(superCluster().eta()) > 1.566 && abs(superCluster().eta()) < 2.5",bool,doc="is supercluster eta within endcap acceptance"),
233  seedGain = Var("userInt('seedGain')","uint8",doc="Gain of the seed crystal"),
234  )
235 )
236 
237 #these eras have the energy correction in the mini
238 for modifier in run2_nanoAOD_94XMiniAODv2, run2_nanoAOD_94X2016:
239  modifier.toModify(photonTable.variables,
240  pt = Var("pt*userFloat('ecalEnergyPostCorr')/userFloat('ecalEnergyPreCorr')", float, precision=-1, doc="p_{T}"),
241  energyErr = Var("userFloat('ecalEnergyErrPostCorr')",float,doc="energy error of the cluster from regression",precision=6),
242  eCorr = Var("userFloat('ecalEnergyPostCorr')/userFloat('ecalEnergyPreCorr')",float,doc="ratio of the calibrated energy/miniaod energy"),
243  )
244 
245 #these eras need to make the energy correction, hence the "New"
246 for modifier in run2_egamma_2017,run2_egamma_2018,run2_nanoAOD_94XMiniAODv1, run2_miniAOD_80XLegacy, run2_nanoAOD_102Xv1,run2_nanoAOD_94XMiniAODv2:
247  modifier.toModify(photonTable.variables,
248  pt = Var("pt*userFloat('ecalEnergyPostCorrNew')/userFloat('ecalEnergyPreCorrNew')", float, precision=-1, doc="p_{T}"),
249  energyErr = Var("userFloat('ecalEnergyErrPostCorrNew')",float,doc="energy error of the cluster from regression",precision=6),
250  eCorr = Var("userFloat('ecalEnergyPostCorrNew')/userFloat('ecalEnergyPreCorrNew')",float,doc="ratio of the calibrated energy/miniaod energy"),
251  )
252 
253 # only add the Spring16 IDs for 2016 nano
254 (~(run2_nanoAOD_94X2016 | run2_miniAOD_80XLegacy)).toModify(photonTable.variables,
255  cutBased_Spring16V2p2 = None,
256  mvaID_Spring16nonTrigV1 = None,
257  vidNestedWPBitmap_Spring16V2p2 = None,
258 )
259 
260 
261 photonsMCMatchForTable = cms.EDProducer("MCMatcher", # cut on deltaR, deltaPt/Pt; pick best by deltaR
262  src = photonTable.src, # final reco collection
263  matched = cms.InputTag("finalGenParticles"), # final mc-truth particle collection
264  mcPdgId = cms.vint32(11,22), # one or more PDG ID (11 = el, 22 = pho); absolute values (see below)
265  checkCharge = cms.bool(False), # True = require RECO and MC objects to have the same charge
266  mcStatus = cms.vint32(1), # PYTHIA status code (1 = stable, 2 = shower, 3 = hard scattering)
267  maxDeltaR = cms.double(0.3), # Minimum deltaR for the match
268  maxDPtRel = cms.double(0.5), # Minimum deltaPt/Pt for the match
269  resolveAmbiguities = cms.bool(True), # Forbid two RECO objects to match to the same GEN object
270  resolveByMatchQuality = cms.bool(True), # False = just match input in order; True = pick lowest deltaR pair first
271 )
272 
273 photonMCTable = cms.EDProducer("CandMCMatchTableProducer",
274  src = photonTable.src,
275  mcMap = cms.InputTag("photonsMCMatchForTable"),
276  objName = photonTable.name,
277  objType = photonTable.name, #cms.string("Photon"),
278  branchName = cms.string("genPart"),
279  docString = cms.string("MC matching to status==1 photons or electrons"),
280 )
281 
282 from RecoEgamma.EgammaTools.egammaObjectModificationsInMiniAOD_cff import egamma8XObjectUpdateModifier,egamma9X105XUpdateModifier,prependEgamma8XObjectUpdateModifier
283 #we have dataformat changes to 106X so to read older releases we use egamma updators
284 slimmedPhotonsTo106X = cms.EDProducer("ModifiedPhotonProducer",
285  src = cms.InputTag("slimmedPhotons"),
286  modifierConfig = cms.PSet( modifications = cms.VPSet(egamma9X105XUpdateModifier) )
287 )
288 #might as well fix 80X while we're at it although the differences are not so relavent for nano
289 run2_miniAOD_80XLegacy.toModify( slimmedPhotonsTo106X.modifierConfig.modifications, prependEgamma8XObjectUpdateModifier )
290 
291 for modifier in run2_miniAOD_80XLegacy,run2_nanoAOD_94XMiniAODv1,run2_nanoAOD_94XMiniAODv2,run2_nanoAOD_94X2016 ,run2_nanoAOD_102Xv1:
292  modifier.toModify(bitmapVIDForPho, src = "slimmedPhotonsTo106X")
293  modifier.toModify(bitmapVIDForPhoSpring16V2p2, src = "slimmedPhotonsTo106X")
294  modifier.toModify(isoForPho, src = "slimmedPhotonsTo106X")
295  modifier.toModify(calibratedPatPhotons102Xv1, src = "slimmedPhotonsTo106X")
296  modifier.toModify(calibratedPatPhotons94Xv1, src = "slimmedPhotonsTo106X")
297  modifier.toModify(calibratedPatPhotons94Xv2, src = "slimmedPhotonsTo106X")
298  modifier.toModify(calibratedPatPhotons80XLegacy, src = "slimmedPhotonsTo106X")
299  modifier.toModify(slimmedPhotonsWithUserData, src = "slimmedPhotonsTo106X")
300  modifier.toModify(seedGainPho, src = "slimmedPhotonsTo106X")
301 
302 
303 photonSequence = cms.Sequence(
304  bitmapVIDForPho + \
305  bitmapVIDForPhoSpring16V2p2 + \
306  isoForPho + \
307  seedGainPho + \
308  slimmedPhotonsWithUserData + \
309  finalPhotons
310 )
311 
312 photonTables = cms.Sequence ( photonTable)
313 photonMC = cms.Sequence(photonsMCMatchForTable + photonMCTable)
314 
315 from RecoEgamma.EgammaIsolationAlgos.egmPhotonIsolationMiniAOD_cff import egmPhotonIsolation
316 from RecoEgamma.PhotonIdentification.photonIDValueMapProducer_cff import photonIDValueMapProducer
317 
318 _withUL17Scale_sequence = photonSequence.copy()
319 _withUL17Scale_sequence.replace(slimmedPhotonsWithUserData, calibratedPatPhotonsUL17 + slimmedPhotonsWithUserData)
320 run2_egamma_2017.toReplaceWith(photonSequence, _withUL17Scale_sequence)
321 
322 _withUL18Scale_sequence = photonSequence.copy()
323 _withUL18Scale_sequence.replace(slimmedPhotonsWithUserData, calibratedPatPhotonsUL18 + slimmedPhotonsWithUserData)
324 run2_egamma_2018.toReplaceWith(photonSequence, _withUL18Scale_sequence)
325 
326 
327 _updatePhoTo106X_sequence =cms.Sequence(egmPhotonIsolation + photonIDValueMapProducer + slimmedPhotonsTo106X)
328 _withUpdatePho_sequence = photonSequence.copy()
329 _withUpdatePho_sequence.insert(0,_updatePhoTo106X_sequence)
330 for modifier in run2_nanoAOD_94XMiniAODv2,run2_nanoAOD_94X2016 ,run2_nanoAOD_102Xv1,run2_nanoAOD_94XMiniAODv1:
331  modifier.toReplaceWith(photonSequence, _withUpdatePho_sequence)
332 
333 
334 
335 _with80XScale_sequence = _withUpdatePho_sequence.copy()
336 _with80XScale_sequence.replace(slimmedPhotonsWithUserData, calibratedPatPhotons80XLegacy + slimmedPhotonsWithUserData)
337 run2_miniAOD_80XLegacy.toReplaceWith(photonSequence, _with80XScale_sequence)
338 
339 _with94Xv1Scale_sequence = _withUpdatePho_sequence.copy()
340 _with94Xv1Scale_sequence.replace(slimmedPhotonsWithUserData, calibratedPatPhotons94Xv1 + slimmedPhotonsWithUserData)
341 run2_nanoAOD_94XMiniAODv1.toReplaceWith(photonSequence, _with94Xv1Scale_sequence)
342 
343 _with94Xv2Scale_sequence = _withUpdatePho_sequence.copy()
344 _with94Xv2Scale_sequence.replace(slimmedPhotonsWithUserData, calibratedPatPhotons94Xv2 + slimmedPhotonsWithUserData)
345 run2_nanoAOD_94XMiniAODv2.toReplaceWith(photonSequence, _with94Xv2Scale_sequence)
346 
347 _with102Xv1Scale_sequence = photonSequence.copy()
348 _with102Xv1Scale_sequence.replace(slimmedPhotonsWithUserData, calibratedPatPhotons102Xv1 + slimmedPhotonsWithUserData)
349 run2_nanoAOD_102Xv1.toReplaceWith(photonSequence, _with102Xv1Scale_sequence)
photons_cff.make_bitmapVID_docstring
def make_bitmapVID_docstring(id_modules_working_points_pset)
Definition: photons_cff.py:32
join
static std::string join(char **cmd)
Definition: RemoteFile.cc:17
common_cff
common_cff.Var
def Var(expr, valtype, compression=None, doc=None, mcOnly=False, precision=-1)
Definition: common_cff.py:20
reco::ceil
constexpr int32_t ceil(float num)
Definition: constexpr_cmath.h:7
submitPVValidationJobs.split
def split(sequence, size)
Definition: submitPVValidationJobs.py:352
photons_cff.int
int
Definition: photons_cff.py:186
nano_eras_cff
dqm-mbProfile.log
log
Definition: dqm-mbProfile.py:17
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23