CMS 3D CMS Logo

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

Public Member Functions

def buildDiLeptons
 
def buildLeptons
 
def buildOtherLeptons
 
def declareHandles
 
def testMuonID
 
def testMuonIso
 
def testVertex
 

Static Public Attributes

 DiObjectClass = DiMuon
 
 LeptonClass = Muon
 
 testLeg1ID = testMuonID
 
 testLeg1Iso = testMuonIso
 
 testLeg2ID = testMuonID
 
 testLeg2Iso = testMuonIso
 

Detailed Description

Definition at line 8 of file ZMuMuAnalyzer.py.

Member Function Documentation

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.

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

Definition at line 45 of file ZMuMuAnalyzer.py.

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

Definition at line 49 of file ZMuMuAnalyzer.py.

49 
50  def buildOtherLeptons(self, cmgLeptons, event):
51  return []
52 
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 
14  def declareHandles(self):
15  super(ZMuMuAnalyzer, self).declareHandles()
16  print('ZMuMuAnalyzer.declareHandles')
17  self.handles['diLeptons'] = AutoHandle(
18  'cmgDiMuonSel',
19  'std::vector<cmg::DiObject<cmg::Muon,cmg::Muon>>'
20  )
21  self.handles['leptons'] = AutoHandle(
22  'cmgMuonSel',
23  'std::vector<cmg::Muon>'
24  )
25  self.handles['otherLeptons'] = AutoHandle(
26  'cmgElectronSel',
27  'std::vector<cmg::Electron>'
28  )
29 
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47
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 
68  def testMuonID(self, muon):
69  '''Tight muon selection, no isolation requirement'''
70  # import pdb; pdb.set_trace()
71  return muon.tightId() and \
72  self.testVertex( muon )
73 
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 
60  def testMuonIso(self, muon, isocut ):
61  '''dbeta corrected pf isolation with all charged particles instead of
62  charged hadrons'''
63  return muon.relIsoAllChargedDB05()<isocut
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 
54  def testVertex(self, lepton):
55  '''Tests vertex constraints, for mu and tau'''
56  return abs(lepton.dxy()) < 0.045 and \
57  abs(lepton.dz()) < 0.2
58 
Abs< T >::type abs(const T &t)
Definition: Abs.h:22

Member Data Documentation

ZMuMuAnalyzer.ZMuMuAnalyzer.DiObjectClass = DiMuon
static

Definition at line 10 of file ZMuMuAnalyzer.py.

ZMuMuAnalyzer.ZMuMuAnalyzer.LeptonClass = Muon
static

Definition at line 11 of file ZMuMuAnalyzer.py.

ZMuMuAnalyzer.ZMuMuAnalyzer.testLeg1ID = testMuonID
static

Definition at line 74 of file ZMuMuAnalyzer.py.

Referenced by DiLeptonAnalyzer.DiLeptonAnalyzer.testLeg1().

ZMuMuAnalyzer.ZMuMuAnalyzer.testLeg1Iso = testMuonIso
static

Definition at line 64 of file ZMuMuAnalyzer.py.

Referenced by DiLeptonAnalyzer.DiLeptonAnalyzer.testLeg1().

ZMuMuAnalyzer.ZMuMuAnalyzer.testLeg2ID = testMuonID
static

Definition at line 75 of file ZMuMuAnalyzer.py.

Referenced by DiLeptonAnalyzer.DiLeptonAnalyzer.testLeg2().

ZMuMuAnalyzer.ZMuMuAnalyzer.testLeg2Iso = testMuonIso
static

Definition at line 65 of file ZMuMuAnalyzer.py.

Referenced by DiLeptonAnalyzer.DiLeptonAnalyzer.testLeg2().