CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes | Static Private Attributes
jetTools.UpdateJetCollection Class Reference
Inheritance diagram for jetTools.UpdateJetCollection:

Public Member Functions

def __call__ (self, process, labelName=None, postfix=None, btagPrefix=None, jetSource=None, pfCandidates=None, explicitJTA=None, pvSource=None, svSource=None, elSource=None, muSource=None, runIVF=None, tightBTagNTkHits=None, loadStdRecoBTag=None, svClustering=None, fatJets=None, groomedFatJets=None, algo=None, rParam=None, printWarning=None, jetCorrections=None, btagDiscriminators=None, btagInfos=None)
 
def __init__ (self)
 
def getDefaultParameters (self)
 
def toolCode (self, process)
 

Private Attributes

 _comment
 add comments More...
 
 _parameters
 initialization of the base class More...
 

Static Private Attributes

 _defaultParameters
 
 _label
 

Detailed Description

Tool to update a jet collection in your PAT Tuple (primarily intended for MiniAOD for which the default input argument values have been set).

Definition at line 1452 of file jetTools.py.

Constructor & Destructor Documentation

def jetTools.UpdateJetCollection.__init__ (   self)
Initialize elements of the class. Note that the tool needs to be derived from ConfigToolBase to be usable in the configEditor.

Definition at line 1459 of file jetTools.py.

References heavyIonTools.ConfigureHeavyIons._defaultParameters, coreTools.RunOnData._defaultParameters, heavyIonTools.ProductionDefaults._defaultParameters, cmsswVersionTools.PickRelValInputFiles._defaultParameters, coreTools.RemoveMCMatching._defaultParameters, heavyIonTools.SelectionDefaults._defaultParameters, heavyIonTools.DisbaleMonteCarloDeps._defaultParameters, jetTools.AddJetCollection._defaultParameters, jetTools.SwitchJetCollection._defaultParameters, jetTools.UpdateJetCollection._defaultParameters, root::helper::RootFunctionAdapter< F, args >.addParameter(), root::helper::RootFunctionHelper< F, args, Tag >.addParameter(), ParameterMgr.addParameter(), fit::RootMinuit< Function >.addParameter(), DropBoxMetadata::Parameters.addParameter(), PythonParameterSet.addParameter(), l1t::TriggerSystem.addParameter(), LutXml.addParameter(), ConfigToolBase.ConfigToolBase.addParameter(), and edm::ParameterSet.addParameter().

