CMS 3D CMS Logo

Functions | Variables
nano_cff Namespace Reference

Functions

def nanoAOD_activateVID (process)
 
def nanoAOD_addDeepInfo (process, addDeepBTag, addDeepFlavour)
 
def nanoAOD_addDeepInfoAK8 (process, addDeepBTag, addDeepBoostedJet, addDeepDoubleX, addDeepDoubleXV2, addParticleNet, jecPayload)
 
def nanoAOD_addDeepMET (process, addDeepMETProducer, ResponseTune_Graph)
 
def nanoAOD_addTauIds (process)
 
def nanoAOD_customizeCommon (process)
 
def nanoAOD_customizeData (process)
 
def nanoAOD_customizeMC (process)
 
def nanoAOD_recalibrateMETs (process, isData)
 
def nanoAOD_runMETfixEE2017 (process, isData)
 
def nanoWmassGenCustomize (process)
 increasing the precision of selected GenParticles. More...
 

Variables

 _102x_sequence
 
 _80x_sequence
 Era dependent customization. More...
 
 bool
 
 btagSFdir
 
 btagWeightTable
 
 cut
 
 discNames
 
 discShortNames
 
 doc
 
 electronName
 
 electrons
 
 electronSel
 
 extraFlagsTable
 
 Flag_ecalBadCalibFilterV2
 
 jetName
 
 jets
 
 jetSel
 
 l1bits
 
 legacyL1
 
 lhcInfoTable
 
 lheInfo
 
 lheInfoTable
 
 linkedObjects
 
 measurementTypesB
 
 measurementTypesC
 
 measurementTypesUDSG
 
 muonName
 
 muons
 
 muonSel
 
 name
 
 nanoMetadata
 
 nanoSequence
 
 nanoSequenceCommon
 
 nanoSequenceFS
 
 nanoSequenceMC
 
 nanoSequenceOnlyData
 
 nanoSequenceOnlyFullSim
 
 operatingPoints
 
 photonName
 
 photons
 
 photonSel
 
 precision
 
 simpleCleanerTable
 
 src
 
 src_ext
 
 storeLHEParticles
 
 storeUnprefireableBit
 
 strings
 
 sysTypes
 
 tag
 
 tauName
 
 taus
 
 tauSel
 
 variables
 
 weightFiles
 

Function Documentation

◆ nanoAOD_activateVID()

def nano_cff.nanoAOD_activateVID (   process)

Definition at line 251 of file nano_cff.py.

251 def nanoAOD_activateVID(process):
252  switchOnVIDElectronIdProducer(process,DataFormat.MiniAOD)
253  for modname in electron_id_modules_WorkingPoints_nanoAOD.modules:
254  setupAllVIDIdsInModule(process,modname,setupVIDElectronSelection)
255  process.electronSequence.insert(process.electronSequence.index(process.bitmapVIDForEle),process.egmGsfElectronIDSequence)
256  for modifier in run2_miniAOD_80XLegacy,run2_nanoAOD_94XMiniAODv1,run2_nanoAOD_94XMiniAODv2,run2_nanoAOD_94X2016,run2_nanoAOD_102Xv1,run2_nanoAOD_106Xv1:
257  modifier.toModify(process.electronMVAValueMapProducer, src = "slimmedElectronsUpdated")
258  modifier.toModify(process.egmGsfElectronIDs, physicsObjectSrc = "slimmedElectronsUpdated")
259 
260  run2_nanoAOD_106Xv2.toModify(process.electronMVAValueMapProducer, src = "slimmedElectrons")
261  run2_nanoAOD_106Xv2.toModify(process.egmGsfElectronIDs, physicsObjectSrc = "slimmedElectrons")
262 
263  switchOnVIDPhotonIdProducer(process,DataFormat.MiniAOD) # do not call this to avoid resetting photon IDs in VID, if called before inside makePuppiesFromMiniAOD
264  for modname in photon_id_modules_WorkingPoints_nanoAOD.modules:
265  setupAllVIDIdsInModule(process,modname,setupVIDPhotonSelection)
266  process.photonSequence.insert(process.photonSequence.index(bitmapVIDForPho),process.egmPhotonIDSequence)
267  for modifier in run2_miniAOD_80XLegacy,run2_nanoAOD_94XMiniAODv1,run2_nanoAOD_94XMiniAODv2,run2_nanoAOD_94X2016,run2_nanoAOD_102Xv1:
268  modifier.toModify(process.photonMVAValueMapProducer, src = "slimmedPhotonsTo106X")
269  modifier.toModify(process.egmPhotonIDs, physicsObjectSrc = "slimmedPhotonsTo106X")
270  return process
271 

