CMS 3D CMS Logo

Functions
iterativeTkUtils Namespace Reference

Functions

def getMVASelectors (postfix)
 

Function Documentation

def iterativeTkUtils.getMVASelectors (   postfix)

Definition at line 6 of file iterativeTkUtils.py.

6 def getMVASelectors(postfix):
7  # assume naming convention that the iteration name (when first
8  # letter in lower case) is the selector name
9 
10  ret = {}
11 
12  for iterName, seqName in _cfg.iterationAlgos(postfix, includeSequenceName=True):
13  if hasattr(_iterativeTk_cff, iterName):
14  mod = getattr(_iterativeTk_cff, iterName)
15  seq = getattr(_iterativeTk_cff, seqName)
16 
17  # Ignore iteration if the MVA selector module is not in the sequence
18  try:
19  seq.index(mod)
20  except:
21  continue
22 
23  typeName = mod._TypedParameterizable__type
24  classifiers = []
25  if typeName == "ClassifierMerger":
26  classifiers = mod.inputClassifiers.value()
27  elif "TrackMVAClassifier" in typeName:
28  classifiers = [iterName]
29  if len(classifiers) > 0:
30  ret[iterName] = (iterName+"Tracks", classifiers)
31 
32  return ret
33 
def getMVASelectors(postfix)