CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Static Private Attributes
jmeUncertaintyTools.JetMEtUncertaintyTools Class Reference

MM from PhysicsTools.PatAlgos.patSequences_cff import *. More...

Inheritance diagram for jmeUncertaintyTools.JetMEtUncertaintyTools:

Public Member Functions

def __call__
 
def __init__
 
def getDefaultParameters
 

Private Member Functions

def _addCleanedJets
 
def _addPATMEtProducer
 
def _addPFCandidatesForPFMEtInput
 
def _addShiftedParticleCollections
 
def _getLeptonsForPFMEtInput
 
def _initializeInputTag
 

Static Private Attributes

tuple _defaultParameters = dicttypes.SortedKeysDict()
 
string _label = 'JetMEtUncertaintyTools'
 

Detailed Description

MM from PhysicsTools.PatAlgos.patSequences_cff import *.

Base class for estimating systematic uncertainties on MET 

Definition at line 17 of file jmeUncertaintyTools.py.

Constructor & Destructor Documentation

def jmeUncertaintyTools.JetMEtUncertaintyTools.__init__ (   self)

Definition at line 22 of file jmeUncertaintyTools.py.

References editorTools.UserCodeTool._comment, heavyIonTools.ConfigureHeavyIons._comment, HiCoreTools.RestrictInputToAOD._comment, coreTools.RunOnData._comment, trackTools.MakeAODTrackCandidates._comment, metTools.AddMETCollection._comment, heavyIonTools.ProductionDefaults._comment, editorTools.ChangeSource._comment, ConfigToolBase.ConfigToolBase._comment, HiCoreTools.RemoveMCMatching._comment, coreTools.RemoveMCMatching._comment, cmsswVersionTools.PickRelValInputFiles._comment, jetTools.AddJetCollection._comment, trackTools.MakePATTrackCandidates._comment, trigTools.SwitchOnTrigger._comment, heavyIonTools.SelectionDefaults._comment, HiCoreTools.RemoveAllPATObjectsBut._comment, heavyIonTools.DisbaleMonteCarloDeps._comment, HiCoreTools.RemoveSpecificPATObjects._comment, trigTools.SwitchOnTriggerStandAlone._comment, trackTools.MakeTrackCandidates._comment, tauTools.AddTauCollection._comment, trigTools.SwitchOnTriggerMatching._comment, HiCoreTools.RemoveCleaning._comment, HiCoreTools.AddCleaning._comment, trigTools.SwitchOnTriggerMatchingStandAlone._comment, trigTools.SwitchOnTriggerMatchEmbedding._comment, jetTools.SwitchJetCollection._comment, jetTools.AddJetID._comment, jetTools.SetTagInfos._comment, metTools.AddMETCollection._defaultParameters, editorTools.UserCodeTool._defaultParameters, trackTools.MakeAODTrackCandidates._defaultParameters, heavyIonTools.ConfigureHeavyIons._defaultParameters, coreTools.RunOnData._defaultParameters, jmeUncertaintyTools.JetMEtUncertaintyTools._defaultParameters, Vispa.Plugins.ConfigEditor.ToolDataAccessor.ImportTool._defaultParameters, jetTools.AddJetCollection._defaultParameters, heavyIonTools.ProductionDefaults._defaultParameters, editorTools.ChangeSource._defaultParameters, cmsswVersionTools.PickRelValInputFiles._defaultParameters, coreTools.RemoveMCMatching._defaultParameters, trackTools.MakePATTrackCandidates._defaultParameters, trigTools.SwitchOnTrigger._defaultParameters, heavyIonTools.SelectionDefaults._defaultParameters, heavyIonTools.DisbaleMonteCarloDeps._defaultParameters, trigTools.SwitchOnTriggerStandAlone._defaultParameters, trackTools.MakeTrackCandidates._defaultParameters, tauTools.AddTauCollection._defaultParameters, trigTools.SwitchOnTriggerMatching._defaultParameters, trigTools.SwitchOnTriggerMatchingStandAlone._defaultParameters, trigTools.SwitchOnTriggerMatchEmbedding._defaultParameters, jetTools.SwitchJetCollection._defaultParameters, jetTools.AddJetID._defaultParameters, jetTools.SetTagInfos._defaultParameters, editorTools.UserCodeTool._parameters, heavyIonTools.ConfigureHeavyIons._parameters, HiCoreTools.RestrictInputToAOD._parameters, coreTools.RunOnData._parameters, trackTools.MakeAODTrackCandidates._parameters, metTools.AddMETCollection._parameters, Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigFolder._parameters, Vispa.Plugins.ConfigEditor.ToolDataAccessor.ImportTool._parameters, heavyIonTools.ProductionDefaults._parameters, ConfigToolBase.ConfigToolBase._parameters, editorTools.ChangeSource._parameters, TAbsFitConstraint._parameters, HiCoreTools.RemoveMCMatching._parameters, TAbsFitParticle._parameters, coreTools.RemoveMCMatching._parameters, cmsswVersionTools.PickRelValInputFiles._parameters, jetTools.AddJetCollection._parameters, trackTools.MakePATTrackCandidates._parameters, trigTools.SwitchOnTrigger._parameters, heavyIonTools.SelectionDefaults._parameters, HiCoreTools.RemoveAllPATObjectsBut._parameters, heavyIonTools.DisbaleMonteCarloDeps._parameters, HiCoreTools.RemoveSpecificPATObjects._parameters, trigTools.SwitchOnTriggerStandAlone._parameters, trackTools.MakeTrackCandidates._parameters, tauTools.AddTauCollection._parameters, trigTools.SwitchOnTriggerMatching._parameters, HiCoreTools.RemoveCleaning._parameters, HiCoreTools.AddCleaning._parameters, trigTools.SwitchOnTriggerMatchingStandAlone._parameters, trigTools.SwitchOnTriggerMatchEmbedding._parameters, jetTools.SwitchJetCollection._parameters, jetTools.AddJetID._parameters, jetTools.SetTagInfos._parameters, root::helper::RootFunctionAdapter< F, args >.addParameter(), root::helper::RootFunctionHelper< F, args, Tag >.addParameter(), ParameterMgr.addParameter(), fit::RootMinuit< Function >.addParameter(), DropBoxMetadata::Parameters.addParameter(), PythonParameterSet.addParameter(), LutXml.addParameter(), ConfigToolBase.ConfigToolBase.addParameter(), and edm::ParameterSet.addParameter().

