CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Photon.py
Go to the documentation of this file.
2 
3 import ROOT
4 
6 
7  ''' return object from the photon
8  '''
9  def hOVERe(self):
10  #return self.physObj.hadronicOverEm()
11  hadTowDepth1O = self.physObj.hadTowDepth1OverEm() * (self.physObj.superCluster().energy()/self.physObj.full5x5_e5x5() if self.physObj.full5x5_e5x5() else 1)
12  hadTowDepth2O = self.physObj.hadTowDepth2OverEm() * (self.physObj.superCluster().energy()/self.physObj.full5x5_e5x5() if self.physObj.full5x5_e5x5() else 1)
13  return hadTowDepth1O + hadTowDepth2O
14 
15  def r9(self):
16  return self.physObj.r9()
17 
18  def sigmaIetaIeta(self):
19  return self.physObj.sigmaIetaIeta()
20 
21  def full5x5_r9(self):
22  return self.physObj.full5x5_r9()
23 
25  return self.physObj.full5x5_sigmaIetaIeta()
26 
27  def chargedHadronIso(self):
28  return self.physObj.chargedHadronIso()
29 
30  def neutralHadronIso(self):
31  return self.physObj.neutralHadronIso()
32 
33  def photonIso(self):
34  return self.physObj.photonIso()
35 
36  def photonIDCSA14(self, name):
37  keepThisPhoton = True
38  if name == "PhotonCutBasedIDLoose_CSA14":
39  if abs(self.physObj.eta())<1.479 :
40  if self.full5x5_sigmaIetaIeta() > 0.012 : keepThisPhoton = False
41  if self.hOVERe() > 0.0559 : keepThisPhoton = False
42  else :
43  if self.full5x5_sigmaIetaIeta() > 0.035 : keepThisPhoton = False
44  if self.hOVERe() > 0.049 : keepThisPhoton = False
45  return keepThisPhoton
46 
47  pass
48 
49 setattr(ROOT.pat.Photon, "recoPhotonIso", ROOT.reco.Photon.photonIso)
50 setattr(ROOT.pat.Photon, "recoNeutralHadronIso", ROOT.reco.Photon.neutralHadronIso)
51 setattr(ROOT.pat.Photon, "recoChargedHadronIso", ROOT.reco.Photon.chargedHadronIso)
def neutralHadronIso
Definition: Photon.py:30
def photonIso
Definition: Photon.py:33
def full5x5_r9
Definition: Photon.py:21
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
def sigmaIetaIeta
Definition: Photon.py:18
def hOVERe
Definition: Photon.py:9
def photonIDCSA14
Definition: Photon.py:36
def chargedHadronIso
Definition: Photon.py:27
def full5x5_sigmaIetaIeta
Definition: Photon.py:24