CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions | Variables
iterativeTkConfig Namespace Reference

Functions

def _classifier
 
def _clusterRemover
 
def _modulePrefix
 
def _seedOrTrackProducers
 
def _tracks
 
def allEras
 
def clusterRemoverForIter
 
def createEarlyTask
 
def iterationAlgos
 
def nonDefaultEras
 
def seedProducers
 
def trackProducers
 

Variables

list _allEras = [_defaultEra]
 
tuple _defaultEra = (_defaultEraName, "", None)
 
string _defaultEraName = ""
 
list _iterations
 
list _iterations_muonSeeded
 
list _iterations_muonSeeded_trackingPhase2PU140
 
list _iterations_trackingLowPU
 
list _iterations_trackingPhase1
 
list _iterations_trackingPhase2PU140
 
dictionary _multipleSeedProducers
 
dictionary _multipleSeedProducers_trackingLowPU
 
dictionary _multipleSeedProducers_trackingPhase1
 
dictionary _multipleSeedProducers_trackingPhase2PU140 = {}
 
list _nonDefaultEraNames = ["trackingLowPU", "trackingPhase1", "trackingPhase2PU140"]
 
list _nonDefaultEras
 
tuple _oldStyleHasSelector
 
tuple _trackClusterRemoverBase
 
tuple _trackClusterRemoverBase_trackingPhase2PU140
 

Function Documentation

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

Definition at line 133 of file iterativeTkConfig.py.

References _modulePrefix().

Referenced by clusterRemoverForIter().

134 def _classifier(iteration, oldStyle=False, oldStyleQualityMasks=False):
135  pre = _modulePrefix(iteration)
136  if oldStyle:
137  if iteration in _oldStyleHasSelector:
138  return pre+"Selector:" + ("QualityMasks" if oldStyleQualityMasks else pre)
139  else:
140  return pre
141  else:
142  return pre+":QualityMasks"
def iterativeTkConfig._clusterRemover (   iteration)
private

Definition at line 127 of file iterativeTkConfig.py.

References _modulePrefix().

Referenced by clusterRemoverForIter().

128 def _clusterRemover(iteration):
129  return _modulePrefix(iteration)+"Clusters"
def iterativeTkConfig._modulePrefix (   iteration)
private

Definition at line 124 of file iterativeTkConfig.py.

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

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

Definition at line 164 of file iterativeTkConfig.py.

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

Referenced by seedProducers(), and trackProducers().

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

Definition at line 130 of file iterativeTkConfig.py.

References _modulePrefix().

Referenced by clusterRemoverForIter().

131 def _tracks(iteration):
132  return _modulePrefix(iteration)+"Tracks"
def iterativeTkConfig.allEras ( )

Definition at line 143 of file iterativeTkConfig.py.

144 def allEras():
145  return _allEras
def iterativeTkConfig.clusterRemoverForIter (   iteration,
  eraName = "",
  postfix = "",
  module = None 
)

Definition at line 189 of file iterativeTkConfig.py.

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

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

Definition at line 149 of file iterativeTkConfig.py.

150 def createEarlyTask(eraName, postfix, modDict):
151  task = cms.Task()
152  for it in globals()["_iterations"+postfix]:
153  task.add(modDict[it+'Task'])
154  return task
def iterativeTkConfig.iterationAlgos (   postfix,
  includeSequenceName = False 
)

Definition at line 155 of file iterativeTkConfig.py.

References _modulePrefix().

156 def iterationAlgos(postfix, includeSequenceName=False):
157  muonVariable = "_iterations_muonSeeded"+postfix
158  iterations = globals()["_iterations"+postfix] + globals().get(muonVariable, _iterations_muonSeeded)
159 
160  if includeSequenceName:
161  return [(_modulePrefix(i), i) for i in iterations]
162  else:
163  return [_modulePrefix(i) for i in iterations]
def iterativeTkConfig.nonDefaultEras ( )

Definition at line 146 of file iterativeTkConfig.py.

147 def nonDefaultEras():
148  return _nonDefaultEras
def iterativeTkConfig.seedProducers (   postfix)

Definition at line 183 of file iterativeTkConfig.py.

References _seedOrTrackProducers().

184 def seedProducers(postfix):
185  return _seedOrTrackProducers(postfix, "Seeds")
def iterativeTkConfig.trackProducers (   postfix)

Definition at line 186 of file iterativeTkConfig.py.

References _seedOrTrackProducers().

187 def trackProducers(postfix):
188  return _seedOrTrackProducers(postfix, "Tracks")

Variable Documentation

list iterativeTkConfig._allEras = [_defaultEra]

Definition at line 16 of file iterativeTkConfig.py.

tuple iterativeTkConfig._defaultEra = (_defaultEraName, "", None)

Definition at line 10 of file iterativeTkConfig.py.

string iterativeTkConfig._defaultEraName = ""

Definition at line 6 of file iterativeTkConfig.py.