References vid_id_tools.setupAllVIDIdsInModule(), vid_id_tools.switchOnVIDElectronIdProducer(), and vid_id_tools.switchOnVIDPhotonIdProducer().

Referenced by nanoAOD_customizeCommon().

◆ nanoAOD_addDeepInfo()

def nano_cff.nanoAOD_addDeepInfo (   process,
  addDeepBTag,
  addDeepFlavour 
)

Definition at line 145 of file nano_cff.py.

145 def nanoAOD_addDeepInfo(process,addDeepBTag,addDeepFlavour):
146  _btagDiscriminators=[]
147  if addDeepBTag:
148  print("Updating process to run DeepCSV btag")
149  _btagDiscriminators += ['pfDeepCSVJetTags:probb','pfDeepCSVJetTags:probbb','pfDeepCSVJetTags:probc']
150  if addDeepFlavour:
151  print("Updating process to run DeepFlavour btag")
152  _btagDiscriminators += ['pfDeepFlavourJetTags:probb','pfDeepFlavourJetTags:probbb','pfDeepFlavourJetTags:problepb','pfDeepFlavourJetTags:probc']
153  if len(_btagDiscriminators)==0: return process
154  print("Will recalculate the following discriminators: "+", ".join(_btagDiscriminators))
155  updateJetCollection(
156  process,
157  jetSource = cms.InputTag('slimmedJets'),
158  jetCorrections = ('AK4PFchs', cms.vstring(['L1FastJet', 'L2Relative', 'L3Absolute','L2L3Residual']), 'None'),
159  btagDiscriminators = _btagDiscriminators,
160  postfix = 'WithDeepInfo',
161  )
162  process.load("Configuration.StandardSequences.MagneticField_cff")
163  process.jetCorrFactorsNano.src="selectedUpdatedPatJetsWithDeepInfo"
164  process.updatedJets.jetSource="selectedUpdatedPatJetsWithDeepInfo"
165  return process
166 

References join(), and print().

Referenced by nanoAOD_customizeCommon().

◆ nanoAOD_addDeepInfoAK8()

def nano_cff.nanoAOD_addDeepInfoAK8 (   process,
  addDeepBTag,
  addDeepBoostedJet,
  addDeepDoubleX,
  addDeepDoubleXV2,
  addParticleNet,
  jecPayload 
)

Definition at line 272 of file nano_cff.py.

272 def nanoAOD_addDeepInfoAK8(process, addDeepBTag, addDeepBoostedJet, addDeepDoubleX, addDeepDoubleXV2, addParticleNet, jecPayload):
273  _btagDiscriminators=[]
274  if addDeepBTag:
275  print("Updating process to run DeepCSV btag to AK8 jets")
276  _btagDiscriminators += ['pfDeepCSVJetTags:probb','pfDeepCSVJetTags:probbb']
277  if addDeepBoostedJet:
278  print("Updating process to run DeepBoostedJet on datasets before 103X")
279  from RecoBTag.ONNXRuntime.pfDeepBoostedJet_cff import _pfDeepBoostedJetTagsAll as pfDeepBoostedJetTagsAll
280  _btagDiscriminators += pfDeepBoostedJetTagsAll
281  if addParticleNet:
282  print("Updating process to run ParticleNet before it's included in MiniAOD")
283  from RecoBTag.ONNXRuntime.pfParticleNet_cff import _pfParticleNetJetTagsAll as pfParticleNetJetTagsAll
284  _btagDiscriminators += pfParticleNetJetTagsAll
285  if addDeepDoubleX:
286  print("Updating process to run DeepDoubleX on datasets before 104X")
287  _btagDiscriminators += ['pfDeepDoubleBvLJetTags:probHbb', \
288  'pfDeepDoubleCvLJetTags:probHcc', \
289  'pfDeepDoubleCvBJetTags:probHcc', \
290  'pfMassIndependentDeepDoubleBvLJetTags:probHbb', 'pfMassIndependentDeepDoubleCvLJetTags:probHcc', 'pfMassIndependentDeepDoubleCvBJetTags:probHcc']
291  if addDeepDoubleXV2:
292  print("Updating process to run DeepDoubleXv2 on datasets before 11X")
293  _btagDiscriminators += [
294  'pfMassIndependentDeepDoubleBvLV2JetTags:probHbb',
295  'pfMassIndependentDeepDoubleCvLV2JetTags:probHcc',
296  'pfMassIndependentDeepDoubleCvBV2JetTags:probHcc'
297  ]
298  if len(_btagDiscriminators)==0: return process
299  print("Will recalculate the following discriminators on AK8 jets: "+", ".join(_btagDiscriminators))
300  updateJetCollection(
301  process,
302  jetSource = cms.InputTag('slimmedJetsAK8'),
303  pvSource = cms.InputTag('offlineSlimmedPrimaryVertices'),
304  svSource = cms.InputTag('slimmedSecondaryVertices'),
305  rParam = 0.8,
306  jetCorrections = (jecPayload.value(), cms.vstring(['L1FastJet', 'L2Relative', 'L3Absolute', 'L2L3Residual']), 'None'),
307  btagDiscriminators = _btagDiscriminators,
308  postfix='AK8WithDeepInfo',
309  printWarning = False
310  )
311  process.jetCorrFactorsAK8.src="selectedUpdatedPatJetsAK8WithDeepInfo"
312  process.updatedJetsAK8.jetSource="selectedUpdatedPatJetsAK8WithDeepInfo"
313  return process
314 

