CMS 3D CMS Logo

photons_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
4 from PhysicsTools.NanoAOD.simpleCandidateFlatTableProducer_cfi import simpleCandidateFlatTableProducer
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_RunIIIWinter22_122X_V1_cff',
11  'RecoEgamma.PhotonIdentification.Identification.mvaPhotonID_Winter22_122X_V1_cff',
12  # Fall17: need to include the modules too to make sure they are run
13  'RecoEgamma.PhotonIdentification.Identification.cutBasedPhotonID_Fall17_94X_V2_cff',
14  'RecoEgamma.PhotonIdentification.Identification.mvaPhotonID_Fall17_94X_V2_cff',
15  ),
16  WorkingPoints = cms.vstring(
17  "egmPhotonIDs:cutBasedPhotonID-RunIIIWinter22-122X-V1-loose",
18  "egmPhotonIDs:cutBasedPhotonID-RunIIIWinter22-122X-V1-medium",
19  "egmPhotonIDs:cutBasedPhotonID-RunIIIWinter22-122X-V1-tight",
20  )
21 )
22 
23 photon_id_modules_WorkingPoints_nanoAOD_Run2 = cms.PSet(
24  modules = cms.vstring(
25  'RecoEgamma.PhotonIdentification.Identification.cutBasedPhotonID_Fall17_94X_V2_cff',
26  'RecoEgamma.PhotonIdentification.Identification.mvaPhotonID_Fall17_94X_V2_cff',
27  ),
28  WorkingPoints = cms.vstring(
29  "egmPhotonIDs:cutBasedPhotonID-Fall17-94X-V2-loose",
30  "egmPhotonIDs:cutBasedPhotonID-Fall17-94X-V2-medium",
31  "egmPhotonIDs:cutBasedPhotonID-Fall17-94X-V2-tight",
32  )
33 
34 )
35 
36 # make Fall17 the default one in Run2
37 run2_egamma.toModify(photon_id_modules_WorkingPoints_nanoAOD,
38  modules=photon_id_modules_WorkingPoints_nanoAOD_Run2.modules).\
39  toModify(photon_id_modules_WorkingPoints_nanoAOD,
40  WorkingPoints=photon_id_modules_WorkingPoints_nanoAOD_Run2.WorkingPoints)
41 
42 def make_bitmapVID_docstring(id_modules_working_points_pset):
43  pset = id_modules_working_points_pset
44 
45  for modname in pset.modules:
46  ids = __import__(modname, globals(), locals(), ['idName','cutFlow'])
47  for name in dir(ids):
48  _id = getattr(ids,name)
49  if hasattr(_id,'idName') and hasattr(_id,'cutFlow'):
50  if (len(pset.WorkingPoints)>0 and _id.idName == pset.WorkingPoints[0].split(':')[-1]):
51  cut_names = ','.join([cut.cutName.value() for cut in _id.cutFlow])
52  n_bits_per_cut = int(ceil(log(len(pset.WorkingPoints)+1,2)))
53  return 'VID compressed bitmap (%s), %d bits per cut'%(cut_names, n_bits_per_cut)
54  raise ValueError("Something is wrong in the photon ID modules parameter set!")
55 
56 
57 bitmapVIDForPho = cms.EDProducer("PhoVIDNestedWPBitmapProducer",
58  src = cms.InputTag("slimmedPhotons"),
59  srcForID = cms.InputTag("reducedEgamma","reducedGedPhotons"),
60  WorkingPoints = photon_id_modules_WorkingPoints_nanoAOD.WorkingPoints,
61 )
62 _bitmapVIDForPho_docstring = make_bitmapVID_docstring(photon_id_modules_WorkingPoints_nanoAOD)
63 
64 bitmapVIDForPhoRun2 = bitmapVIDForPho.clone(
65  WorkingPoints = photon_id_modules_WorkingPoints_nanoAOD_Run2.WorkingPoints,
66 )
67 _bitmapVIDForPhoRun2_docstring = make_bitmapVID_docstring(photon_id_modules_WorkingPoints_nanoAOD_Run2)
68 
69 isoForPho = cms.EDProducer("PhoIsoValueMapProducer",
70  src = cms.InputTag("slimmedPhotons"),
71  relative = cms.bool(False),
72  doQuadratic = cms.bool(True),
73  rho_PFIso = cms.InputTag("fixedGridRhoFastjetAll"),
74  QuadraticEAFile_PFIso_Chg = cms.FileInPath("RecoEgamma/PhotonIdentification/data/RunIII_Winter22/effectiveArea_ChgHadronIso_95percentBased.txt"),
75  QuadraticEAFile_PFIso_ECal = cms.FileInPath("RecoEgamma/PhotonIdentification/data/RunIII_Winter22/effectiveArea_ECalClusterIso_95percentBased.txt"),
76  QuadraticEAFile_PFIso_HCal = cms.FileInPath("RecoEgamma/PhotonIdentification/data/RunIII_Winter22/effectiveArea_HCalClusterIso_95percentBased.txt"),
77 )
78 
79 hOverEForPho = cms.EDProducer("PhoHoverEValueMapProducer",
80  src = cms.InputTag("slimmedPhotons"),
81  relative = cms.bool(False),
82  rho = cms.InputTag("fixedGridRhoFastjetAll"),
83  QuadraticEAFile_HoverE = cms.FileInPath("RecoEgamma/PhotonIdentification/data/RunIII_Winter22/effectiveArea_coneBasedHoverE_95percentBased.txt"),
84 )
85 
86 isoForPhoFall17V2 = isoForPho.clone(
87  doQuadratic = cms.bool(False),
88  EAFile_PFIso_Chg = cms.FileInPath("RecoEgamma/PhotonIdentification/data/Fall17/effAreaPhotons_cone03_pfChargedHadrons_90percentBased_V2.txt"),
89  EAFile_PFIso_Neu = cms.FileInPath("RecoEgamma/PhotonIdentification/data/Fall17/effAreaPhotons_cone03_pfNeutralHadrons_90percentBased_V2.txt"),
90  EAFile_PFIso_Pho = cms.FileInPath("RecoEgamma/PhotonIdentification/data/Fall17/effAreaPhotons_cone03_pfPhotons_90percentBased_V2.txt"),
91 )
92 
93 
94 seedGainPho = cms.EDProducer("PhotonSeedGainProducer", src = cms.InputTag("slimmedPhotons"))
95 
96 seedLocationPho = cms.EDProducer("PhotonSeedLocationProducer", src = cms.InputTag("slimmedPhotons"))
97 
98 import RecoEgamma.EgammaTools.calibratedEgammas_cff
99 
100 calibratedPatPhotonsNano = RecoEgamma.EgammaTools.calibratedEgammas_cff.calibratedPatPhotons.clone(
101  produceCalibratedObjs = False,
102  correctionFile = cms.string("EgammaAnalysis/ElectronTools/data/ScalesSmearings/Run2016_UltraLegacy_preVFP_RunFineEtaR9Gain"),
103 )
104 
105 (run2_egamma_2016 & tracker_apv_vfp30_2016).toModify(
106  calibratedPatPhotonsNano,
107  correctionFile = cms.string("EgammaAnalysis/ElectronTools/data/ScalesSmearings/Run2016_UltraLegacy_preVFP_RunFineEtaR9Gain")
108 )
109 
110 (run2_egamma_2016 & ~tracker_apv_vfp30_2016).toModify(
111  calibratedPatPhotonsNano,
112  correctionFile = cms.string("EgammaAnalysis/ElectronTools/data/ScalesSmearings/Run2016_UltraLegacy_postVFP_RunFineEtaR9Gain"),
113 )
114 
115 run2_egamma_2017.toModify(
116  calibratedPatPhotonsNano,
117  correctionFile = cms.string("EgammaAnalysis/ElectronTools/data/ScalesSmearings/Run2017_24Feb2020_runEtaR9Gain_v2")
118 )
119 
120 run2_egamma_2018.toModify(
121  calibratedPatPhotonsNano,
122  correctionFile = cms.string("EgammaAnalysis/ElectronTools/data/ScalesSmearings/Run2018_29Sep2020_RunFineEtaR9Gain")
123 )
124 
125 slimmedPhotonsWithUserData = cms.EDProducer("PATPhotonUserDataEmbedder",
126  src = cms.InputTag("slimmedPhotons"),
127  parentSrcs = cms.VInputTag("reducedEgamma:reducedGedPhotons"),
128  userFloats = cms.PSet(
129  mvaID = cms.InputTag("photonMVAValueMapProducer:PhotonMVAEstimatorRunIIIWinter22v1Values"),
130  PFIsoChgQuadratic = cms.InputTag("isoForPho:PFIsoChgQuadratic"),
131  PFIsoAllQuadratic = cms.InputTag("isoForPho:PFIsoAllQuadratic"),
132  HoverEQuadratic = cms.InputTag("hOverEForPho:HoEForPhoEACorr"),
133  mvaID_Fall17V2 = cms.InputTag("photonMVAValueMapProducer:PhotonMVAEstimatorRunIIFall17v2Values"),
134  PFIsoChgFall17V2 = cms.InputTag("isoForPhoFall17V2:PFIsoChg"),
135  PFIsoAllFall17V2 = cms.InputTag("isoForPhoFall17V2:PFIsoAll"),
136  ),
137  userIntFromBools = cms.PSet(
138  cutBasedID_loose = cms.InputTag("egmPhotonIDs:cutBasedPhotonID-RunIIIWinter22-122X-V1-loose"),
139  cutBasedID_medium = cms.InputTag("egmPhotonIDs:cutBasedPhotonID-RunIIIWinter22-122X-V1-medium"),
140  cutBasedID_tight = cms.InputTag("egmPhotonIDs:cutBasedPhotonID-RunIIIWinter22-122X-V1-tight"),
141  cutBasedID_Fall17V2_loose = cms.InputTag("egmPhotonIDs:cutBasedPhotonID-Fall17-94X-V2-loose"),
142  cutBasedID_Fall17V2_medium = cms.InputTag("egmPhotonIDs:cutBasedPhotonID-Fall17-94X-V2-medium"),
143  cutBasedID_Fall17V2_tight = cms.InputTag("egmPhotonIDs:cutBasedPhotonID-Fall17-94X-V2-tight"),
144  mvaID_WP90 = cms.InputTag("egmPhotonIDs:mvaPhoID-RunIIIWinter22-v1-wp90"),
145  mvaID_WP80 = cms.InputTag("egmPhotonIDs:mvaPhoID-RunIIIWinter22-v1-wp80"),
146  mvaID_Fall17V2_WP90 = cms.InputTag("egmPhotonIDs:mvaPhoID-RunIIFall17-v2-wp90"),
147  mvaID_Fall17V2_WP80 = cms.InputTag("egmPhotonIDs:mvaPhoID-RunIIFall17-v2-wp80"),
148  ),
149  userInts = cms.PSet(
150  VIDNestedWPBitmap = cms.InputTag("bitmapVIDForPho"),
151  VIDNestedWPBitmapFall17V2 = cms.InputTag("bitmapVIDForPhoRun2"),
152  seedGain = cms.InputTag("seedGainPho"),
153  seediEtaOriX = cms.InputTag("seedLocationPho:iEtaOriX"),
154  seediPhiOriY = cms.InputTag("seedLocationPho:iPhiOriY"),
155  )
156 )
157 
158 # no need for the Run3 IDs in Run2
159 run2_egamma.toModify(slimmedPhotonsWithUserData.userFloats,
160  mvaID = None,
161  PFIsoChgQuadratic = None,
162  PFIsoAllQuadratic = None,
163  HoverEQuadratic = None).\
164  toModify(slimmedPhotonsWithUserData.userIntFromBools,
165  cutBasedID_loose = None,
166  cutBasedID_medium = None,
167  cutBasedID_tight = None,
168  mvaID_WP90 = None,
169  mvaID_WP80 = None).\
170  toModify(slimmedPhotonsWithUserData.userInts,
171  VIDNestedWPBitmap = None)
172 
173 run2_egamma.toModify(
174  slimmedPhotonsWithUserData.userFloats,
175  ecalEnergyErrPostCorrNew = cms.InputTag("calibratedPatPhotonsNano","ecalEnergyErrPostCorr"),
176  ecalEnergyPreCorrNew = cms.InputTag("calibratedPatPhotonsNano","ecalEnergyPreCorr"),
177  ecalEnergyPostCorrNew = cms.InputTag("calibratedPatPhotonsNano","ecalEnergyPostCorr"),
178  energyScaleUpNew = cms.InputTag("calibratedPatPhotonsNano","energyScaleUp"),
179  energyScaleDownNew = cms.InputTag("calibratedPatPhotonsNano","energyScaleDown"),
180  energySigmaUpNew = cms.InputTag("calibratedPatPhotonsNano","energySigmaUp"),
181  energySigmaDownNew = cms.InputTag("calibratedPatPhotonsNano","energySigmaDown"),
182 )
183 
184 
185 finalPhotons = cms.EDFilter("PATPhotonRefSelector",
186  src = cms.InputTag("slimmedPhotonsWithUserData"),
187  cut = cms.string("pt > 5 ")
188 )
189 
190 photonTable = simpleCandidateFlatTableProducer.clone(
191  src = cms.InputTag("linkedObjects","photons"),
192  name= cms.string("Photon"),
193  doc = cms.string("slimmedPhotons after basic selection (" + finalPhotons.cut.value()+")"),
194  variables = cms.PSet(P3Vars,
195  jetIdx = Var("?hasUserCand('jet')?userCand('jet').key():-1", int, doc="index of the associated jet (-1 if none)"),
196  electronIdx = Var("?hasUserCand('electron')?userCand('electron').key():-1", int, doc="index of the associated electron (-1 if none)"),
197  energyErr = Var("getCorrectedEnergyError('regression2')",float,doc="energy error of the cluster from regression",precision=6),
198  energyRaw = Var("superCluster().rawEnergy()",float,doc="raw energy of photon supercluster", precision=10),
199  r9 = Var("full5x5_r9()",float,doc="R9 of the supercluster, calculated with full 5x5 region",precision=8),
200  sieie = Var("full5x5_sigmaIetaIeta()",float,doc="sigma_IetaIeta of the supercluster, calculated with full 5x5 region",precision=8),
201  sipip = Var("showerShapeVariables().sigmaIphiIphi", float, doc="sigmaIphiIphi of the supercluster", precision=8),
202  sieip = Var("full5x5_showerShapeVariables().sigmaIetaIphi",float,doc="sigma_IetaIphi of the supercluster, calculated with full 5x5 region",precision=8),
203  s4 = Var("full5x5_showerShapeVariables().e2x2/full5x5_showerShapeVariables().e5x5",float,doc="e2x2/e5x5 of the supercluster, calculated with full 5x5 region",precision=8),
204  etaWidth = Var("superCluster().etaWidth()",float,doc="Width of the photon supercluster in eta", precision=8),
205  phiWidth = Var("superCluster().phiWidth()",float,doc="Width of the photon supercluster in phi", precision=8),
206  cutBased = Var(
207  "userInt('cutBasedID_loose')+userInt('cutBasedID_medium')+userInt('cutBasedID_tight')",
208  int,
209  doc="cut-based ID bitmap, RunIIIWinter22V1, (0:fail, 1:loose, 2:medium, 3:tight)",
210  ),
211  cutBased_Fall17V2 = Var(
212  "userInt('cutBasedID_Fall17V2_loose')+userInt('cutBasedID_Fall17V2_medium')+userInt('cutBasedID_Fall17V2_tight')",
213  int,
214  doc="cut-based ID bitmap, Fall17V2, (0:fail, 1:loose, 2:medium, 3:tight)",
215  ),
216  vidNestedWPBitmap = Var(
217  "userInt('VIDNestedWPBitmap')",
218  int,
219  doc="RunIIIWinter22V1 " + _bitmapVIDForPho_docstring
220  ),
221  vidNestedWPBitmap_Fall17V2 = Var(
222  "userInt('VIDNestedWPBitmapFall17V2')",
223  int,
224  doc="Fall17V2 " + _bitmapVIDForPhoRun2_docstring
225  ),
226  electronVeto = Var("passElectronVeto()",bool,doc="pass electron veto"),
227  pixelSeed = Var("hasPixelSeed()",bool,doc="has pixel seed"),
228  mvaID = Var("userFloat('mvaID')",float,doc="MVA ID score, Winter22V1",precision=10),
229  mvaID_WP90 = Var("userInt('mvaID_WP90')",bool,doc="MVA ID WP90, Winter22V1"),
230  mvaID_WP80 = Var("userInt('mvaID_WP80')",bool,doc="MVA ID WP80, Winter22V1"),
231  mvaID_Fall17V2 = Var("userFloat('mvaID_Fall17V2')",float,doc="MVA ID score, Fall17V2",precision=10),
232  mvaID_Fall17V2_WP90 = Var("userInt('mvaID_Fall17V2_WP90')",bool,doc="MVA ID WP90, Fall17V2"),
233  mvaID_Fall17V2_WP80 = Var("userInt('mvaID_Fall17V2_WP80')",bool,doc="MVA ID WP80, Fall17V2"),
234  pfPhoIso03 = Var("photonIso()",float,doc="PF absolute isolation dR=0.3, photon component (uncorrected)"),
235  pfChargedIsoPFPV = Var("chargedHadronPFPVIso()",float,doc="PF absolute isolation dR=0.3, charged component (PF PV only)"),
236  pfChargedIsoWorstVtx = Var("chargedHadronWorstVtxIso()",float,doc="PF absolute isolation dR=0.3, charged component (Vertex with largest isolation)"),
237  pfRelIso03_chg_quadratic = Var("userFloat('PFIsoChgQuadratic')/pt",float,doc="PF relative isolation dR=0.3, charged hadron component (with quadraticEA*rho*rho + linearEA*rho Winter22V1 corrections)"),
238  pfRelIso03_all_quadratic = Var("userFloat('PFIsoAllQuadratic')/pt",float,doc="PF relative isolation dR=0.3, total (with quadraticEA*rho*rho + linearEA*rho Winter22V1 corrections)"),
239  pfRelIso03_chg_Fall17V2 = Var("userFloat('PFIsoChgFall17V2')/pt",float,doc="PF relative isolation dR=0.3, charged component (with Fall17V2 rho*EA PU corrections)"),
240  pfRelIso03_all_Fall17V2 = Var("userFloat('PFIsoAllFall17V2')/pt",float,doc="PF relative isolation dR=0.3, total (with Fall17V2 rho*EA PU corrections)"),
241  hoe = Var("hadronicOverEm()",float,doc="H over E",precision=8),
242  hoe_PUcorr = Var("userFloat('HoverEQuadratic')",float,doc="PU corrected H/E (cone-based with quadraticEA*rho*rho + linearEA*rho Winter22V1 corrections)",precision=8),
243  isScEtaEB = Var("abs(superCluster().eta()) < 1.4442",bool,doc="is supercluster eta within barrel acceptance"),
244  isScEtaEE = Var("abs(superCluster().eta()) > 1.566 && abs(superCluster().eta()) < 2.5",bool,doc="is supercluster eta within endcap acceptance"),
245  seedGain = Var("userInt('seedGain')","uint8",doc="Gain of the seed crystal"),
246  seediEtaOriX = Var("userInt('seediEtaOriX')","int8",doc="iEta or iX of seed crystal. iEta is barrel-only, iX is endcap-only. iEta runs from -85 to +85, with no crystal at iEta=0. iX runs from 1 to 100."),
247  seediPhiOriY = Var("userInt('seediPhiOriY')",int,doc="iPhi or iY of seed crystal. iPhi is barrel-only, iY is endcap-only. iPhi runs from 1 to 360. iY runs from 1 to 100."),
248  # position of photon is best approximated by position of seed cluster, not the SC centroid
249  x_calo = Var("superCluster().seed().position().x()",float,doc="photon supercluster position on calorimeter, x coordinate (cm)",precision=10),
250  y_calo = Var("superCluster().seed().position().y()",float,doc="photon supercluster position on calorimeter, y coordinate (cm)",precision=10),
251  z_calo = Var("superCluster().seed().position().z()",float,doc="photon supercluster position on calorimeter, z coordinate (cm)",precision=10),
252  # ES variables
253  esEffSigmaRR = Var("full5x5_showerShapeVariables().effSigmaRR()", float, doc="preshower sigmaRR"),
254  esEnergyOverRawE = Var("superCluster().preshowerEnergy()/superCluster().rawEnergy()", float, doc="ratio of preshower energy to raw supercluster energy"),
255  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),
256  )
257 )
258 
259 # switch default IDs back to Fall17V2 in Run2, remove Winter22V1 and quadratic iso
260 run2_egamma.toModify(photonTable.variables,
261  cutBased = photonTable.variables.cutBased_Fall17V2,
262  cutBased_Fall17V2 = None,
263  vidNestedWPBitmap = photonTable.variables.vidNestedWPBitmap_Fall17V2,
264  vidNestedWPBitmap_Fall17V2 = None,
265  mvaID = photonTable.variables.mvaID_Fall17V2,
266  mvaID_Fall17V2 = None,
267  mvaID_WP90 = photonTable.variables.mvaID_Fall17V2_WP90,
268  mvaID_Fall17V2_WP90 = None,
269  mvaID_WP80 = photonTable.variables.mvaID_Fall17V2_WP80,
270  mvaID_Fall17V2_WP80 = None,
271  pfRelIso03_chg = photonTable.variables.pfRelIso03_chg_Fall17V2,
272  pfRelIso03_chg_Fall17V2 = None,
273  pfRelIso03_all = photonTable.variables.pfRelIso03_all_Fall17V2,
274  pfRelIso03_all_Fall17V2 = None,
275  pfRelIso03_chg_quadratic=None,
276  pfRelIso03_all_quadratic=None,
277  hoe_PUcorr=None)
278 
279 #these eras need to make the energy correction, hence the "New"
280 run2_egamma.toModify(
281  photonTable.variables,
282  pt = Var("pt*userFloat('ecalEnergyPostCorrNew')/userFloat('ecalEnergyPreCorrNew')", float, precision=-1, doc="p_{T}"),
283  energyErr = Var("userFloat('ecalEnergyErrPostCorrNew')",float,doc="energy error of the cluster from regression",precision=6),
284  eCorr = Var("userFloat('ecalEnergyPostCorrNew')/userFloat('ecalEnergyPreCorrNew')",float,doc="ratio of the calibrated energy/miniaod energy"),
285  hoe = Var("hadTowOverEm()",float,doc="H over E (Run2)",precision=8),
286 )
287 
288 photonsMCMatchForTable = cms.EDProducer("MCMatcher", # cut on deltaR, deltaPt/Pt; pick best by deltaR
289  src = photonTable.src, # final reco collection
290  matched = cms.InputTag("finalGenParticles"), # final mc-truth particle collection
291  mcPdgId = cms.vint32(11,22), # one or more PDG ID (11 = el, 22 = pho); absolute values (see below)
292  checkCharge = cms.bool(False), # True = require RECO and MC objects to have the same charge
293  mcStatus = cms.vint32(1), # PYTHIA status code (1 = stable, 2 = shower, 3 = hard scattering)
294  maxDeltaR = cms.double(0.3), # Minimum deltaR for the match
295  maxDPtRel = cms.double(0.5), # Minimum deltaPt/Pt for the match
296  resolveAmbiguities = cms.bool(True), # Forbid two RECO objects to match to the same GEN object
297  resolveByMatchQuality = cms.bool(True), # False = just match input in order; True = pick lowest deltaR pair first
298 )
299 
300 photonMCTable = cms.EDProducer("CandMCMatchTableProducer",
301  src = photonTable.src,
302  mcMap = cms.InputTag("photonsMCMatchForTable"),
303  objName = photonTable.name,
304  objType = photonTable.name, #cms.string("Photon"),
305  branchName = cms.string("genPart"),
306  docString = cms.string("MC matching to status==1 photons or electrons"),
307 )
308 
309 #adding 4 most imp scale & smearing variables to table
310 run2_egamma.toModify(
311  photonTable.variables,
312  dEscaleUp=Var("userFloat('ecalEnergyPostCorrNew') - userFloat('energyScaleUpNew')", float, doc="ecal energy scale shifted 1 sigma up (adding gain/stat/syst in quadrature)", precision=8),
313  dEscaleDown=Var("userFloat('ecalEnergyPostCorrNew') - userFloat('energyScaleDownNew')", float, doc="ecal energy scale shifted 1 sigma down (adding gain/stat/syst in quadrature)", precision=8),
314  dEsigmaUp=Var("userFloat('ecalEnergyPostCorrNew') - userFloat('energySigmaUpNew')", float, doc="ecal energy smearing value shifted 1 sigma up", precision=8),
315  dEsigmaDown=Var("userFloat('ecalEnergyPostCorrNew') - userFloat('energySigmaDownNew')", float, doc="ecal energy smearing value shifted 1 sigma up", precision=8),
316 )
317 
318 
319 photonTask = cms.Task(bitmapVIDForPho, bitmapVIDForPhoRun2, isoForPho, hOverEForPho, isoForPhoFall17V2, seedGainPho, seedLocationPho, slimmedPhotonsWithUserData, finalPhotons)
320 
321 photonTablesTask = cms.Task(photonTable)
322 photonMCTask = cms.Task(photonsMCMatchForTable, photonMCTable)
323 
324 _photonTask_Run2 = photonTask.copy()
325 _photonTask_Run2.remove(bitmapVIDForPho)
326 _photonTask_Run2.remove(isoForPho)
327 _photonTask_Run2.remove(hOverEForPho)
328 _photonTask_Run2.add(calibratedPatPhotonsNano)
329 run2_egamma.toReplaceWith(photonTask, _photonTask_Run2)
constexpr int32_t ceil(float num)
def Var(expr, valtype, doc=None, precision=-1)
Definition: common_cff.py:16
static std::string join(char **cmd)
Definition: RemoteFile.cc:19
def make_bitmapVID_docstring(id_modules_working_points_pset)
Definition: photons_cff.py:42