CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ttFullLepEvtBuilder_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 
4 ################################################################################
5 # produce ttFullLepEvent structure with all necessary ingredients
6 ################################################################################
7 
8 ## std sequence to produce the ttFullLepEventHypotheses
10 
11 ## configure ttFullLepEventBuilder
13 
14 ### make ttFullLepEvent
15 #makeTtFullLepEvent = cms.Sequence(makeTtFullLepHypotheses *
16  #ttFullLepEvent
17  #)
18 
19 
20 ################################################################################
21 ## helper functions
22 ## (examples of usage can be found in the ttFullLepEvtBuilder_cfg.py)
23 ################################################################################
24 
25 ## remove genMatch hypothesis from the process
27  #process.makeTtFullLepHypotheses.remove(process.makeHypothesis_genMatch)
28  process.ttFullLepEvent.hypotheses.remove("ttFullLepHypGenMatch")
29  process.ttFullLepEvent.genEvent = ''
30 
31 
32 ## set a specific attribute for all hypotheses to a given value
33 ## -> this works for "jets", "leps", "mets", "maxNJets"
34 def setForAllTtFullLepHypotheses(process, attribute, value):
35  modules = ["ttFullLepJetPartonMatch",
36  "ttFullLepHypGenMatch",
37  "ttFullLepHypKinSolution",
38  "kinSolutionTtFullLepEventHypothesis"]
39  for obj in range(len(modules)):
40  object = getattr(process, modules[obj])
41  if hasattr(object, attribute):
42  setattr(object, attribute, value)
43 
44 
45 
def removeTtFullLepHypGenMatch
make ttFullLepEvent makeTtFullLepEvent = cms.Sequence(makeTtFullLepHypotheses * ttFullLepEvent ) ...
def setForAllTtFullLepHypotheses
set a specific attribute for all hypotheses to a given value -> this works for "jets", "leps", "mets", "maxNJets"
configure ttFullLepEventBuilder
produce ttFullLepEvent structure with all necessary ingredients