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 "findTtSemiLepJetCombMaxSumPtWMass",
64 "findTtSemiLepJetCombMVA",
65 "findTtSemiLepJetCombWMassDeltaTopMass",
66 "findTtSemiLepJetCombWMassMaxSumPt",
67 "hitFitTtSemiLepEventHypothesis",
68 "kinFitTtSemiLepEventHypothesis",
69 "ttSemiLepJetPartonMatch",
70 "ttSemiLepHypGenMatch",
74 "ttSemiLepHypMaxSumPtWMass",
75 "ttSemiLepHypMVADisc",
76 "ttSemiLepHypWMassDeltaTopMass",
77 "ttSemiLepHypWMassMaxSumPt"
79 for obj
in range(len(modules)):
80 object = getattr(process, modules[obj])
81 if hasattr(object, attribute):
82 setattr(object, attribute, value)
87 import TopQuarkAnalysis.TopKinFitter.TtSemiLepKinFitProducer_Electrons_cfi
88 process.kinFitTtSemiLepEventHypothesis = TopQuarkAnalysis.TopKinFitter.TtSemiLepKinFitProducer_Electrons_cfi.kinFitTtSemiLepEvent.clone()
89 import TopQuarkAnalysis.TopHitFit.TtSemiLepHitFitProducer_Electrons_cfi
90 process.hitFitTtSemiLepEventHypothesis = TopQuarkAnalysis.TopHitFit.TtSemiLepHitFitProducer_Electrons_cfi.hitFitTtSemiLepEvent.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