list iterativeTkConfig._iterations
Initial value:
1 = [
2  "InitialStep",
3  "DetachedTripletStep",
4  "LowPtTripletStep",
5  "PixelPairStep",
6  "MixedTripletStep",
7  "PixelLessStep",
8  "TobTecStep",
9  "JetCoreRegionalStep",
10 ]

Definition at line 19 of file iterativeTkConfig.py.

list iterativeTkConfig._iterations_muonSeeded
Initial value:
1 = [
2  "MuonSeededStepInOut",
3  "MuonSeededStepOutIn",
4 ]

Definition at line 66 of file iterativeTkConfig.py.

list iterativeTkConfig._iterations_muonSeeded_trackingPhase2PU140
Initial value:
1 = [
2  "MuonSeededStepInOut",
3  "MuonSeededStepOutIn",
4 ]

Definition at line 71 of file iterativeTkConfig.py.

list iterativeTkConfig._iterations_trackingLowPU
Initial value:
1 = [
2  "InitialStep",
3  "LowPtTripletStep",
4  "PixelPairStep",
5  "DetachedTripletStep",
6  "MixedTripletStep",
7  "PixelLessStep",
8  "TobTecStep",
9 ]

Definition at line 29 of file iterativeTkConfig.py.

list iterativeTkConfig._iterations_trackingPhase1
Initial value:
1 = [
2  "InitialStep",
3  "LowPtQuadStep",
4  "HighPtTripletStep",
5  "LowPtTripletStep",
6  "DetachedQuadStep",
7  "DetachedTripletStep",
8  "PixelPairStep",
9  "MixedTripletStep",
10  "PixelLessStep",
11  "TobTecStep",
12 ]

Definition at line 38 of file iterativeTkConfig.py.

list iterativeTkConfig._iterations_trackingPhase2PU140
Initial value:
1 = [
2  "InitialStep",
3  "HighPtTripletStep",
4  "LowPtQuadStep",
5  "LowPtTripletStep",
6  "DetachedQuadStep",
7  "PixelPairStep",
8 ]

Definition at line 56 of file iterativeTkConfig.py.

dictionary iterativeTkConfig._multipleSeedProducers
Initial value:
1 = {
2  "MixedTripletStep": ["A", "B"],
3  "TobTecStep": ["Pair", "Tripl"],
4 }

Definition at line 75 of file iterativeTkConfig.py.

dictionary iterativeTkConfig._multipleSeedProducers_trackingLowPU
Initial value:
1 = {
2  "MixedTripletStep": ["A", "B"],
3 }

Definition at line 79 of file iterativeTkConfig.py.

dictionary iterativeTkConfig._multipleSeedProducers_trackingPhase1
Initial value:
1 = {
2  "PixelPairStep": ["A", "B"],
3  "MixedTripletStep": ["A", "B"],
4  "TobTecStep": ["Pair", "Tripl"],
5 }

Definition at line 82 of file iterativeTkConfig.py.

dictionary iterativeTkConfig._multipleSeedProducers_trackingPhase2PU140 = {}

Definition at line 91 of file iterativeTkConfig.py.

list iterativeTkConfig._nonDefaultEraNames = ["trackingLowPU", "trackingPhase1", "trackingPhase2PU140"]

Definition at line 7 of file iterativeTkConfig.py.

list iterativeTkConfig._nonDefaultEras
Initial value:
1 = [
2  (_name, "_"+_name, getattr(__import__('Configuration.Eras.Modifier_'+_name+'_cff',globals(),locals(),[_name],0),_name)) \
3  for _name in _nonDefaultEraNames
4 ]

Definition at line 11 of file iterativeTkConfig.py.

tuple iterativeTkConfig._oldStyleHasSelector
Initial value:
1 = set([
2  "InitialStep",
3  "HighPtTripletStep",
4  "LowPtQuadStep",
5  "LowPtTripletStep",
6  "PixelPairStep",
7  "PixelLessStep",
8  "TobTecStep",
9 ])

Definition at line 92 of file iterativeTkConfig.py.

tuple iterativeTkConfig._trackClusterRemoverBase
Initial value:
1 = _trackClusterRemover.clone(
2  maxChi2 = 9.0,
3  pixelClusters = "siPixelClusters",
4  stripClusters = "siStripClusters",
5  TrackQuality = 'highPurity',
6  minNumberOfLayersWithMeasBeforeFiltering = 0,
7 )

Definition at line 103 of file iterativeTkConfig.py.

tuple iterativeTkConfig._trackClusterRemoverBase_trackingPhase2PU140
Initial value:
1 = _phase2trackClusterRemover.clone(
2  maxChi2 = 9.0,
3  phase2pixelClusters = "siPixelClusters",
4  phase2OTClusters = "siPhase2Clusters",
5  TrackQuality = 'highPurity',
6  minNumberOfLayersWithMeasBeforeFiltering = 0,
7 )

Definition at line 116 of file iterativeTkConfig.py.