22 
23  def __init__(self):
24  ConfigToolBase.__init__(self)
25  self.addParameter(self._defaultParameters, 'electronCollection', cms.InputTag('cleanPatElectrons'),
"Input electron collection", Type=cms.InputTag, acceptNoneValue=True)

Member Function Documentation

def jmeUncertaintyTools.JetMEtUncertaintyTools.__call__ (   self,
  process,
  electronCollection = None,
  photonCollection = None,
  muonCollection = None,
  tauCollection = None,
  jetCollection = None,
  jetCorrLabel = None,
  doSmearJets = None,
  jetSmearFileName = None,
  jetSmearHistogram = None,
  jetCorrPayloadName = None,
  jetCorrLabelUpToL3 = None,
  jetCorrLabelUpToL3Res = None,
  jecUncertaintyFile = None,
  jecUncertaintyTag = None,
  varyByNsigmas = None,
  addToPatDefaultSequence = None,
  outputModule = None,
  postfix = None 
)

Definition at line 306 of file jmeUncertaintyTools.py.

References metTools.AddMETCollection._defaultParameters, editorTools.UserCodeTool._defaultParameters, trackTools.MakeAODTrackCandidates._defaultParameters, heavyIonTools.ConfigureHeavyIons._defaultParameters, coreTools.RunOnData._defaultParameters, jmeUncertaintyTools.JetMEtUncertaintyTools._defaultParameters, Vispa.Plugins.ConfigEditor.ToolDataAccessor.ImportTool._defaultParameters, jetTools.AddJetCollection._defaultParameters, heavyIonTools.ProductionDefaults._defaultParameters, editorTools.ChangeSource._defaultParameters, cmsswVersionTools.PickRelValInputFiles._defaultParameters, coreTools.RemoveMCMatching._defaultParameters, trackTools.MakePATTrackCandidates._defaultParameters, trigTools.SwitchOnTrigger._defaultParameters, heavyIonTools.SelectionDefaults._defaultParameters, heavyIonTools.DisbaleMonteCarloDeps._defaultParameters, trigTools.SwitchOnTriggerStandAlone._defaultParameters, trackTools.MakeTrackCandidates._defaultParameters, tauTools.AddTauCollection._defaultParameters, trigTools.SwitchOnTriggerMatching._defaultParameters, trigTools.SwitchOnTriggerMatchingStandAlone._defaultParameters, trigTools.SwitchOnTriggerMatchEmbedding._defaultParameters, jetTools.SwitchJetCollection._defaultParameters, jetTools.AddJetID._defaultParameters, jetTools.SetTagInfos._defaultParameters, jmeUncertaintyTools.JetMEtUncertaintyTools._initializeInputTag(), ora::OraMainTable.setParameter(), ora::IMainTable.setParameter(), ora::PoolMainTable.setParameter(), PedeReader.setParameter(), IntegratedCalibrationBase.setParameter(), SiStripLorentzAngleCalibration.setParameter(), SiPixelLorentzAngleCalibration.setParameter(), SiStripBackplaneCalibration.setParameter(), fit::RootMinuit< Function >.setParameter(), and ConfigToolBase.ConfigToolBase.setParameter().