References join(), and print().

Referenced by nanoAOD_customizeCommon().

◆ nanoAOD_addDeepMET()

def nano_cff.nanoAOD_addDeepMET (   process,
  addDeepMETProducer,
  ResponseTune_Graph 
)

Definition at line 167 of file nano_cff.py.

167 def nanoAOD_addDeepMET(process, addDeepMETProducer, ResponseTune_Graph):
168  if addDeepMETProducer:
169  # produce DeepMET on the fly if it is not in MiniAOD
170  print("add DeepMET Producers")
171  process.load('RecoMET.METPUSubtraction.deepMETProducer_cfi')
172  process.deepMETsResolutionTune = process.deepMETProducer.clone()
173  process.deepMETsResponseTune = process.deepMETProducer.clone()
174  #process.deepMETsResponseTune.graph_path = 'RecoMET/METPUSubtraction/data/deepmet/deepmet_resp_v1_2018.pb'
175  process.deepMETsResponseTune.graph_path = ResponseTune_Graph.value()
176  process.metTables += process.deepMetTables
177  return process
178 

References print().

Referenced by nanoAOD_recalibrateMETs().

◆ nanoAOD_addTauIds()

def nano_cff.nanoAOD_addTauIds (   process)

Definition at line 135 of file nano_cff.py.

135 def nanoAOD_addTauIds(process):
136  updatedTauName = "slimmedTausUpdated"
137  tauIdEmbedder = tauIdConfig.TauIDEmbedder(process, debug = False, updatedTauName = updatedTauName,
138  toKeep = [ "deepTau2017v2p1" ])
139  tauIdEmbedder.runTauID()
140  process.patTauMVAIDsSeq.insert(process.patTauMVAIDsSeq.index(getattr(process, updatedTauName)),
141  process.rerunMvaIsolationSequence)
142  return process
143 

Referenced by nanoAOD_customizeCommon().

◆ nanoAOD_customizeCommon()

def nano_cff.nanoAOD_customizeCommon (   process)

Definition at line 323 of file nano_cff.py.

