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_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 129 of file iterativeTkConfig.py.

129 def _classifier(iteration, oldStyle=False, oldStyleQualityMasks=False):
130  pre = _modulePrefix(iteration)
131  if oldStyle:
132  if iteration in _oldStyleHasSelector:
133  return pre+"Selector:" + ("QualityMasks" if oldStyleQualityMasks else pre)
134  else:
135  return pre
136  else:
137  return pre+":QualityMasks"
138 

References _modulePrefix().

Referenced by clusterRemoverForIter().

◆ _clusterRemover()

def iterativeTkConfig._clusterRemover (   iteration)
private

Definition at line 123 of file iterativeTkConfig.py.

123 def _clusterRemover(iteration):
124  return _modulePrefix(iteration)+"Clusters"
125 

References _modulePrefix().

Referenced by clusterRemoverForIter().

◆ _modulePrefix()

def iterativeTkConfig._modulePrefix (   iteration)
private

Definition at line 120 of file iterativeTkConfig.py.

120 def _modulePrefix(iteration):
121  return iteration[0].lower()+iteration[1:]
122 

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

◆ _seedOrTrackProducers()

def iterativeTkConfig._seedOrTrackProducers (   postfix,
  typ 
)
private

Definition at line 160 of file iterativeTkConfig.py.

160 def _seedOrTrackProducers(postfix, typ):
161  ret = []
162  iters = globals()["_iterations"+postfix]
163  if typ == "Seeds":
164  multipleSeedProducers = globals()["_multipleSeedProducers"+postfix]
165  else:
166  multipleSeedProducers = None
167  for i in iters:
168  seeder = _modulePrefix(i)+typ
169  if multipleSeedProducers is not None and i in multipleSeedProducers:
170  ret.extend([seeder+m for m in multipleSeedProducers[i]])
171  else:
172  ret.append(seeder)
173 
174  for i in globals().get("_iterations_muonSeeded"+postfix, _iterations_muonSeeded):
175  ret.append(_modulePrefix(i).replace("Step", typ))
176 
177  return ret
178 

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

Referenced by seedProducers(), and trackProducers().

◆ _tracks()

def iterativeTkConfig._tracks (   iteration)
private

Definition at line 126 of file iterativeTkConfig.py.

126 def _tracks(iteration):
127  return _modulePrefix(iteration)+"Tracks"
128 

References _modulePrefix().

Referenced by clusterRemoverForIter().

◆ allEras()

def iterativeTkConfig.allEras ( )

Definition at line 139 of file iterativeTkConfig.py.

139 def allEras():
140  return _allEras
141 

◆ clusterRemoverForIter()

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

Definition at line 185 of file iterativeTkConfig.py.

185 def clusterRemoverForIter(iteration, eraName="", postfix="", module=None):
186  if module is None:
187  module = _trackClusterRemoverBase.clone()
188  if eraName == "trackingPhase2PU140":
189  module = globals().get("_trackClusterRemoverBase"+postfix, _trackClusterRemoverBase)
190 
191  iters = globals()["_iterations"+postfix]
192  try:
193  ind = iters.index(iteration)
194  except ValueError:
195  # if the iteration is not active in era, just return the same
196  return module
197 
198  if ind == 0:
199  raise Exception("Iteration %s is the first iteration in era %s, asking cluster remover configuration does not make sense" % (iteration, eraName))
200  prevIter = iters[ind-1]
201 
202  customize = dict(
203  trajectories = _tracks(prevIter),
204  oldClusterRemovalInfo = _clusterRemover(prevIter) if ind >= 2 else "", # 1st iteration does not have cluster remover
205  )
206  if eraName in ["trackingPhase2PU140"]:
207  customize["overrideTrkQuals"] = _classifier(prevIter, oldStyle=True) # old-style selector
208  elif eraName == "trackingLowPU":
209  customize["overrideTrkQuals"] = _classifier(prevIter, oldStyle=True, oldStyleQualityMasks=True) # old-style selector with 'QualityMasks' instance label
210  else:
211  customize["trackClassifier"] = _classifier(prevIter)
212 
213  return module.clone(**customize)

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

◆ createEarlyTask()

def iterativeTkConfig.createEarlyTask (   eraName,
  postfix,
  modDict 
)

Definition at line 145 of file iterativeTkConfig.py.

145 def createEarlyTask(eraName, postfix, modDict):
146  task = cms.Task()
147  for it in globals()["_iterations"+postfix]:
148  task.add(modDict[it+'Task'])
149  return task
150 

◆ iterationAlgos()

def iterativeTkConfig.iterationAlgos (   postfix,
  includeSequenceName = False 
)

Definition at line 151 of file iterativeTkConfig.py.

151 def iterationAlgos(postfix, includeSequenceName=False):
152  muonVariable = "_iterations_muonSeeded"+postfix
153  iterations = globals()["_iterations"+postfix] + globals().get(muonVariable, _iterations_muonSeeded)
154 
155  if includeSequenceName:
156  return [(_modulePrefix(i), i) for i in iterations]
157  else:
158  return [_modulePrefix(i) for i in iterations]
159 

