CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/TopQuarkAnalysis/TopEventProducers/python/sequences/ttFullLepEvtBuilder_cff.py

Go to the documentation of this file.
00001 import FWCore.ParameterSet.Config as cms
00002 
00003 
00004 ################################################################################
00005 # produce ttFullLepEvent structure with all necessary ingredients
00006 ################################################################################
00007 
00008 ## std sequence to produce the ttFullLepEventHypotheses
00009 from TopQuarkAnalysis.TopEventProducers.sequences.ttFullLepEvtHypotheses_cff import *
00010 
00011 ## configure ttFullLepEventBuilder
00012 from TopQuarkAnalysis.TopEventProducers.producers.TtFullLepEvtBuilder_cfi import *
00013 
00014 ## make ttFullLepEvent
00015 makeTtFullLepEvent = cms.Sequence(makeTtFullLepHypotheses *
00016                                   ttFullLepEvent
00017                                   )
00018 
00019 
00020 ################################################################################
00021 ## helper functions
00022 ## (examples of usage can be found in the ttFullLepEvtBuilder_cfg.py)
00023 ################################################################################
00024 
00025 ## remove genMatch hypothesis from the process
00026 def removeTtFullLepHypGenMatch(process):
00027     process.makeTtFullLepHypotheses.remove(process.makeHypothesis_genMatch)
00028     process.ttFullLepEvent.hypotheses.remove("ttFullLepHypGenMatch")
00029 
00030 
00031 ## set a specific attribute for all hypotheses to a given value
00032 ## -> this works for "jets", "leps", "mets", "maxNJets"
00033 def setForAllTtFullLepHypotheses(process, attribute, value):
00034     modules = ["ttFullLepHypGenMatch",     
00035                "ttFullLepHypKinSolution",
00036                "kinSolutionTtFullLepEventHypothesis"]
00037     for obj in range(len(modules)):
00038         object = getattr(process, modules[obj])
00039         if hasattr(object, attribute):
00040             setattr(object, attribute, value)
00041 
00042 
00043