CMS 3D CMS Logo

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

Public Member Functions

def __init__ (self, args, kwargs)
 
def calScaledIsoValueExp (self, offset, slope_exp, offset_exp)
 
def calScaledIsoValueLin (self, offset, slope)
 
def calScaledIsoValueQuadr (self, offset, term_1, term_2)
 
def chargedHadronIso (self, corr=None)
 
def CutBasedIDWP (self, name)
 
def etaRegionID (self)
 
def full5x5_r9 (self)
 
def full5x5_sigmaIetaIeta (self)
 
def hOVERe (self)
 
def neutralHadronIso (self, corr=None)
 
def passPhotonID (self, name, conversionSafe_eleVeto=False)
 
def passPhotonIso (self, name, isocorr)
 
def photonIDCSA14 (self, name, sidebands=False)
 
def photonIso (self, corr=None)
 
def r9 (self)
 
def sigmaIetaIeta (self)
 

Public Attributes

 rho
 

Private Member Functions

def _physObjInit (self)
 

Detailed Description

Definition at line 7 of file Photon.py.

Constructor & Destructor Documentation

def Photon.Photon.__init__ (   self,
  args,
  kwargs 
)
Initializing rho to None. The user is responsible for setting it to the right value 
to get the rho-corrected isolation.

Definition at line 9 of file Photon.py.

References Electron.Electron._physObjInit(), Photon.Photon._physObjInit(), and Jet.Jet._physObjInit().

9  def __init__(self, *args, **kwargs):
10  '''Initializing rho to None. The user is responsible for setting it to the right value
11  to get the rho-corrected isolation.'''
12  super(Photon, self).__init__(*args, **kwargs)
13  self._physObjInit()
14 
def _physObjInit(self)
Definition: Photon.py:15
def __init__(self, args, kwargs)
Definition: Photon.py:9

Member Function Documentation

def Photon.Photon._physObjInit (   self)
private

Definition at line 15 of file Photon.py.

Referenced by Photon.Photon.__init__().

15  def _physObjInit(self):
16  self.rho = None
17 
18 
def _physObjInit(self)
Definition: Photon.py:15
def Photon.Photon.calScaledIsoValueExp (   self,
  offset,
  slope_exp,
  offset_exp 
)

Definition at line 157 of file Photon.py.

References JetChargeProducer_cfi.exp, eetest::CandForTest.pt(), mypt.pt, res::HelperElectron.pt(), res::HelperMuon.pt(), res::HelperJet.pt(), reco::VoronoiBackground.pt(), RecoObj.pt, ScoutingParticle.pt(), tauImpactParameter::LorentzVectorParticle.pt, L1MuCSCPtLut.pt(), ScoutingPhoton.pt(), Residual1DHit.pt, reco::MuonMETCorrectionData.pt(), ScoutingElectron.pt(), PtHatReweightUserHook.pt, MatchStruct.pt, PtEtaPhiMass.pt(), MySimTrack.pt, ALILine.pt(), ScoutingCaloJet.pt(), L2TauPixelTrackMatch::TinyTrack.pt, TrackMultiSelector::Block.pt, ResonanceBuilder.Resonance.pt(), ScoutingPFJet.pt(), ScoutingMuon.pt(), DTMuonLocalAlignment.pt, PGlobalSimHit::Trk.pt, TtFullHadSignalSel.pt(), ElectronMVAEstimator.pt, L1Analysis::L1AnalysisRecoTauDataFormat.pt, ZMuMuIsolationAnalyzer.pt, L1Analysis::L1AnalysisRecoElectronDataFormat.pt, PatTrackAnalyzer::Plots.pt, L1Analysis::L1AnalysisRecoMuon2DataFormat.pt, jpt::Map.pt(), SiStripLAProfileBooker.pt, PhysicsObjectsMonitor.pt, reco::CaloMuon.pt(), TrackerValidationVariables::AVTrackStruct.pt, trigger::TriggerObject.pt(), BSTrkParameters.pt(), ElectronMVAEstimatorRun2Phys14NonTrig::AllVariables.pt, goodseedhelpers::HeavyObjectCache.pt, MuScleFitMuon.pt(), SoftElectronMVAEstimator.pt, SimpleL1MuGMTCand.pt(), PTrajectoryStateOnDet.pt(), ValidationMisalignedTracker.pt, HTrackVariables.pt(), ElectronMVAEstimatorRun2Spring16GeneralPurpose::AllVariables.pt, HepLine3D.pt(), ElectronMVAEstimatorRun2Spring16HZZ::AllVariables.pt, L1MuDTTrack.pt(), ElectronMVAEstimatorRun2Spring15NonTrig::AllVariables.pt, TrajectoryStateClosestToPoint.pt(), L1MuBMTrack.pt(), ElectronMVAEstimatorRun2Spring15Trig::AllVariables.pt, MuonDTLocalMillepedeAlgorithm.pt, BPhysicsValidation::ParticleMonitor.pt, MuonGmtPair.pt(), L1TMuon::InternalTrack.pt, susybsm::HSCParticle.pt(), QualityCutsAnalyzer::histogram_element_t.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, PrimaryVertexAnalyzer4PUSlimmed::recoPrimaryVertex.pt, MuonResidualsFitter::MuonAlignmentTreeRow.pt, CompositeRefCandidateT< reco::GenParticleRefVector >.pt(), AlignmentMonitorMuonSystemMap1D::MyTrack.pt, CandidateWithRef< Ref >.pt(), reco::LeafCandidate.pt(), HGCalClusterT< C >.pt(), reco::PFCluster.pt(), CaloParticle.pt(), CosmicRateAnalyzer.pt, JetAnalyzer_HeavyIons_matching::MyJet.pt, SimCluster.pt(), l1t::EMTFTrack.pt, L1Analysis::L1AnalysisRecoMuonDataFormat.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.passPhotonIso().

