CMS 3D CMS Logo

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__ (self, cfg_ana, cfg_comp, looperName)
 
def beginLoop (self, setup)
 
def declareHandles (self)
 
def process (self, event)
 

Static Public Attributes

 filterHiggsDecays
 

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  def __init__(self, cfg_ana, cfg_comp, looperName ):
25  super(HiggsDecayModeAnalyzer,self).__init__(cfg_ana,cfg_comp,looperName)
def __init__(self, cfg_ana, cfg_comp, looperName)

Member Function Documentation

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

Definition at line 32 of file HiggsDecayModeAnalyzer.py.

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

Definition at line 29 of file HiggsDecayModeAnalyzer.py.

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

Definition at line 35 of file HiggsDecayModeAnalyzer.py.

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

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

Member Data Documentation

gen.HiggsDecayModeAnalyzer.HiggsDecayModeAnalyzer.filterHiggsDecays
static

Definition at line 60 of file HiggsDecayModeAnalyzer.py.