Referenced by jmeUncertaintyTools.JetMEtUncertaintyTools._addPATMEtProducer().

307  postfix = None):
308  electronCollection = self._initializeInputTag(electronCollection, 'electronCollection')
309  photonCollection = self._initializeInputTag(photonCollection, 'photonCollection')
310  muonCollection = self._initializeInputTag(muonCollection, 'muonCollection')
311  tauCollection = self._initializeInputTag(tauCollection, 'tauCollection')
312  jetCollection = self._initializeInputTag(jetCollection, 'jetCollection')
313  if jetCorrLabel is None:
314  jetCorrLabel = self._defaultParameters['jetCorrLabel'].value
315  if doSmearJets is None:
316  doSmearJets = self._defaultParameters['doSmearJets'].value
317  if jetSmearFileName is None:
318  jetSmearFileName = self._defaultParameters['jetSmearFileName'].value
319  if jetSmearHistogram is None:
320  jetSmearHistogram = self._defaultParameters['jetSmearHistogram'].value
321  if jetCorrPayloadName is None:
322  jetCorrPayloadName = self._defaultParameters['jetCorrPayloadName'].value
323  if jetCorrLabelUpToL3 is None:
324  jetCorrLabelUpToL3 = self._defaultParameters['jetCorrLabelUpToL3'].value
325  if jetCorrLabelUpToL3Res is None:
326  jetCorrLabelUpToL3Res = self._defaultParameters['jetCorrLabelUpToL3Res'].value
327  if jecUncertaintyFile is None:
328  jecUncertaintyFile = self._defaultParameters['jecUncertaintyFile'].value
329  if jecUncertaintyTag is None:
330  jecUncertaintyTag = self._defaultParameters['jecUncertaintyTag'].value
331  if varyByNsigmas is None:
332  varyByNsigmas = self._defaultParameters['varyByNsigmas'].value
333  if addToPatDefaultSequence is None:
334  addToPatDefaultSequence = self._defaultParameters['addToPatDefaultSequence'].value
335  if outputModule is None:
336  outputModule = self._defaultParameters['outputModule'].value
337  if postfix is None:
338  postfix = self._defaultParameters['postfix'].value
339 
340  self.setParameter('electronCollection', electronCollection)
341  self.setParameter('photonCollection', photonCollection)
342  self.setParameter('muonCollection', muonCollection)
343  self.setParameter('tauCollection', tauCollection)
344  self.setParameter('jetCollection', jetCollection)
345  self.setParameter('jetCorrLabel', jetCorrLabel)
346  self.setParameter('doSmearJets', doSmearJets)
347  self.setParameter('jetSmearFileName', jetSmearFileName)
348  self.setParameter('jetSmearHistogram', jetSmearHistogram)
349  self.setParameter('jetCorrPayloadName', jetCorrPayloadName)
350  self.setParameter('jetCorrLabelUpToL3', jetCorrLabelUpToL3)
351  self.setParameter('jetCorrLabelUpToL3Res', jetCorrLabelUpToL3Res)
352  self.setParameter('jecUncertaintyFile', jecUncertaintyFile)
353  self.setParameter('jecUncertaintyTag', jecUncertaintyTag)
354  self.setParameter('varyByNsigmas', varyByNsigmas)
355  self.setParameter('addToPatDefaultSequence', addToPatDefaultSequence)
356  self.setParameter('outputModule', outputModule)
357  self.setParameter('postfix', postfix)
358 
def jmeUncertaintyTools.JetMEtUncertaintyTools._addCleanedJets (   self,
  process,
  jetCollection,
  electronCollection,
  photonCollection,
  muonCollection,
  tauCollection,
  uncertaintySequence,
  postfix = "" 
)
private