157  def calScaledIsoValueExp(self,offset,slope_exp,offset_exp):
158  return offset + exp(slope_exp*self.pt()+offset_exp)
159 
def calScaledIsoValueExp(self, offset, slope_exp, offset_exp)
Definition: Photon.py:157
def Photon.Photon.calScaledIsoValueLin (   self,
  offset,
  slope 
)

Definition at line 151 of file Photon.py.

References eetest::CandForTest.pt(), mypt.pt, res::HelperElectron.pt(), res::HelperMuon.pt(), res::HelperJet.pt(), reco::VoronoiBackground.pt(), RecoObj.pt, ScoutingParticle.pt(), tauImpactParameter::LorentzVectorParticle.pt, L1MuCSCPtLut.pt(), ScoutingPhoton.pt(), Residual1DHit.pt, reco::MuonMETCorrectionData.pt(), ScoutingElectron.pt(), PtHatReweightUserHook.pt, MatchStruct.pt, PtEtaPhiMass.pt(), MySimTrack.pt, ALILine.pt(), ScoutingCaloJet.pt(), L2TauPixelTrackMatch::TinyTrack.pt, TrackMultiSelector::Block.pt, ResonanceBuilder.Resonance.pt(), ScoutingPFJet.pt(), ScoutingMuon.pt(), DTMuonLocalAlignment.pt, TtFullHadSignalSel.pt(), PGlobalSimHit::Trk.pt, ElectronMVAEstimator.pt, L1Analysis::L1AnalysisRecoTauDataFormat.pt, ZMuMuIsolationAnalyzer.pt, L1Analysis::L1AnalysisRecoElectronDataFormat.pt, PatTrackAnalyzer::Plots.pt, L1Analysis::L1AnalysisRecoMuon2DataFormat.pt, jpt::Map.pt(), SiStripLAProfileBooker.pt, reco::CaloMuon.pt(), PhysicsObjectsMonitor.pt, TrackerValidationVariables::AVTrackStruct.pt, trigger::TriggerObject.pt(), BSTrkParameters.pt(), ElectronMVAEstimatorRun2Phys14NonTrig::AllVariables.pt, goodseedhelpers::HeavyObjectCache.pt, MuScleFitMuon.pt(), SoftElectronMVAEstimator.pt, ValidationMisalignedTracker.pt, PTrajectoryStateOnDet.pt(), SimpleL1MuGMTCand.pt(), HTrackVariables.pt(), HepLine3D.pt(), ElectronMVAEstimatorRun2Spring16GeneralPurpose::AllVariables.pt, ElectronMVAEstimatorRun2Spring16HZZ::AllVariables.pt, L1MuDTTrack.pt(), ElectronMVAEstimatorRun2Spring15NonTrig::AllVariables.pt, TrajectoryStateClosestToPoint.pt(), L1MuBMTrack.pt(), ElectronMVAEstimatorRun2Spring15Trig::AllVariables.pt, MuonDTLocalMillepedeAlgorithm.pt, BPhysicsValidation::ParticleMonitor.pt, MuonGmtPair.pt(), L1TMuon::InternalTrack.pt, susybsm::HSCParticle.pt(), QualityCutsAnalyzer::histogram_element_t.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, PrimaryVertexAnalyzer4PUSlimmed::recoPrimaryVertex.pt, MuonResidualsFitter::MuonAlignmentTreeRow.pt, reco::LeafCandidate.pt(), CompositeRefCandidateT< reco::GenParticleRefVector >.pt(), AlignmentMonitorMuonSystemMap1D::MyTrack.pt, HGCalClusterT< C >.pt(), CandidateWithRef< Ref >.pt(), reco::PFCluster.pt(), CaloParticle.pt(), CosmicRateAnalyzer.pt, JetAnalyzer_HeavyIons_matching::MyJet.pt, SimCluster.pt(), l1t::EMTFTrack.pt, L1Analysis::L1AnalysisRecoMuonDataFormat.pt, TrackingParticle.pt(), pat::MET::Vector2.pt(), GoodSeedProducer.pt, pat::PackedGenParticle.pt(), reco::TrackBase.pt(), pat::PackedCandidate.pt(), PMuonSimHit::Trk.pt, and PTrackerSimHit::Trk.pt.

