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

124 def _classifier(iteration, oldStyle=False, oldStyleQualityMasks=False):
125  pre = _modulePrefix(iteration)
126  if oldStyle:
127  if iteration in _oldStyleHasSelector:
128  return pre+"Selector:" + ("QualityMasks" if oldStyleQualityMasks else pre)
129  else:
130  return pre
131  else:
132  return pre+":QualityMasks"
133 

References _modulePrefix().

Referenced by clusterRemoverForIter().

◆ _clusterRemover()

def iterativeTkConfig._clusterRemover (   iteration)
private

Definition at line 118 of file iterativeTkConfig.py.

118 def _clusterRemover(iteration):
119  return _modulePrefix(iteration)+"Clusters"
120 

References _modulePrefix().

Referenced by clusterRemoverForIter().

◆ _modulePrefix()

def iterativeTkConfig._modulePrefix (   iteration)
private

Definition at line 115 of file iterativeTkConfig.py.

115 def _modulePrefix(iteration):
116  return iteration[0].lower()+iteration[1:]
117 

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

◆ _seedOrTrackProducers()

def iterativeTkConfig._seedOrTrackProducers (   postfix,
  typ 
)
private

Definition at line 155 of file iterativeTkConfig.py.

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

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

Referenced by seedProducers(), and trackProducers().

◆ _tracks()

def iterativeTkConfig._tracks (   iteration)
private

Definition at line 121 of file iterativeTkConfig.py.

121 def _tracks(iteration):
122  return _modulePrefix(iteration)+"Tracks"
123 

References _modulePrefix().

Referenced by clusterRemoverForIter().

◆ allEras()

def iterativeTkConfig.allEras ( )

Definition at line 134 of file iterativeTkConfig.py.

134 def allEras():
135  return _allEras
136 

◆ clusterRemoverForIter()

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

Definition at line 180 of file iterativeTkConfig.py.

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

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

◆ createEarlyTask()

def iterativeTkConfig.createEarlyTask (   eraName,
  postfix,
  modDict 
)

Definition at line 140 of file iterativeTkConfig.py.

140 def createEarlyTask(eraName, postfix, modDict):
141  task = cms.Task()
142  for it in globals()["_iterations"+postfix]:
143  task.add(modDict[it+'Task'])
144  return task
145 

◆ iterationAlgos()

def iterativeTkConfig.iterationAlgos (   postfix,
  includeSequenceName = False 
)

Definition at line 146 of file iterativeTkConfig.py.

146 def iterationAlgos(postfix, includeSequenceName=False):
147  muonVariable = "_iterations_muonSeeded"+postfix
148  iterations = globals()["_iterations"+postfix] + globals().get(muonVariable, _iterations_muonSeeded)
149 
150  if includeSequenceName:
151  return [(_modulePrefix(i), i) for i in iterations]
152  else:
153  return [_modulePrefix(i) for i in iterations]
154 

References _modulePrefix().

◆ nonDefaultEras()

def iterativeTkConfig.nonDefaultEras ( )

Definition at line 137 of file iterativeTkConfig.py.

137 def nonDefaultEras():
138  return _nonDefaultEras
139 

◆ seedProducers()

def iterativeTkConfig.seedProducers (   postfix)

Definition at line 174 of file iterativeTkConfig.py.

174 def seedProducers(postfix):
175  return _seedOrTrackProducers(postfix, "Seeds")
176 

References _seedOrTrackProducers().

◆ trackProducers()

def iterativeTkConfig.trackProducers (   postfix)

Definition at line 177 of file iterativeTkConfig.py.

177 def trackProducers(postfix):
178  return _seedOrTrackProducers(postfix, "Tracks")
179 

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

◆ _iterations_muonSeeded_trackingPhase2PU140

iterativeTkConfig._iterations_muonSeeded_trackingPhase2PU140
private

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

◆ _multipleSeedProducers

iterativeTkConfig._multipleSeedProducers
private

Definition at line 70 of file iterativeTkConfig.py.

◆ _multipleSeedProducers_trackingLowPU

iterativeTkConfig._multipleSeedProducers_trackingLowPU
private

Definition at line 74 of file iterativeTkConfig.py.

◆ _multipleSeedProducers_trackingPhase1

iterativeTkConfig._multipleSeedProducers_trackingPhase1
private

Definition at line 77 of file iterativeTkConfig.py.

◆ _multipleSeedProducers_trackingPhase2PU140

iterativeTkConfig._multipleSeedProducers_trackingPhase2PU140
private

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

◆ _trackClusterRemoverBase

iterativeTkConfig._trackClusterRemoverBase
private

Definition at line 94 of file iterativeTkConfig.py.

◆ _trackClusterRemoverBase_trackingPhase2PU140

iterativeTkConfig._trackClusterRemoverBase_trackingPhase2PU140
private

Definition at line 107 of file iterativeTkConfig.py.

◆ func

iterativeTkConfig.func

Definition at line 60 of file iterativeTkConfig.py.

◆ maxChi2

iterativeTkConfig.maxChi2

Definition at line 95 of file iterativeTkConfig.py.

◆ minNumberOfLayersWithMeasBeforeFiltering

iterativeTkConfig.minNumberOfLayersWithMeasBeforeFiltering

Definition at line 99 of file iterativeTkConfig.py.

◆ phase2OTClusters

iterativeTkConfig.phase2OTClusters

Definition at line 110 of file iterativeTkConfig.py.

◆ phase2pixelClusters

iterativeTkConfig.phase2pixelClusters

Definition at line 109 of file iterativeTkConfig.py.

◆ pixelClusters

iterativeTkConfig.pixelClusters

Definition at line 96 of file iterativeTkConfig.py.

◆ stripClusters

iterativeTkConfig.stripClusters

Definition at line 97 of file iterativeTkConfig.py.

◆ TrackQuality

iterativeTkConfig.TrackQuality

Definition at line 98 of file iterativeTkConfig.py.

iterativeTkConfig.trackProducers
def trackProducers(postfix)
Definition: iterativeTkConfig.py:177
iterativeTkConfig._tracks
def _tracks(iteration)
Definition: iterativeTkConfig.py:121
iterativeTkConfig._clusterRemover
def _clusterRemover(iteration)
Definition: iterativeTkConfig.py:118
iterativeTkConfig.nonDefaultEras
def nonDefaultEras()
Definition: iterativeTkConfig.py:137
iterativeTkConfig.allEras
def allEras()
Definition: iterativeTkConfig.py:134
iterativeTkConfig._classifier
def _classifier(iteration, oldStyle=False, oldStyleQualityMasks=False)
Definition: iterativeTkConfig.py:124
iterativeTkConfig.createEarlyTask
def createEarlyTask(eraName, postfix, modDict)
Definition: iterativeTkConfig.py:140
iterativeTkConfig._modulePrefix
def _modulePrefix(iteration)
Definition: iterativeTkConfig.py:115
Exception
iterativeTkConfig.iterationAlgos
def iterationAlgos(postfix, includeSequenceName=False)
Definition: iterativeTkConfig.py:146
iterativeTkConfig.seedProducers
def seedProducers(postfix)
Definition: iterativeTkConfig.py:174
iterativeTkConfig.clusterRemoverForIter
def clusterRemoverForIter(iteration, eraName="", postfix="", module=None)
Definition: iterativeTkConfig.py:180
iterativeTkConfig._seedOrTrackProducers
def _seedOrTrackProducers(postfix, typ)
Definition: iterativeTkConfig.py:155
python.rootplot.root2matplotlib.replace
def replace(string, replacements)
Definition: root2matplotlib.py:444