323 def nanoAOD_customizeCommon(process):
324  makePuppiesFromMiniAOD(process,True)
325  process.puppiNoLep.useExistingWeights = True
326  process.puppi.useExistingWeights = True
327  run2_nanoAOD_106Xv1.toModify(process.puppiNoLep, useExistingWeights = False)
328  run2_nanoAOD_106Xv1.toModify(process.puppi, useExistingWeights = False)
329  process = nanoAOD_activateVID(process)
330  nanoAOD_addDeepInfo_switch = cms.PSet(
331  nanoAOD_addDeepBTag_switch = cms.untracked.bool(False),
332  nanoAOD_addDeepFlavourTag_switch = cms.untracked.bool(False),
333  )
334  run2_miniAOD_80XLegacy.toModify(nanoAOD_addDeepInfo_switch, nanoAOD_addDeepBTag_switch = cms.untracked.bool(True))
335  for modifier in run2_miniAOD_80XLegacy, run2_nanoAOD_94X2016, run2_nanoAOD_94XMiniAODv1, run2_nanoAOD_94XMiniAODv2:
336  modifier.toModify(nanoAOD_addDeepInfo_switch, nanoAOD_addDeepFlavourTag_switch = cms.untracked.bool(True))
337  process = nanoAOD_addDeepInfo(process,
338  addDeepBTag=nanoAOD_addDeepInfo_switch.nanoAOD_addDeepBTag_switch,
339  addDeepFlavour=nanoAOD_addDeepInfo_switch.nanoAOD_addDeepFlavourTag_switch)
340  nanoAOD_addDeepInfoAK8_switch = cms.PSet(
341  nanoAOD_addDeepBTag_switch = cms.untracked.bool(False),
342  nanoAOD_addDeepBoostedJet_switch = cms.untracked.bool(False),
343  nanoAOD_addDeepDoubleX_switch = cms.untracked.bool(False),
344  nanoAOD_addDeepDoubleXV2_switch = cms.untracked.bool(False),
345  nanoAOD_addParticleNet_switch = cms.untracked.bool(False),
346  jecPayload = cms.untracked.string('AK8PFPuppi')
347  )
348  # deepAK8 should not run on 80X, that contains ak8PFJetsCHS jets
349  run2_miniAOD_80XLegacy.toModify(nanoAOD_addDeepInfoAK8_switch,
350  nanoAOD_addDeepBTag_switch = True,
351  jecPayload = 'AK8PFchs')
352  # for 94X and 102X samples: needs to run DeepAK8, DeepDoubleX and ParticleNet
353  (run2_nanoAOD_94X2016 | run2_nanoAOD_94XMiniAODv1 | run2_nanoAOD_94XMiniAODv2 | run2_nanoAOD_102Xv1).toModify(
354  nanoAOD_addDeepInfoAK8_switch,
355  nanoAOD_addDeepBoostedJet_switch = True,
356  nanoAOD_addDeepDoubleX_switch = True,
357  nanoAOD_addDeepDoubleXV2_switch = True,
358  nanoAOD_addParticleNet_switch = True,
359  )
360  # for 106Xv1: only needs to run ParticleNet and DDXV2; DeepAK8, DeepDoubleX are already in MiniAOD
361  run2_nanoAOD_106Xv1.toModify(
362  nanoAOD_addDeepInfoAK8_switch,
363  nanoAOD_addDeepDoubleXV2_switch = True,
364  nanoAOD_addParticleNet_switch = True,
365  )
366  process = nanoAOD_addDeepInfoAK8(process,
367  addDeepBTag=nanoAOD_addDeepInfoAK8_switch.nanoAOD_addDeepBTag_switch,
368  addDeepBoostedJet=nanoAOD_addDeepInfoAK8_switch.nanoAOD_addDeepBoostedJet_switch,
369  addDeepDoubleX=nanoAOD_addDeepInfoAK8_switch.nanoAOD_addDeepDoubleX_switch,
370  addDeepDoubleXV2=nanoAOD_addDeepInfoAK8_switch.nanoAOD_addDeepDoubleXV2_switch,
371  addParticleNet=nanoAOD_addDeepInfoAK8_switch.nanoAOD_addParticleNet_switch,
372  jecPayload=nanoAOD_addDeepInfoAK8_switch.jecPayload)
373  (run2_nanoAOD_94XMiniAODv1 | run2_nanoAOD_94X2016 | run2_nanoAOD_94XMiniAODv2 | run2_nanoAOD_102Xv1 | run2_nanoAOD_106Xv1).toModify(process, lambda p : nanoAOD_addTauIds(p))
374  return process
375 

References puppiForMET_cff.makePuppiesFromMiniAOD(), nanoAOD_activateVID(), nanoAOD_addDeepInfo(), nanoAOD_addDeepInfoAK8(), and nanoAOD_addTauIds().

Referenced by nanoAOD_customizeData(), and nanoAOD_customizeMC().

◆ nanoAOD_customizeData()

def nano_cff.nanoAOD_customizeData (   process)

Definition at line 376 of file nano_cff.py.

376 def nanoAOD_customizeData(process):
377  process = nanoAOD_customizeCommon(process)
378  process = nanoAOD_recalibrateMETs(process,isData=True)
379  for modifier in run2_nanoAOD_94XMiniAODv1, run2_nanoAOD_94XMiniAODv2:
380  modifier.toModify(process, lambda p: nanoAOD_runMETfixEE2017(p,isData=True))
381  return process
382 

References nanoAOD_customizeCommon(), nanoAOD_recalibrateMETs(), and nanoAOD_runMETfixEE2017().

◆ nanoAOD_customizeMC()

def nano_cff.nanoAOD_customizeMC (   process)

Definition at line 383 of file nano_cff.py.

383 def nanoAOD_customizeMC(process):
384  process = nanoAOD_customizeCommon(process)
385  process = nanoAOD_recalibrateMETs(process,isData=False)
386  for modifier in run2_nanoAOD_94XMiniAODv1, run2_nanoAOD_94XMiniAODv2:
387  modifier.toModify(process, lambda p: nanoAOD_runMETfixEE2017(p,isData=False))
388  return process
389 

References nanoAOD_customizeCommon(), nanoAOD_recalibrateMETs(), and nanoAOD_runMETfixEE2017().

◆ nanoAOD_recalibrateMETs()

def nano_cff.nanoAOD_recalibrateMETs (   process,
  isData 
)