Referenced by Photon.Photon.passPhotonIso().

151  def calScaledIsoValueLin(self,offset,slope):
152  return slope*self.pt()+offset
153 
def calScaledIsoValueLin(self, offset, slope)
Definition: Photon.py:151
def Photon.Photon.calScaledIsoValueQuadr (   self,
  offset,
  term_1,
  term_2 
)

Definition at line 154 of file Photon.py.

References funct.pow(), eetest::CandForTest.pt(), mypt.pt, res::HelperElectron.pt(), res::HelperMuon.pt(), res::HelperJet.pt(), reco::VoronoiBackground.pt(), RecoObj.pt, ScoutingParticle.pt(), tauImpactParameter::LorentzVectorParticle.pt, L1MuCSCPtLut.pt(), ScoutingPhoton.pt(), Residual1DHit.pt, reco::MuonMETCorrectionData.pt(), ScoutingElectron.pt(), PtHatReweightUserHook.pt, MatchStruct.pt, PtEtaPhiMass.pt(), MySimTrack.pt, ALILine.pt(), ScoutingCaloJet.pt(), L2TauPixelTrackMatch::TinyTrack.pt, TrackMultiSelector::Block.pt, ResonanceBuilder.Resonance.pt(), ScoutingPFJet.pt(), ScoutingMuon.pt(), DTMuonLocalAlignment.pt, TtFullHadSignalSel.pt(), PGlobalSimHit::Trk.pt, ElectronMVAEstimator.pt, L1Analysis::L1AnalysisRecoTauDataFormat.pt, ZMuMuIsolationAnalyzer.pt, L1Analysis::L1AnalysisRecoElectronDataFormat.pt, PatTrackAnalyzer::Plots.pt, L1Analysis::L1AnalysisRecoMuon2DataFormat.pt, jpt::Map.pt(), SiStripLAProfileBooker.pt, reco::CaloMuon.pt(), PhysicsObjectsMonitor.pt, TrackerValidationVariables::AVTrackStruct.pt, trigger::TriggerObject.pt(), BSTrkParameters.pt(), ElectronMVAEstimatorRun2Phys14NonTrig::AllVariables.pt, goodseedhelpers::HeavyObjectCache.pt, MuScleFitMuon.pt(), SoftElectronMVAEstimator.pt, ValidationMisalignedTracker.pt, PTrajectoryStateOnDet.pt(), SimpleL1MuGMTCand.pt(), HTrackVariables.pt(), HepLine3D.pt(), ElectronMVAEstimatorRun2Spring16GeneralPurpose::AllVariables.pt, ElectronMVAEstimatorRun2Spring16HZZ::AllVariables.pt, L1MuDTTrack.pt(), ElectronMVAEstimatorRun2Spring15NonTrig::AllVariables.pt, TrajectoryStateClosestToPoint.pt(), L1MuBMTrack.pt(), ElectronMVAEstimatorRun2Spring15Trig::AllVariables.pt, MuonDTLocalMillepedeAlgorithm.pt, BPhysicsValidation::ParticleMonitor.pt, MuonGmtPair.pt(), L1TMuon::InternalTrack.pt, susybsm::HSCParticle.pt(), QualityCutsAnalyzer::histogram_element_t.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, PrimaryVertexAnalyzer4PUSlimmed::recoPrimaryVertex.pt, MuonResidualsFitter::MuonAlignmentTreeRow.pt, reco::LeafCandidate.pt(), CompositeRefCandidateT< reco::GenParticleRefVector >.pt(), AlignmentMonitorMuonSystemMap1D::MyTrack.pt, HGCalClusterT< C >.pt(), CandidateWithRef< Ref >.pt(), reco::PFCluster.pt(), CaloParticle.pt(), CosmicRateAnalyzer.pt, JetAnalyzer_HeavyIons_matching::MyJet.pt, SimCluster.pt(), l1t::EMTFTrack.pt, L1Analysis::L1AnalysisRecoMuonDataFormat.pt, TrackingParticle.pt(), pat::MET::Vector2.pt(), GoodSeedProducer.pt, pat::PackedGenParticle.pt(), reco::TrackBase.pt(), pat::PackedCandidate.pt(), PMuonSimHit::Trk.pt, and PTrackerSimHit::Trk.pt.

