Functions | |
def | addTtSemiLepHypotheses |
helper functions (examples of usage can be found in the ttSemiLepEvtBuilder_cfg.py) | |
def | removeTtSemiLepHypGenMatch |
remove genMatch hypothesis from the process | |
def | setForAllTtSemiLepHypotheses |
set a specific attribute for all hypotheses to a given value -> this works for "jets", "leps", "mets", "maxNJets" | |
def | useElectronsForAllTtSemiLepHypotheses |
use electrons instead of muons for the hypotheses | |
Variables | |
tuple | makeTtSemiLepEvent |
make ttSemiLepEvent |
def ttSemiLepEvtBuilder_cff::addTtSemiLepHypotheses | ( | process, | |
names | |||
) |
helper functions (examples of usage can be found in the ttSemiLepEvtBuilder_cfg.py)
add hypotheses to the process
Definition at line 26 of file ttSemiLepEvtBuilder_cff.py.
00029 : 00030 00031 ## edit list of input hypotheses for the TtSemiLepEventBuilder 00032 labels = getattr(process.ttSemiLepEvent, "hypotheses") 00033 for obj in range(len(names)): 00034 ## create correct label from HypoClassKey string (stripping the leading "k") 00035 ## e.g. kKinFit -> ttSemiLepHypKinFit 00036 label = "ttSemiLepHyp" + names[obj][1:] 00037 ## add it to the list 00038 labels.append(label) 00039 process.ttSemiLepEvent.hypotheses = labels 00040 00041 ## include hypotheses in the standard sequence 00042 sequence = getattr(process, "makeTtSemiLepHypotheses") 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 ttSemiLepEvtBuilder_cff::removeTtSemiLepHypGenMatch | ( | process | ) |
remove genMatch hypothesis from the process
Definition at line 54 of file ttSemiLepEvtBuilder_cff.py.
def ttSemiLepEvtBuilder_cff::setForAllTtSemiLepHypotheses | ( | process, | |
attribute, | |||
value | |||
) |
set a specific attribute for all hypotheses to a given value -> this works for "jets", "leps", "mets", "maxNJets"
Definition at line 61 of file ttSemiLepEvtBuilder_cff.py.
00062 : 00063 modules = ["findTtSemiLepJetCombGeom", 00064 "findTtSemiLepJetCombGeom", 00065 "ttSemiLepHypGeom", 00066 "ttSemiLepHypMaxSumPtWMass", 00067 "ttSemiLepHypWMassMaxSumPt", 00068 "ttSemiLepHypWMassDeltaTopMass", 00069 "ttSemiLepJetPartonMatch", 00070 "ttSemiLepHypGenMatch", 00071 "findTtSemiLepJetCombMVA", 00072 "ttSemiLepHypMVADisc", 00073 "kinFitTtSemiLepEventHypothesis", 00074 "ttSemiLepHypKinFit"] 00075 for obj in range(len(modules)): 00076 object = getattr(process, modules[obj]) 00077 if hasattr(object, attribute): 00078 setattr(object, attribute, value)
def ttSemiLepEvtBuilder_cff::useElectronsForAllTtSemiLepHypotheses | ( | process, | |
elecLabel = "selectedPatElectrons" |
|||
) |
use electrons instead of muons for the hypotheses
Definition at line 80 of file ttSemiLepEvtBuilder_cff.py.
00081 : 00082 ## replace lepton InputTags in all modules 00083 setForAllTtSemiLepHypotheses(process, "leps", elecLabel) 00084 ## use correct KinFitter module 00085 import TopQuarkAnalysis.TopKinFitter.TtSemiLepKinFitProducer_Electrons_cfi 00086 process.kinFitTtSemiLepEventHypothesis = TopQuarkAnalysis.TopKinFitter.TtSemiLepKinFitProducer_Electrons_cfi.kinFitTtSemiLepEvent.clone()
00001 cms.Sequence(makeTtSemiLepHypotheses * 00002 ttSemiLepEvent 00003 )
make ttSemiLepEvent
Definition at line 15 of file ttSemiLepEvtBuilder_cff.py.