Definition at line 181 of file nano_cff.py.

181 def nanoAOD_recalibrateMETs(process,isData):
182  # add DeepMETs
183  nanoAOD_DeepMET_switch = cms.PSet(
184  nanoAOD_addDeepMET_switch = cms.untracked.bool(True), # decide if DeeMET should be included in Nano
185  nanoAOD_produceDeepMET_switch = cms.untracked.bool(False), # decide if DeepMET should be computed on the fly
186  ResponseTune_Graph = cms.untracked.string('RecoMET/METPUSubtraction/data/deepmet/deepmet_resp_v1_2018.pb')
187  )
188  for modifier in run2_miniAOD_80XLegacy, run2_nanoAOD_94X2016, run2_nanoAOD_94XMiniAODv1, run2_nanoAOD_94XMiniAODv2, run2_nanoAOD_102Xv1, run2_nanoAOD_106Xv1:
189  # compute DeepMETs in these eras (before 111X)
190  modifier.toModify(nanoAOD_DeepMET_switch, nanoAOD_produceDeepMET_switch = cms.untracked.bool(True))
191  for modifier in run2_miniAOD_80XLegacy, run2_nanoAOD_94X2016:
192  modifier.toModify(nanoAOD_DeepMET_switch, ResponseTune_Graph=cms.untracked.string("RecoMET/METPUSubtraction/data/deepmet/deepmet_resp_v1_2016.pb"))
193  if nanoAOD_DeepMET_switch.nanoAOD_addDeepMET_switch:
194  process = nanoAOD_addDeepMET(process,
195  addDeepMETProducer=nanoAOD_DeepMET_switch.nanoAOD_produceDeepMET_switch,
196  ResponseTune_Graph=nanoAOD_DeepMET_switch.ResponseTune_Graph)
197 
198  # if included in Nano, and not computed in the fly, then it should be extracted from minAOD
199  extractDeepMETs = nanoAOD_DeepMET_switch.nanoAOD_addDeepMET_switch and not nanoAOD_DeepMET_switch.nanoAOD_produceDeepMET_switch
200 
201  runMetCorAndUncFromMiniAOD(process,isData=isData, extractDeepMETs=extractDeepMETs)
202  process.nanoSequenceCommon.insert(process.nanoSequenceCommon.index(process.jetSequence),cms.Sequence(process.fullPatMetSequence))
203  process.basicJetsForMetForT1METNano = process.basicJetsForMet.clone(
204  src = process.updatedJetsWithUserData.src,
205  skipEM = False,
206  type1JetPtThreshold = 0.0,
207  calcMuonSubtrRawPtAsValueMap = cms.bool(True),
208  )
209  process.jetSequence.insert(process.jetSequence.index(process.updatedJetsWithUserData),cms.Sequence(process.basicJetsForMetForT1METNano))
210  process.updatedJetsWithUserData.userFloats.muonSubtrRawPt = cms.InputTag("basicJetsForMetForT1METNano:MuonSubtrRawPt")
211  process.corrT1METJetTable.src = process.finalJets.src
212  process.corrT1METJetTable.cut = "pt<15 && abs(eta)<9.9"
213  for table in process.jetTable, process.corrT1METJetTable:
214  table.variables.muonSubtrFactor = Var("1-userFloat('muonSubtrRawPt')/(pt()*jecFactor('Uncorrected'))",float,doc="1-(muon-subtracted raw pt)/(raw pt)",precision=6)
215  process.metTables += process.corrT1METJetTable
216 # makePuppiesFromMiniAOD(process,True) # call this before in the global customizer otherwise it would reset photon IDs in VID
217  nanoAOD_PuppiV15_switch = cms.PSet(
218  recoMetFromPFCs = cms.untracked.bool(False),
219  reclusterJets = cms.untracked.bool(False),
220  )
221  run2_nanoAOD_106Xv1.toModify(nanoAOD_PuppiV15_switch,recoMetFromPFCs=True,reclusterJets=True)
222  if nanoAOD_PuppiV15_switch.reclusterJets:
223  from RecoJets.JetProducers.ak4PFJets_cfi import ak4PFJets
224  from PhysicsTools.PatAlgos.tools.helpers import getPatAlgosToolsTask, addToProcessAndTask
225  task = getPatAlgosToolsTask(process)
226  addToProcessAndTask('ak4PuppiJets', ak4PFJets.clone (src = 'puppi', doAreaFastjet = True, jetPtMin = 10.), process, task)
227  from PhysicsTools.PatAlgos.tools.jetTools import addJetCollection
228  addJetCollection(process,
229  labelName = 'Puppi',
230  jetSource = cms.InputTag('ak4PuppiJets'),
231  algo = 'AK', rParam=0.4,
232  genJetCollection=cms.InputTag('slimmedGenJets'),
233  jetCorrections = ('AK4PFPuppi', ['L1FastJet', 'L2Relative', 'L3Absolute','L2L3Residual'], 'None'),
234  pfCandidates = cms.InputTag('packedPFCandidates'),
235  pvSource = cms.InputTag('offlineSlimmedPrimaryVertices'),
236  svSource = cms.InputTag('slimmedSecondaryVertices'),
237  muSource =cms.InputTag( 'slimmedMuons'),
238  elSource = cms.InputTag('slimmedElectrons'),
239  genParticles= cms.InputTag('prunedGenParticles'),
240  getJetMCFlavour= False
241  )
242 
243  process.patJetsPuppi.addGenPartonMatch = cms.bool(False)
244  process.patJetsPuppi.addGenJetMatch = cms.bool(False)
245 
246  runMetCorAndUncFromMiniAOD(process,isData=isData,metType="Puppi",postfix="Puppi",jetFlavor="AK4PFPuppi", recoMetFromPFCs=bool(nanoAOD_PuppiV15_switch.recoMetFromPFCs), reclusterJets=bool(nanoAOD_PuppiV15_switch.reclusterJets))
247  process.nanoSequenceCommon.insert(process.nanoSequenceCommon.index(process.jetSequence),cms.Sequence(process.puppiMETSequence+process.fullPatMetSequencePuppi))
248  return process
249 