Referenced by Photon.Photon.passPhotonIso().

154  def calScaledIsoValueQuadr(self,offset,term_1,term_2):
155  return offset + term_1*self.pt() + term_2*pow(self.pt(),2)
156 
def calScaledIsoValueQuadr(self, offset, term_1, term_2)
Definition: Photon.py:154
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
def Photon.Photon.chargedHadronIso (   self,
  corr = None 
)

Definition at line 34 of file Photon.py.

References hpstanc_transforms.max, Photon.Photon.rho, Electron.Electron.rho, correctionValue_class.rho, AlignmentMonitorMuonSystemMap1D::MyResidual.rho, and objects.JetAnalyzer.JetAnalyzer.rho.

Referenced by Lepton.Lepton.absIsoFromEA(), and Photon.Photon.passPhotonIso().

34  def chargedHadronIso(self, corr=None):
35  isoCharged = self.ftprAbsIsoCharged03 if hasattr(self,'ftprAbsIsoCharged03') else self.physObj.chargedHadronIso()
36  if corr is None or corr == "": return isoCharged
37  elif corr == "rhoArea": return max(isoCharged-self.rho*self.EffectiveArea03[0],0)
38  else: raise RuntimeError("Photon isolation correction '%s' not yet implemented in Photon.py" % corr)
39 
def chargedHadronIso(self, corr=None)
Definition: Photon.py:34
def Photon.Photon.CutBasedIDWP (   self,
  name 
)

Definition at line 85 of file Photon.py.

References join().

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

