CMS 3D CMS Logo

Functions | Variables
ttSemiLepEvtBuilder_cff Namespace Reference

Functions

def addTtSemiLepHypotheses (process, names)
 helper functions (examples of usage can be found in the ttSemiLepEvtBuilder_cfg.py) More...
 
def removeTtSemiLepHypGenMatch (process)
 remove genMatch hypothesis from the process More...
 
def setForAllTtSemiLepHypotheses (process, attribute, value)
 set a specific attribute for all hypotheses to a given value -> this works for "jets", "leps", "mets", "maxNJets" More...
 
def useElectronsForAllTtSemiLepHypotheses (process, elecLabel="selectedPatElectrons")
 use electrons instead of muons for the hypotheses More...
 

Variables

 makeTtSemiLepEventTask
 make ttSemiLepEvent More...
 

Function Documentation

◆ addTtSemiLepHypotheses()

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 27 of file ttSemiLepEvtBuilder_cff.py.

27 def addTtSemiLepHypotheses(process,
28  names
29  ):
30 
31 
32  labels = getattr(process.ttSemiLepEvent, "hypotheses")
33  for obj in range(len(names)):
34 
36  label = "ttSemiLepHyp" + names[obj][1:]
37 
38  labels.append(label)
39  process.ttSemiLepEvent.hypotheses = labels
40 
41 
52 
53 

References FastTimerService_cff.range.

◆ removeTtSemiLepHypGenMatch()

def ttSemiLepEvtBuilder_cff.removeTtSemiLepHypGenMatch (   process)

remove genMatch hypothesis from the process

Definition at line 55 of file ttSemiLepEvtBuilder_cff.py.

55 def removeTtSemiLepHypGenMatch(process):
56  #process.makeTtSemiLepHypotheses.remove(process.makeHypothesis_genMatch)
57  process.ttSemiLepEvent.hypotheses.remove("ttSemiLepHypGenMatch")
58  process.ttSemiLepEvent.genEvent = ''
59 
60 

◆ setForAllTtSemiLepHypotheses()

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 63 of file ttSemiLepEvtBuilder_cff.py.

63 def setForAllTtSemiLepHypotheses(process, attribute, value):
64  modules = ["findTtSemiLepJetCombGeom",
65  "findTtSemiLepJetCombMaxSumPtWMass",
66  "findTtSemiLepJetCombMVA",
67  "findTtSemiLepJetCombWMassDeltaTopMass",
68  "findTtSemiLepJetCombWMassMaxSumPt",
69  "hitFitTtSemiLepEventHypothesis",
70  "kinFitTtSemiLepEventHypothesis",
71  "ttSemiLepJetPartonMatch",
72  "ttSemiLepHypGenMatch",
73  "ttSemiLepHypGeom",
74  "ttSemiLepHypHitFit",
75  "ttSemiLepHypKinFit",
76  "ttSemiLepHypMaxSumPtWMass",
77  "ttSemiLepHypMVADisc",
78  "ttSemiLepHypWMassDeltaTopMass",
79  "ttSemiLepHypWMassMaxSumPt"
80  ]
81  for obj in range(len(modules)):
82  object = getattr(process, modules[obj])
83  if hasattr(object, attribute):
84  setattr(object, attribute, value)
85 

References FastTimerService_cff.range.

Referenced by useElectronsForAllTtSemiLepHypotheses().

◆ useElectronsForAllTtSemiLepHypotheses()

def ttSemiLepEvtBuilder_cff.useElectronsForAllTtSemiLepHypotheses (   process,
  elecLabel = "selectedPatElectrons" 
)

use electrons instead of muons for the hypotheses

Definition at line 87 of file ttSemiLepEvtBuilder_cff.py.

87 def useElectronsForAllTtSemiLepHypotheses(process, elecLabel = "selectedPatElectrons"):
88 
89  import TopQuarkAnalysis.TopKinFitter.TtSemiLepKinFitProducer_Electrons_cfi
90  process.kinFitTtSemiLepEventHypothesis = TopQuarkAnalysis.TopKinFitter.TtSemiLepKinFitProducer_Electrons_cfi.kinFitTtSemiLepEvent.clone()
91  import TopQuarkAnalysis.TopHitFit.TtSemiLepHitFitProducer_Electrons_cfi
92  process.hitFitTtSemiLepEventHypothesis = TopQuarkAnalysis.TopHitFit.TtSemiLepHitFitProducer_Electrons_cfi.hitFitTtSemiLepEvent.clone()
93 
94  setForAllTtSemiLepHypotheses(process, "leps", elecLabel)

References setForAllTtSemiLepHypotheses().

Variable Documentation

◆ makeTtSemiLepEventTask

ttSemiLepEvtBuilder_cff.makeTtSemiLepEventTask

make ttSemiLepEvent

Definition at line 15 of file ttSemiLepEvtBuilder_cff.py.

FastTimerService_cff.range
range
Definition: FastTimerService_cff.py:34
ttSemiLepEvtBuilder_cff.removeTtSemiLepHypGenMatch
def removeTtSemiLepHypGenMatch(process)
remove genMatch hypothesis from the process
Definition: ttSemiLepEvtBuilder_cff.py:55
ttSemiLepEvtBuilder_cff.useElectronsForAllTtSemiLepHypotheses
def useElectronsForAllTtSemiLepHypotheses(process, elecLabel="selectedPatElectrons")
use electrons instead of muons for the hypotheses
Definition: ttSemiLepEvtBuilder_cff.py:87
ttSemiLepEvtBuilder_cff.addTtSemiLepHypotheses
def addTtSemiLepHypotheses(process, names)
helper functions (examples of usage can be found in the ttSemiLepEvtBuilder_cfg.py)
Definition: ttSemiLepEvtBuilder_cff.py:27
ttSemiLepEvtBuilder_cff.setForAllTtSemiLepHypotheses
def setForAllTtSemiLepHypotheses(process, attribute, value)
set a specific attribute for all hypotheses to a given value -> this works for "jets",...
Definition: ttSemiLepEvtBuilder_cff.py:63