CMS 3D CMS Logo

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

Functions

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

Variables

tuple makeTtFullHadEvent
 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 28 of file ttFullHadEvtBuilder_cff.py.

28 
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 
def ttFullHadEvtBuilder_cff.removeTtFullHadHypGenMatch (   process)

remove genMatch hypothesis from the process

Definition at line 54 of file ttFullHadEvtBuilder_cff.py.

54 
55 def removeTtFullHadHypGenMatch(process):
56  process.makeTtFullHadHypotheses.remove(process.makeHypothesis_genMatch)
57  process.ttFullHadEvent.hypotheses.remove("ttFullHadHypGenMatch")
58 
def removeTtFullHadHypGenMatch
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 61 of file ttFullHadEvtBuilder_cff.py.

61 
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)
def setForAllTtFullHadHypotheses
set a specific attribute for all hypotheses to a given value -> this works for "jets", "maxNJets", "jetCorrectionLevel"

Variable Documentation

tuple ttFullHadEvtBuilder_cff.makeTtFullHadEvent
Initial value:
1 = cms.Sequence(makeTtFullHadHypotheses *
2  ttFullHadEvent
3  )

make ttFullHadEvent

Definition at line 15 of file ttFullHadEvtBuilder_cff.py.