85  def CutBasedIDWP( self, name):
86  # recommeneded PHYS14 working points from POG
87  WPs = {
88  # https://twiki.cern.ch/twiki/bin/viewauth/CMS/CutBasedPhotonIdentificationRun2#Pointers_for_PHYS14_selection_im
89  "POG_PHYS14_25ns_Loose": {"conversionVeto": [True,True], "H/E":[0.028,0.093],"sigmaIEtaIEta":[0.0107,0.0272],
90  "chaHadIso":[2.67,1.79],"neuHadIso":[[7.23,0.0028,0.5408],[8.89,0.01725]],"phoIso":[[2.11,0.0014],[3.09,0.0091]]},
91 
92  # https://twiki.cern.ch/twiki/bin/view/CMS/CutBasedPhotonIdentificationRun2?rev=11
93  "POG_PHYS14_25ns_Loose_old": {"conversionVeto": [True,True], "H/E":[0.048,0.069],"sigmaIEtaIEta":[0.0106,0.0266],
94  "chaHadIso":[2.56,3.12],"neuHadIso":[[3.74,0.0025,0.],[17.11,0.0118,0.]],"phoIso":[[2.68,0.001],[2.70,0.0059]]},
95 
96  "POG_PHYS14_25ns_Medium": {"conversionVeto": [True,True], "H/E":[0.012,0.023],"sigmaIEtaIEta":[0.0100,0.0267],
97  "chaHadIso":[1.79,1.09],"neuHadIso":[[0.16,0.0028,0.5408],[4.31,0.0172]],"phoIso":[[1.90,0.0014],[1.90,0.0091]]},
98 
99  "POG_PHYS14_25ns_Tight": {"conversionVeto": [True,True], "H/E":[0.010,0.015],"sigmaIEtaIEta":[0.0100,0.0265],
100  "chaHadIso":[1.66,1.04],"neuHadIso":[[0.14,0.0028,0.5408],[3.89,0.0172]],"phoIso":[[1.40,0.0014],[1.40,0.0091]]},
101 
102  # https://twiki.cern.ch/twiki/bin/viewauth/CMS/CutBasedPhotonIdentificationRun2#SPRING15_selections_bunch_crossing
103  "POG_SPRING15_50ns_Loose": {"conversionVeto": [True,True], "H/E":[0.05,0.05],"sigmaIEtaIEta":[0.0103,0.0277],
104  "chaHadIso":[2.44,1.84],"neuHadIso":[[2.57,0.0044,0.5809],[4.00, 0.0040,0.9402]],"phoIso":[[1.92,0.0043],[2.15,0.0041]]},
105 
106  "POG_SPRING15_50ns_Medium": {"conversionVeto": [True,True], "H/E":[0.05,0.05],"sigmaIEtaIEta":[0.0100,0.0267],
107  "chaHadIso":[1.31,1.25],"neuHadIso":[[0.60,0.0044,0.5809],[1.65, 0.0040,0.9402]],"phoIso":[[1.33,0.0043],[1.02,0.0041]]},
108 
109  "POG_SPRING15_50ns_Tight": {"conversionVeto": [True,True], "H/E":[0.05,0.05],"sigmaIEtaIEta":[0.0100,0.0267],
110  "chaHadIso":[0.91,0.65],"neuHadIso":[[0.33,0.0044,0.5809],[0.93, 0.0040,0.9402]],"phoIso":[[0.61,0.0043],[0.54,0.0041]]},
111 
112  # https://twiki.cern.ch/twiki/bin/viewauth/CMS/CutBasedPhotonIdentificationRun2#SPRING15_selections_25_ns
113  "POG_SPRING15_25ns_Loose": {"conversionVeto": [True,True], "H/E":[0.05,0.05],"sigmaIEtaIEta":[0.0102,0.0274],
114  "chaHadIso":[3.32,1.97],"neuHadIso":[[1.92,0.0014,0.000019],[11.86, 0.00139,0.000025]],"phoIso":[[0.81,0.0053],[0.83,0.0034]]},
115 
116  "POG_SPRING15_25ns_Medium": {"conversionVeto": [True,True], "H/E":[0.05,0.05],"sigmaIEtaIEta":[0.0102,0.0268],
117  "chaHadIso":[1.37,1.10],"neuHadIso":[[1.06,0.0014,0.000019],[2.69, 0.00139,0.000025]],"phoIso":[[0.28,0.0053],[0.39,0.0034]]},
118 
119  "POG_SPRING15_25ns_Tight": {"conversionVeto": [True,True], "H/E":[0.05,0.05],"sigmaIEtaIEta":[0.0100,0.0268],
120  "chaHadIso":[0.76,0.56],"neuHadIso":[[0.97,0.0014,0.000019],[2.09, 0.00139,0.000025]],"phoIso":[[0.08,0.0053],[0.16,0.0034]]},
121 
122  # https://twiki.cern.ch/twiki/bin/viewauth/CMS/CutBasedPhotonIdentificationRun2#CSA14_selections_for_20_bx_25_sc
123  "POG_CSA14_25ns_Loose": {"conversionVeto": [True,True], "H/E":[0.553,0.062],"sigmaIEtaIEta":[0.0099,0.0284],
124  "chaHadIso":[2.49,1.04],"neuHadIso":[[15.43,0.007],[19.71,0.0129]],"phoIso":[[9.42,0.0033],[11.88,0.0108]]},
125 
126  "POG_CSA14_25ns_Medium": {"conversionVeto": [True,True], "H/E":[0.058,0.020],"sigmaIEtaIEta":[0.0099,0.0268],
127  "chaHadIso":[1.91,0.82],"neuHadIso":[[4.66,0.007],[14.65,0.0129]],"phoIso":[[4.29,0.0033],[4.06,0.0108]]},
128 
129  "POG_CSA14_25ns_Tight": {"conversionVeto": [True,True], "H/E":[0.019,0.016],"sigmaIEtaIEta":[0.0099,0.0263],
130  "chaHadIso":[1.61,0.69],"neuHadIso":[[3.98,0.007],[4.52,0.0129]],"phoIso":[[3.01,0.0033],[3.61,0.0108]]},
131 
132 
133  }
134 
135  baseWP = re.split('_',name)
136  if "looseSieie" in baseWP[-1]:
137  baseWP.pop()
138  WPs["_".join(baseWP)]["sigmaIEtaIEta"] = [0.015,0.035]
139 
140  return WPs["_".join(baseWP)]
141 
142 
def CutBasedIDWP(self, name)
Definition: Photon.py:85
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def Photon.Photon.etaRegionID (   self)

