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 createEarlySequence (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_trackingPhase1PU70
 
 _iterations_trackingPhase1QuadProp
 
 _iterations_trackingPhase2PU140
 
 _multipleSeedProducers
 
 _multipleSeedProducers_trackingLowPU
 
 _multipleSeedProducers_trackingPhase1
 
 _multipleSeedProducers_trackingPhase1PU70
 
 _multipleSeedProducers_trackingPhase1QuadProp
 
 _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 126 of file iterativeTkConfig.py.

References _modulePrefix().

Referenced by clusterRemoverForIter().

126 def _classifier(iteration, oldStyle=False, oldStyleQualityMasks=False):
127  pre = _modulePrefix(iteration)
128  if oldStyle:
129  if iteration in _oldStyleHasSelector:
130  return pre+"Selector:" + ("QualityMasks" if oldStyleQualityMasks else pre)
131  else:
132  return pre
133  else:
134  return pre+":QualityMasks"
135 
def _classifier(iteration, oldStyle=False, oldStyleQualityMasks=False)
def _modulePrefix(iteration)
def iterativeTkConfig._clusterRemover (   iteration)
private

Definition at line 120 of file iterativeTkConfig.py.

References _modulePrefix().

Referenced by clusterRemoverForIter().

120 def _clusterRemover(iteration):
121  return _modulePrefix(iteration)+"Clusters"
122 
def _clusterRemover(iteration)
def _modulePrefix(iteration)
def iterativeTkConfig._modulePrefix (   iteration)
private

Definition at line 117 of file iterativeTkConfig.py.

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

117 def _modulePrefix(iteration):
118  return iteration[0].lower()+iteration[1:]
119 
def _modulePrefix(iteration)
def iterativeTkConfig._seedOrTrackProducers (   postfix,
  typ 
)
private

Definition at line 157 of file iterativeTkConfig.py.

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

Referenced by seedProducers(), and trackProducers().

157 def _seedOrTrackProducers(postfix, typ):
158  ret = []
159  iters = globals()["_iterations"+postfix]
160  if typ == "Seeds":
161  multipleSeedProducers = globals()["_multipleSeedProducers"+postfix]
162  else:
163  multipleSeedProducers = None
164  for i in iters:
165  seeder = _modulePrefix(i)+typ
166  if multipleSeedProducers is not None and i in multipleSeedProducers:
167  ret.extend([seeder+m for m in multipleSeedProducers[i]])
168  else:
169  ret.append(seeder)
170 
171  for i in globals().get("_iterations_muonSeeded"+postfix, _iterations_muonSeeded):
172  ret.append(_modulePrefix(i).replace("Step", typ))
173 
174  return ret
175 
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 123 of file iterativeTkConfig.py.

References _modulePrefix().

Referenced by clusterRemoverForIter().

123 def _tracks(iteration):
124  return _modulePrefix(iteration)+"Tracks"
125 
def _modulePrefix(iteration)
def _tracks(iteration)
def iterativeTkConfig.allEras ( )

Definition at line 136 of file iterativeTkConfig.py.

136 def allEras():
137  return _allEras
138 
def iterativeTkConfig.clusterRemoverForIter (   iteration,
  eraName = "",
  postfix = "",
  module = None 
)

Definition at line 182 of file iterativeTkConfig.py.

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

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

Definition at line 142 of file iterativeTkConfig.py.

142 def createEarlySequence(eraName, postfix, modDict):
143  seq = cms.Sequence()
144  for it in globals()["_iterations"+postfix]:
145  seq += modDict[it]
146  return seq
147 
def createEarlySequence(eraName, postfix, modDict)
def iterativeTkConfig.iterationAlgos (   postfix,
  includeSequenceName = False 
)

Definition at line 148 of file iterativeTkConfig.py.

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

148 def iterationAlgos(postfix, includeSequenceName=False):
149  muonVariable = "_iterations_muonSeeded"+postfix
150  iterations = globals()["_iterations"+postfix] + globals().get(muonVariable, _iterations_muonSeeded)
151 
152  if includeSequenceName:
153  return [(_modulePrefix(i), i) for i in iterations]
154  else:
155  return [_modulePrefix(i) for i in iterations]
156 
def iterationAlgos(postfix, includeSequenceName=False)
def _modulePrefix(iteration)
T get(const Candidate &c)
Definition: component.h:55
def iterativeTkConfig.nonDefaultEras ( )

Definition at line 139 of file iterativeTkConfig.py.

140  return _nonDefaultEras
141 
def iterativeTkConfig.seedProducers (   postfix)

Definition at line 176 of file iterativeTkConfig.py.

References _seedOrTrackProducers().

176 def seedProducers(postfix):
177  return _seedOrTrackProducers(postfix, "Seeds")
178 
def _seedOrTrackProducers(postfix, typ)
def seedProducers(postfix)
def iterativeTkConfig.trackProducers (   postfix)

Definition at line 179 of file iterativeTkConfig.py.

References _seedOrTrackProducers().

179 def trackProducers(postfix):
180  return _seedOrTrackProducers(postfix, "Tracks")
181 
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 69 of file iterativeTkConfig.py.

iterativeTkConfig._iterations_muonSeeded_trackingPhase2PU140
private

Definition at line 74 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_trackingPhase1PU70
private

Definition at line 51 of file iterativeTkConfig.py.

iterativeTkConfig._iterations_trackingPhase1QuadProp
private

Definition at line 50 of file iterativeTkConfig.py.

iterativeTkConfig._iterations_trackingPhase2PU140
private

Definition at line 61 of file iterativeTkConfig.py.

iterativeTkConfig._multipleSeedProducers
private

Definition at line 77 of file iterativeTkConfig.py.

iterativeTkConfig._multipleSeedProducers_trackingLowPU
private

Definition at line 81 of file iterativeTkConfig.py.

iterativeTkConfig._multipleSeedProducers_trackingPhase1
private

Definition at line 84 of file iterativeTkConfig.py.

iterativeTkConfig._multipleSeedProducers_trackingPhase1PU70
private

Definition at line 86 of file iterativeTkConfig.py.

iterativeTkConfig._multipleSeedProducers_trackingPhase1QuadProp
private

Definition at line 85 of file iterativeTkConfig.py.

iterativeTkConfig._multipleSeedProducers_trackingPhase2PU140
private

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

iterativeTkConfig._trackClusterRemoverBase
private

Definition at line 99 of file iterativeTkConfig.py.

iterativeTkConfig._trackClusterRemoverBase_trackingPhase2PU140
private

Definition at line 109 of file iterativeTkConfig.py.

iterativeTkConfig.maxChi2

Definition at line 100 of file iterativeTkConfig.py.

iterativeTkConfig.minNumberOfLayersWithMeasBeforeFiltering

Definition at line 104 of file iterativeTkConfig.py.

iterativeTkConfig.phase2OTClusters

Definition at line 112 of file iterativeTkConfig.py.

iterativeTkConfig.phase2pixelClusters

Definition at line 111 of file iterativeTkConfig.py.

iterativeTkConfig.pixelClusters

Definition at line 101 of file iterativeTkConfig.py.

iterativeTkConfig.stripClusters

Definition at line 102 of file iterativeTkConfig.py.

iterativeTkConfig.TrackQuality

Definition at line 103 of file iterativeTkConfig.py.