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_trackingPhase1QuadProp
 
 _iterations_trackingPhase2PU140
 
 _multipleSeedProducers
 
 _multipleSeedProducers_trackingLowPU
 
 _multipleSeedProducers_trackingPhase1
 
 _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 121 of file iterativeTkConfig.py.

References _modulePrefix().

Referenced by clusterRemoverForIter().

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

Definition at line 115 of file iterativeTkConfig.py.

References _modulePrefix().

Referenced by clusterRemoverForIter().

115 def _clusterRemover(iteration):
116  return _modulePrefix(iteration)+"Clusters"
117 
def _clusterRemover(iteration)
def _modulePrefix(iteration)
def iterativeTkConfig._modulePrefix (   iteration)
private

Definition at line 112 of file iterativeTkConfig.py.

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

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

Definition at line 152 of file iterativeTkConfig.py.

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

Referenced by seedProducers(), and trackProducers().

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

References _modulePrefix().

Referenced by clusterRemoverForIter().

118 def _tracks(iteration):
119  return _modulePrefix(iteration)+"Tracks"
120 
def _modulePrefix(iteration)
def _tracks(iteration)
def iterativeTkConfig.allEras ( )

Definition at line 131 of file iterativeTkConfig.py.

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

Definition at line 177 of file iterativeTkConfig.py.

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

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

137 def createEarlySequence(eraName, postfix, modDict):
138  seq = cms.Sequence()
139  for it in globals()["_iterations"+postfix]:
140  seq += modDict[it]
141  return seq
142 
def createEarlySequence(eraName, postfix, modDict)
def iterativeTkConfig.iterationAlgos (   postfix,
  includeSequenceName = False 
)

Definition at line 143 of file iterativeTkConfig.py.

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

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

Definition at line 134 of file iterativeTkConfig.py.

135  return _nonDefaultEras
136 
def iterativeTkConfig.seedProducers (   postfix)

Definition at line 171 of file iterativeTkConfig.py.

References _seedOrTrackProducers().

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

Definition at line 174 of file iterativeTkConfig.py.

References _seedOrTrackProducers().

174 def trackProducers(postfix):
175  return _seedOrTrackProducers(postfix, "Tracks")
176 
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 60 of file iterativeTkConfig.py.

iterativeTkConfig._iterations_muonSeeded_trackingPhase2PU140
private

Definition at line 65 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_trackingPhase1QuadProp
private

Definition at line 51 of file iterativeTkConfig.py.

iterativeTkConfig._iterations_trackingPhase2PU140
private

Definition at line 52 of file iterativeTkConfig.py.

iterativeTkConfig._multipleSeedProducers
private

Definition at line 69 of file iterativeTkConfig.py.

iterativeTkConfig._multipleSeedProducers_trackingLowPU
private

Definition at line 73 of file iterativeTkConfig.py.

iterativeTkConfig._multipleSeedProducers_trackingPhase1
private

Definition at line 76 of file iterativeTkConfig.py.

iterativeTkConfig._multipleSeedProducers_trackingPhase1QuadProp
private

Definition at line 81 of file iterativeTkConfig.py.

iterativeTkConfig._multipleSeedProducers_trackingPhase2PU140
private

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

iterativeTkConfig._trackClusterRemoverBase
private

Definition at line 94 of file iterativeTkConfig.py.

iterativeTkConfig._trackClusterRemoverBase_trackingPhase2PU140
private

Definition at line 104 of file iterativeTkConfig.py.

iterativeTkConfig.maxChi2

Definition at line 95 of file iterativeTkConfig.py.

iterativeTkConfig.minNumberOfLayersWithMeasBeforeFiltering

Definition at line 99 of file iterativeTkConfig.py.

iterativeTkConfig.phase2OTClusters

Definition at line 107 of file iterativeTkConfig.py.

iterativeTkConfig.phase2pixelClusters

Definition at line 106 of file iterativeTkConfig.py.

iterativeTkConfig.pixelClusters

Definition at line 96 of file iterativeTkConfig.py.

iterativeTkConfig.stripClusters

Definition at line 97 of file iterativeTkConfig.py.

iterativeTkConfig.TrackQuality

Definition at line 98 of file iterativeTkConfig.py.