CMS 3D CMS Logo

Functions | Variables

ttFullHadEvtBuilder_cff Namespace Reference

Functions

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

Variables

tuple makeTtFullHadEvent
 make ttFullHadEvent

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 26 of file ttFullHadEvtBuilder_cff.py.

00029                             :
00030 
00031     ## edit list of input hypotheses for the TtFullHadEventBuilder
00032     labels =  getattr(process.ttFullHadEvent, "hypotheses")
00033     for obj in range(len(names)):
00034         ## create correct label from HypoClassKey string (stripping the leading "k")
00035         ## e.g. kKinFit -> ttFullHadHypKinFit
00036         label = "ttFullHadHyp" + names[obj][1:]
00037         ## add it to the list
00038         labels.append(label)
00039     process.ttFullHadEvent.hypotheses = labels
00040 
00041     ## include hypotheses in the standard sequence
00042     sequence = getattr(process, "makeTtFullHadHypotheses")
00043     for obj in range(len(names)):
00044         ## create correct label from HypoClassKey string (stripping the leading "k")
00045         ## e.g. kKinFit -> makeHypothesis_kinFit
00046         if names[obj][1:4] == "MVA":
00047             label = "makeHypothesis_" + names[obj][1:4].lower() + names[obj][4:]
00048         else:
00049             label = "makeHypothesis_" + names[obj][1:2].lower() + names[obj][2:]
00050         ## add it to the sequence
00051         sequence += getattr(process, label)
00052 

def ttFullHadEvtBuilder_cff::removeTtFullHadHypGenMatch (   process)

remove genMatch hypothesis from the process

Definition at line 54 of file ttFullHadEvtBuilder_cff.py.

00055                                        :
00056     process.makeTtFullHadHypotheses.remove(process.makeHypothesis_genMatch)
00057     process.ttFullHadEvent.hypotheses.remove("ttFullHadHypGenMatch")
00058 

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.

00062                                                            :
00063     modules = ["ttFullHadJetPartonMatch",
00064                "ttFullHadHypGenMatch",
00065                "kinFitTtFullHadEventHypothesis",
00066                "ttFullHadHypKinFit"]
00067     for obj in range(len(modules)):
00068         object = getattr(process, modules[obj])
00069         if hasattr(object, attribute):
00070             setattr(object, attribute, value)

Variable Documentation

Initial value:
00001 cms.Sequence(makeTtFullHadHypotheses *
00002                                   ttFullHadEvent
00003                                   )

make ttFullHadEvent

Definition at line 15 of file ttFullHadEvtBuilder_cff.py.