Definition at line 81 of file jmeUncertaintyTools.py.

References jmeUncertaintyTools.JetMEtUncertaintyTools._addShiftedParticleCollections(), objectsUncertaintyTools.addModuleToSequence(), and objectsUncertaintyTools.isValidInputTag().

Referenced by jmeUncertaintyTools.JetMEtUncertaintyTools._initializeInputTag(), runJetUncertainties.RunJetUncertainties.toolCode(), runType1CaloMEtUncertainties.RunType1CaloMEtUncertainties.toolCode(), and runType1PFMEtUncertainties.RunType1PFMEtUncertainties.toolCode().

81 
82  uncertaintySequence, postfix = ""):
83 
84  # produce collection of jets not overlapping with reconstructed
85  # electrons/photons, muons and tau-jet candidates
86  jetsNotOverlappingWithLeptons = cms.EDProducer("PATJetCleaner",
87  src = jetCollection,
88  preselection = cms.string(''),
89  checkOverlaps = cms.PSet(),
90  finalCut = cms.string('')
91  )
92  numOverlapCollections = 0
93  for collection in [
94  [ 'electrons', electronCollection ],
95  [ 'photons', photonCollection ],
96  [ 'muons', muonCollection ],
97  [ 'taus', tauCollection ] ]:
98  if isValidInputTag(collection[1]):
99  setattr(jetsNotOverlappingWithLeptons.checkOverlaps, collection[0], cms.PSet(
100  src = collection[1],
101  algorithm = cms.string("byDeltaR"),
102  preselection = cms.string(""),
103  deltaR = cms.double(0.5),
104  checkRecoComponents = cms.bool(False),
105  pairCut = cms.string(""),
106  requireNoOverlaps = cms.bool(True),
107  ))
108  numOverlapCollections = numOverlapCollections + 1
109  lastJetCollection = jetCollection.value()
110  if numOverlapCollections >= 1:
111  lastJetCollection = \
112  addModuleToSequence(process, jetsNotOverlappingWithLeptons,
113  [ jetCollection.value(), "NotOverlappingWithLeptonsForJetMEtUncertainty" ],
114  uncertaintySequence, postfix)
115  cleanedJetCollection = lastJetCollection
116 
117  return ( lastJetCollection, cleanedJetCollection )
118 
def jmeUncertaintyTools.JetMEtUncertaintyTools._addPATMEtProducer (   self,
  process,
  metUncertaintySequence,
  metCollection,
  patMEtCollection,
  collectionsToKeep,
  postfix 
)
private

Definition at line 275 of file jmeUncertaintyTools.py.

References jmeUncertaintyTools.JetMEtUncertaintyTools.__call__().

Referenced by runMVAMEtUncertainties.RunMVAMEtUncertainties._addPFMVAMEt(), runNoPileUpMEtUncertainties.RunNoPileUpMEtUncertainties._addPFNoPUMEt(), and jmeUncertaintyTools.JetMEtUncertaintyTools._getLeptonsForPFMEtInput().

276  collectionsToKeep, postfix):
277 
278  module = patMETs.clone(
279  metSource = cms.InputTag(metCollection),
280  addMuonCorrections = cms.bool(False),
281  genMETSource = cms.InputTag('genMetTrue')
282  )
283  patMEtCollectionName = patMEtCollection+postfix
284  setattr(process, patMEtCollectionName, module)
285  metUncertaintySequence += module
286  collectionsToKeep.append(patMEtCollectionName)
287 
def jmeUncertaintyTools.JetMEtUncertaintyTools._addPFCandidatesForPFMEtInput (   self,
  process,
  metUncertaintySequence,
  particleCollection,
  particleType,
  shiftType,
  particleCollectionShiftUp,
  particleCollectionShiftDown,
  dRmatch,
  pfCandCollection,
  postfix 
)
private

Definition at line 234 of file jmeUncertaintyTools.py.

Referenced by runMVAMEtUncertainties.RunMVAMEtUncertainties._addPFMVAMEt(), and jmeUncertaintyTools.JetMEtUncertaintyTools._addShiftedParticleCollections().

