CMS 3D CMS Logo

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

Public Member Functions

def calScaledIsoValue
 
def chargedHadronIso
 
def CutBasedIDWP
 
def etaRegionID
 
def full5x5_r9
 
def full5x5_sigmaIetaIeta
 
def hOVERe
 
def neutralHadronIso
 
def passPhotonID
 
def photonIDCSA14
 
def photonIso
 
def r9
 
def sigmaIetaIeta
 

Detailed Description

return object from the photon 

Definition at line 5 of file Photon.py.

Member Function Documentation

def Photon.Photon.calScaledIsoValue (   self,
  slope,
  offset 
)

Definition at line 78 of file Photon.py.

References eetest::CandForTest.pt(), mypt.pt, res::HelperElectron.pt(), res::HelperMuon.pt(), res::HelperJet.pt(), reco::VoronoiBackground.pt(), RecoObj.pt, tauImpactParameter::LorentzVectorParticle.pt, ScoutingParticle.pt(), L1MuCSCPtLut.pt(), ScoutingPhoton.pt(), Residual1DHit.pt, reco::MuonMETCorrectionData.pt(), ScoutingElectron.pt(), MatchStruct.pt, PtEtaPhiMass.pt(), PtHatReweightUserHook.pt, ALILine.pt(), ScoutingMuon.pt(), ScoutingCaloJet.pt(), L2TauPixelTrackMatch::TinyTrack.pt, TrackMultiSelector::Block.pt, ScoutingPFJet.pt(), DTMuonLocalAlignment.pt, TtFullHadSignalSel.pt(), ElectronMVAEstimator.pt, PGlobalSimHit::Trk.pt, lhef::JetClustering::Jet.pt(), ZMuMuIsolationAnalyzer.pt, PatTrackAnalyzer::Plots.pt, SiStripLAProfileBooker.pt, jpt::Map.pt(), reco::CaloMuon.pt(), PhysicsObjectsMonitor.pt, trigger::TriggerObject.pt(), TrackerValidationVariables::AVTrackStruct.pt, BSTrkParameters.pt(), ElectronMVAEstimatorRun2Phys14NonTrig::AllVariables.pt, goodseedhelpers::HeavyObjectCache.pt, MuScleFitMuon.pt(), SoftElectronMVAEstimator.pt, SimpleL1MuGMTCand.pt(), HTrackVariables.pt(), ValidationMisalignedTracker.pt, PTrajectoryStateOnDet.pt(), HepLine3D.pt(), L1MuDTTrack.pt(), ElectronMVAEstimatorRun2Spring15NonTrig::AllVariables.pt, TrajectoryStateClosestToPoint.pt(), ElectronMVAEstimatorRun2Spring15Trig::AllVariables.pt, MuonDTLocalMillepedeAlgorithm.pt, BPhysicsValidation::ParticleMonitor.pt, PhotonPair.pt(), susybsm::HSCParticle.pt(), QualityCutsAnalyzer::histogram_element_t.pt, MuonGmtPair.pt(), reco::PreId.pt(), Lepton.pt, reco::Candidate.pt(), egHLT::OffPho.pt(), TrackStruct::TrackParameterStruct.pt, reco::Particle.pt(), reco::ParticleState.pt(), contrib::CMSBoostedTauSeedingAlgorithmStructure.pt(), PtHatRapReweightUserHook.pt, MuonResidualsFitter::MuonAlignmentTreeRow.pt, AlignmentMonitorMuonSystemMap1D::MyTrack.pt, reco::LeafCandidate.pt(), CandidateWithRef< Ref >.pt(), reco::PFCluster.pt(), JetAnalyzer_HeavyIons_matching::MyJet.pt, TrackingParticle.pt(), pat::MET::Vector2.pt(), pat::PackedGenParticle.pt(), GoodSeedProducer.pt, reco::TrackBase.pt(), pat::PackedCandidate.pt(), PMuonSimHit::Trk.pt, and PTrackerSimHit::Trk.pt.

Referenced by Photon.Photon.passPhotonID().

78 
79  def calScaledIsoValue(self,slope,offset):
80  return slope*self.pt()+offset
81 
def calScaledIsoValue
Definition: Photon.py:78
def Photon.Photon.chargedHadronIso (   self)

Definition at line 24 of file Photon.py.

Referenced by Lepton.Lepton.absIso(), Lepton.Lepton.absIsoFromEA(), and Photon.Photon.passPhotonID().

24 
25  def chargedHadronIso(self):
26  return self.physObj.chargedHadronIso()
def chargedHadronIso
Definition: Photon.py:24
def Photon.Photon.CutBasedIDWP (   self,
  name 
)

Definition at line 44 of file Photon.py.

Referenced by Photon.Photon.passPhotonID().

