15 makeTtSemiLepEvent = cms.Sequence(makeTtSemiLepHypotheses *
31 labels = getattr(process.ttSemiLepEvent,
"hypotheses")
32 for obj
in range(len(names)):
35 label =
"ttSemiLepHyp" + names[obj][1:]
38 process.ttSemiLepEvent.hypotheses = labels
41 sequence = getattr(process,
"makeTtSemiLepHypotheses")
42 for obj
in range(len(names)):
45 if names[obj][1:4] ==
"MVA":
46 label =
"makeHypothesis_" + names[obj][1:4].lower() + names[obj][4:]
48 label =
"makeHypothesis_" + names[obj][1:2].lower() + names[obj][2:]
50 sequence += getattr(process, label)
55 process.makeTtSemiLepHypotheses.remove(process.makeHypothesis_genMatch)
56 process.ttSemiLepEvent.hypotheses.remove(
"ttSemiLepHypGenMatch")
62 modules = [
"findTtSemiLepJetCombGeom",
63 "findTtSemiLepJetCombGeom",
65 "ttSemiLepHypMaxSumPtWMass",
66 "ttSemiLepHypWMassMaxSumPt",
67 "ttSemiLepHypWMassDeltaTopMass",
68 "ttSemiLepJetPartonMatch",
69 "ttSemiLepHypGenMatch",
70 "findTtSemiLepJetCombMVA",
71 "ttSemiLepHypMVADisc",
72 "kinFitTtSemiLepEventHypothesis",
74 for obj
in range(len(modules)):
75 object = getattr(process, modules[obj])
76 if hasattr(object, attribute):
77 setattr(object, attribute, value)
84 import TopQuarkAnalysis.TopKinFitter.TtSemiLepKinFitProducer_Electrons_cfi
85 process.kinFitTtSemiLepEventHypothesis = TopQuarkAnalysis.TopKinFitter.TtSemiLepKinFitProducer_Electrons_cfi.kinFitTtSemiLepEvent.clone()
def setForAllTtSemiLepHypotheses
set a specific attribute for all hypotheses to a given value -> this works for "jets", "leps", "mets", "maxNJets"
def addTtSemiLepHypotheses
helper functions (examples of usage can be found in the ttSemiLepEvtBuilder_cfg.py) ...
def useElectronsForAllTtSemiLepHypotheses
use electrons instead of muons for the hypotheses
produce ttSemiLepEvent structure with all necessary ingredients
def removeTtSemiLepHypGenMatch
remove genMatch hypothesis from the process
configure ttSemiLepEventBuilder