CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Attributes | Private Attributes | Static Private Attributes
jetTools.AddJetCollection Class Reference
Inheritance diagram for jetTools.AddJetCollection:

Public Member Functions

def __call__
 
def __init__
 
def getDefaultParameters
 
def toolCode
 

Static Public Attributes

tuple acceptedBtagDiscriminators = list()
 setup all required btagDiscriminators More...
 
tuple acceptedTagInfos = list()
 setup all required btagInfos : we give a dedicated treatment for different types of tagInfos here. More...
 
tuple addJetCollection = AddJetCollection()
 switch jetCorrFactors off More...
 
tuple bHadrons = cms.InputTag("patJetPartons"+postfix,"bHadrons")
 
tuple cHadrons = cms.InputTag("patJetPartons"+postfix,"cHadrons")
 
 error = False
 check whether L1Offset or L1FastJet is part of levels More...
 
 jetAlgorithm = _algo,
 
 jets = jetSource,
 
 jetTracksAssociator = ak4JetTracksAssociatorAtVertex
 
tuple partons = cms.InputTag("patJetPartons"+postfix,"partons")
 
tuple requiredTagInfos = list(btagInfos)
 modify new patJets collection accordingly More...
 
 rParam = rParam,
 
 tagInfoCovered = False
 

Private Attributes

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

Static Private Attributes

tuple _btagInfo = getattr(process, btagInfo+_labelName+postfix)
 
 _corrector = _payloadType
 
tuple _defaultParameters = dicttypes.SortedKeysDict()
 
string _label = 'addJetCollection'
 
 _labelCorrName = _labelName
 set up MET(Type1) correction modules More...
 
string _labelCorrName = 'For'
 
tuple _newJetTracksAssociationAtVertex = getattr(process, 'jetTracksAssociatorAtVertex'+_labelName+postfix)
 
tuple _newPatJetCharge = getattr(process, 'patJetCharge'+_labelName+postfix)
 
tuple _newPatJetCorrFactors = getattr(process, 'patJetCorrFactors'+_labelName+postfix)
 
tuple _newPatJetFlavourAssociation = getattr(process, 'patJetFlavourAssociationLegacy'+_labelName+postfix)
 modify new patJets collection accordingly More...
 
tuple _newPatJetGenJetMatch = getattr(process, 'patJetGenJetMatch'+_labelName+postfix)
 
tuple _newPatJetPartonAssociation = getattr(process, 'patJetPartonAssociationLegacy'+_labelName+postfix)
 
tuple _newPatJetPartonMatch = getattr(process, 'patJetPartonMatch'+_labelName+postfix)
 
tuple _newPatJets = getattr(process, 'patJets'+_labelName+postfix)
 
tuple _newSelectedPatJets = getattr(process, 'selectedPatJets'+_labelName+postfix)
 
list _payloadType = jetCorrections[0]
 configure MET(Type1) corrections More...
 
string _type = "NONE"
 replace corresponding tags for pat jet production More...
 

Detailed Description

Tool to add a new jet collection to your PAT Tuple or to modify an existing one.

Definition at line 27 of file jetTools.py.

Constructor & Destructor Documentation

def jetTools.AddJetCollection.__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 34 of file jetTools.py.

References editorTools.UserCodeTool._defaultParameters, heavyIonTools.ConfigureHeavyIons._defaultParameters, coreTools.RunOnData._defaultParameters, Vispa.Plugins.ConfigEditor.ToolDataAccessor.ImportTool._defaultParameters, jetTools.AddJetCollection._defaultParameters, heavyIonTools.ProductionDefaults._defaultParameters, editorTools.ChangeSource._defaultParameters, cmsswVersionTools.PickRelValInputFiles._defaultParameters, coreTools.RemoveMCMatching._defaultParameters, heavyIonTools.SelectionDefaults._defaultParameters, heavyIonTools.DisbaleMonteCarloDeps._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(), LutXml.addParameter(), ConfigToolBase.ConfigToolBase.addParameter(), and edm::ParameterSet.addParameter().