44 
45  def CutBasedIDWP(self,name):
46  # recommeneded PHYS14 working points from POG
47  WPs = {
48  # https://twiki.cern.ch/twiki/bin/viewauth/CMS/CutBasedPhotonIdentificationRun2#Pointers_for_PHYS14_selection_im
49  "POG_PHYS14_25ns_Loose": {"conversionVeto": [True,True], "H/E":[0.048,0.069],"sigmaIEtaIEta":[0.0106,0.0266],
50  "chaHadIso":[2.56,3.12],"neuHadIso":[[3.74,0.0025],[17.11,0.0118]],"phoIso":[[2.68,0.001],[2.70,0.0059]]},
51 
52  "POG_PHYS14_25ns_Medium": {"conversionVeto": [True,True], "H/E":[0.032,0.0166],"sigmaIEtaIEta":[0.0101,0.0264],
53  "chaHadIso":[1.90,1.95],"neuHadIso":[[2.96,0.0025],[4.42,0.0118]],"phoIso":[[1.39,0.001],[1.89,0.0059]]},
54 
55  "POG_PHYS14_25ns_Tight": {"conversionVeto": [True,True], "H/E":[0.011,0.015],"sigmaIEtaIEta":[0.0099,0.0263],
56  "chaHadIso":[1.86,1.68],"neuHadIso":[[2.64,0.0025],[4.42,0.0118]],"phoIso":[[1.39,0.001],[1.03,0.0059]]},
57 
58  # https://twiki.cern.ch/twiki/bin/viewauth/CMS/CutBasedPhotonIdentificationRun2#CSA14_selections_for_20_bx_25_sc
59  "POG_CSA14_25ns_Loose": {"conversionVeto": [True,True], "H/E":[0.553,0.062],"sigmaIEtaIEta":[0.0099,0.0284],
60  "chaHadIso":[2.49,1.04],"neuHadIso":[[15.43,0.007],[19.71,0.0129]],"phoIso":[[9.42,0.0033],[11.88,0.0108]]},
61 
62  "POG_CSA14_25ns_Medium": {"conversionVeto": [True,True], "H/E":[0.058,0.020],"sigmaIEtaIEta":[0.0099,0.0268],
63  "chaHadIso":[1.91,0.82],"neuHadIso":[[4.66,0.007],[14.65,0.0129]],"phoIso":[[4.29,0.0033],[4.06,0.0108]]},
64 
65  "POG_CSA14_25ns_Tight": {"conversionVeto": [True,True], "H/E":[0.019,0.016],"sigmaIEtaIEta":[0.0099,0.0263],
66  "chaHadIso":[1.61,0.69],"neuHadIso":[[3.98,0.007],[4.52,0.0129]],"phoIso":[[3.01,0.0033],[3.61,0.0108]]},
67  }
68  return WPs[name]
69 
def CutBasedIDWP
Definition: Photon.py:44
def Photon.Photon.etaRegionID (   self)

Definition at line 70 of file Photon.py.

References funct.abs().

Referenced by Photon.Photon.passPhotonID().

70 
71  def etaRegionID(self):
72  #return 0 if the photon is in barrel and 1 if in endcap
73  if abs(self.physObj.eta())<1.479 :
74  idForBarrel = 0
75  else:
76  idForBarrel = 1
77  return idForBarrel
def etaRegionID
Definition: Photon.py:70
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
def Photon.Photon.full5x5_r9 (   self)

Definition at line 18 of file Photon.py.

18 
19  def full5x5_r9(self):
20  return self.physObj.full5x5_r9()
def full5x5_r9
Definition: Photon.py:18
def Photon.Photon.full5x5_sigmaIetaIeta (   self)

Definition at line 21 of file Photon.py.

Referenced by Photon.Photon.passPhotonID(), and Photon.Photon.photonIDCSA14().

21 
22  def full5x5_sigmaIetaIeta(self):
23  return self.physObj.full5x5_sigmaIetaIeta()
def full5x5_sigmaIetaIeta
Definition: Photon.py:21
def Photon.Photon.hOVERe (   self)

Definition at line 9 of file Photon.py.

Referenced by Photon.Photon.passPhotonID(), and Photon.Photon.photonIDCSA14().

9 
10  def hOVERe(self):
11  return self.physObj.hadTowOverEm()
def hOVERe
Definition: Photon.py:9
def Photon.Photon.neutralHadronIso (   self)

Definition at line 27 of file Photon.py.

Referenced by Lepton.Lepton.absIso(), Lepton.Lepton.absIsoFromEA(), and Photon.Photon.passPhotonID().

27 
28  def neutralHadronIso(self):
29  return self.physObj.neutralHadronIso()
def neutralHadronIso
Definition: Photon.py:27
def Photon.Photon.passPhotonID (   self,
  name 
)

