CMS 3D CMS Logo

Functions | Variables
iterativeTkConfig Namespace Reference

Functions

def _classifier (iteration, oldStyle=False, oldStyleQualityMasks=False)
 
def _clusterRemover (iteration)
 
def _modulePrefix (iteration)
 
def _seedOrTrackProducers (postfix, typ)
 
def _tracks (iteration)
 
def allEras ()
 
def clusterRemoverForIter (iteration, eraName="", postfix="", module=None)
 
def createEarlyTask (eraName, postfix, modDict)
 
def iterationAlgos (postfix, includeSequenceName=False)
 
def nonDefaultEras ()
 
def seedProducers (postfix)
 
def trackProducers (postfix)
 

Variables

 _allEras
 
 _defaultEra
 
 _defaultEraName
 
 _iterations
 
 _iterations_muonSeeded
 
 _iterations_muonSeeded_trackingPhase1
 
 _iterations_muonSeeded_trackingPhase2PU140
 
 _iterations_muonSeeded_trackingPhase2PU140_VS
 
 _iterations_trackingLowPU
 
 _iterations_trackingPhase1
 
 _iterations_trackingPhase2PU140
 
 _iterations_trackingPhase2PU140_VS
 
 _multipleSeedProducers
 
 _multipleSeedProducers_trackingLowPU
 
 _multipleSeedProducers_trackingPhase1
 
 _multipleSeedProducers_trackingPhase2PU140
 
 _nonDefaultEraNames
 
 _nonDefaultEras
 
 _oldStyleHasSelector
 
 _trackClusterRemoverBase
 
 _trackClusterRemoverBase_trackingPhase2PU140
 
 func
 
 maxChi2
 
 minNumberOfLayersWithMeasBeforeFiltering
 
 names
 
 phase2OTClusters
 
 phase2pixelClusters
 
 pixelClusters
 
 stripClusters
 
 TrackQuality
 

Function Documentation

◆ _classifier()

def iterativeTkConfig._classifier (   iteration,
  oldStyle = False,
  oldStyleQualityMasks = False 
)
private

Definition at line 153 of file iterativeTkConfig.py.

References _modulePrefix().

Referenced by clusterRemoverForIter().

153 def _classifier(iteration, oldStyle=False, oldStyleQualityMasks=False):
154  pre = _modulePrefix(iteration)
155  if oldStyle:
156  if iteration in _oldStyleHasSelector:
157  return pre+"Selector:" + ("QualityMasks" if oldStyleQualityMasks else pre)
158  else:
159  return pre
160  else:
161  return pre+":QualityMasks"
162 
def _classifier(iteration, oldStyle=False, oldStyleQualityMasks=False)
def _modulePrefix(iteration)

◆ _clusterRemover()

def iterativeTkConfig._clusterRemover (   iteration)
private

Definition at line 147 of file iterativeTkConfig.py.

References _modulePrefix().

Referenced by clusterRemoverForIter().

147 def _clusterRemover(iteration):
148  return _modulePrefix(iteration)+"Clusters"
149 
def _clusterRemover(iteration)
def _modulePrefix(iteration)

◆ _modulePrefix()

def iterativeTkConfig._modulePrefix (   iteration)
private

Definition at line 144 of file iterativeTkConfig.py.

Referenced by _classifier(), _clusterRemover(), _seedOrTrackProducers(), _tracks(), and iterationAlgos().

144 def _modulePrefix(iteration):
145  return iteration[0].lower()+iteration[1:]
146 
def _modulePrefix(iteration)

◆ _seedOrTrackProducers()

def iterativeTkConfig._seedOrTrackProducers (   postfix,
  typ 
)
private

Definition at line 184 of file iterativeTkConfig.py.

References _modulePrefix(), and python.rootplot.root2matplotlib.replace().

Referenced by seedProducers(), and trackProducers().

184 def _seedOrTrackProducers(postfix, typ):
185  ret = []
186  iters = globals()["_iterations"+postfix]
187  if typ == "Seeds":
188  multipleSeedProducers = globals()["_multipleSeedProducers"+postfix]
189  else:
190  multipleSeedProducers = None
191  for i in iters:
192  seeder = _modulePrefix(i)+typ
193  if multipleSeedProducers is not None and i in multipleSeedProducers:
194  ret.extend([seeder+m for m in multipleSeedProducers[i]])
195  else:
196  ret.append(seeder)
197 
198  for i in globals().get("_iterations_muonSeeded"+postfix, _iterations_muonSeeded):
199  if _modulePrefix(i).endswith("Step"):
200  ret.append(_modulePrefix(i)+typ)
201  else:
202  ret.append(_modulePrefix(i).replace("Step", typ))
203 
204  return ret
205 
def _seedOrTrackProducers(postfix, typ)
def replace(string, replacements)
def _modulePrefix(iteration)

◆ _tracks()