235  pfCandCollection, postfix):
236 
237  srcUnshiftedObjects = particleCollection
238  if isinstance(srcUnshiftedObjects, cms.InputTag):
239  srcUnshiftedObjects = srcUnshiftedObjects.value()
240  moduleShiftUp = cms.EDProducer("ShiftedPFCandidateProducerByMatchedObject",
241  srcPFCandidates = pfCandCollection,
242  srcUnshiftedObjects = cms.InputTag(srcUnshiftedObjects),
243  srcShiftedObjects = cms.InputTag(particleCollectionShiftUp),
244  dRmatch_PFCandidate = cms.double(dRmatch)
245  )
246  moduleNameShiftUp = "pfCandidates%s%sUp%s" % (particleType, shiftType, postfix)
247  setattr(process, moduleNameShiftUp, moduleShiftUp)
248  metUncertaintySequence += moduleShiftUp
249 
250  moduleShiftDown = moduleShiftUp.clone(
251  srcShiftedObjects = cms.InputTag(particleCollectionShiftDown)
252  )
253  moduleNameShiftDown = "pfCandidates%s%sDown%s" % (particleType, shiftType, postfix)
254  setattr(process, moduleNameShiftDown, moduleShiftDown)
255  metUncertaintySequence += moduleShiftDown
256 
257  moduleNameShifts = { 'Up':moduleNameShiftUp , 'Down':moduleNameShiftDown }
return moduleNameShifts
def jmeUncertaintyTools.JetMEtUncertaintyTools._addShiftedParticleCollections (   self,
  process,
  electronCollection = None,
  photonCollection = None,
  muonCollection = None,
  tauCollection = None,
  jetCollection = None,
  cleanedJetCollection = None,
  lastJetCollection = None,
  addShiftedResJetCollections = False,
  jetCorrLabelUpToL3 = None,
  jetCorrLabelUpToL3Res = None,
  jecUncertaintyFile = None,
  jecUncertaintyTag = None,
  jetSmearFileName = None,
  jetSmearHistogram = None,
  varyByNsigmas = None,
  postfix = "" 
)
private

Definition at line 130 of file jmeUncertaintyTools.py.

References jmeUncertaintyTools.JetMEtUncertaintyTools._addPFCandidatesForPFMEtInput(), objectsUncertaintyTools.addShiftedJetCollections(), objectsUncertaintyTools.addShiftedSingleParticleCollection(), objectsUncertaintyTools.addSmearedJets(), and objectsUncertaintyTools.isValidInputTag().

Referenced by jmeUncertaintyTools.JetMEtUncertaintyTools._addCleanedJets(), runJetUncertainties.RunJetUncertainties.toolCode(), runType1CaloMEtUncertainties.RunType1CaloMEtUncertainties.toolCode(), runMVAMEtUncertainties.RunMVAMEtUncertainties.toolCode(), runType1PFMEtUncertainties.RunType1PFMEtUncertainties.toolCode(), and runNoPileUpMEtUncertainties.RunNoPileUpMEtUncertainties.toolCode().