Definition at line 143 of file Photon.py.

References funct.abs().

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

143  def etaRegionID(self):
144  #return 0 if the photon is in barrel and 1 if in endcap
145  if abs(self.physObj.eta())<1.479 :
146  idForBarrel = 0
147  else:
148  idForBarrel = 1
149  return idForBarrel
150 
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
def etaRegionID(self)
Definition: Photon.py:143
def Photon.Photon.full5x5_r9 (   self)

Definition at line 28 of file Photon.py.

28  def full5x5_r9(self):
29  return self.physObj.full5x5_r9()
30 
def full5x5_r9(self)
Definition: Photon.py:28
def Photon.Photon.full5x5_sigmaIetaIeta (   self)

Definition at line 31 of file Photon.py.

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

32  return self.physObj.full5x5_sigmaIetaIeta()
33 
def full5x5_sigmaIetaIeta(self)
Definition: Photon.py:31
def Photon.Photon.hOVERe (   self)

Definition at line 19 of file Photon.py.

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

19  def hOVERe(self):
20  return self.physObj.hadTowOverEm()
21 
def hOVERe(self)
Definition: Photon.py:19
def Photon.Photon.neutralHadronIso (   self,
  corr = None 
)

Definition at line 40 of file Photon.py.

References hpstanc_transforms.max, Photon.Photon.rho, Electron.Electron.rho, correctionValue_class.rho, AlignmentMonitorMuonSystemMap1D::MyResidual.rho, and objects.JetAnalyzer.JetAnalyzer.rho.

Referenced by Lepton.Lepton.absIsoFromEA(), and Photon.Photon.passPhotonIso().

40  def neutralHadronIso(self, corr=None):
41  isoNHad = self.ftprAbsIsoNHad03 if hasattr(self,'ftprAbsIsoNHad03') else self.physObj.neutralHadronIso()
42  if corr is None or corr == "": return isoNHad
43  elif corr == "rhoArea": return max(isoNHad-self.rho*self.EffectiveArea03[1],0)
44  else: raise RuntimeError("Photon isolation correction '%s' not yet implemented in Photon.py" % corr)
45 
def neutralHadronIso(self, corr=None)
Definition: Photon.py:40
def Photon.Photon.passPhotonID (   self,
  name,
  conversionSafe_eleVeto = False 
)