1459  def __init__(self):
1460  """
1461  Initialize elements of the class. Note that the tool needs to be derived from ConfigToolBase to be usable in the configEditor.
1462  """
1463  ## initialization of the base class
1464  ConfigToolBase.__init__(self)
1465  ## add all parameters that should be known to the class
1466  self.addParameter(self._defaultParameters,'labelName', '', "Label name of the new patJet collection.", str)
1467  self.addParameter(self._defaultParameters,'postfix','', "Postfix from usePF2PAT.", str)
1468  self.addParameter(self._defaultParameters,'btagPrefix','', "Prefix to be added to b-tag discriminator and TagInfo names", str)
1469  self.addParameter(self._defaultParameters,'jetSource','', "Label of the input collection from which the new patJet collection should be created", cms.InputTag)
1470  self.addParameter(self._defaultParameters,'pfCandidates',cms.InputTag('packedPFCandidates'), "Label of the input collection for candidatecandidatese used in b-tagging", cms.InputTag)
1471  self.addParameter(self._defaultParameters,'explicitJTA', False, "Use explicit jet-track association")
1472  self.addParameter(self._defaultParameters,'pvSource',cms.InputTag('offlineSlimmedPrimaryVertices'), "Label of the input collection for primary vertices used in b-tagging", cms.InputTag)
1473  self.addParameter(self._defaultParameters,'svSource',cms.InputTag('slimmedSecondaryVertices'), "Label of the input collection for IVF vertices used in b-tagging", cms.InputTag)
1474  self.addParameter(self._defaultParameters,'elSource',cms.InputTag('slimmedElectrons'), "Label of the input collection for electrons used in b-tagging", cms.InputTag)
1475  self.addParameter(self._defaultParameters,'muSource',cms.InputTag('slimmedMuons'), "Label of the input collection for muons used in b-tagging", cms.InputTag)
1476  self.addParameter(self._defaultParameters,'runIVF', False, "Re-run IVF secondary vertex reconstruction")
1477  self.addParameter(self._defaultParameters,'tightBTagNTkHits', False, "Enable legacy tight b-tag track selection")
1478  self.addParameter(self._defaultParameters,'loadStdRecoBTag', False, "Load the standard reconstruction b-tagging modules")
1479  self.addParameter(self._defaultParameters,'svClustering', False, "Secondary vertices ghost-associated to jets using jet clustering (mostly intended for subjets)")
1480  self.addParameter(self._defaultParameters,'fatJets', cms.InputTag(''), "Fat jet collection used for secondary vertex clustering", cms.InputTag)
1481  self.addParameter(self._defaultParameters,'groomedFatJets', cms.InputTag(''), "Groomed fat jet collection used for secondary vertex clustering", cms.InputTag)
1482  self.addParameter(self._defaultParameters,'algo', 'AK', "Jet algorithm of the input collection from which the new patJet collection should be created")
1483  self.addParameter(self._defaultParameters,'rParam', 0.4, "Jet size (distance parameter R used in jet clustering)")
1484  self.addParameter(self._defaultParameters,'printWarning', True, "To be use as False in production to reduce log size")
1485  self.addParameter(self._defaultParameters,'jetCorrections',None, "Add all relevant information about jet energy corrections that you want to be added to your new patJet \
1486  collection. The format has to be given in a python tuple of type: (\'AK4Calo\',[\'L2Relative\', \'L3Absolute\'], patMet). Here the first argument corresponds to the payload \
1487  in the CMS Conditions database for the given jet collection; the second argument corresponds to the jet energy correction levels that you want to be embedded into your \
1488  new patJet collection. This should be given as a list of strings. Available values are L1Offset, L1FastJet, L1JPTOffset, L2Relative, L3Absolute, L5Falvour, L7Parton; the \
1489  third argument indicates whether MET(Type1/2) corrections should be applied corresponding to the new patJetCollection. If so a new patMet collection will be added to your PAT \
1490  Tuple in addition to the raw patMet. This new patMet collection will have the MET(Type1/2) corrections applied. The argument can have the following types: \'type-1\' for \
1491  type-1 corrected MET; \'type-2\' for type-1 plus type-2 corrected MET; \'\' or \'none\' if no further MET corrections should be applied to your MET. The arguments \'type-1\' \
1492  and \'type-2\' are not case sensitive.", tuple, acceptNoneValue=True)
1493  self.addParameter(self._defaultParameters,'btagDiscriminators',['None'], "If you are interested in btagging, in most cases just the labels of the btag discriminators that \
1494  you are interested in is all relevant information that you need for a high level analysis. Add here all btag discriminators, that you are interested in as a list of strings. \
1495  If this list is empty no btag discriminator information will be added to your new patJet collection.", allowedValues=(supportedBtagDiscr.keys()+supportedMetaDiscr.keys()),Type=list)
1496  self.addParameter(self._defaultParameters,'btagInfos',['None'], "The btagInfos objects contain all relevant information from which all discriminators of a certain \
1497  type have been calculated. You might be interested in keeping this information for low level tests or to re-calculate some discriminators from hand. Note that this information \
1498  on the one hand can be very space consuming and that it is not necessary to access the pre-calculated btag discriminator information that has been derived from it. Only in very \
1499  special cases the btagInfos might really be needed in your analysis. Add here all btagInfos, that you are interested in as a list of strings. If this list is empty no btagInfos \
1500  will be added to your new patJet collection.", allowedValues=supportedBtagInfos,Type=list)
1501  self.addParameter(self._defaultParameters,'outputModules',['out'],"Add a list of all output modules to which you would like the new jet collection to be added. Usually this is \
1502  just one single output module with name \'out\', which corresponds also the default configuration of the tool. There is cases though where you might want to add this collection \
1503  to more than one output module.")
1504  ## set defaults
1505  self._parameters=copy.deepcopy(self._defaultParameters)
1506  ## add comments
1507  self._comment = "This is a tool to add more patJet collectinos to your PAT Tuple or to re-configure the default collection. You can add and embed additional information like jet\
1508  energy correction factors, btag information and generator match information to the new patJet collection depending on the parameters that you pass on to this function. Consult \
1509  the descriptions of each parameter for more information."
1510 
_parameters
initialization of the base class
Definition: jetTools.py:1505