34 
35  def __init__(self):
36  """
37  Initialize elements of the class. Note that the tool needs to be derived from ConfigToolBase to be usable in the configEditor.
38  """
39  ## initialization of the base class
40  ConfigToolBase.__init__(self)
41  ## add all parameters that should be known to the class
42  self.addParameter(self._defaultParameters,'labelName', 'UNDEFINED', "Label name of the new patJet collection.", str)
43  self.addParameter(self._defaultParameters,'postfix','', "Postfix from usePF2PAT.", str)
44  self.addParameter(self._defaultParameters,'jetSource','', "Label of the input collection from which the new patJet collection should be created", cms.InputTag)
45  self.addParameter(self._defaultParameters,'pfCandidates',cms.InputTag('particleFlow'), "Label of the input collection for candidatecandidatese used in b-tagging", cms.InputTag)
46  self.addParameter(self._defaultParameters,'explicitJTA', False, "Use explicit jet-track association")
47  self.addParameter(self._defaultParameters,'pvSource',cms.InputTag('offlinePrimaryVertices'), "Label of the input collection for primary vertices used in b-tagging", cms.InputTag)
48  self.addParameter(self._defaultParameters,'svSource',cms.InputTag('inclusiveCandidateSecondaryVertices'), "Label of the input collection for IVF vertices used in b-tagging", cms.InputTag)
49  self.addParameter(self._defaultParameters,'elSource',cms.InputTag('gedGsfElectrons'), "Label of the input collection for electrons used in b-tagging", cms.InputTag)
50  self.addParameter(self._defaultParameters,'muSource',cms.InputTag('muons'), "Label of the input collection for muons used in b-tagging", cms.InputTag)
51  self.addParameter(self._defaultParameters,'runIVF', False, "Re-run IVF secondary vertex reconstruction")
52  self.addParameter(self._defaultParameters,'svClustering', False, "Secondary vertices ghost-associated to jets using jet clustering (mostly intended for subjets)")
53  self.addParameter(self._defaultParameters,'fatJets', cms.InputTag(''), "Fat jet collection used for secondary vertex clustering", cms.InputTag)
54  self.addParameter(self._defaultParameters,'groomedFatJets', cms.InputTag(''), "Groomed fat jet collection used for secondary vertex clustering", cms.InputTag)
55  self.addParameter(self._defaultParameters,'algo', 'AK', "Jet algorithm of the input collection from which the new patJet collection should be created")
56  self.addParameter(self._defaultParameters,'rParam', 0.4, "Jet size (distance parameter R used in jet clustering)")
57  self.addParameter(self._defaultParameters,'getJetMCFlavour', True, "Get jet MC truth flavour")
58  self.addParameter(self._defaultParameters,'genJetCollection', cms.InputTag("ak4GenJets"), "GenJet collection to match to", cms.InputTag)
59  self.addParameter(self._defaultParameters,'genParticles', cms.InputTag("genParticles"), "GenParticle collection to be used", cms.InputTag)
60  self.addParameter(self._defaultParameters,'jetCorrections',None, "Add all relevant information about jet energy corrections that you want to be added to your new patJet \
61  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 \
62  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 \
63  new patJet collection. This should be given as a list of strings. Available values are L1Offset, L1FastJet, L1JPTOffset, L2Relative, L3Absolute, L5Falvour, L7Parton; the \
64  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 \
65  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 \
66  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\' \
67  and \'type-2\' are not case sensitive.", tuple, acceptNoneValue=True)
68  self.addParameter(self._defaultParameters,'btagDiscriminators',['None'], "If you are interested in btagging, in most cases just the labels of the btag discriminators that \
69  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. \
70  If this list is empty no btag discriminator information will be added to your new patJet collection.", allowedValues=supportedBtagDiscr.keys(),Type=list)
71  self.addParameter(self._defaultParameters,'btagInfos',['None'], "The btagInfos objects contain all relevant information from which all discriminators of a certain \
72  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 \
73  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 \
74  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 \
75  will be added to your new patJet collection.", allowedValues=supportedBtagInfos,Type=list)
76  self.addParameter(self._defaultParameters,'jetTrackAssociation',False, "Add JetTrackAssociation and JetCharge from reconstructed tracks to your new patJet collection. This \
77  switch is only of relevance if you don\'t add any btag information to your new patJet collection (btagDiscriminators or btagInfos) and still want this information added to \
78  your new patJetCollection. If btag information of any form is added to the new patJet collection this information will be added automatically.")
79  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 \
80  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 \
81  to more than one output module.")
82  ## set defaults
83  self._parameters=copy.deepcopy(self._defaultParameters)
84  ## add comments
85  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\
86  energy correction factors, btag infomration and generator match information to the new patJet collection depending on the parameters that you pass on to this function. Consult \
87  the descriptions of each parameter for more information."
_parameters
initialization of the base class
Definition: jetTools.py:82
_comment
add comments
Definition: jetTools.py:84