Definition at line 160 of file Photon.py.

References Photon.Photon.CutBasedIDWP(), Photon.Photon.etaRegionID(), Photon.Photon.full5x5_sigmaIetaIeta(), reco::Photon.full5x5_sigmaIetaIeta(), reco::GsfElectron.full5x5_sigmaIetaIeta(), and Photon.Photon.hOVERe().

160  def passPhotonID(self,name,conversionSafe_eleVeto=False):
161 
162  idForBarrel = self.etaRegionID()
163  passPhotonID = True
164 
165  if self.CutBasedIDWP(name)["conversionVeto"][idForBarrel]:
166  if (conversionSafe_eleVeto==False and self.physObj.hasPixelSeed()) or (conversionSafe_eleVeto==True and self.physObj.passElectronVeto()==False):
167  passPhotonID = False
168 
169  if self.CutBasedIDWP(name)["H/E"][idForBarrel] < self.hOVERe():
170  passPhotonID = False
171 
172  if self.CutBasedIDWP(name)["sigmaIEtaIEta"][idForBarrel] < self.full5x5_sigmaIetaIeta():
173  passPhotonID = False
174 
175  return passPhotonID
176 
def full5x5_sigmaIetaIeta(self)
Definition: Photon.py:31
def passPhotonID(self, name, conversionSafe_eleVeto=False)
Definition: Photon.py:160
def CutBasedIDWP(self, name)
Definition: Photon.py:85
def hOVERe(self)
Definition: Photon.py:19
def etaRegionID(self)
Definition: Photon.py:143
def Photon.Photon.passPhotonIso (   self,
  name,
  isocorr 
)

Definition at line 177 of file Photon.py.

References Photon.Photon.calScaledIsoValueExp(), Photon.Photon.calScaledIsoValueLin(), Photon.Photon.calScaledIsoValueQuadr(), Photon.Photon.chargedHadronIso(), pat::Photon.chargedHadronIso(), pat::Lepton< LeptonType >.chargedHadronIso(), reco::Photon::PflowIsolationVariables.chargedHadronIso, reco::Photon.chargedHadronIso(), Photon.Photon.CutBasedIDWP(), Photon.Photon.etaRegionID(), Photon.Photon.neutralHadronIso(), pat::Lepton< LeptonType >.neutralHadronIso(), pat::Photon.neutralHadronIso(), reco::Photon::PflowIsolationVariables.neutralHadronIso, reco::Photon.neutralHadronIso(), Photon.Photon.photonIso(), pat::Lepton< LeptonType >.photonIso(), pat::Photon.photonIso(), reco::Photon::PflowIsolationVariables.photonIso, and reco::Photon.photonIso().

177  def passPhotonIso(self,name,isocorr):
178 
179  idForBarrel = self.etaRegionID()
180  passPhotonIso = True
181 
182  if self.CutBasedIDWP(name)["chaHadIso"][idForBarrel] < self.chargedHadronIso(isocorr):
183  passPhotonIso = False
184 
185  if "POG_PHYS14_25ns" in name and idForBarrel == 0:
186  if self.calScaledIsoValueExp(*self.CutBasedIDWP(name)["neuHadIso"][idForBarrel]) < self.neutralHadronIso(isocorr):
187  passPhotonIso = False
188  elif "POG_SPRING15_50ns" in name:
189  if self.calScaledIsoValueExp(*self.CutBasedIDWP(name)["neuHadIso"][idForBarrel]) < self.neutralHadronIso(isocorr):
190  passPhotonIso = False
191  elif "POG_SPRING15_25ns" in name:
192  if self.calScaledIsoValueQuadr(*self.CutBasedIDWP(name)["neuHadIso"][idForBarrel]) < self.neutralHadronIso(isocorr):
193  passPhotonIso = False
194  else:
195  if self.calScaledIsoValueLin(*self.CutBasedIDWP(name)["neuHadIso"][idForBarrel]) < self.neutralHadronIso(isocorr):
196  passPhotonIso = False
197 
198  if self.calScaledIsoValueLin(*self.CutBasedIDWP(name)["phoIso"][idForBarrel]) < self.photonIso(isocorr):
199  passPhotonIso = False
200 
201  return passPhotonIso
202 
def photonIso(self, corr=None)
Definition: Photon.py:46
def neutralHadronIso(self, corr=None)
Definition: Photon.py:40
def CutBasedIDWP(self, name)
Definition: Photon.py:85
def chargedHadronIso(self, corr=None)
Definition: Photon.py:34
def calScaledIsoValueExp(self, offset, slope_exp, offset_exp)
Definition: Photon.py:157
def passPhotonIso(self, name, isocorr)
Definition: Photon.py:177
def calScaledIsoValueQuadr(self, offset, term_1, term_2)
Definition: Photon.py:154
def calScaledIsoValueLin(self, offset, slope)
Definition: Photon.py:151
def etaRegionID(self)
Definition: Photon.py:143
def Photon.Photon.photonIDCSA14 (   self,
  name,
  sidebands = False 
)

