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
 
 maxChi2
 
 minNumberOfLayersWithMeasBeforeFiltering
 
 phase2OTClusters
 
 phase2pixelClusters
 
 pixelClusters
 
 stripClusters
 
 TrackQuality
 

Function Documentation

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

Definition at line 119 of file iterativeTkConfig.py.

References _modulePrefix().

Referenced by clusterRemoverForIter().

119 def _classifier(iteration, oldStyle=False, oldStyleQualityMasks=False):
120  pre = _modulePrefix(iteration)
121  if oldStyle:
122  if iteration in _oldStyleHasSelector:
123  return pre+"Selector:" + ("QualityMasks" if oldStyleQualityMasks else pre)
124  else:
125  return pre
126  else:
127  return pre+":QualityMasks"
128 
def _classifier(iteration, oldStyle=False, oldStyleQualityMasks=False)
def _modulePrefix(iteration)
def iterativeTkConfig._clusterRemover (   iteration)
private

Definition at line 113 of file iterativeTkConfig.py.

References _modulePrefix().

Referenced by clusterRemoverForIter().

113 def _clusterRemover(iteration):
114  return _modulePrefix(iteration)+"Clusters"
115 
def _clusterRemover(iteration)
def _modulePrefix(iteration)
def iterativeTkConfig._modulePrefix (   iteration)
private

Definition at line 110 of file iterativeTkConfig.py.

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

110 def _modulePrefix(iteration):
111  return iteration[0].lower()+iteration[1:]
112 
def _modulePrefix(iteration)
def iterativeTkConfig._seedOrTrackProducers (   postfix,
  typ 
)
private

Definition at line 150 of file iterativeTkConfig.py.

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

Referenced by seedProducers(), and trackProducers().

150 def _seedOrTrackProducers(postfix, typ):
151  ret = []
152  iters = globals()["_iterations"+postfix]
153  if typ == "Seeds":
154  multipleSeedProducers = globals()["_multipleSeedProducers"+postfix]
155  else:
156  multipleSeedProducers = None
157  for i in iters:
158  seeder = _modulePrefix(i)+typ
159  if multipleSeedProducers is not None and i in multipleSeedProducers:
160  ret.extend([seeder+m for m in multipleSeedProducers[i]])
161  else:
162  ret.append(seeder)
163 
164  for i in globals().get("_iterations_muonSeeded"+postfix, _iterations_muonSeeded):
165  ret.append(_modulePrefix(i).replace("Step", typ))
166 
167  return ret
168 
def _seedOrTrackProducers(postfix, typ)
def replace(string, replacements)
def _modulePrefix(iteration)
T get(const Candidate &c)
Definition: component.h:55
def iterativeTkConfig._tracks (   iteration)
private

Definition at line 116 of file iterativeTkConfig.py.

References _modulePrefix().

Referenced by clusterRemoverForIter().

116 def _tracks(iteration):
117  return _modulePrefix(iteration)+"Tracks"
118 
def _modulePrefix(iteration)
def _tracks(iteration)
def iterativeTkConfig.allEras ( )

Definition at line 129 of file iterativeTkConfig.py.

129 def allEras():
130  return _allEras
131 
def iterativeTkConfig.clusterRemoverForIter (   iteration,
  eraName = "",
  postfix = "",
  module = None 
)

Definition at line 175 of file iterativeTkConfig.py.

References _classifier(), _clusterRemover(), _tracks(), cmsPerfStripChart.dict, and reco.get().

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

Definition at line 135 of file iterativeTkConfig.py.

135 def createEarlyTask(eraName, postfix, modDict):
136  task = cms.Task()
137  for it in globals()["_iterations"+postfix]:
138  task.add(modDict[it+'Task'])
139  return task
140 
def createEarlyTask(eraName, postfix, modDict)
def iterativeTkConfig.iterationAlgos (   postfix,
  includeSequenceName = False 
)

Definition at line 141 of file iterativeTkConfig.py.

References _modulePrefix(), and reco.get().