References helpers.addToProcessAndTask(), bool, helpers.getPatAlgosToolsTask(), nanoAOD_addDeepMET(), runMETCorrectionsAndUncertainties.runMetCorAndUncFromMiniAOD(), and common_cff.Var().

Referenced by nanoAOD_customizeData(), and nanoAOD_customizeMC().

◆ nanoAOD_runMETfixEE2017()

def nano_cff.nanoAOD_runMETfixEE2017 (   process,
  isData 
)

Definition at line 316 of file nano_cff.py.

316 def nanoAOD_runMETfixEE2017(process,isData):
317  runMetCorAndUncFromMiniAOD(process,isData=isData,
318  fixEE2017 = True,
319  fixEE2017Params = {'userawPt': True, 'ptThreshold':50.0, 'minEtaThreshold':2.65, 'maxEtaThreshold': 3.139},
320  postfix = "FixEE2017")
321  process.nanoSequenceCommon.insert(process.nanoSequenceCommon.index(jetSequence),process.fullPatMetSequenceFixEE2017)
322 

References runMETCorrectionsAndUncertainties.runMetCorAndUncFromMiniAOD().

Referenced by nanoAOD_customizeData(), and nanoAOD_customizeMC().

◆ nanoWmassGenCustomize()

def nano_cff.nanoWmassGenCustomize (   process)

increasing the precision of selected GenParticles.


Definition at line 391 of file nano_cff.py.

391 def nanoWmassGenCustomize(process):
392  pdgSelection="?(abs(pdgId) == 11|| abs(pdgId)==13 || abs(pdgId)==15 ||abs(pdgId)== 12 || abs(pdgId)== 14 || abs(pdgId)== 16|| abs(pdgId)== 24|| pdgId== 23)"
393  # Keep precision same as default RECO for selected particles
394  ptPrecision="{}?{}:{}".format(pdgSelection, CandVars.pt.precision.value(),genParticleTable.variables.pt.precision.value())
395  process.genParticleTable.variables.pt.precision=cms.string(ptPrecision)
396  phiPrecision="{} ? {} : {}".format(pdgSelection, CandVars.phi.precision.value(), genParticleTable.variables.phi.precision.value())
397  process.genParticleTable.variables.phi.precision=cms.string(phiPrecision)
398  etaPrecision="{} ? {} : {}".format(pdgSelection, CandVars.eta.precision.value(), genParticleTable.variables.eta.precision.value())
399  process.genParticleTable.variables.eta.precision=cms.string(etaPrecision)
400  return process
401 

Variable Documentation

◆ _102x_sequence

nano_cff._102x_sequence
private

Definition at line 413 of file nano_cff.py.

◆ _80x_sequence

nano_cff._80x_sequence
private

Era dependent customization.

Definition at line 403 of file nano_cff.py.

◆ bool

nano_cff.bool

Definition at line 131 of file nano_cff.py.

Referenced by nanoAOD_recalibrateMETs().

◆ btagSFdir

nano_cff.btagSFdir

Definition at line 56 of file nano_cff.py.

◆ btagWeightTable

nano_cff.btagWeightTable