def iterativeTkConfig._tracks (   iteration)
private

Definition at line 150 of file iterativeTkConfig.py.

References _modulePrefix().

Referenced by clusterRemoverForIter().

150 def _tracks(iteration):
151  return _modulePrefix(iteration)+"Tracks"
152 
def _modulePrefix(iteration)
def _tracks(iteration)

◆ allEras()

def iterativeTkConfig.allEras ( )

Definition at line 163 of file iterativeTkConfig.py.

163 def allEras():
164  return _allEras
165 

◆ clusterRemoverForIter()

def iterativeTkConfig.clusterRemoverForIter (   iteration,
  eraName = "",
  postfix = "",
  module = None 
)

Definition at line 212 of file iterativeTkConfig.py.

References _classifier(), _clusterRemover(), and _tracks().

212 def clusterRemoverForIter(iteration, eraName="", postfix="", module=None):
213  if module is None:
214  module = _trackClusterRemoverBase.clone()
215  if eraName == "trackingPhase2PU140":
216  module = globals().get("_trackClusterRemoverBase"+postfix, _trackClusterRemoverBase)
217 
218  iters = globals()["_iterations"+postfix]
219  try:
220  # DisplacedRegionalStep is a special case because it comes after the
221  # usual muon-seeded steps
222  ind = iters.index(iteration) if iteration != "DisplacedRegionalStep" else len(iters)
223  except ValueError:
224  # if the iteration is not active in era, just return the same
225  return module
226 
227  if ind == 0:
228  raise Exception("Iteration %s is the first iteration in era %s, asking cluster remover configuration does not make sense" % (iteration, eraName))
229  prevIter = iters[ind-1]
230  # JetCoreRegionalStep uses all clusters, so if that is the previous
231  # iteration, use the one before that for cluster removal
232  if prevIter == "JetCoreRegionalStep":
233  prevIter = iters[ind-2]
234 
235  customize = dict(
236  trajectories = _tracks(prevIter),
237  oldClusterRemovalInfo = _clusterRemover(prevIter) if ind >= 2 else "", # 1st iteration does not have cluster remover
238  )
239  if eraName in ["trackingPhase2PU140"]:
240  customize["overrideTrkQuals"] = _classifier(prevIter, oldStyle=True) # old-style selector
241  elif eraName == "trackingLowPU":
242  customize["overrideTrkQuals"] = _classifier(prevIter, oldStyle=True, oldStyleQualityMasks=True) # old-style selector with 'QualityMasks' instance label
243  else:
244  customize["trackClassifier"] = _classifier(prevIter)
245 
246  return module.clone(**customize)
247 
def clusterRemoverForIter(iteration, eraName="", postfix="", module=None)
def _clusterRemover(iteration)
def _classifier(iteration, oldStyle=False, oldStyleQualityMasks=False)
def _tracks(iteration)

◆ createEarlyTask()

def iterativeTkConfig.createEarlyTask (   eraName,
  postfix,
  modDict 
)

Definition at line 169 of file iterativeTkConfig.py.

169 def createEarlyTask(eraName, postfix, modDict):
170  task = cms.Task()
171  for it in globals()["_iterations"+postfix]:
172  task.add(modDict[it+'Task'])
173  return task
174 
def createEarlyTask(eraName, postfix, modDict)

◆ iterationAlgos()

def iterativeTkConfig.iterationAlgos (   postfix,
  includeSequenceName = False 
)

Definition at line 175 of file iterativeTkConfig.py.

References _modulePrefix().

175 def iterationAlgos(postfix, includeSequenceName=False):
176  muonVariable = "_iterations_muonSeeded"+postfix
177  iterations = globals()["_iterations"+postfix] + globals().get(muonVariable, _iterations_muonSeeded)
178 
179  if includeSequenceName:
180  return [(_modulePrefix(i), i) for i in iterations]
181  else:
182  return [_modulePrefix(i) for i in iterations]
183 
def iterationAlgos(postfix, includeSequenceName=False)
def _modulePrefix(iteration)

◆ nonDefaultEras()

def iterativeTkConfig.nonDefaultEras ( )

Definition at line 166 of file iterativeTkConfig.py.

166 def nonDefaultEras():
167  return _nonDefaultEras
168 

◆ seedProducers()

def iterativeTkConfig.seedProducers (   postfix)

Definition at line 206 of file iterativeTkConfig.py.

References _seedOrTrackProducers().

206 def seedProducers(postfix):
207  return _seedOrTrackProducers(postfix, "Seeds")
208 
def _seedOrTrackProducers(postfix, typ)
def seedProducers(postfix)

◆ trackProducers()

def iterativeTkConfig.trackProducers (   postfix)

Definition at line 209 of file iterativeTkConfig.py.

References _seedOrTrackProducers().