References _modulePrefix().

◆ nonDefaultEras()

def iterativeTkConfig.nonDefaultEras ( )

Definition at line 142 of file iterativeTkConfig.py.

142 def nonDefaultEras():
143  return _nonDefaultEras
144 

◆ seedProducers()

def iterativeTkConfig.seedProducers (   postfix)

Definition at line 179 of file iterativeTkConfig.py.

179 def seedProducers(postfix):
180  return _seedOrTrackProducers(postfix, "Seeds")
181 

References _seedOrTrackProducers().

◆ trackProducers()

def iterativeTkConfig.trackProducers (   postfix)

Definition at line 182 of file iterativeTkConfig.py.

182 def trackProducers(postfix):
183  return _seedOrTrackProducers(postfix, "Tracks")
184 

References _seedOrTrackProducers().

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 66 of file iterativeTkConfig.py.

◆ _iterations_muonSeeded_trackingPhase2PU140

iterativeTkConfig._iterations_muonSeeded_trackingPhase2PU140
private

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

◆ _multipleSeedProducers_trackingLowPU

iterativeTkConfig._multipleSeedProducers_trackingLowPU
private

Definition at line 79 of file iterativeTkConfig.py.

◆ _multipleSeedProducers_trackingPhase1

iterativeTkConfig._multipleSeedProducers_trackingPhase1
private

Definition at line 82 of file iterativeTkConfig.py.

◆ _multipleSeedProducers_trackingPhase2PU140

iterativeTkConfig._multipleSeedProducers_trackingPhase2PU140
private

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

◆ _trackClusterRemoverBase

iterativeTkConfig._trackClusterRemoverBase
private

Definition at line 99 of file iterativeTkConfig.py.

◆ _trackClusterRemoverBase_trackingPhase2PU140

iterativeTkConfig._trackClusterRemoverBase_trackingPhase2PU140
private

Definition at line 112 of file iterativeTkConfig.py.

◆ func

iterativeTkConfig.func

Definition at line 52 of file iterativeTkConfig.py.

◆ maxChi2

iterativeTkConfig.maxChi2

Definition at line 100 of file iterativeTkConfig.py.

◆ minNumberOfLayersWithMeasBeforeFiltering

iterativeTkConfig.minNumberOfLayersWithMeasBeforeFiltering

Definition at line 104 of file iterativeTkConfig.py.

◆ phase2OTClusters

iterativeTkConfig.phase2OTClusters

Definition at line 115 of file iterativeTkConfig.py.

◆ phase2pixelClusters

iterativeTkConfig.phase2pixelClusters

Definition at line 114 of file iterativeTkConfig.py.

◆ pixelClusters

iterativeTkConfig.pixelClusters

Definition at line 101 of file iterativeTkConfig.py.

◆ stripClusters

iterativeTkConfig.stripClusters

Definition at line 102 of file iterativeTkConfig.py.

◆ TrackQuality

iterativeTkConfig.TrackQuality

Definition at line 103 of file iterativeTkConfig.py.

iterativeTkConfig.trackProducers
def trackProducers(postfix)
Definition: iterativeTkConfig.py:182
iterativeTkConfig._tracks
def _tracks(iteration)
Definition: iterativeTkConfig.py:126
iterativeTkConfig._clusterRemover
def _clusterRemover(iteration)
Definition: iterativeTkConfig.py:123
iterativeTkConfig.nonDefaultEras
def nonDefaultEras()
Definition: iterativeTkConfig.py:142
iterativeTkConfig.allEras
def allEras()
Definition: iterativeTkConfig.py:139
iterativeTkConfig._classifier
def _classifier(iteration, oldStyle=False, oldStyleQualityMasks=False)
Definition: iterativeTkConfig.py:129
iterativeTkConfig.createEarlyTask
def createEarlyTask(eraName, postfix, modDict)
Definition: iterativeTkConfig.py:145
iterativeTkConfig._modulePrefix
def _modulePrefix(iteration)
Definition: iterativeTkConfig.py:120
Exception
iterativeTkConfig.iterationAlgos
def iterationAlgos(postfix, includeSequenceName=False)
Definition: iterativeTkConfig.py:151
iterativeTkConfig.seedProducers
def seedProducers(postfix)
Definition: iterativeTkConfig.py:179
iterativeTkConfig.clusterRemoverForIter
def clusterRemoverForIter(iteration, eraName="", postfix="", module=None)
Definition: iterativeTkConfig.py:185
iterativeTkConfig._seedOrTrackProducers
def _seedOrTrackProducers(postfix, typ)
Definition: iterativeTkConfig.py:160
python.rootplot.root2matplotlib.replace
def replace(string, replacements)
Definition: root2matplotlib.py:444