131  postfix = ""):
132 
133  shiftedParticleSequence = cms.Sequence()
134  shiftedParticleCollections = {}
135  collectionsToKeep = []
136 
137  # standard jet collections
138  shiftedParticleCollections[ 'cleanedJetCollection' ] = cleanedJetCollection
139 
140  #--------------------------------------------------------------------------------------------
141  # store collection of jets shifted up/down in energy resolution
142  #--------------------------------------------------------------------------------------------
143  if not isValidInputTag(jetCollection) or jetCollection=="":
144  print "INFO : jet collection %s does not exists, no energy resolution shifting will be performed in MET uncertainty tools" % jetCollection
145  else:
146  if addShiftedResJetCollections:
147  variations = { "ResUp":-1., "ResDown":1. }
148  for var in variations.keys():
149  jetCollectionToKeep = \
150  addSmearedJets(process, cleanedJetCollection,
151  [ "smeared", jetCollection, var ],
152  jetSmearFileName,jetSmearHistogram,jetResolutions,
153  varyByNsigmas, variations[ var ],
154  shiftedParticleSequence, postfix)
155  jetCol={'jetCollection%s'%var:jetCollectionToKeep}
156  shiftedParticleCollections.update( jetCol )
157  collectionsToKeep.append( jetCollectionToKeep )
158 
159  #--------------------------------------------------------------------------------------------
160  # produce collection of jets shifted up/down in energy
161  #--------------------------------------------------------------------------------------------
162  if not isValidInputTag(jetCollection) or jetCollection=="":
163  print "INFO : jet collection %s does not exists, no energy shifting will be performed in MET uncertainty tools" % jetCollection
164  else:
165  shiftedJetsCollections, jetsCollectionsToKeep = addShiftedJetCollections(
166  process,jetCollection,lastJetCollection,
167  jetCorrLabelUpToL3, jetCorrLabelUpToL3Res,
168  jecUncertaintyFile, jecUncertaintyTag,
169  varyByNsigmas, shiftedParticleSequence,
170  postfix)
171  shiftedParticleCollections.update( shiftedJetsCollections )
172  collectionsToKeep.extend( jetsCollectionsToKeep )
173 
174  #--------------------------------------------------------------------------------------------
175  # produce collection of electrons shifted up/down in energy
176  #--------------------------------------------------------------------------------------------
177  if not isValidInputTag(electronCollection) or electronCollection=="":
178  print "INFO : electron collection %s does not exists, no energy shifting will be performed in MET uncertainty tools" % electronCollection
179  else:
180  shiftedElectronsCollections, electronsCollectionsToKeep = addShiftedSingleParticleCollection(
181  process, "electron", electronCollection,
182  varyByNsigmas,shiftedParticleSequence,
183  postfix)
184 
185  shiftedParticleCollections.update( shiftedElectronsCollections )
186  collectionsToKeep.extend( electronsCollectionsToKeep )
187 
188  #--------------------------------------------------------------------------------------------
189  # produce collection of (high Pt) photon candidates shifted up/down in energy
190  #--------------------------------------------------------------------------------------------
191  if not isValidInputTag(photonCollection) or photonCollection=="":
192  print "INFO : photon collection %s does not exists, no energy shifting will be performed in MET uncertainty tools" % photonCollection
193  else:
194  shiftedPhotonsCollections, photonsCollectionsToKeep = addShiftedSingleParticleCollection(
195  process, "photon", photonCollection,
196  varyByNsigmas,shiftedParticleSequence,
197  postfix)
198  shiftedParticleCollections.update( shiftedPhotonsCollections )
199  collectionsToKeep.extend( photonsCollectionsToKeep )
200 
201  #--------------------------------------------------------------------------------------------
202  # produce collection of muons shifted up/down in energy/momentum
203  #--------------------------------------------------------------------------------------------
204  if not isValidInputTag(muonCollection) or muonCollection=="":
205  print "INFO : muon collection %s does not exists, no energy shifting will be performed in MET uncertainty tools" % muonCollection
206  else:
207  shiftedMuonsCollections, muonsCollectionsToKeep = addShiftedSingleParticleCollection(process, "muon", muonCollection,
208  varyByNsigmas,shiftedParticleSequence,
209  postfix)
210  shiftedParticleCollections.update( shiftedMuonsCollections )
211  collectionsToKeep.extend( muonsCollectionsToKeep )
212 
213  #--------------------------------------------------------------------------------------------
214  # produce collection of tau-jets shifted up/down in energy
215  #--------------------------------------------------------------------------------------------
216  if not isValidInputTag(tauCollection) or tauCollection=="":
217  print "INFO : tau collection %s does not exists, no energy shifting will be performed in MET uncertainty tools" % tauCollection
218  else:
219  shiftedTausCollections, tausCollectionsToKeep = addShiftedSingleParticleCollection(process, "tau", tauCollection,
220  varyByNsigmas,shiftedParticleSequence,
221  postfix)
222  shiftedParticleCollections.update( shiftedTausCollections )
223  collectionsToKeep.extend( tausCollectionsToKeep )
224 
225 
226  return ( shiftedParticleSequence, shiftedParticleCollections, collectionsToKeep )
227 
228 
229 
230 
def addShiftedJetCollections
Now, jet variation for corrected METs, the default collection to use.
def addShiftedSingleParticleCollection
Up variation.
def jmeUncertaintyTools.JetMEtUncertaintyTools._getLeptonsForPFMEtInput (   self,
  shiftedParticleCollections,
  substituteKeyUnshifted = None,
  substituteKeyShifted = None,
  postfix = "" 
)
private