209 def trackProducers(postfix):
210  return _seedOrTrackProducers(postfix, "Tracks")
211 
def _seedOrTrackProducers(postfix, typ)
def trackProducers(postfix)

Variable Documentation

◆ _allEras

iterativeTkConfig._allEras
private

Definition at line 16 of file iterativeTkConfig.py.

◆ _defaultEra

iterativeTkConfig._defaultEra
private

Definition at line 10 of file iterativeTkConfig.py.

◆ _defaultEraName

iterativeTkConfig._defaultEraName
private

Definition at line 6 of file iterativeTkConfig.py.

◆ _iterations

iterativeTkConfig._iterations
private

Definition at line 19 of file iterativeTkConfig.py.

◆ _iterations_muonSeeded

iterativeTkConfig._iterations_muonSeeded
private

Definition at line 74 of file iterativeTkConfig.py.

◆ _iterations_muonSeeded_trackingPhase1

iterativeTkConfig._iterations_muonSeeded_trackingPhase1
private

Definition at line 78 of file iterativeTkConfig.py.

◆ _iterations_muonSeeded_trackingPhase2PU140

iterativeTkConfig._iterations_muonSeeded_trackingPhase2PU140
private

Definition at line 88 of file iterativeTkConfig.py.

◆ _iterations_muonSeeded_trackingPhase2PU140_VS

iterativeTkConfig._iterations_muonSeeded_trackingPhase2PU140_VS
private

Definition at line 83 of file iterativeTkConfig.py.

◆ _iterations_trackingLowPU

iterativeTkConfig._iterations_trackingLowPU
private

Definition at line 29 of file iterativeTkConfig.py.

◆ _iterations_trackingPhase1

iterativeTkConfig._iterations_trackingPhase1
private

Definition at line 38 of file iterativeTkConfig.py.

◆ _iterations_trackingPhase2PU140

iterativeTkConfig._iterations_trackingPhase2PU140
private

Definition at line 69 of file iterativeTkConfig.py.

◆ _iterations_trackingPhase2PU140_VS

iterativeTkConfig._iterations_trackingPhase2PU140_VS
private

Definition at line 56 of file iterativeTkConfig.py.

◆ _multipleSeedProducers

iterativeTkConfig._multipleSeedProducers
private

Definition at line 90 of file iterativeTkConfig.py.

◆ _multipleSeedProducers_trackingLowPU

iterativeTkConfig._multipleSeedProducers_trackingLowPU
private

Definition at line 94 of file iterativeTkConfig.py.

◆ _multipleSeedProducers_trackingPhase1

iterativeTkConfig._multipleSeedProducers_trackingPhase1
private

Definition at line 97 of file iterativeTkConfig.py.

◆ _multipleSeedProducers_trackingPhase2PU140

iterativeTkConfig._multipleSeedProducers_trackingPhase2PU140
private

Definition at line 106 of file iterativeTkConfig.py.

◆ _nonDefaultEraNames

iterativeTkConfig._nonDefaultEraNames
private

Definition at line 7 of file iterativeTkConfig.py.

◆ _nonDefaultEras

iterativeTkConfig._nonDefaultEras
private

Definition at line 11 of file iterativeTkConfig.py.

◆ _oldStyleHasSelector

iterativeTkConfig._oldStyleHasSelector
private

Definition at line 107 of file iterativeTkConfig.py.

◆ _trackClusterRemoverBase

iterativeTkConfig._trackClusterRemoverBase
private

Definition at line 122 of file iterativeTkConfig.py.

◆ _trackClusterRemoverBase_trackingPhase2PU140

iterativeTkConfig._trackClusterRemoverBase_trackingPhase2PU140
private

Definition at line 136 of file iterativeTkConfig.py.

◆ func

iterativeTkConfig.func

Definition at line 52 of file iterativeTkConfig.py.

◆ maxChi2

iterativeTkConfig.maxChi2

Definition at line 123 of file iterativeTkConfig.py.

◆ minNumberOfLayersWithMeasBeforeFiltering

iterativeTkConfig.minNumberOfLayersWithMeasBeforeFiltering

Definition at line 127 of file iterativeTkConfig.py.

◆ names

iterativeTkConfig.names

Definition at line 56 of file iterativeTkConfig.py.

◆ phase2OTClusters

iterativeTkConfig.phase2OTClusters

Definition at line 139 of file iterativeTkConfig.py.

◆ phase2pixelClusters

iterativeTkConfig.phase2pixelClusters

Definition at line 138 of file iterativeTkConfig.py.

◆ pixelClusters

iterativeTkConfig.pixelClusters

Definition at line 124 of file iterativeTkConfig.py.

◆ stripClusters

iterativeTkConfig.stripClusters

Definition at line 125 of file iterativeTkConfig.py.

◆ TrackQuality

iterativeTkConfig.TrackQuality

Definition at line 126 of file iterativeTkConfig.py.