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 "findTtSemiLepJetCombMaxSumPtWMass", 00065 "findTtSemiLepJetCombMVA", 00066 "findTtSemiLepJetCombWMassDeltaTopMass", 00067 "findTtSemiLepJetCombWMassMaxSumPt", 00068 "hitFitTtSemiLepEventHypothesis", 00069 "kinFitTtSemiLepEventHypothesis", 00070 "ttSemiLepJetPartonMatch", 00071 "ttSemiLepHypGenMatch", 00072 "ttSemiLepHypGeom", 00073 "ttSemiLepHypHitFit", 00074 "ttSemiLepHypKinFit", 00075 "ttSemiLepHypMaxSumPtWMass", 00076 "ttSemiLepHypMVADisc", 00077 "ttSemiLepHypWMassDeltaTopMass", 00078 "ttSemiLepHypWMassMaxSumPt" 00079 ] 00080 for obj in range(len(modules)): 00081 object = getattr(process, modules[obj]) 00082 if hasattr(object, attribute): 00083 setattr(object, attribute, value)
def ttSemiLepEvtBuilder_cff::useElectronsForAllTtSemiLepHypotheses | ( | process, | |
elecLabel = "selectedPatElectrons" |
|||
) |
use electrons instead of muons for the hypotheses
Definition at line 85 of file ttSemiLepEvtBuilder_cff.py.
00086 : 00087 ## use correct KinFitter module 00088 import TopQuarkAnalysis.TopKinFitter.TtSemiLepKinFitProducer_Electrons_cfi 00089 process.kinFitTtSemiLepEventHypothesis = TopQuarkAnalysis.TopKinFitter.TtSemiLepKinFitProducer_Electrons_cfi.kinFitTtSemiLepEvent.clone() 00090 import TopQuarkAnalysis.TopHitFit.TtSemiLepHitFitProducer_Electrons_cfi 00091 process.hitFitTtSemiLepEventHypothesis = TopQuarkAnalysis.TopHitFit.TtSemiLepHitFitProducer_Electrons_cfi.hitFitTtSemiLepEvent.clone() 00092 ## replace lepton InputTags in all modules 00093 setForAllTtSemiLepHypotheses(process, "leps", elecLabel)
00001 cms.Sequence(makeTtSemiLepHypotheses * 00002 ttSemiLepEvent 00003 )
make ttSemiLepEvent
Definition at line 15 of file ttSemiLepEvtBuilder_cff.py.