CMS 3D CMS Logo

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

Functions

def getMVASelectors
 

Function Documentation

def iterativeTkUtils.getMVASelectors (   postfix)

Definition at line 6 of file iterativeTkUtils.py.

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