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  if not seq.contains(mod):
19  continue
20 
21  typeName = mod._TypedParameterizable__type
22  classifiers = []
23  if typeName == "ClassifierMerger":
24  classifiers = mod.inputClassifiers.value()
25  elif "TrackMVAClassifier" in typeName:
26  classifiers = [iterName]
27  if len(classifiers) > 0:
28  ret[iterName] = (iterName+"Tracks", classifiers)
29 
30  return ret
31 
def getMVASelectors(postfix)