Definition at line 82 of file Photon.py.

References Photon.Photon.calScaledIsoValue(), Photon.Photon.chargedHadronIso(), pat::Lepton< LeptonType >.chargedHadronIso(), pat::Photon.chargedHadronIso(), reco::Photon::PflowIsolationVariables.chargedHadronIso, reco::Photon.chargedHadronIso(), Photon.Photon.CutBasedIDWP(), Photon.Photon.etaRegionID(), Photon.Photon.full5x5_sigmaIetaIeta(), reco::Photon.full5x5_sigmaIetaIeta(), reco::GsfElectron.full5x5_sigmaIetaIeta(), Photon.Photon.hOVERe(), Photon.Photon.neutralHadronIso(), pat::Photon.neutralHadronIso(), pat::Lepton< LeptonType >.neutralHadronIso(), reco::Photon::PflowIsolationVariables.neutralHadronIso, reco::Photon.neutralHadronIso(), Photon.Photon.photonIso(), pat::Photon.photonIso(), pat::Lepton< LeptonType >.photonIso(), reco::Photon::PflowIsolationVariables.photonIso, and reco::Photon.photonIso().

82 
83  def passPhotonID(self,name):
84 
85  idForBarrel = self.etaRegionID()
86  passPhotonID = True
87 
88  if self.CutBasedIDWP(name)["conversionVeto"][idForBarrel] and self.physObj.hasPixelSeed():
89  passPhotonID = False
90 
91  if self.CutBasedIDWP(name)["H/E"][idForBarrel] < self.hOVERe():
92  passPhotonID = False
93 
94  if self.CutBasedIDWP(name)["sigmaIEtaIEta"][idForBarrel] < self.full5x5_sigmaIetaIeta():
95  passPhotonID = False
96 
97  if self.CutBasedIDWP(name)["chaHadIso"][idForBarrel] < self.chargedHadronIso():
98  passPhotonID = False
99 
100  if self.calScaledIsoValue(*self.CutBasedIDWP(name)["neuHadIso"][idForBarrel]) < self.neutralHadronIso():
101  passPhotonID = False
102 
103  if self.calScaledIsoValue(*self.CutBasedIDWP(name)["phoIso"][idForBarrel]) < self.photonIso():
104  passPhotonID = False
105 
106  return passPhotonID
107 
108 
def neutralHadronIso
Definition: Photon.py:27
def photonIso
Definition: Photon.py:30
def CutBasedIDWP
Definition: Photon.py:44
def calScaledIsoValue
Definition: Photon.py:78
def etaRegionID
Definition: Photon.py:70
def hOVERe
Definition: Photon.py:9
def passPhotonID
Definition: Photon.py:82
def chargedHadronIso
Definition: Photon.py:24
def full5x5_sigmaIetaIeta
Definition: Photon.py:21
def Photon.Photon.photonIDCSA14 (   self,
  name 
)

Definition at line 33 of file Photon.py.

References funct.abs(), Photon.Photon.full5x5_sigmaIetaIeta(), reco::Photon.full5x5_sigmaIetaIeta(), reco::GsfElectron.full5x5_sigmaIetaIeta(), and Photon.Photon.hOVERe().

33 
34  def photonIDCSA14(self, name):
35  keepThisPhoton = True
36  if name == "PhotonCutBasedIDLoose_CSA14":
37  if abs(self.physObj.eta())<1.479 :
38  if self.full5x5_sigmaIetaIeta() > 0.015 : keepThisPhoton = False
39  if self.hOVERe() > 0.0559 : keepThisPhoton = False
40  else :
41  if self.full5x5_sigmaIetaIeta() > 0.035 : keepThisPhoton = False
42  if self.hOVERe() > 0.049 : keepThisPhoton = False
43  return keepThisPhoton
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
def hOVERe
Definition: Photon.py:9
def photonIDCSA14
Definition: Photon.py:33
def full5x5_sigmaIetaIeta
Definition: Photon.py:21
def Photon.Photon.photonIso (   self)

Definition at line 30 of file Photon.py.

Referenced by Lepton.Lepton.absIso(), Lepton.Lepton.absIsoFromEA(), and Photon.Photon.passPhotonID().

30 
31  def photonIso(self):
32  return self.physObj.photonIso()
def photonIso
Definition: Photon.py:30
def Photon.Photon.r9 (   self)

Definition at line 12 of file Photon.py.

12 
13  def r9(self):
14  return self.physObj.r9()
def Photon.Photon.sigmaIetaIeta (   self)

Definition at line 15 of file Photon.py.

15 
16  def sigmaIetaIeta(self):
17  return self.physObj.sigmaIetaIeta()
def sigmaIetaIeta
Definition: Photon.py:15