CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Attributes
ZMuMuAnalyzer.ZMuMuAnalyzer Class Reference
Inheritance diagram for ZMuMuAnalyzer.ZMuMuAnalyzer:

Public Member Functions

def buildDiLeptons (self, cmgDiLeptons, event)
 
def buildLeptons (self, cmgLeptons, event)
 
def buildOtherLeptons (self, cmgLeptons, event)
 
def declareHandles (self)
 
def testMuonID (self, muon)
 
def testMuonIso (self, muon, isocut)
 
def testVertex (self, lepton)
 

Static Public Attributes

 DiObjectClass
 
 LeptonClass
 
 testLeg1ID
 
 testLeg1Iso
 
 testLeg2ID
 
 testLeg2Iso
 

Detailed Description

Definition at line 8 of file ZMuMuAnalyzer.py.

Member Function Documentation

◆ buildDiLeptons()

def ZMuMuAnalyzer.ZMuMuAnalyzer.buildDiLeptons (   self,
  cmgDiLeptons,
  event 
)
Build di-leptons, associate best vertex to both legs,
select di-leptons with a tight ID muon.
The tight ID selection is done so that dxy and dz can be computed
(the muon must not be standalone).

Definition at line 30 of file ZMuMuAnalyzer.py.

References __class__< T >.__class__(), and ZMuMuAnalyzer.ZMuMuAnalyzer.DiObjectClass.

30  def buildDiLeptons(self, cmgDiLeptons, event):
31  '''Build di-leptons, associate best vertex to both legs,
32  select di-leptons with a tight ID muon.
33  The tight ID selection is done so that dxy and dz can be computed
34  (the muon must not be standalone).
35  '''
36  diLeptons = []
37  for index, dil in enumerate(cmgDiLeptons):
38  pydil = self.__class__.DiObjectClass(dil)
39  pydil.leg1().associatedVertex = event.goodVertices[0]
40  pydil.leg2().associatedVertex = event.goodVertices[0]
41  diLeptons.append( pydil )
42  return diLeptons
43 
44 

◆ buildLeptons()

def ZMuMuAnalyzer.ZMuMuAnalyzer.buildLeptons (   self,
  cmgLeptons,
  event 
)

Definition at line 45 of file ZMuMuAnalyzer.py.

45  def buildLeptons(self, cmgLeptons, event):
46  return []
47 
48 

◆ buildOtherLeptons()

def ZMuMuAnalyzer.ZMuMuAnalyzer.buildOtherLeptons (   self,
  cmgLeptons,
  event 
)

Definition at line 49 of file ZMuMuAnalyzer.py.

49  def buildOtherLeptons(self, cmgLeptons, event):
50  return []
51 
52 

◆ declareHandles()

def ZMuMuAnalyzer.ZMuMuAnalyzer.declareHandles (   self)

Definition at line 13 of file ZMuMuAnalyzer.py.

References core.AutoHandle.AutoHandle.handles, core.Analyzer.Analyzer.handles, HTTP.RequestManager.handles, and print().

13  def declareHandles(self):
14  super(ZMuMuAnalyzer, self).declareHandles()
15  print('ZMuMuAnalyzer.declareHandles')
16  self.handles['diLeptons'] = AutoHandle(
17  'cmgDiMuonSel',
18  'std::vector<cmg::DiObject<cmg::Muon,cmg::Muon>>'
19  )
20  self.handles['leptons'] = AutoHandle(
21  'cmgMuonSel',
22  'std::vector<cmg::Muon>'
23  )
24  self.handles['otherLeptons'] = AutoHandle(
25  'cmgElectronSel',
26  'std::vector<cmg::Electron>'
27  )
28 
29 
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47

◆ testMuonID()

def ZMuMuAnalyzer.ZMuMuAnalyzer.testMuonID (   self,
  muon 
)
Tight muon selection, no isolation requirement

Definition at line 67 of file ZMuMuAnalyzer.py.

References ZMuMuAnalyzer.ZMuMuAnalyzer.testVertex().

67  def testMuonID(self, muon):
68  '''Tight muon selection, no isolation requirement'''
69  # import pdb; pdb.set_trace()
70  return muon.tightId() and \
71  self.testVertex( muon )
72 
73 

◆ testMuonIso()

def ZMuMuAnalyzer.ZMuMuAnalyzer.testMuonIso (   self,
  muon,
  isocut 
)
dbeta corrected pf isolation with all charged particles instead of
charged hadrons

Definition at line 59 of file ZMuMuAnalyzer.py.

59  def testMuonIso(self, muon, isocut ):
60  '''dbeta corrected pf isolation with all charged particles instead of
61  charged hadrons'''
62  return muon.relIsoAllChargedDB05()<isocut
63 

◆ testVertex()

def ZMuMuAnalyzer.ZMuMuAnalyzer.testVertex (   self,
  lepton 
)
Tests vertex constraints, for mu and tau

Definition at line 53 of file ZMuMuAnalyzer.py.

References funct.abs().

Referenced by ZMuMuAnalyzer.ZMuMuAnalyzer.testMuonID().

53  def testVertex(self, lepton):
54  '''Tests vertex constraints, for mu and tau'''
55  return abs(lepton.dxy()) < 0.045 and \
56  abs(lepton.dz()) < 0.2
57 
58 
Abs< T >::type abs(const T &t)
Definition: Abs.h:22

Member Data Documentation

◆ DiObjectClass

ZMuMuAnalyzer.ZMuMuAnalyzer.DiObjectClass
static

Definition at line 10 of file ZMuMuAnalyzer.py.

Referenced by ZMuMuAnalyzer.ZMuMuAnalyzer.buildDiLeptons().

◆ LeptonClass

ZMuMuAnalyzer.ZMuMuAnalyzer.LeptonClass
static

Definition at line 11 of file ZMuMuAnalyzer.py.

◆ testLeg1ID

ZMuMuAnalyzer.ZMuMuAnalyzer.testLeg1ID
static

Definition at line 74 of file ZMuMuAnalyzer.py.

Referenced by DiLeptonAnalyzer.DiLeptonAnalyzer.testLeg1().

◆ testLeg1Iso

ZMuMuAnalyzer.ZMuMuAnalyzer.testLeg1Iso
static

Definition at line 64 of file ZMuMuAnalyzer.py.

Referenced by DiLeptonAnalyzer.DiLeptonAnalyzer.testLeg1().

◆ testLeg2ID

ZMuMuAnalyzer.ZMuMuAnalyzer.testLeg2ID
static

Definition at line 75 of file ZMuMuAnalyzer.py.

Referenced by DiLeptonAnalyzer.DiLeptonAnalyzer.testLeg2().

◆ testLeg2Iso

ZMuMuAnalyzer.ZMuMuAnalyzer.testLeg2Iso
static

Definition at line 65 of file ZMuMuAnalyzer.py.

Referenced by DiLeptonAnalyzer.DiLeptonAnalyzer.testLeg2().