CMS 3D CMS Logo

Functions | Variables
ttFullHadEvtBuilder_cff Namespace Reference

Functions

def addTtFullHadHypotheses (process, names)
 helper functions (examples of usage can be found in the ttFullHadEvtBuilder_cfg.py) More...
 
def removeTtFullHadHypGenMatch (process)
 remove genMatch hypothesis from the process More...
 
def setForAllTtFullHadHypotheses (process, attribute, value)
 set a specific attribute for all hypotheses to a given value -> this works for "jets", "maxNJets", "jetCorrectionLevel" More...
 

Variables

 makeTtFullHadEventTask
 make ttFullHadEvent More...
 

Function Documentation

def ttFullHadEvtBuilder_cff.addTtFullHadHypotheses (   process,
  names 
)

helper functions (examples of usage can be found in the ttFullHadEvtBuilder_cfg.py)

add hypotheses to the process

Definition at line 29 of file ttFullHadEvtBuilder_cff.py.

29  ):
30 
31  ## edit list of input hypotheses for the TtFullHadEventBuilder
32  labels = getattr(process.ttFullHadEvent, "hypotheses")
33  for obj in range(len(names)):
34  ## create correct label from HypoClassKey string (stripping the leading "k")
35  ## e.g. kKinFit -> ttFullHadHypKinFit
36  label = "ttFullHadHyp" + names[obj][1:]
37  ## add it to the list
38  labels.append(label)
39  process.ttFullHadEvent.hypotheses = labels
40 
41  ### include hypotheses in the standard sequence
42  #sequence = getattr(process, "makeTtFullHadHypotheses")
43  #for obj in range(len(names)):
44  ### create correct label from HypoClassKey string (stripping the leading "k")
45  ### e.g. kKinFit -> makeHypothesis_kinFit
46  #if names[obj][1:4] == "MVA":
47  #label = "makeHypothesis_" + names[obj][1:4].lower() + names[obj][4:]
48  #else:
49  #label = "makeHypothesis_" + names[obj][1:2].lower() + names[obj][2:]
50  ### add it to the sequence
51  #sequence += getattr(process, label)
52 
53 
def ttFullHadEvtBuilder_cff.removeTtFullHadHypGenMatch (   process)

remove genMatch hypothesis from the process

Definition at line 55 of file ttFullHadEvtBuilder_cff.py.

56  #process.makeTtFullHadHypotheses.remove(process.makeHypothesis_genMatch)
57  process.ttFullHadEvent.hypotheses.remove("ttFullHadHypGenMatch")
58 
59 
def removeTtFullHadHypGenMatch(process)
remove genMatch hypothesis from the process
def ttFullHadEvtBuilder_cff.setForAllTtFullHadHypotheses (   process,
  attribute,
  value 
)

set a specific attribute for all hypotheses to a given value -> this works for "jets", "maxNJets", "jetCorrectionLevel"

Definition at line 62 of file ttFullHadEvtBuilder_cff.py.

62 def setForAllTtFullHadHypotheses(process, attribute, value):
63  modules = ["ttFullHadJetPartonMatch",
64  "ttFullHadHypGenMatch",
65  "kinFitTtFullHadEventHypothesis",
66  "ttFullHadHypKinFit"]
67  for obj in range(len(modules)):
68  object = getattr(process, modules[obj])
69  if hasattr(object, attribute):
70  setattr(object, attribute, value)
71 
def setForAllTtFullHadHypotheses(process, attribute, value)
set a specific attribute for all hypotheses to a given value -> this works for "jets", "maxNJets", "jetCorrectionLevel"

Variable Documentation

ttFullHadEvtBuilder_cff.makeTtFullHadEventTask

make ttFullHadEvent

Definition at line 15 of file ttFullHadEvtBuilder_cff.py.