Definition at line 260 of file jmeUncertaintyTools.py.

References jmeUncertaintyTools.JetMEtUncertaintyTools._addPATMEtProducer(), and objectsUncertaintyTools.isValidInputTag().

Referenced by runMVAMEtUncertainties.RunMVAMEtUncertainties._addPFMVAMEt().

261  def _getLeptonsForPFMEtInput(self, shiftedParticleCollections, substituteKeyUnshifted = None, substituteKeyShifted = None, postfix=""):
262  retVal = []
263  for particleCol in shiftedParticleCollections.keys():
264  if not (particleCol.find("Jet") or particleCol.find("jet") ) and isValidInputTag(shiftedParticleCollections[collectionName]):
265  print collectionName,"==>:"+shiftedParticleCollections[collectionName]
266  if substituteKeyUnshifted is not None and substituteKeyUnshifted in shiftedParticleCollections.keys() and \
267  substituteKeyShifted is not None and substituteKeyShifted in shiftedParticleCollections.keys() and \
268  shiftedParticleCollections[collectionName] == shiftedParticleCollections[substituteKeyUnshifted]:
269  retVal.append(cms.InputTag(shiftedParticleCollections[substituteKeyShifted]))
270  else:
271  retVal.append(shiftedParticleCollections[collectionName])
272  return retVal
def jmeUncertaintyTools.JetMEtUncertaintyTools._initializeInputTag (   self,
  input,
  default 
)
private

Definition at line 67 of file jmeUncertaintyTools.py.

References jmeUncertaintyTools.JetMEtUncertaintyTools._addCleanedJets(), metTools.AddMETCollection._defaultParameters, trackTools.MakeAODTrackCandidates._defaultParameters, editorTools.UserCodeTool._defaultParameters, heavyIonTools.ConfigureHeavyIons._defaultParameters, coreTools.RunOnData._defaultParameters, jmeUncertaintyTools.JetMEtUncertaintyTools._defaultParameters, Vispa.Plugins.ConfigEditor.ToolDataAccessor.ImportTool._defaultParameters, jetTools.AddJetCollection._defaultParameters, heavyIonTools.ProductionDefaults._defaultParameters, editorTools.ChangeSource._defaultParameters, cmsswVersionTools.PickRelValInputFiles._defaultParameters, coreTools.RemoveMCMatching._defaultParameters, trackTools.MakePATTrackCandidates._defaultParameters, trigTools.SwitchOnTrigger._defaultParameters, heavyIonTools.SelectionDefaults._defaultParameters, heavyIonTools.DisbaleMonteCarloDeps._defaultParameters, trigTools.SwitchOnTriggerStandAlone._defaultParameters, trackTools.MakeTrackCandidates._defaultParameters, tauTools.AddTauCollection._defaultParameters, trigTools.SwitchOnTriggerMatching._defaultParameters, trigTools.SwitchOnTriggerMatchingStandAlone._defaultParameters, trigTools.SwitchOnTriggerMatchEmbedding._defaultParameters, jetTools.SwitchJetCollection._defaultParameters, jetTools.AddJetID._defaultParameters, and jetTools.SetTagInfos._defaultParameters.

Referenced by runType1CaloMEtUncertainties.RunType1CaloMEtUncertainties.__call__(), runMVAMEtUncertainties.RunMVAMEtUncertainties.__call__(), jmeUncertaintyTools.JetMEtUncertaintyTools.__call__(), runType1PFMEtUncertainties.RunType1PFMEtUncertainties.__call__(), and runNoPileUpMEtUncertainties.RunNoPileUpMEtUncertainties.__call__().

67 
68  def _initializeInputTag(self, input, default):
69  retVal = None
70  if input is None:
71  retVal = self._defaultParameters[default].value
72  elif type(input) == str:
73  retVal = cms.InputTag(input)
74  else:
75  retVal = input
76  return retVal
77 
def jmeUncertaintyTools.JetMEtUncertaintyTools.getDefaultParameters (   self)

Definition at line 63 of file jmeUncertaintyTools.py.