Member Function Documentation

def jetTools.UpdateJetCollection.__call__ (   self,
  process,
  labelName = None,
  postfix = None,
  btagPrefix = None,
  jetSource = None,
  pfCandidates = None,
  explicitJTA = None,
  pvSource = None,
  svSource = None,
  elSource = None,
  muSource = None,
  runIVF = None,
  tightBTagNTkHits = None,
  loadStdRecoBTag = None,
  svClustering = None,
  fatJets = None,
  groomedFatJets = None,
  algo = None,
  rParam = None,
  printWarning = None,
  jetCorrections = None,
  btagDiscriminators = None,
  btagInfos = None 
)
Function call wrapper. This will check the parameters and call the actual implementation that
can be found in toolCode via the base class function apply.

Definition at line 1517 of file jetTools.py.

References heavyIonTools.ConfigureHeavyIons._defaultParameters, coreTools.RunOnData._defaultParameters, heavyIonTools.ProductionDefaults._defaultParameters, cmsswVersionTools.PickRelValInputFiles._defaultParameters, coreTools.RemoveMCMatching._defaultParameters, heavyIonTools.SelectionDefaults._defaultParameters, heavyIonTools.DisbaleMonteCarloDeps._defaultParameters, jetTools.AddJetCollection._defaultParameters, jetTools.SwitchJetCollection._defaultParameters, jetTools.UpdateJetCollection._defaultParameters, SignedImpactParameter3D.apply(), gen::PhotosInterfaceBase.apply(), SignedTransverseImpactParameter.apply(), MatrixReader.MatrixReader.apply, SignedDecayLength3D.apply(), DummyOOTPileupCorrection.apply(), HcalDeterministicFit.apply(), gen::PhotosppInterface.apply(), FWPSetCellEditor.apply(), gen::PhotosInterface.apply(), SurveyParameters.apply(), FWGUIEventFilter.apply(), DeviationsFromFileSensor2D.apply(), BeamSpotAlignmentParameters.apply(), RigidBodyAlignmentParameters.apply(), ConfigToolBase.ConfigToolBase.apply(), AlignmentParameters.apply(), BowedSurfaceAlignmentParameters.apply(), OOTPileupCorrData.apply(), Vispa.Plugins.ConfigEditor.ToolDataAccessor.ImportTool.apply(), Vispa.Plugins.ConfigEditor.ToolDataAccessor.ApplyTool.apply(), AbsOOTPileupCorrection.apply(), TwoBowedSurfacesAlignmentParameters.apply(), Vispa.Gui.BoxContentDialog.BoxContentDialog.apply(), reco::modules::TrackerTrackHitFilter::Rule.apply(), Vispa.Plugins.ConfigEditor.ToolDialog.ToolDialog.apply(), PulseShapeFitOOTPileupCorrection.apply(), reco::Add< T >.apply(), reco::Sub< T >.apply(), reco::Mul< T >.apply(), reco::Div< T >.apply(), cmsswVersionTools.PickRelValInputFiles.apply(), models.RegExp.apply(), reco::And< bool >.apply(), reco::Or< bool >.apply(), reco::Less< T >.apply(), reco::LessEqual< T >.apply(), reco::More< T >.apply(), reco::MoreEqual< T >.apply(), reco::Equal< T >.apply(), npstat::ArrayND< Numeric, StackLen, StackDim >.apply(), npstat::ArrayND< Num1, Len1, Dim1 >.apply(), npstat::ArrayND< Numeric >.apply(), Config.ProcessModifier.apply(), PedeReader.setParameter(), QIE8Simulator.setParameter(), AbsElectronicODERHS.setParameter(), IntegratedCalibrationBase.setParameter(), SiStripLorentzAngleCalibration.setParameter(), SiPixelLorentzAngleCalibration.setParameter(), SiStripBackplaneCalibration.setParameter(), fit::RootMinuit< Function >.setParameter(), and ConfigToolBase.ConfigToolBase.setParameter().

