CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 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.

References sistrip::SpyUtilities.range().

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

remove genMatch hypothesis from the process

Definition at line 55 of file ttFullHadEvtBuilder_cff.py.

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

References sistrip::SpyUtilities.range().

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

Variable Documentation

tuple ttFullHadEvtBuilder_cff.makeTtFullHadEventTask
Initial value:
1 = cms.Task(
2  makeTtFullHadHypothesesTask,
3  ttFullHadEvent
4 )

make ttFullHadEvent

Definition at line 15 of file ttFullHadEvtBuilder_cff.py.