References metTools.AddMETCollection._defaultParameters, trackTools.MakeAODTrackCandidates._defaultParameters, editorTools.UserCodeTool._defaultParameters, heavyIonTools.ConfigureHeavyIons._defaultParameters, coreTools.RunOnData._defaultParameters, jmeUncertaintyTools.JetMEtUncertaintyTools._defaultParameters, Vispa.Plugins.ConfigEditor.ToolDataAccessor.ImportTool._defaultParameters, jetTools.AddJetCollection._defaultParameters, heavyIonTools.ProductionDefaults._defaultParameters, editorTools.ChangeSource._defaultParameters, cmsswVersionTools.PickRelValInputFiles._defaultParameters, coreTools.RemoveMCMatching._defaultParameters, trackTools.MakePATTrackCandidates._defaultParameters, trigTools.SwitchOnTrigger._defaultParameters, heavyIonTools.SelectionDefaults._defaultParameters, heavyIonTools.DisbaleMonteCarloDeps._defaultParameters, trigTools.SwitchOnTriggerStandAlone._defaultParameters, trackTools.MakeTrackCandidates._defaultParameters, tauTools.AddTauCollection._defaultParameters, trigTools.SwitchOnTriggerMatching._defaultParameters, trigTools.SwitchOnTriggerMatchingStandAlone._defaultParameters, trigTools.SwitchOnTriggerMatchEmbedding._defaultParameters, jetTools.SwitchJetCollection._defaultParameters, jetTools.AddJetID._defaultParameters, and jetTools.SetTagInfos._defaultParameters.

63 
64  def getDefaultParameters(self):
65  return self._defaultParameters
66 

Member Data Documentation

tuple jmeUncertaintyTools.JetMEtUncertaintyTools._defaultParameters = dicttypes.SortedKeysDict()
staticprivate

Definition at line 21 of file jmeUncertaintyTools.py.

Referenced by HiCoreTools.RestrictInputToAOD.__call__(), runJetUncertainties.RunJetUncertainties.__call__(), HiCoreTools.RemoveMCMatching.__call__(), HiCoreTools.RemoveAllPATObjectsBut.__call__(), runType1CaloMEtUncertainties.RunType1CaloMEtUncertainties.__call__(), HiCoreTools.RemoveSpecificPATObjects.__call__(), jmeUncertaintyTools.JetMEtUncertaintyTools.__call__(), HiCoreTools.RemoveCleaning.__call__(), runType1PFMEtUncertainties.RunType1PFMEtUncertainties.__call__(), HiCoreTools.AddCleaning.__call__(), runNoPileUpMEtUncertainties.RunNoPileUpMEtUncertainties.__call__(), HiCoreTools.RestrictInputToAOD.__init__(), runJetUncertainties.RunJetUncertainties.__init__(), runType1CaloMEtUncertainties.RunType1CaloMEtUncertainties.__init__(), jmeUncertaintyTools.JetMEtUncertaintyTools.__init__(), runType1PFMEtUncertainties.RunType1PFMEtUncertainties.__init__(), runMVAMEtUncertainties.RunMVAMEtUncertainties.__init__(), runNoPileUpMEtUncertainties.RunNoPileUpMEtUncertainties.__init__(), HiCoreTools.RemoveMCMatching.__init__(), HiCoreTools.RemoveAllPATObjectsBut.__init__(), HiCoreTools.RemoveSpecificPATObjects.__init__(), HiCoreTools.RemoveCleaning.__init__(), HiCoreTools.AddCleaning.__init__(), jmeUncertaintyTools.JetMEtUncertaintyTools._initializeInputTag(), ConfigToolBase.ConfigToolBase.dumpPython(), ConfigToolBase.ConfigToolBase.getAllowedValues(), HiCoreTools.RestrictInputToAOD.getDefaultParameters(), jmeUncertaintyTools.JetMEtUncertaintyTools.getDefaultParameters(), HiCoreTools.RemoveMCMatching.getDefaultParameters(), HiCoreTools.RemoveAllPATObjectsBut.getDefaultParameters(), HiCoreTools.RemoveSpecificPATObjects.getDefaultParameters(), HiCoreTools.RemoveCleaning.getDefaultParameters(), HiCoreTools.AddCleaning.getDefaultParameters(), ConfigToolBase.ConfigToolBase.reset(), and ConfigToolBase.ConfigToolBase.setParameter().

string jmeUncertaintyTools.JetMEtUncertaintyTools._label = 'JetMEtUncertaintyTools'
staticprivate

Definition at line 20 of file jmeUncertaintyTools.py.