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_trackingLowPU
 
 _iterations_trackingPhase1
 
 _iterations_trackingPhase2PU140
 
 _multipleSeedProducers
 
 _multipleSeedProducers_trackingLowPU
 
 _multipleSeedProducers_trackingPhase1
 
 _multipleSeedProducers_trackingPhase2PU140
 
 _nonDefaultEraNames
 
 _nonDefaultEras
 
 _oldStyleHasSelector
 
 _trackClusterRemoverBase
 
 _trackClusterRemoverBase_trackingPhase2PU140
 
 func
 
 maxChi2
 
 minNumberOfLayersWithMeasBeforeFiltering
 
 phase2OTClusters
 
 phase2pixelClusters
 
 pixelClusters
 
 stripClusters
 
 TrackQuality
 

Function Documentation

◆ _classifier()

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

Definition at line 146 of file iterativeTkConfig.py.

References _modulePrefix().

Referenced by clusterRemoverForIter().

146 def _classifier(iteration, oldStyle=False, oldStyleQualityMasks=False):
147  pre = _modulePrefix(iteration)
148  if oldStyle:
149  if iteration in _oldStyleHasSelector:
150  return pre+"Selector:" + ("QualityMasks" if oldStyleQualityMasks else pre)
151  else:
152  return pre
153  else:
154  return pre+":QualityMasks"
155 
def _classifier(iteration, oldStyle=False, oldStyleQualityMasks=False)
def _modulePrefix(iteration)

◆ _clusterRemover()

def iterativeTkConfig._clusterRemover (   iteration)
private

Definition at line 140 of file iterativeTkConfig.py.

References _modulePrefix().

Referenced by clusterRemoverForIter().

140 def _clusterRemover(iteration):
141  return _modulePrefix(iteration)+"Clusters"
142 
def _clusterRemover(iteration)
def _modulePrefix(iteration)

◆ _modulePrefix()

def iterativeTkConfig._modulePrefix (   iteration)
private

Definition at line 137 of file iterativeTkConfig.py.

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

137 def _modulePrefix(iteration):
138  return iteration[0].lower()+iteration[1:]
139 
def _modulePrefix(iteration)

◆ _seedOrTrackProducers()

def iterativeTkConfig._seedOrTrackProducers (   postfix,
  typ 
)
private

Definition at line 177 of file iterativeTkConfig.py.

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

Referenced by seedProducers(), and trackProducers().

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

◆ _tracks()

def iterativeTkConfig._tracks (   iteration)
private

Definition at line 143 of file iterativeTkConfig.py.

References _modulePrefix().

Referenced by clusterRemoverForIter().

143 def _tracks(iteration):
144  return _modulePrefix(iteration)+"Tracks"
145 
def _modulePrefix(iteration)
def _tracks(iteration)

◆ allEras()

def iterativeTkConfig.allEras ( )

Definition at line 156 of file iterativeTkConfig.py.

156 def allEras():
157  return _allEras
158 

◆ clusterRemoverForIter()

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

Definition at line 205 of file iterativeTkConfig.py.

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

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

162 def createEarlyTask(eraName, postfix, modDict):
163  task = cms.Task()
164  for it in globals()["_iterations"+postfix]:
165  task.add(modDict[it+'Task'])
166  return task
167 
def createEarlyTask(eraName, postfix, modDict)

◆ iterationAlgos()

def iterativeTkConfig.iterationAlgos (   postfix,
  includeSequenceName = False 
)

Definition at line 168 of file iterativeTkConfig.py.

References _modulePrefix().

168 def iterationAlgos(postfix, includeSequenceName=False):
169  muonVariable = "_iterations_muonSeeded"+postfix
170  iterations = globals()["_iterations"+postfix] + globals().get(muonVariable, _iterations_muonSeeded)
171 
172  if includeSequenceName:
173  return [(_modulePrefix(i), i) for i in iterations]
174  else:
175  return [_modulePrefix(i) for i in iterations]
176 
def iterationAlgos(postfix, includeSequenceName=False)
def _modulePrefix(iteration)

◆ nonDefaultEras()

def iterativeTkConfig.nonDefaultEras ( )

Definition at line 159 of file iterativeTkConfig.py.

159 def nonDefaultEras():
160  return _nonDefaultEras
161 

◆ seedProducers()

def iterativeTkConfig.seedProducers (   postfix)

Definition at line 199 of file iterativeTkConfig.py.

References _seedOrTrackProducers().

199 def seedProducers(postfix):
200  return _seedOrTrackProducers(postfix, "Seeds")
201 
def _seedOrTrackProducers(postfix, typ)
def seedProducers(postfix)

◆ trackProducers()

def iterativeTkConfig.trackProducers (   postfix)

Definition at line 202 of file iterativeTkConfig.py.

References _seedOrTrackProducers().

202 def trackProducers(postfix):
203  return _seedOrTrackProducers(postfix, "Tracks")
204 
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 70 of file iterativeTkConfig.py.

◆ _iterations_muonSeeded_trackingPhase1

iterativeTkConfig._iterations_muonSeeded_trackingPhase1
private

Definition at line 74 of file iterativeTkConfig.py.

◆ _iterations_muonSeeded_trackingPhase2PU140

iterativeTkConfig._iterations_muonSeeded_trackingPhase2PU140
private

Definition at line 79 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 56 of file iterativeTkConfig.py.

◆ _multipleSeedProducers

iterativeTkConfig._multipleSeedProducers
private

Definition at line 83 of file iterativeTkConfig.py.

◆ _multipleSeedProducers_trackingLowPU

iterativeTkConfig._multipleSeedProducers_trackingLowPU
private

Definition at line 87 of file iterativeTkConfig.py.

◆ _multipleSeedProducers_trackingPhase1

iterativeTkConfig._multipleSeedProducers_trackingPhase1
private

Definition at line 90 of file iterativeTkConfig.py.

◆ _multipleSeedProducers_trackingPhase2PU140

iterativeTkConfig._multipleSeedProducers_trackingPhase2PU140
private

Definition at line 99 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 100 of file iterativeTkConfig.py.

◆ _trackClusterRemoverBase

iterativeTkConfig._trackClusterRemoverBase
private

Definition at line 115 of file iterativeTkConfig.py.

◆ _trackClusterRemoverBase_trackingPhase2PU140

iterativeTkConfig._trackClusterRemoverBase_trackingPhase2PU140
private

Definition at line 129 of file iterativeTkConfig.py.

◆ func

iterativeTkConfig.func

Definition at line 52 of file iterativeTkConfig.py.

◆ maxChi2

iterativeTkConfig.maxChi2

Definition at line 116 of file iterativeTkConfig.py.

◆ minNumberOfLayersWithMeasBeforeFiltering

iterativeTkConfig.minNumberOfLayersWithMeasBeforeFiltering

Definition at line 120 of file iterativeTkConfig.py.

◆ phase2OTClusters

iterativeTkConfig.phase2OTClusters

Definition at line 132 of file iterativeTkConfig.py.

◆ phase2pixelClusters

iterativeTkConfig.phase2pixelClusters

Definition at line 131 of file iterativeTkConfig.py.

◆ pixelClusters

iterativeTkConfig.pixelClusters

Definition at line 117 of file iterativeTkConfig.py.

◆ stripClusters

iterativeTkConfig.stripClusters

Definition at line 118 of file iterativeTkConfig.py.

◆ TrackQuality

iterativeTkConfig.TrackQuality

Definition at line 119 of file iterativeTkConfig.py.