Member Function Documentation

def jetTools.AddJetCollection.__call__ (   self,
  process,
  labelName = None,
  postfix = None,
  jetSource = None,
  pfCandidates = None,
  explicitJTA = None,
  pvSource = None,
  svSource = None,
  elSource = None,
  muSource = None,
  runIVF = None,
  svClustering = None,
  fatJets = None,
  groomedFatJets = None,
  algo = None,
  rParam = None,
  getJetMCFlavour = None,
  genJetCollection = None,
  genParticles = None,
  jetCorrections = None,
  btagDiscriminators = None,
  btagInfos = None,
  jetTrackAssociation = None,
  outputModules = 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 94 of file jetTools.py.

References editorTools.UserCodeTool._defaultParameters, heavyIonTools.ConfigureHeavyIons._defaultParameters, coreTools.RunOnData._defaultParameters, Vispa.Plugins.ConfigEditor.ToolDataAccessor.ImportTool._defaultParameters, jetTools.AddJetCollection._defaultParameters, heavyIonTools.ProductionDefaults._defaultParameters, editorTools.ChangeSource._defaultParameters, cmsswVersionTools.PickRelValInputFiles._defaultParameters, coreTools.RemoveMCMatching._defaultParameters, heavyIonTools.SelectionDefaults._defaultParameters, heavyIonTools.DisbaleMonteCarloDeps._defaultParameters, SignedImpactParameter3D.apply(), gen::PhotosInterfaceBase.apply(), SignedTransverseImpactParameter.apply(), MatrixReader.MatrixReader.apply, SignedDecayLength3D.apply(), DummyOOTPileupCorrection.apply(), gen::PhotosppInterface.apply(), SurveyParameters.apply(), FWPSetCellEditor.apply(), gen::PhotosInterface.apply(), HcalDeterministicFit.apply(), FWGUIEventFilter.apply(), DeviationsFromFileSensor2D.apply(), BeamSpotAlignmentParameters.apply(), RigidBodyAlignmentParameters.apply(), MatRepSparse< T, D1, D2, S, F >.apply(), ConfigToolBase.ConfigToolBase.apply(), OOTPileupCorrData.apply(), AlignmentParameters.apply(), BowedSurfaceAlignmentParameters.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(), PulseShapeFitOOTPileupCorrection.apply(), Vispa.Plugins.ConfigEditor.ToolDialog.ToolDialog.apply(), reco::Add< T >.apply(), reco::Sub< T >.apply(), reco::Mul< T >.apply(), reco::Div< T >.apply(), cmsswVersionTools.PickRelValInputFiles.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< Num1, Len1, Dim1 >.apply(), npstat::ArrayND< Numeric >.apply(), npstat::ArrayND< Numeric, StackLen, StackDim >.apply(), Config.ProcessModifier.apply(), ora::OraMainTable.setParameter(), ora::IMainTable.setParameter(), ora::PoolMainTable.setParameter(), PedeReader.setParameter(), QIE8Simulator.setParameter(), AbsElectronicODERHS.setParameter(), IntegratedCalibrationBase.setParameter(), SiStripLorentzAngleCalibration.setParameter(), SiPixelLorentzAngleCalibration.setParameter(), SiStripBackplaneCalibration.setParameter(), fit::RootMinuit< Function >.setParameter(), and ConfigToolBase.ConfigToolBase.setParameter().

94 
95  def __call__(self,process,labelName=None,postfix=None,jetSource=None,pfCandidates=None,explicitJTA=None,pvSource=None,svSource=None,elSource=None,muSource=None,runIVF=None,svClustering=None,fatJets=None,groomedFatJets=None,algo=None,rParam=None,getJetMCFlavour=None,genJetCollection=None,genParticles=None,jetCorrections=None,btagDiscriminators=None,btagInfos=None,jetTrackAssociation=None,outputModules=None):
96  """
97  Function call wrapper. This will check the parameters and call the actual implementation that
98  can be found in toolCode via the base class function apply.
99  """
100  if labelName is None:
101  labelName=self._defaultParameters['labelName'].value
102  self.setParameter('labelName', labelName)
103  if postfix is None:
104  postfix=self._defaultParameters['postfix'].value
105  self.setParameter('postfix', postfix)
106  if jetSource is None:
107  jetSource=self._defaultParameters['jetSource'].value
108  self.setParameter('jetSource', jetSource)
109  if pfCandidates is None:
110  pfCandidates=self._defaultParameters['pfCandidates'].value
111  self.setParameter('pfCandidates', pfCandidates)
112  if explicitJTA is None:
113  explicitJTA=self._defaultParameters['explicitJTA'].value
114  self.setParameter('explicitJTA', explicitJTA)
115  if pvSource is None:
116  pvSource=self._defaultParameters['pvSource'].value
117  self.setParameter('pvSource', pvSource)
118  if svSource is None:
119  svSource=self._defaultParameters['svSource'].value
120  self.setParameter('svSource', svSource)
121  if elSource is None:
122  elSource=self._defaultParameters['elSource'].value
123  self.setParameter('elSource', elSource)
124  if muSource is None:
125  muSource=self._defaultParameters['muSource'].value
126  self.setParameter('muSource', muSource)
127  if runIVF is None:
128  runIVF=self._defaultParameters['runIVF'].value
129  self.setParameter('runIVF', runIVF)
130  if svClustering is None:
131  svClustering=self._defaultParameters['svClustering'].value
132  self.setParameter('svClustering', svClustering)
133  if fatJets is None:
134  fatJets=self._defaultParameters['fatJets'].value
135  self.setParameter('fatJets', fatJets)
136  if groomedFatJets is None:
137  groomedFatJets=self._defaultParameters['groomedFatJets'].value
138  self.setParameter('groomedFatJets', groomedFatJets)
139  if algo is None:
140  algo=self._defaultParameters['algo'].value
141  self.setParameter('algo', algo)
142  if rParam is None:
143  rParam=self._defaultParameters['rParam'].value
144  self.setParameter('rParam', rParam)
145  if getJetMCFlavour is None:
146  getJetMCFlavour=self._defaultParameters['getJetMCFlavour'].value
147  self.setParameter('getJetMCFlavour', getJetMCFlavour)
148  if genJetCollection is None:
149  genJetCollection=self._defaultParameters['genJetCollection'].value
150  self.setParameter('genJetCollection', genJetCollection)
151  if genParticles is None:
152  genParticles=self._defaultParameters['genParticles'].value
153  self.setParameter('genParticles', genParticles)
154  if jetCorrections is None:
155  jetCorrections=self._defaultParameters['jetCorrections'].value
156  self.setParameter('jetCorrections', jetCorrections)
157  if btagDiscriminators is None:
158  btagDiscriminators=self._defaultParameters['btagDiscriminators'].value
159  self.setParameter('btagDiscriminators', btagDiscriminators)
160  if btagInfos is None:
161  btagInfos=self._defaultParameters['btagInfos'].value
162  self.setParameter('btagInfos', btagInfos)
163  if jetTrackAssociation is None:
164  jetTrackAssociation=self._defaultParameters['jetTrackAssociation'].value
165  self.setParameter('jetTrackAssociation', jetTrackAssociation)
166  if outputModules is None:
167  outputModules=self._defaultParameters['outputModules'].value
168  self.setParameter('outputModules', outputModules)
169  self.apply(process)
def jetTools.AddJetCollection.getDefaultParameters (   self)
Return default parameters of the class

Definition at line 88 of file jetTools.py.

References editorTools.UserCodeTool._defaultParameters, heavyIonTools.ConfigureHeavyIons._defaultParameters, coreTools.RunOnData._defaultParameters, Vispa.Plugins.ConfigEditor.ToolDataAccessor.ImportTool._defaultParameters, jetTools.AddJetCollection._defaultParameters, heavyIonTools.ProductionDefaults._defaultParameters, editorTools.ChangeSource._defaultParameters, cmsswVersionTools.PickRelValInputFiles._defaultParameters, coreTools.RemoveMCMatching._defaultParameters, heavyIonTools.SelectionDefaults._defaultParameters, and heavyIonTools.DisbaleMonteCarloDeps._defaultParameters.

88 
89  def getDefaultParameters(self):
90  """
91  Return default parameters of the class
92  """
93  return self._defaultParameters
def jetTools.AddJetCollection.toolCode (   self,
  process 
)
Tool code implementation

Definition at line 170 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, coreTools.RemoveMCMatching._parameters, cmsswVersionTools.PickRelValInputFiles._parameters, jetTools.AddJetCollection._parameters, heavyIonTools.SelectionDefaults._parameters, heavyIonTools.DisbaleMonteCarloDeps._parameters, list(), split, jetTools.undefinedLabelName(), jetTools.unsupportedJetAlgorithm(), and pileupCalc.upper.

171  def toolCode(self, process):
172  """
173  Tool code implementation
174  """
175  ## initialize parameters
176  labelName=self._parameters['labelName'].value
177  postfix=self._parameters['postfix'].value
178  jetSource=self._parameters['jetSource'].value
179  pfCandidates=self._parameters['pfCandidates'].value
180  explicitJTA=self._parameters['explicitJTA'].value
181  pvSource=self._parameters['pvSource'].value
182  svSource=self._parameters['svSource'].value
183  elSource=self._parameters['elSource'].value
184  muSource=self._parameters['muSource'].value
185  runIVF=self._parameters['runIVF'].value
186  svClustering=self._parameters['svClustering'].value
187  fatJets=self._parameters['fatJets'].value
188  groomedFatJets=self._parameters['groomedFatJets'].value
189  algo=self._parameters['algo'].value
190  rParam=self._parameters['rParam'].value
191  getJetMCFlavour=self._parameters['getJetMCFlavour'].value
192  genJetCollection=self._parameters['genJetCollection'].value
193  genParticles=self._parameters['genParticles'].value
194  jetCorrections=self._parameters['jetCorrections'].value
195  btagDiscriminators=list(self._parameters['btagDiscriminators'].value)
196  btagInfos=list(self._parameters['btagInfos'].value)
197  jetTrackAssociation=self._parameters['jetTrackAssociation'].value
198  outputModules=list(self._parameters['outputModules'].value)
199 
200  ## added jets must have a defined 'labelName'
201  if labelName=='UNDEFINED':
202  undefinedLabelName(self)
203 
204  ## a list of all producer modules, which are already known to process
205  knownModules = process.producerNames().split()
206  ## determine whether btagging information is required or not
207  if btagDiscriminators.count('None')>0:
208  btagDiscriminators.remove('None')
209  if btagInfos.count('None')>0:
210  btagInfos.remove('None')
211  bTagging=(len(btagDiscriminators)>0 or len(btagInfos)>0)
212  ## check if any legacy btag discriminators are being used
213  infos = 0
214  for info in btagInfos:
215  if info.startswith('pf'): infos = infos + 1
216  if 'softpf' in info.lower(): infos = infos + 1
217  tags = 0
218  for tag in btagDiscriminators:
219  if tag.startswith('pf'): tags = tags + 1
220  if 'softpf' in tag.lower(): tags = tags + 1
221  bTaggingLegacy=(len(btagDiscriminators)>tags or len(btagInfos)>infos)
222  ## construct postfix label for auxiliary modules; this postfix
223  ## label will start with a capitalized first letter following
224  ## the CMS nameing conventions and for improved readablility
225  _labelName=labelName[:1].upper()+labelName[1:]
226 
227  #_labelName=labelName
228  ## supported algo types are ak, ca, and kt
229  _algo=''
230  for x in ["ak", "ca", "kt"]:
231  if x in algo.lower():
232  _algo=supportedJetAlgos[x]
233  break
234  if _algo=='':
unsupportedJetAlgorithm(self)
def undefinedLabelName
Definition: jetTools.py:968
_parameters
initialization of the base class
Definition: jetTools.py:82
def unsupportedJetAlgorithm
Definition: jetTools.py:975
double split
Definition: MVATrainer.cc:139
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

tuple jetTools.AddJetCollection._btagInfo = getattr(process, btagInfo+_labelName+postfix)
staticprivate

Definition at line 414 of file jetTools.py.

jetTools.AddJetCollection._comment
private

add comments

Definition at line 84 of file jetTools.py.

Referenced by runJetUncertainties.RunJetUncertainties.__init__(), and runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.__init__().

jetTools.AddJetCollection._corrector = _payloadType
staticprivate

Definition at line 610 of file jetTools.py.

tuple jetTools.AddJetCollection._defaultParameters = dicttypes.SortedKeysDict()
staticprivate

Definition at line 32 of file jetTools.py.

Referenced by HiCoreTools.RestrictInputToAOD.__call__(), trackTools.MakeAODTrackCandidates.__call__(), runJetUncertainties.RunJetUncertainties.__call__(), metTools.AddMETCollection.__call__(), HiCoreTools.RemoveMCMatching.__call__(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.__call__(), trackTools.MakePATTrackCandidates.__call__(), trigTools.SwitchOnTrigger.__call__(), jetTools.AddJetCollection.__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.SwitchJetCollection.__call__(), jetTools.AddJetID.__call__(), jetTools.SetTagInfos.__call__(), metTools.AddMETCollection.__init__(), trackTools.MakeAODTrackCandidates.__init__(), HiCoreTools.RestrictInputToAOD.__init__(), runJetUncertainties.RunJetUncertainties.__init__(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.__init__(), jetTools.AddJetCollection.__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.SwitchJetCollection.__init__(), jetTools.AddJetID.__init__(), jetTools.SetTagInfos.__init__(), ConfigToolBase.ConfigToolBase.dumpPython(), ConfigToolBase.ConfigToolBase.getAllowedValues(), HiCoreTools.RestrictInputToAOD.getDefaultParameters(), trackTools.MakeAODTrackCandidates.getDefaultParameters(), metTools.AddMETCollection.getDefaultParameters(), HiCoreTools.RemoveMCMatching.getDefaultParameters(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.getDefaultParameters(), trackTools.MakePATTrackCandidates.getDefaultParameters(), jetTools.AddJetCollection.getDefaultParameters(), trigTools.SwitchOnTrigger.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.SwitchJetCollection.getDefaultParameters(), jetTools.AddJetID.getDefaultParameters(), jetTools.SetTagInfos.getDefaultParameters(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.initializeInputTag(), ConfigToolBase.ConfigToolBase.reset(), and ConfigToolBase.ConfigToolBase.setParameter().

string jetTools.AddJetCollection._label = 'addJetCollection'
staticprivate

Definition at line 31 of file jetTools.py.

Referenced by trigTools.SwitchOnTrigger.toolCode(), trigTools.SwitchOnTriggerStandAlone.toolCode(), trigTools.SwitchOnTriggerMatching.toolCode(), trigTools.SwitchOnTriggerMatchingStandAlone.toolCode(), and trigTools.SwitchOnTriggerMatchEmbedding.toolCode().

jetTools.AddJetCollection._labelCorrName = _labelName
staticprivate

set up MET(Type1) correction modules

Definition at line 621 of file jetTools.py.

string jetTools.AddJetCollection._labelCorrName = 'For'
staticprivate

Definition at line 623 of file jetTools.py.

tuple jetTools.AddJetCollection._newJetTracksAssociationAtVertex = getattr(process, 'jetTracksAssociatorAtVertex'+_labelName+postfix)
staticprivate

Definition at line 351 of file jetTools.py.

tuple jetTools.AddJetCollection._newPatJetCharge = getattr(process, 'patJetCharge'+_labelName+postfix)
staticprivate

Definition at line 363 of file jetTools.py.

tuple jetTools.AddJetCollection._newPatJetCorrFactors = getattr(process, 'patJetCorrFactors'+_labelName+postfix)
staticprivate

Definition at line 546 of file jetTools.py.

tuple jetTools.AddJetCollection._newPatJetFlavourAssociation = getattr(process, 'patJetFlavourAssociationLegacy'+_labelName+postfix)
staticprivate

modify new patJets collection accordingly

if the jets is actually a subjet

Definition at line 297 of file jetTools.py.

tuple jetTools.AddJetCollection._newPatJetGenJetMatch = getattr(process, 'patJetGenJetMatch'+_labelName+postfix)
staticprivate

Definition at line 266 of file jetTools.py.

tuple jetTools.AddJetCollection._newPatJetPartonAssociation = getattr(process, 'patJetPartonAssociationLegacy'+_labelName+postfix)
staticprivate

Definition at line 289 of file jetTools.py.

tuple jetTools.AddJetCollection._newPatJetPartonMatch = getattr(process, 'patJetPartonMatch'+_labelName+postfix)
staticprivate

Definition at line 257 of file jetTools.py.

tuple jetTools.AddJetCollection._newPatJets = getattr(process, 'patJets'+_labelName+postfix)
staticprivate

Definition at line 239 of file jetTools.py.

tuple jetTools.AddJetCollection._newSelectedPatJets = getattr(process, 'selectedPatJets'+_labelName+postfix)
staticprivate

Definition at line 248 of file jetTools.py.

jetTools.AddJetCollection._parameters
private

initialization of the base class

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

Definition at line 82 of file jetTools.py.

Referenced by runJetUncertainties.RunJetUncertainties.__init__(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.__init__(), HiCoreTools.RestrictInputToAOD.toolCode(), trackTools.MakeAODTrackCandidates.toolCode(), metTools.AddMETCollection.toolCode(), runJetUncertainties.RunJetUncertainties.toolCode(), HiCoreTools.RemoveMCMatching.toolCode(), trackTools.MakePATTrackCandidates.toolCode(), trigTools.SwitchOnTrigger.toolCode(), jetTools.AddJetCollection.toolCode(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.toolCode(), HiCoreTools.RemoveAllPATObjectsBut.toolCode(), HiCoreTools.RemoveSpecificPATObjects.toolCode(), trigTools.SwitchOnTriggerStandAlone.toolCode(), trackTools.MakeTrackCandidates.toolCode(), tauTools.AddTauCollection.toolCode(), HiCoreTools.RemoveCleaning.toolCode(), trigTools.SwitchOnTriggerMatching.toolCode(), HiCoreTools.AddCleaning.toolCode(), trigTools.SwitchOnTriggerMatchingStandAlone.toolCode(), trigTools.SwitchOnTriggerMatchEmbedding.toolCode(), jetTools.SwitchJetCollection.toolCode(), jetTools.AddJetID.toolCode(), and jetTools.SetTagInfos.toolCode().

list jetTools.AddJetCollection._payloadType = jetCorrections[0]
staticprivate

configure MET(Type1) corrections

set up jet correctors for MET corrections

Definition at line 596 of file jetTools.py.

string jetTools.AddJetCollection._type = "NONE"
staticprivate

replace corresponding tags for pat jet production

adjust output module; these collections will be empty anyhow, but we do it to stay clean add jet correction factors if required by user check for the correct format determine type of jet constituents from jetSource; supported jet constituent types are calo, pf, jpt, for pf also particleflow is aloowed as part of the jetSource label, which might be used in CommonTools.ParticleFlow

Definition at line 535 of file jetTools.py.

tuple jetTools.AddJetCollection.acceptedBtagDiscriminators = list()
static

setup all required btagDiscriminators

Definition at line 484 of file jetTools.py.

tuple jetTools.AddJetCollection.acceptedTagInfos = list()
static

setup all required btagInfos : we give a dedicated treatment for different types of tagInfos here.

A common treatment is possible but might require a more general approach anyway in coordination with the btagging POG.

Definition at line 408 of file jetTools.py.

tuple jetTools.AddJetCollection.addJetCollection = AddJetCollection()
static

switch jetCorrFactors off

Definition at line 670 of file jetTools.py.

tuple jetTools.AddJetCollection.bHadrons = cms.InputTag("patJetPartons"+postfix,"bHadrons")
static

Definition at line 328 of file jetTools.py.

tuple jetTools.AddJetCollection.cHadrons = cms.InputTag("patJetPartons"+postfix,"cHadrons")
static

Definition at line 329 of file jetTools.py.

jetTools.AddJetCollection.error = False
static

check whether L1Offset or L1FastJet is part of levels

configure module

we set this to True now as a L1 correction type should appear only once otherwise levels is miss configured

Definition at line 555 of file jetTools.py.

Referenced by argparse.ArgumentParser._get_option_tuples(), python.rootplot.argparse.ArgumentParser._get_option_tuples(), argparse.ArgumentParser._parse_known_args(), python.rootplot.argparse.ArgumentParser._parse_known_args(), argparse.ArgumentParser._parse_optional(), python.rootplot.argparse.ArgumentParser._parse_optional(), argparse.ArgumentParser._read_args_from_files(), python.rootplot.argparse.ArgumentParser._read_args_from_files(), argparse.ArgumentParser.add_subparsers(), python.rootplot.argparse.ArgumentParser.add_subparsers(), argparse.ArgumentParser.parse_args(), python.rootplot.argparse.ArgumentParser.parse_args(), argparse.ArgumentParser.parse_known_args(), and python.rootplot.argparse.ArgumentParser.parse_known_args().

jetTools.AddJetCollection.jetAlgorithm = _algo,
static

Definition at line 326 of file jetTools.py.

jetTools.AddJetCollection.jets = jetSource,
static

Definition at line 325 of file jetTools.py.

jetTools.AddJetCollection.jetTracksAssociator = ak4JetTracksAssociatorAtVertex
static

Definition at line 355 of file jetTools.py.

tuple jetTools.AddJetCollection.partons = cms.InputTag("patJetPartons"+postfix,"partons")
static

Definition at line 330 of file jetTools.py.

tuple jetTools.AddJetCollection.requiredTagInfos = list(btagInfos)
static

modify new patJets collection accordingly

modify new patJets collection accordingly run btagging if required by user expand tagInfos to what is explicitely required by user + implicit requirements that come in from one or the other discriminator

Definition at line 383 of file jetTools.py.

jetTools.AddJetCollection.rParam = rParam,
static

Definition at line 327 of file jetTools.py.

jetTools.AddJetCollection.tagInfoCovered = False
static

Definition at line 386 of file jetTools.py.