CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Attributes
gen.HiggsDecayModeAnalyzer.HiggsDecayModeAnalyzer Class Reference
Inheritance diagram for gen.HiggsDecayModeAnalyzer.HiggsDecayModeAnalyzer:

Public Member Functions

def __init__
 
def beginLoop
 
def declareHandles
 
def process
 

Static Public Attributes

 filterHiggsDecays = False,
 

Detailed Description

Classify and filter events according to Higgs boson decays

   Reads:
     event.genHiggsBosons

   Creates in the event:
     event.genHiggsDecayMode =   0  for non-Higgs or multi-higgs
                             15  for H -> tau tau
                             23  for H -> Z Z
                             24  for H -> W W
                             xx  for H -> xx yy zzz 
   If filterHiggsDecays is set to a list of Higgs decay modes,
   it will filter events that have those decay modes.
   e.g. [0, 15, 23, 24] will keep data, non-Higgs MC and Higgs decays to (tau, Z, W) 
   but will drop Higgs decays to other particles (e.g. bb).

Definition at line 6 of file HiggsDecayModeAnalyzer.py.

Constructor & Destructor Documentation

def gen.HiggsDecayModeAnalyzer.HiggsDecayModeAnalyzer.__init__ (   self,
  cfg_ana,
  cfg_comp,
  looperName 
)

Definition at line 24 of file HiggsDecayModeAnalyzer.py.

24 
25  def __init__(self, cfg_ana, cfg_comp, looperName ):
super(HiggsDecayModeAnalyzer,self).__init__(cfg_ana,cfg_comp,looperName)

Member Function Documentation

def gen.HiggsDecayModeAnalyzer.HiggsDecayModeAnalyzer.beginLoop (   self,
  setup 
)

Definition at line 32 of file HiggsDecayModeAnalyzer.py.

32 
33  def beginLoop(self, setup):
34  super(HiggsDecayModeAnalyzer,self).beginLoop(setup)
def gen.HiggsDecayModeAnalyzer.HiggsDecayModeAnalyzer.declareHandles (   self)

Definition at line 29 of file HiggsDecayModeAnalyzer.py.

29 
30  def declareHandles(self):
31  super(HiggsDecayModeAnalyzer, self).declareHandles()
def gen.HiggsDecayModeAnalyzer.HiggsDecayModeAnalyzer.process (   self,
  event 
)

Definition at line 35 of file HiggsDecayModeAnalyzer.py.

References funct.abs(), benchmark_cfg.pdgId, and core.Analyzer.Analyzer.readCollections().

Referenced by ConfigBuilder.ConfigBuilder.addExtraStream(), ConfigBuilder.ConfigBuilder.completeInputCommand(), ConfigBuilder.ConfigBuilder.doNotInlineEventContent(), ConfigBuilder.ConfigBuilder.PrintAllModules.leave(), ConfigBuilder.ConfigBuilder.prepare_HLT(), ConfigBuilder.ConfigBuilder.prepare_LHE(), ConfigBuilder.ConfigBuilder.prepare_PATFILTER(), ConfigBuilder.ConfigBuilder.prepare_VALIDATION(), ConfigBuilder.ConfigBuilder.renameHLTprocessInSequence(), ConfigBuilder.ConfigBuilder.renameInputTagsInSequence(), and ConfigBuilder.ConfigBuilder.scheduleSequence().

35 
36  def process(self, event):
37  self.readCollections( event.input )
38 
39  # if not MC, nothing to do
40  if not self.cfg_comp.isMC:
41  return True
42 
43  higgsBosons = event.genHiggsBosons
44  if len(higgsBosons) != 1:
45  event.genHiggsDecayMode = 0
46  event.genHiggsBoson = None
47  else:
48  event.genHiggsBoson = higgsBosons[0]
49  event.genHiggsDecayMode = abs( event.genHiggsBoson.daughter(0).pdgId() )
50 
51  # if MC and filtering on the Higgs decay mode,
52  # them do filter events
53  if self.cfg_ana.filterHiggsDecays:
54  if event.genHiggsDecayMode not in self.cfg_ana.filterHiggsDecays:
55  return False
56 
57  return True
58 
setattr(HiggsDecayModeAnalyzer,"defaultConfig",
Abs< T >::type abs(const T &t)
Definition: Abs.h:22

Member Data Documentation

gen.HiggsDecayModeAnalyzer.HiggsDecayModeAnalyzer.filterHiggsDecays = False,
static

Definition at line 60 of file HiggsDecayModeAnalyzer.py.