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

◆ __init__()

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)

Member Function Documentation

◆ beginLoop()

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 

◆ declareHandles()

def gen.HiggsDecayModeAnalyzer.HiggsDecayModeAnalyzer.declareHandles (   self)

Definition at line 29 of file HiggsDecayModeAnalyzer.py.

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

◆ process()

def gen.HiggsDecayModeAnalyzer.HiggsDecayModeAnalyzer.process (   self,
  event 
)

Definition at line 35 of file HiggsDecayModeAnalyzer.py.

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",

References funct.abs(), analyzer.Analyzer.cfg_ana, analyzer.Analyzer.cfg_comp, looper.Looper.cfg_comp, EgammaValidation_cff.pdgId, and core.Analyzer.Analyzer.readCollections().

Member Data Documentation

◆ filterHiggsDecays

gen.HiggsDecayModeAnalyzer.HiggsDecayModeAnalyzer.filterHiggsDecays
static

Definition at line 60 of file HiggsDecayModeAnalyzer.py.

LaserDQM_cfg.process
process
Definition: LaserDQM_cfg.py:3
EgammaValidation_cff.pdgId
pdgId
Definition: EgammaValidation_cff.py:118
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22