Definition at line 58 of file nano_cff.py.

◆ cut

nano_cff.cut

Definition at line 60 of file nano_cff.py.

◆ discNames

nano_cff.discNames

Definition at line 61 of file nano_cff.py.

◆ discShortNames

nano_cff.discShortNames

Definition at line 66 of file nano_cff.py.

◆ doc

nano_cff.doc

Definition at line 41 of file nano_cff.py.

◆ electronName

nano_cff.electronName

Definition at line 52 of file nano_cff.py.

◆ electrons

nano_cff.electrons

Definition at line 34 of file nano_cff.py.

◆ electronSel

nano_cff.electronSel

Definition at line 49 of file nano_cff.py.

◆ extraFlagsTable

nano_cff.extraFlagsTable

Definition at line 130 of file nano_cff.py.

◆ Flag_ecalBadCalibFilterV2

nano_cff.Flag_ecalBadCalibFilterV2

Definition at line 131 of file nano_cff.py.

◆ jetName

nano_cff.jetName

Definition at line 52 of file nano_cff.py.

◆ jets

nano_cff.jets

Definition at line 32 of file nano_cff.py.

◆ jetSel

nano_cff.jetSel

Definition at line 47 of file nano_cff.py.

◆ l1bits

nano_cff.l1bits

Definition at line 103 of file nano_cff.py.

◆ legacyL1

nano_cff.legacyL1

Definition at line 103 of file nano_cff.py.

◆ lhcInfoTable

nano_cff.lhcInfoTable

Definition at line 93 of file nano_cff.py.

◆ lheInfo

nano_cff.lheInfo

Definition at line 98 of file nano_cff.py.

◆ lheInfoTable

nano_cff.lheInfoTable

Definition at line 97 of file nano_cff.py.

◆ linkedObjects

nano_cff.linkedObjects

Definition at line 31 of file nano_cff.py.

◆ measurementTypesB

nano_cff.measurementTypesB

Definition at line 77 of file nano_cff.py.

◆ measurementTypesC

nano_cff.measurementTypesC

Definition at line 78 of file nano_cff.py.

◆ measurementTypesUDSG

nano_cff.measurementTypesUDSG

Definition at line 79 of file nano_cff.py.

◆ muonName

nano_cff.muonName

Definition at line 52 of file nano_cff.py.

◆ muons

nano_cff.muons

Definition at line 33 of file nano_cff.py.

◆ muonSel

nano_cff.muonSel

Definition at line 48 of file nano_cff.py.

◆ name

nano_cff.name

Definition at line 40 of file nano_cff.py.

◆ nanoMetadata

nano_cff.nanoMetadata

Definition at line 25 of file nano_cff.py.

◆ nanoSequence

nano_cff.nanoSequence

Definition at line 116 of file nano_cff.py.

◆ nanoSequenceCommon

nano_cff.nanoSequenceCommon

Definition at line 107 of file nano_cff.py.

◆ nanoSequenceFS

nano_cff.nanoSequenceFS

Definition at line 118 of file nano_cff.py.

◆ nanoSequenceMC

nano_cff.nanoSequenceMC

Definition at line 125 of file nano_cff.py.

◆ nanoSequenceOnlyData

nano_cff.nanoSequenceOnlyData

Definition at line 114 of file nano_cff.py.

◆ nanoSequenceOnlyFullSim

nano_cff.nanoSequenceOnlyFullSim

Definition at line 113 of file nano_cff.py.

◆ operatingPoints

nano_cff.operatingPoints

Definition at line 76 of file nano_cff.py.

◆ photonName

nano_cff.photonName

Definition at line 53 of file nano_cff.py.

◆ photons

nano_cff.photons

Definition at line 36 of file nano_cff.py.

◆ photonSel

nano_cff.photonSel

Definition at line 51 of file nano_cff.py.

◆ precision

nano_cff.precision

Definition at line 94 of file nano_cff.py.

◆ simpleCleanerTable

nano_cff.simpleCleanerTable

Definition at line 39 of file nano_cff.py.

◆ src

nano_cff.src

Definition at line 59 of file nano_cff.py.

◆ src_ext

nano_cff.src_ext

Definition at line 104 of file nano_cff.py.

◆ storeLHEParticles

nano_cff.storeLHEParticles

Definition at line 100 of file nano_cff.py.

◆ storeUnprefireableBit

nano_cff.storeUnprefireableBit

Definition at line 104 of file nano_cff.py.

◆ strings

nano_cff.strings

◆ sysTypes

nano_cff.sysTypes

Definition at line 80 of file nano_cff.py.

◆ tag

nano_cff.tag

Definition at line 27 of file nano_cff.py.