141 def iterationAlgos(postfix, includeSequenceName=False):
142  muonVariable = "_iterations_muonSeeded"+postfix
143  iterations = globals()["_iterations"+postfix] + globals().get(muonVariable, _iterations_muonSeeded)
144 
145  if includeSequenceName:
146  return [(_modulePrefix(i), i) for i in iterations]
147  else:
148  return [_modulePrefix(i) for i in iterations]
149 
def iterationAlgos(postfix, includeSequenceName=False)
def _modulePrefix(iteration)
T get(const Candidate &c)
Definition: component.h:55
def iterativeTkConfig.nonDefaultEras ( )

Definition at line 132 of file iterativeTkConfig.py.

133  return _nonDefaultEras
134 
def iterativeTkConfig.seedProducers (   postfix)

Definition at line 169 of file iterativeTkConfig.py.

References _seedOrTrackProducers().

169 def seedProducers(postfix):
170  return _seedOrTrackProducers(postfix, "Seeds")
171 
def _seedOrTrackProducers(postfix, typ)
def seedProducers(postfix)
def iterativeTkConfig.trackProducers (   postfix)

Definition at line 172 of file iterativeTkConfig.py.

References _seedOrTrackProducers().

172 def trackProducers(postfix):
173  return _seedOrTrackProducers(postfix, "Tracks")
174 
def _seedOrTrackProducers(postfix, typ)
def trackProducers(postfix)

Variable Documentation

iterativeTkConfig._allEras
private

Definition at line 16 of file iterativeTkConfig.py.

iterativeTkConfig._defaultEra
private

Definition at line 10 of file iterativeTkConfig.py.

iterativeTkConfig._defaultEraName
private

Definition at line 6 of file iterativeTkConfig.py.

iterativeTkConfig._iterations
private

Definition at line 19 of file iterativeTkConfig.py.

iterativeTkConfig._iterations_muonSeeded
private

Definition at line 59 of file iterativeTkConfig.py.

iterativeTkConfig._iterations_muonSeeded_trackingPhase2PU140
private

Definition at line 64 of file iterativeTkConfig.py.

iterativeTkConfig._iterations_trackingLowPU
private

Definition at line 29 of file iterativeTkConfig.py.

iterativeTkConfig._iterations_trackingPhase1
private

Definition at line 38 of file iterativeTkConfig.py.

iterativeTkConfig._iterations_trackingPhase2PU140
private

Definition at line 51 of file iterativeTkConfig.py.

iterativeTkConfig._multipleSeedProducers
private

Definition at line 68 of file iterativeTkConfig.py.

iterativeTkConfig._multipleSeedProducers_trackingLowPU
private

Definition at line 72 of file iterativeTkConfig.py.

iterativeTkConfig._multipleSeedProducers_trackingPhase1
private

Definition at line 75 of file iterativeTkConfig.py.

iterativeTkConfig._multipleSeedProducers_trackingPhase2PU140
private

Definition at line 80 of file iterativeTkConfig.py.

iterativeTkConfig._nonDefaultEraNames
private

Definition at line 7 of file iterativeTkConfig.py.

iterativeTkConfig._nonDefaultEras
private

Definition at line 11 of file iterativeTkConfig.py.

iterativeTkConfig._oldStyleHasSelector
private

Definition at line 81 of file iterativeTkConfig.py.

iterativeTkConfig._trackClusterRemoverBase
private

Definition at line 92 of file iterativeTkConfig.py.

iterativeTkConfig._trackClusterRemoverBase_trackingPhase2PU140
private

Definition at line 102 of file iterativeTkConfig.py.

iterativeTkConfig.maxChi2

Definition at line 93 of file iterativeTkConfig.py.

iterativeTkConfig.minNumberOfLayersWithMeasBeforeFiltering

Definition at line 97 of file iterativeTkConfig.py.

iterativeTkConfig.phase2OTClusters

Definition at line 105 of file iterativeTkConfig.py.

iterativeTkConfig.phase2pixelClusters

Definition at line 104 of file iterativeTkConfig.py.

iterativeTkConfig.pixelClusters

Definition at line 94 of file iterativeTkConfig.py.

iterativeTkConfig.stripClusters

Definition at line 95 of file iterativeTkConfig.py.

iterativeTkConfig.TrackQuality

Definition at line 96 of file iterativeTkConfig.py.