1517  def __call__(self,process,labelName=None,postfix=None,btagPrefix=None,jetSource=None,pfCandidates=None,explicitJTA=None,pvSource=None,svSource=None,elSource=None,muSource=None,runIVF=None,tightBTagNTkHits=None,loadStdRecoBTag=None,svClustering=None,fatJets=None,groomedFatJets=None,algo=None,rParam=None,printWarning=None,jetCorrections=None,btagDiscriminators=None,btagInfos=None):
1518  """
1519  Function call wrapper. This will check the parameters and call the actual implementation that
1520  can be found in toolCode via the base class function apply.
1521  """
1522  if labelName is None:
1523  labelName=self._defaultParameters['labelName'].value
1524  self.setParameter('labelName', labelName)
1525  if postfix is None:
1526  postfix=self._defaultParameters['postfix'].value
1527  self.setParameter('postfix', postfix)
1528  if btagPrefix is None:
1529  btagPrefix=self._defaultParameters['btagPrefix'].value
1530  self.setParameter('btagPrefix', btagPrefix)
1531  if jetSource is None:
1532  jetSource=self._defaultParameters['jetSource'].value
1533  self.setParameter('jetSource', jetSource)
1534  if pfCandidates is None:
1535  pfCandidates=self._defaultParameters['pfCandidates'].value
1536  self.setParameter('pfCandidates', pfCandidates)
1537  if explicitJTA is None:
1538  explicitJTA=self._defaultParameters['explicitJTA'].value
1539  self.setParameter('explicitJTA', explicitJTA)
1540  if pvSource is None:
1541  pvSource=self._defaultParameters['pvSource'].value
1542  self.setParameter('pvSource', pvSource)
1543  if svSource is None:
1544  svSource=self._defaultParameters['svSource'].value
1545  self.setParameter('svSource', svSource)
1546  if elSource is None:
1547  elSource=self._defaultParameters['elSource'].value
1548  self.setParameter('elSource', elSource)
1549  if muSource is None:
1550  muSource=self._defaultParameters['muSource'].value
1551  self.setParameter('muSource', muSource)
1552  if runIVF is None:
1553  runIVF=self._defaultParameters['runIVF'].value
1554  self.setParameter('runIVF', runIVF)
1555  if tightBTagNTkHits is None:
1556  tightBTagNTkHits=self._defaultParameters['tightBTagNTkHits'].value
1557  self.setParameter('tightBTagNTkHits', tightBTagNTkHits)
1558  if loadStdRecoBTag is None:
1559  loadStdRecoBTag=self._defaultParameters['loadStdRecoBTag'].value
1560  self.setParameter('loadStdRecoBTag', loadStdRecoBTag)
1561  if svClustering is None:
1562  svClustering=self._defaultParameters['svClustering'].value
1563  self.setParameter('svClustering', svClustering)
1564  if fatJets is None:
1565  fatJets=self._defaultParameters['fatJets'].value
1566  self.setParameter('fatJets', fatJets)
1567  if groomedFatJets is None:
1568  groomedFatJets=self._defaultParameters['groomedFatJets'].value
1569  self.setParameter('groomedFatJets', groomedFatJets)
1570  if algo is None:
1571  algo=self._defaultParameters['algo'].value
1572  self.setParameter('algo', algo)
1573  if rParam is None:
1574  rParam=self._defaultParameters['rParam'].value
1575  self.setParameter('rParam', rParam)
1576  if printWarning is None:
1577  printWarning=self._defaultParameters['printWarning'].value
1578  self.setParameter('printWarning', printWarning)
1579  if jetCorrections is None:
1580  jetCorrections=self._defaultParameters['jetCorrections'].value
1581  self.setParameter('jetCorrections', jetCorrections)
1582  if btagDiscriminators is None:
1583  btagDiscriminators=self._defaultParameters['btagDiscriminators'].value
1584  self.setParameter('btagDiscriminators', btagDiscriminators)
1585  if btagInfos is None:
1586  btagInfos=self._defaultParameters['btagInfos'].value
1587  self.setParameter('btagInfos', btagInfos)
1588  self.apply(process)
1589 
def __call__(self, process, labelName=None, postfix=None, btagPrefix=None, jetSource=None, pfCandidates=None, explicitJTA=None, pvSource=None, svSource=None, elSource=None, muSource=None, runIVF=None, tightBTagNTkHits=None, loadStdRecoBTag=None, svClustering=None, fatJets=None, groomedFatJets=None, algo=None, rParam=None, printWarning=None, jetCorrections=None, btagDiscriminators=None, btagInfos=None)
Definition: jetTools.py:1517
def jetTools.UpdateJetCollection.getDefaultParameters (   self)
def jetTools.UpdateJetCollection.toolCode (   self,
  process 
)
Tool code implementation