◆ tauName

nano_cff.tauName

Definition at line 53 of file nano_cff.py.

◆ taus

nano_cff.taus

Definition at line 35 of file nano_cff.py.

◆ tauSel

nano_cff.tauSel

Definition at line 50 of file nano_cff.py.

◆ variables

nano_cff.variables

Definition at line 130 of file nano_cff.py.

◆ weightFiles

nano_cff.weightFiles

Definition at line 71 of file nano_cff.py.

nano_cff.nanoAOD_customizeData
def nanoAOD_customizeData(process)
Definition: nano_cff.py:376
nano_cff.nanoAOD_addDeepInfoAK8
def nanoAOD_addDeepInfoAK8(process, addDeepBTag, addDeepBoostedJet, addDeepDoubleX, addDeepDoubleXV2, addParticleNet, jecPayload)
Definition: nano_cff.py:272
runMETCorrectionsAndUncertainties.runMetCorAndUncFromMiniAOD
def runMetCorAndUncFromMiniAOD(process, metType="PF", jetCollUnskimmed="slimmedJets", photonColl="slimmedPhotons", electronColl="slimmedElectrons", muonColl="slimmedMuons", tauColl="slimmedTaus", pfCandColl="packedPFCandidates", jetFlavor="AK4PFchs", jetCleaning="LepClean", isData=False, manualJetConfig=False, reclusterJets=None, jetSelection="pt>15 && abs(eta)<9.9", recoMetFromPFCs=None, jetCorLabelL3="ak4PFCHSL1FastL2L3Corrector", jetCorLabelRes="ak4PFCHSL1FastL2L3ResidualCorrector", CHS=False, reapplyJEC=True, jecUncFile="", computeMETSignificance=True, fixEE2017=False, fixEE2017Params=None, extractDeepMETs=False, postfix="")
Definition: runMETCorrectionsAndUncertainties.py:2047
helpers.getPatAlgosToolsTask
def getPatAlgosToolsTask(process)
Definition: helpers.py:14
vid_id_tools.switchOnVIDElectronIdProducer
def switchOnVIDElectronIdProducer(process, dataFormat, task=None)
Electrons.
Definition: vid_id_tools.py:66
nano_cff.nanoAOD_addTauIds
def nanoAOD_addTauIds(process)
Definition: nano_cff.py:135
pfDeepBoostedJet_cff
join
static std::string join(char **cmd)
Definition: RemoteFile.cc:17
nano_cff.nanoAOD_recalibrateMETs
def nanoAOD_recalibrateMETs(process, isData)
Definition: nano_cff.py:181
puppiForMET_cff.makePuppiesFromMiniAOD
def makePuppiesFromMiniAOD(process, createScheduledSequence=False)
Definition: puppiForMET_cff.py:13
common_cff.Var
def Var(expr, valtype, compression=None, doc=None, mcOnly=False, precision=-1)
Definition: common_cff.py:20
nano_cff.nanoAOD_customizeMC
def nanoAOD_customizeMC(process)
Definition: nano_cff.py:383
nano_cff.nanoAOD_activateVID
def nanoAOD_activateVID(process)
Definition: nano_cff.py:251
nano_cff.nanoAOD_addDeepInfo
def nanoAOD_addDeepInfo(process, addDeepBTag, addDeepFlavour)
Definition: nano_cff.py:145
jetTools
ak4PFJets_cfi
print
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:46
nano_cff.bool
bool
Definition: nano_cff.py:131
pfParticleNet_cff
nano_cff.nanoWmassGenCustomize
def nanoWmassGenCustomize(process)
increasing the precision of selected GenParticles.
Definition: nano_cff.py:391
helpers
nano_cff.nanoAOD_runMETfixEE2017
def nanoAOD_runMETfixEE2017(process, isData)
Definition: nano_cff.py:316
vid_id_tools.setupAllVIDIdsInModule
def setupAllVIDIdsInModule(process, id_module_name, setupFunction, patProducer=None, addUserData=True, task=None)
Definition: vid_id_tools.py:49
vid_id_tools.switchOnVIDPhotonIdProducer
def switchOnVIDPhotonIdProducer(process, dataFormat, task=None)
Photons.
Definition: vid_id_tools.py:158
format
nano_cff.nanoAOD_addDeepMET
def nanoAOD_addDeepMET(process, addDeepMETProducer, ResponseTune_Graph)
Definition: nano_cff.py:167
helpers.addToProcessAndTask
def addToProcessAndTask(label, module, process, task)
Definition: helpers.py:29
nano_cff.nanoAOD_customizeCommon
def nanoAOD_customizeCommon(process)
Definition: nano_cff.py:323