Definition at line 52 of file Photon.py.

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

52  def photonIDCSA14(self, name, sidebands=False):
53  keepThisPhoton = True
54  sigmaThresh = 999
55  hovereThresh = 999
56  if name == "PhotonCutBasedIDLoose_CSA14":
57  if abs(self.physObj.eta())<1.479 :
58  sigmaThresh = 0.010
59  hovereThresh = 0.0559
60  else :
61  sigmaThresh = 0.030
62  hovereThresh = 0.049
63  elif name == "PhotonCutBasedIDLoose_PHYS14":
64  if abs(self.physObj.eta())<1.479 :
65  sigmaThresh = 0.0106
66  hovereThresh = 0.048
67  else :
68  sigmaThresh = 0.0266
69  hovereThresh = 0.069
70  else :
71  print "WARNING! Unkown photon ID! Will return true!"
72  return True
73 
74  if sidebands:
75  if abs(self.physObj.eta())<1.479 :
76  sigmaThresh = 0.015
77  else :
78  sigmaThresh = 0.035
79 
80  if self.full5x5_sigmaIetaIeta() > sigmaThresh : keepThisPhoton = False
81  if self.hOVERe() > hovereThresh : keepThisPhoton = False
82 
83  return keepThisPhoton
84 
def photonIDCSA14(self, name, sidebands=False)
Definition: Photon.py:52
def full5x5_sigmaIetaIeta(self)
Definition: Photon.py:31
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
def hOVERe(self)
Definition: Photon.py:19
def Photon.Photon.photonIso (   self,
  corr = None 
)

Definition at line 46 of file Photon.py.

References hpstanc_transforms.max, Photon.Photon.rho, Electron.Electron.rho, correctionValue_class.rho, AlignmentMonitorMuonSystemMap1D::MyResidual.rho, and objects.JetAnalyzer.JetAnalyzer.rho.

Referenced by Lepton.Lepton.absIsoFromEA(), and Photon.Photon.passPhotonIso().

46  def photonIso(self, corr=None):
47  isoPho = self.ftprAbsIsoPho03 if hasattr(self,'ftprAbsIsoPho03') else self.physObj.photonIso()
48  if corr is None or corr == "": return isoPho
49  elif corr == "rhoArea": return max(isoPho-self.rho*self.EffectiveArea03[2],0)
50  else: raise RuntimeError("Photon isolation correction '%s' not yet implemented in Photon.py" % corr)
51 
def photonIso(self, corr=None)
Definition: Photon.py:46
def Photon.Photon.r9 (   self)

Definition at line 22 of file Photon.py.

22  def r9(self):
23  return self.physObj.r9()
24 
def r9(self)
Definition: Photon.py:22
def Photon.Photon.sigmaIetaIeta (   self)

Definition at line 25 of file Photon.py.

25  def sigmaIetaIeta(self):
26  return self.physObj.sigmaIetaIeta()
27 
def sigmaIetaIeta(self)
Definition: Photon.py:25

Member Data Documentation

Photon.Photon.rho