Definition at line 1590 of file jetTools.py.

References editorTools.UserCodeTool._parameters, heavyIonTools.ConfigureHeavyIons._parameters, coreTools.RunOnData._parameters, Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigFolder._parameters, Vispa.Plugins.ConfigEditor.ToolDataAccessor.ImportTool._parameters, heavyIonTools.ProductionDefaults._parameters, ConfigToolBase.ConfigToolBase._parameters, editorTools.ChangeSource._parameters, TAbsFitConstraint._parameters, TAbsFitParticle._parameters, cmsswVersionTools.PickRelValInputFiles._parameters, coreTools.RemoveMCMatching._parameters, heavyIonTools.SelectionDefaults._parameters, heavyIonTools.DisbaleMonteCarloDeps._parameters, jetTools.AddJetCollection._parameters, jetTools.SwitchJetCollection._parameters, jetTools.UpdateJetCollection._parameters, helpers.addToProcessAndTask(), jetTools.checkJetCorrectionsFormat(), helpers.getPatAlgosToolsTask(), list(), jetTools.setupBTagging(), jetTools.setupJetCorrections(), split, jetTools.unsupportedJetAlgorithm(), and pfDeepBoostedJetPreprocessParams_cfi.upper.

1590  def toolCode(self, process):
1591  """
1592  Tool code implementation
1593  """
1594  ## initialize parameters
1595  labelName=self._parameters['labelName'].value
1596  postfix=self._parameters['postfix'].value
1597  btagPrefix=self._parameters['btagPrefix'].value
1598  jetSource=self._parameters['jetSource'].value
1599  pfCandidates=self._parameters['pfCandidates'].value
1600  explicitJTA=self._parameters['explicitJTA'].value
1601  pvSource=self._parameters['pvSource'].value
1602  svSource=self._parameters['svSource'].value
1603  elSource=self._parameters['elSource'].value
1604  muSource=self._parameters['muSource'].value
1605  runIVF=self._parameters['runIVF'].value
1606  tightBTagNTkHits=self._parameters['tightBTagNTkHits'].value
1607  loadStdRecoBTag=self._parameters['loadStdRecoBTag'].value
1608  svClustering=self._parameters['svClustering'].value
1609  fatJets=self._parameters['fatJets'].value
1610  groomedFatJets=self._parameters['groomedFatJets'].value
1611  algo=self._parameters['algo'].value
1612  rParam=self._parameters['rParam'].value
1613  printWarning=self._parameters['printWarning'].value
1614  jetCorrections=self._parameters['jetCorrections'].value
1615  btagDiscriminators=list(self._parameters['btagDiscriminators'].value)
1616  btagInfos=list(self._parameters['btagInfos'].value)
1617 
1618  ## a list of all producer modules, which are already known to process
1619  knownModules = process.producerNames().split()
1620  ## determine whether btagging information is required or not
1621  if btagDiscriminators.count('None')>0:
1622  btagDiscriminators.remove('None')
1623  if btagInfos.count('None')>0:
1624  btagInfos.remove('None')
1625  bTagging=(len(btagDiscriminators)>0 or len(btagInfos)>0)
1626 
1627  ## construct postfix label for auxiliary modules; this postfix
1628  ## label will start with a capitalized first letter following
1629  ## the CMS naming conventions and for improved readablility
1630  _labelName=labelName[:1].upper()+labelName[1:]
1631 
1632  ## supported algo types are ak, ca, and kt
1633  _algo=''
1634  for x in ["ak", "ca", "kt"]:
1635  if x in algo.lower():
1636  _algo=supportedJetAlgos[x]
1637  break
1638  if _algo=='':
1640 
1641  task = getPatAlgosToolsTask(process)
1642 
1643  ## add new updatedPatJets to process (keep instance for later further modifications)
1644  from PhysicsTools.PatAlgos.producersLayer1.jetUpdater_cfi import updatedPatJets
1645  if 'updatedPatJets'+_labelName+postfix in knownModules :
1646  _newPatJets=getattr(process, 'updatedPatJets'+_labelName+postfix)
1647  _newPatJets.jetSource=jetSource
1648  else :
1649  addToProcessAndTask('updatedPatJets'+_labelName+postfix,
1650  updatedPatJets.clone(jetSource=jetSource,
1651  printWarning=printWarning), process, task)
1652  _newPatJets=getattr(process, 'updatedPatJets'+_labelName+postfix)
1653  knownModules.append('updatedPatJets'+_labelName+postfix)
1654  ## add new selectedUpdatedPatJets to process
1655  from PhysicsTools.PatAlgos.selectionLayer1.jetSelector_cfi import selectedPatJets
1656  if 'selectedUpdatedPatJets'+_labelName+postfix in knownModules :
1657  _newSelectedPatJets=getattr(process, 'selectedUpdatedPatJets'+_labelName+postfix)
1658  _newSelectedPatJets.src='updatedPatJets'+_labelName+postfix
1659  else :
1660  addToProcessAndTask('selectedUpdatedPatJets'+_labelName+postfix,
1661  selectedPatJets.clone(src='updatedPatJets'+_labelName+postfix),
1662  process, task)
1663  knownModules.append('selectedUpdatedPatJets'+_labelName+postfix)
1664 
1665  ## run btagging if required by user
1666  if (bTagging):
1667  if printWarning:
1668  sys.stderr.write("**************************************************************\n")
1669  sys.stderr.write("b tagging needs to be run on uncorrected jets. Hence, the JECs\n")
1670  sys.stderr.write("will first be undone for 'updatedPatJets%s' and then applied to\n" % (_labelName+postfix) )
1671  sys.stderr.write("'updatedPatJetsTransientCorrected%s'.\n" % (_labelName+postfix) )
1672  sys.stderr.write("**************************************************************\n")
1673  _jetSource = cms.InputTag('updatedPatJets'+_labelName+postfix)
1674  ## insert new jet collection with jet corrections applied and btag info added
1675  self(
1676  process,
1677  labelName = ('TransientCorrected'+_labelName),
1678  jetSource = _jetSource,
1679  pfCandidates=pfCandidates,
1680  explicitJTA=explicitJTA,
1681  pvSource=pvSource,
1682  svSource=svSource,
1683  elSource=elSource,
1684  muSource=muSource,
1685  runIVF=runIVF,
1686  tightBTagNTkHits=tightBTagNTkHits,
1687  loadStdRecoBTag=loadStdRecoBTag,
1688  svClustering=svClustering,
1689  fatJets=fatJets,
1690  groomedFatJets=groomedFatJets,
1691  algo=algo,
1692  rParam=rParam,
1693  jetCorrections = jetCorrections,
1694  btagPrefix = btagPrefix,
1695  postfix = postfix
1696  )
1697  ## setup btagging
1698  _patJets=getattr(process, 'updatedPatJetsTransientCorrected'+_labelName+postfix)
1699  setupBTagging(process, _jetSource, pfCandidates, explicitJTA, pvSource, svSource, elSource, muSource, runIVF, tightBTagNTkHits, loadStdRecoBTag, svClustering, fatJets, groomedFatJets,
1700  _algo, rParam, btagDiscriminators, btagInfos, _patJets, _labelName, btagPrefix, postfix)
1701  ## update final selected jets
1702  _newSelectedPatJets=getattr(process, 'selectedUpdatedPatJets'+_labelName+postfix)
1703  _newSelectedPatJets.src='updatedPatJetsTransientCorrected'+_labelName+postfix
1704  ## remove automatically added but redundant 'TransientCorrected' selected jets
1705  delattr(process, 'selectedUpdatedPatJetsTransientCorrected'+_labelName+postfix)
1706  else:
1707  _newPatJets.addBTagInfo = False
1708  _newPatJets.addTagInfos = False
1709 
1710  ## add jet correction factors if required by user
1711  if (jetCorrections != None or bTagging):
1712  ## check the jet corrections format
1713  checkJetCorrectionsFormat(jetCorrections)
1714  ## reset MET corrrection
1715  if jetCorrections[2].lower() != 'none' and jetCorrections[2] != '':
1716  sys.stderr.write("-------------------------------------------------------------------\n")
1717  sys.stderr.write(" Warning: MET correction was set to " + jetCorrections[2] + " but\n")
1718  sys.stderr.write(" will be ignored. Please set it to \"None\" to avoid\n")
1719  sys.stderr.write(" getting this warning.\n")
1720  sys.stderr.write("-------------------------------------------------------------------\n")
1721  jetCorrectionsList = list(jetCorrections)
1722  jetCorrectionsList[2] = 'None'
1723  jetCorrections = tuple(jetCorrectionsList)
1724  ## if running b tagging, need to use uncorrected jets
1725  if (bTagging):
1726  jetCorrections = ('AK4PFchs', cms.vstring([]), 'None')
1727  ## setup jet energy corrections
1728  setupJetCorrections(process, knownModules, jetCorrections, jetSource, pvSource, _newPatJets, _labelName, postfix)
1729  else:
1730  ## switch jetCorrFactors off
1731  _newPatJets.addJetCorrFactors=False
1732 
1733 updateJetCollection=UpdateJetCollection()
1734 
1735 
def addToProcessAndTask(label, module, process, task)
Definition: helpers.py:27
def setupJetCorrections(process, knownModules, jetCorrections, jetSource, pvSource, patJets, labelName, postfix)
Definition: jetTools.py:25
_parameters
initialization of the base class
Definition: jetTools.py:1505
def toolCode(self, process)
Definition: jetTools.py:1590
def setupBTagging(process, jetSource, pfCandidates, explicitJTA, pvSource, svSource, elSource, muSource, runIVF, tightBTagNTkHits, loadStdRecoBTag, svClustering, fatJets, groomedFatJets, algo, rParam, btagDiscriminators, btagInfos, patJets, labelName, btagPrefix, postfix)
Definition: jetTools.py:236
def checkJetCorrectionsFormat(jetCorrections)
Definition: jetTools.py:17
def getPatAlgosToolsTask(process)
Definition: helpers.py:12
double split
Definition: MVATrainer.cc:139
def unsupportedJetAlgorithm(obj)
Definition: jetTools.py:1848
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run

Member Data Documentation

jetTools.UpdateJetCollection._comment
private

add comments

Definition at line 1507 of file jetTools.py.

jetTools.UpdateJetCollection._defaultParameters
staticprivate

Definition at line 1457 of file jetTools.py.

Referenced by HiCoreTools.RestrictInputToAOD.__call__(), trackTools.MakeAODTrackCandidates.__call__(), runJetUncertainties.RunJetUncertainties.__call__(), metTools.AddMETCollection.__call__(), editorTools.ChangeSource.__call__(), HiCoreTools.RemoveMCMatching.__call__(), trigTools.SwitchOnTrigger.__call__(), trackTools.MakePATTrackCandidates.__call__(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.__call__(), HiCoreTools.RemoveAllPATObjectsBut.__call__(), HiCoreTools.RemoveSpecificPATObjects.__call__(), trigTools.SwitchOnTriggerStandAlone.__call__(), trackTools.MakeTrackCandidates.__call__(), tauTools.AddTauCollection.__call__(), trigTools.SwitchOnTriggerMatching.__call__(), HiCoreTools.RemoveCleaning.__call__(), HiCoreTools.AddCleaning.__call__(), trigTools.SwitchOnTriggerMatchingStandAlone.__call__(), trigTools.SwitchOnTriggerMatchEmbedding.__call__(), jetTools.UpdateJetCollection.__call__(), jetTools.AddJetID.__call__(), jetTools.SetTagInfos.__call__(), editorTools.UserCodeTool.__init__(), metTools.AddMETCollection.__init__(), trackTools.MakeAODTrackCandidates.__init__(), HiCoreTools.RestrictInputToAOD.__init__(), runJetUncertainties.RunJetUncertainties.__init__(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.__init__(), Vispa.Plugins.ConfigEditor.ToolDataAccessor.ImportTool.__init__(), editorTools.ChangeSource.__init__(), HiCoreTools.RemoveMCMatching.__init__(), trackTools.MakePATTrackCandidates.__init__(), trigTools.SwitchOnTrigger.__init__(), HiCoreTools.RemoveAllPATObjectsBut.__init__(), HiCoreTools.RemoveSpecificPATObjects.__init__(), trigTools.SwitchOnTriggerStandAlone.__init__(), trackTools.MakeTrackCandidates.__init__(), tauTools.AddTauCollection.__init__(), trigTools.SwitchOnTriggerMatching.__init__(), HiCoreTools.RemoveCleaning.__init__(), HiCoreTools.AddCleaning.__init__(), trigTools.SwitchOnTriggerMatchingStandAlone.__init__(), trigTools.SwitchOnTriggerMatchEmbedding.__init__(), jetTools.UpdateJetCollection.__init__(), jetTools.AddJetID.__init__(), jetTools.SetTagInfos.__init__(), ConfigToolBase.ConfigToolBase.dumpPython(), ConfigToolBase.ConfigToolBase.getAllowedValues(), HiCoreTools.RestrictInputToAOD.getDefaultParameters(), trackTools.MakeAODTrackCandidates.getDefaultParameters(), metTools.AddMETCollection.getDefaultParameters(), editorTools.ChangeSource.getDefaultParameters(), HiCoreTools.RemoveMCMatching.getDefaultParameters(), trackTools.MakePATTrackCandidates.getDefaultParameters(), trigTools.SwitchOnTrigger.getDefaultParameters(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.getDefaultParameters(), HiCoreTools.RemoveAllPATObjectsBut.getDefaultParameters(), HiCoreTools.RemoveSpecificPATObjects.getDefaultParameters(), trigTools.SwitchOnTriggerStandAlone.getDefaultParameters(), trackTools.MakeTrackCandidates.getDefaultParameters(), tauTools.AddTauCollection.getDefaultParameters(), trigTools.SwitchOnTriggerMatching.getDefaultParameters(), HiCoreTools.RemoveCleaning.getDefaultParameters(), HiCoreTools.AddCleaning.getDefaultParameters(), trigTools.SwitchOnTriggerMatchingStandAlone.getDefaultParameters(), trigTools.SwitchOnTriggerMatchEmbedding.getDefaultParameters(), jetTools.UpdateJetCollection.getDefaultParameters(), jetTools.AddJetID.getDefaultParameters(), jetTools.SetTagInfos.getDefaultParameters(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.initializeInputTag(), ConfigToolBase.ConfigToolBase.reset(), and ConfigToolBase.ConfigToolBase.setParameter().

jetTools.UpdateJetCollection._label
staticprivate
jetTools.UpdateJetCollection._parameters
private

initialization of the base class

add all parameters that should be known to the class set defaults

Definition at line 1505 of file jetTools.py.

Referenced by runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.__call__(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.ak4JetReclustering(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.createMVAMETModule(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.createSmearedJetModule(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.extractMET(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.getCorrectedMET(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.getUnclusteredVariationsForMVAMET(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.getVariations(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.jetCleaning(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.jetConfiguration(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.miniAODConfiguration(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.miniAODConfigurationPost(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.produceMET(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.recomputeRawMetFromPfcs(), HiCoreTools.RestrictInputToAOD.toolCode(), trackTools.MakeAODTrackCandidates.toolCode(), metTools.AddMETCollection.toolCode(), runJetUncertainties.RunJetUncertainties.toolCode(), HiCoreTools.RemoveMCMatching.toolCode(), trigTools.SwitchOnTrigger.toolCode(), trackTools.MakePATTrackCandidates.toolCode(), HiCoreTools.RemoveAllPATObjectsBut.toolCode(), HiCoreTools.RemoveSpecificPATObjects.toolCode(), trigTools.SwitchOnTriggerStandAlone.toolCode(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.toolCode(), trackTools.MakeTrackCandidates.toolCode(), tauTools.AddTauCollection.toolCode(), HiCoreTools.RemoveCleaning.toolCode(), trigTools.SwitchOnTriggerMatching.toolCode(), HiCoreTools.AddCleaning.toolCode(), trigTools.SwitchOnTriggerMatchingStandAlone.toolCode(), trigTools.SwitchOnTriggerMatchEmbedding.toolCode(), jetTools.UpdateJetCollection.toolCode(), jetTools.AddJetID.toolCode(), jetTools.SetTagInfos.toolCode(), and runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.updateJECs().