CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Private Attributes
egHLT::OffPho Class Reference

#include <EgHLTOffPho.h>

Classes

struct  ClusShapeData
 
struct  HLTData
 
struct  IsolData
 

Public Member Functions

int cutCode () const
 
float DeltaE () const
 
float detEta () const
 
float e1x5Over5x5 () const
 
float e2x5MaxOver5x5 () const
 
float energy () const
 
float et () const
 
float eta () const
 
float etaSC () const
 
float etSC () const
 
float hltEnergy () const
 
float hltEta () const
 
float hltIsolEm () const
 
float hltIsolHad () const
 
float hltIsolTrks () const
 
float hltPhi () const
 
float hOverE () const
 
bool isGap () const
 
float isolEm () const
 
float isolHad () const
 
int isolNrTrks () const
 
float isolPtTrks () const
 
int looseCutCode () const
 
 OffPho (const reco::Photon &pho, const ClusShapeData &shapeData, const IsolData &isolData, const HLTData &hltData)
 
const math::XYZTLorentzVectorp4 () const
 
float phi () const
 
float phiSC () const
 
float pt () const
 
float r9 () const
 
const reco::PhotonrecoPho () const
 
void setCutCode (int code)
 
void setLooseCutCode (int code)
 
void setTrigBits (TrigCodes::TrigBitSet bits)
 
void setTrigCutsCutCodes (const std::vector< std::pair< TrigCodes::TrigBitSet, int > > &trigCutsCutCodes)
 
float sigmaEtaEta () const
 
float sigmaEtaEtaUnCorr () const
 
float sigmaIEtaIEta () const
 
float sigmaIPhiIPhi () const
 
float sigmaPhiPhi () const
 
TrigCodes::TrigBitSet trigBits () const
 
int trigCutsCutCode (const TrigCodes::TrigBitSet &trigger) const
 
float zVtx () const
 
 ~OffPho ()=default
 

Private Attributes

ClusShapeData clusShapeData_
 
int cutCode_
 
HLTData hltData_
 
IsolData isolData_
 
int looseCutCode_
 
const reco::Photonpho_
 
TrigCodes::TrigBitSet trigBits_
 
std::vector< std::pair< TrigCodes::TrigBitSet, int > > trigCutsCutCodes_
 

Detailed Description

Definition at line 26 of file EgHLTOffPho.h.

Constructor & Destructor Documentation

◆ OffPho()

egHLT::OffPho::OffPho ( const reco::Photon pho,
const ClusShapeData shapeData,
const IsolData isolData,
const HLTData hltData 
)
inline

Definition at line 82 of file EgHLTOffPho.h.

83  : pho_(&pho),
84  clusShapeData_(shapeData),
85  isolData_(isolData),
86  hltData_(hltData),
ClusShapeData clusShapeData_
Definition: EgHLTOffPho.h:63
const reco::Photon * pho_
Definition: EgHLTOffPho.h:61
IsolData isolData_
Definition: EgHLTOffPho.h:64
HLTData hltData_
Definition: EgHLTOffPho.h:65

◆ ~OffPho()

egHLT::OffPho::~OffPho ( )
default

Member Function Documentation

◆ cutCode()

int egHLT::OffPho::cutCode ( ) const
inline

◆ DeltaE()

float egHLT::OffPho::DeltaE ( ) const
inline

Definition at line 147 of file EgHLTOffPho.h.

References energy(), and hltEnergy().

Referenced by egHLT::MonElemFuncs::initStdPhoHists(), and egHLT::MonElemFuncs::initStdPhoHistsHEP().

147 { return (hltEnergy() - energy()); }
float energy() const
Definition: EgHLTOffPho.h:106
float hltEnergy() const
Definition: EgHLTOffPho.h:145

◆ detEta()

float egHLT::OffPho::detEta ( ) const
inline

◆ e1x5Over5x5()

float egHLT::OffPho::e1x5Over5x5 ( ) const
inline

◆ e2x5MaxOver5x5()

float egHLT::OffPho::e2x5MaxOver5x5 ( ) const
inline

◆ energy()

float egHLT::OffPho::energy ( ) const
inline

◆ et()

float egHLT::OffPho::et ( ) const
inline

◆ eta()

float egHLT::OffPho::eta ( ) const
inline

Definition at line 107 of file EgHLTOffPho.h.

References reco::LeafCandidate::eta(), and pho_.

Referenced by Particle.Particle::__str__(), Jet.Jet::jetID(), egHLT::EgTrigTagProbeCut_NewPho::pass(), egHLT::PhoHLTFilterMon::PhoHLTFilterMon(), and Jet.Jet::puJetId().

107 { return pho_->eta(); }
const reco::Photon * pho_
Definition: EgHLTOffPho.h:61
double eta() const final
momentum pseudorapidity

◆ etaSC()

float egHLT::OffPho::etaSC ( ) const
inline

Definition at line 112 of file EgHLTOffPho.h.

References pho_, and reco::Photon::superCluster().

Referenced by detEta(), egHLT::OffEgSel::getCutCode(), and sigmaEtaEta().

112 { return pho_->superCluster()->eta(); }
const reco::Photon * pho_
Definition: EgHLTOffPho.h:61
reco::SuperClusterRef superCluster() const override
Ref to SuperCluster.

◆ etSC()

float egHLT::OffPho::etSC ( ) const
inline

Definition at line 109 of file EgHLTOffPho.h.

References energy(), pho_, and reco::Photon::superCluster().

Referenced by egHLT::MonElemFuncs::initStdPhoHists(), egHLT::MonElemFuncs::initStdPhoHistsHEP(), egHLT::MonElemFuncs::initTrigTagProbeHist(), and egHLT::MonElemFuncs::initTrigTagProbeHists().

109  {
110  return pho_->superCluster()->position().rho() / pho_->superCluster()->position().r() * energy();
111  }
float energy() const
Definition: EgHLTOffPho.h:106
const reco::Photon * pho_
Definition: EgHLTOffPho.h:61
reco::SuperClusterRef superCluster() const override
Ref to SuperCluster.

◆ hltEnergy()

float egHLT::OffPho::hltEnergy ( ) const
inline

◆ hltEta()

float egHLT::OffPho::hltEta ( ) const
inline

◆ hltIsolEm()

float egHLT::OffPho::hltIsolEm ( ) const
inline

Definition at line 139 of file EgHLTOffPho.h.

References egHLT::OffPho::IsolData::hltEm, and isolData_.

Referenced by egHLT::OffEgSel::getCutCode().

139 { return isolData_.hltEm; }
IsolData isolData_
Definition: EgHLTOffPho.h:64

◆ hltIsolHad()

float egHLT::OffPho::hltIsolHad ( ) const
inline

Definition at line 137 of file EgHLTOffPho.h.

References egHLT::OffPho::IsolData::hltHad, and isolData_.

Referenced by egHLT::OffEgSel::getCutCode().

137 { return isolData_.hltHad; }
IsolData isolData_
Definition: EgHLTOffPho.h:64

◆ hltIsolTrks()

float egHLT::OffPho::hltIsolTrks ( ) const
inline

Definition at line 138 of file EgHLTOffPho.h.

References egHLT::OffPho::IsolData::hltTrks, and isolData_.

Referenced by egHLT::OffEgSel::getCutCode().

138 { return isolData_.hltTrks; }
IsolData isolData_
Definition: EgHLTOffPho.h:64

◆ hltPhi()

float egHLT::OffPho::hltPhi ( ) const
inline

◆ hOverE()

float egHLT::OffPho::hOverE ( ) const
inline

Definition at line 121 of file EgHLTOffPho.h.

References reco::Photon::hadronicOverEm(), and pho_.

Referenced by egHLT::OffEgSel::getCutCode(), egHLT::MonElemFuncs::initStdPhoHists(), and egHLT::MonElemFuncs::initStdPhoHistsHEP().

121 { return pho_->hadronicOverEm(); }
const reco::Photon * pho_
Definition: EgHLTOffPho.h:61
float hadronicOverEm(int depth=0) const
Definition: Photon.h:236

◆ isGap()

bool egHLT::OffPho::isGap ( ) const
inline

Definition at line 118 of file EgHLTOffPho.h.

References reco::Photon::isEBEEGap(), reco::Photon::isEBGap(), reco::Photon::isEEGap(), and pho_.

Referenced by egHLT::OffEgSel::getCutCode().

118 { return pho_->isEBGap() || pho_->isEEGap() || pho_->isEBEEGap(); }
const reco::Photon * pho_
Definition: EgHLTOffPho.h:61
bool isEEGap() const
true if photon is in EE, and inside the boundaries in supercrystal/D
Definition: Photon.h:131
bool isEBGap() const
true if photon is in EB, and inside the boundaries in super crystals/modules
Definition: Photon.h:127
bool isEBEEGap() const
true if photon is in boundary between EB and EE
Definition: Photon.h:135

◆ isolEm()

float egHLT::OffPho::isolEm ( ) const
inline

◆ isolHad()

float egHLT::OffPho::isolHad ( ) const
inline

◆ isolNrTrks()

int egHLT::OffPho::isolNrTrks ( ) const
inline

◆ isolPtTrks()

float egHLT::OffPho::isolPtTrks ( ) const
inline

◆ looseCutCode()

int egHLT::OffPho::looseCutCode ( ) const
inline

Definition at line 151 of file EgHLTOffPho.h.

References looseCutCode_.

151 { return looseCutCode_; }

◆ p4()

const math::XYZTLorentzVector& egHLT::OffPho::p4 ( ) const
inline

Definition at line 116 of file EgHLTOffPho.h.

References reco::Photon::p4(), and pho_.

Referenced by Tau.Tau::dxy_approx(), Tau.Tau::dz(), Lepton.Lepton::p4WithFSR(), and egHLT::EgTrigTagProbeCut_NewPho::pass().

116 { return pho_->p4(); }
const reco::Photon * pho_
Definition: EgHLTOffPho.h:61
const LorentzVector & p4(P4type type) const

◆ phi()

float egHLT::OffPho::phi ( void  ) const
inline

◆ phiSC()

float egHLT::OffPho::phiSC ( ) const
inline

Definition at line 114 of file EgHLTOffPho.h.

References pho_, and reco::Photon::superCluster().

114 { return pho_->superCluster()->phi(); }
const reco::Photon * pho_
Definition: EgHLTOffPho.h:61
reco::SuperClusterRef superCluster() const override
Ref to SuperCluster.

◆ pt()

float egHLT::OffPho::pt ( ) const
inline

◆ r9()

float egHLT::OffPho::r9 ( ) const
inline

◆ recoPho()

const reco::Photon* egHLT::OffPho::recoPho ( ) const
inline

Definition at line 101 of file EgHLTOffPho.h.

References pho_.

101 { return pho_; }
const reco::Photon * pho_
Definition: EgHLTOffPho.h:61

◆ setCutCode()

void egHLT::OffPho::setCutCode ( int  code)
inline

Definition at line 92 of file EgHLTOffPho.h.

References cutCode_.

Referenced by egHLT::OffHelper::fillOffPhoVec().

92 { cutCode_ = code; }

◆ setLooseCutCode()

void egHLT::OffPho::setLooseCutCode ( int  code)
inline

Definition at line 93 of file EgHLTOffPho.h.

References looseCutCode_.

Referenced by egHLT::OffHelper::fillOffPhoVec().

93 { looseCutCode_ = code; }

◆ setTrigBits()

void egHLT::OffPho::setTrigBits ( TrigCodes::TrigBitSet  bits)
inline

Definition at line 99 of file EgHLTOffPho.h.

References trigBits_.

99 { trigBits_ = bits; }
TrigCodes::TrigBitSet trigBits_
Definition: EgHLTOffPho.h:79

◆ setTrigCutsCutCodes()

void egHLT::OffPho::setTrigCutsCutCodes ( const std::vector< std::pair< TrigCodes::TrigBitSet, int > > &  trigCutsCutCodes)
inline

Definition at line 96 of file EgHLTOffPho.h.

References trigCutsCutCodes_.

Referenced by egHLT::OffHelper::fillOffPhoVec().

96  {
97  trigCutsCutCodes_ = trigCutsCutCodes;
98  }
std::vector< std::pair< TrigCodes::TrigBitSet, int > > trigCutsCutCodes_
Definition: EgHLTOffPho.h:74

◆ sigmaEtaEta()

float OffPho::sigmaEtaEta ( ) const

Definition at line 7 of file EgHLTOffPho.cc.

References clusShapeData_, etaSC(), and egHLT::OffPho::ClusShapeData::sigmaEtaEta.

Referenced by egHLT::OffEgSel::getCutCode().

7  {
8  if (std::fabs(etaSC()) < 1.479)
9  return clusShapeData_.sigmaEtaEta; //barrel case, no correction
10  else { //endcap, need to apply eta correction
11  return clusShapeData_.sigmaEtaEta - 0.02 * (std::fabs(etaSC()) - 2.3);
12  }
13 }
ClusShapeData clusShapeData_
Definition: EgHLTOffPho.h:63
float etaSC() const
Definition: EgHLTOffPho.h:112

◆ sigmaEtaEtaUnCorr()

float egHLT::OffPho::sigmaEtaEtaUnCorr ( ) const
inline

Definition at line 124 of file EgHLTOffPho.h.

References clusShapeData_, and egHLT::OffPho::ClusShapeData::sigmaEtaEta.

124 { return clusShapeData_.sigmaEtaEta; }
ClusShapeData clusShapeData_
Definition: EgHLTOffPho.h:63

◆ sigmaIEtaIEta()

float egHLT::OffPho::sigmaIEtaIEta ( ) const
inline

◆ sigmaIPhiIPhi()

float egHLT::OffPho::sigmaIPhiIPhi ( ) const
inline

Definition at line 127 of file EgHLTOffPho.h.

References clusShapeData_, and egHLT::OffPho::ClusShapeData::sigmaIPhiIPhi.

127 { return clusShapeData_.sigmaIPhiIPhi; }
ClusShapeData clusShapeData_
Definition: EgHLTOffPho.h:63

◆ sigmaPhiPhi()

float egHLT::OffPho::sigmaPhiPhi ( ) const
inline

Definition at line 126 of file EgHLTOffPho.h.

References clusShapeData_, and egHLT::OffPho::ClusShapeData::sigmaPhiPhi.

126 { return clusShapeData_.sigmaPhiPhi; }
ClusShapeData clusShapeData_
Definition: EgHLTOffPho.h:63

◆ trigBits()

TrigCodes::TrigBitSet egHLT::OffPho::trigBits ( ) const
inline

Definition at line 158 of file EgHLTOffPho.h.

References trigBits_.

Referenced by egHLT::PhoHLTFilterMon::fill(), and egHLT::EgTrigTagProbeCut_NewPho::pass().

158 { return trigBits_; }
TrigCodes::TrigBitSet trigBits_
Definition: EgHLTOffPho.h:79

◆ trigCutsCutCode()

int OffPho::trigCutsCutCode ( const TrigCodes::TrigBitSet trigger) const

Definition at line 15 of file EgHLTOffPho.cc.

References trigCutsCutCodes_.

Referenced by egHLT::MonElemFuncs::initTightLooseDiObjTrigHistsTrigCuts(), and egHLT::MonElemFuncs::initTightLooseTrigHistsTrigCuts().

15  {
16  //yes maybe a sorted vector might be better but 1) its small and 2) bitset doesnt support < operator
17  //okay laugh, for some reason I cant overload the == operator (brain just not working), hence the non stl'y way
18  //std::vector<std::pair<TrigCodes::TrigBitSet,int> >::const_iterator it;
19  //it = std::find(trigCutsCodes_.begin(),trigCutsCodes_.end(),trigger);
20  //if(it!=trigCutsCodes_.end()) return it->second;
21  //else return 0; //defaults to passing
22 
23  for (auto const& trigCutsCutCode : trigCutsCutCodes_)
24  if (trigger == trigCutsCutCode.first)
25  return trigCutsCutCode.second;
26  return 0; //defaults to passing
27 }
int trigCutsCutCode(const TrigCodes::TrigBitSet &trigger) const
Definition: EgHLTOffPho.cc:15
std::vector< std::pair< TrigCodes::TrigBitSet, int > > trigCutsCutCodes_
Definition: EgHLTOffPho.h:74

◆ zVtx()

float egHLT::OffPho::zVtx ( ) const
inline

Definition at line 115 of file EgHLTOffPho.h.

References pho_, and reco::LeafCandidate::vz().

115 { return pho_->vz(); }
double vz() const override
z coordinate of vertex position
const reco::Photon * pho_
Definition: EgHLTOffPho.h:61

Member Data Documentation

◆ clusShapeData_

ClusShapeData egHLT::OffPho::clusShapeData_
private

◆ cutCode_

int egHLT::OffPho::cutCode_
private

Definition at line 68 of file EgHLTOffPho.h.

Referenced by cutCode(), and setCutCode().

◆ hltData_

HLTData egHLT::OffPho::hltData_
private

Definition at line 65 of file EgHLTOffPho.h.

Referenced by hltEnergy(), hltEta(), and hltPhi().

◆ isolData_

IsolData egHLT::OffPho::isolData_
private

Definition at line 64 of file EgHLTOffPho.h.

Referenced by hltIsolEm(), hltIsolHad(), hltIsolTrks(), isolEm(), isolHad(), isolNrTrks(), and isolPtTrks().

◆ looseCutCode_

int egHLT::OffPho::looseCutCode_
private

Definition at line 69 of file EgHLTOffPho.h.

Referenced by looseCutCode(), and setLooseCutCode().

◆ pho_

const reco::Photon* egHLT::OffPho::pho_
private

Definition at line 61 of file EgHLTOffPho.h.

Referenced by energy(), et(), eta(), etaSC(), etSC(), hOverE(), isGap(), p4(), phi(), phiSC(), pt(), recoPho(), and zVtx().

◆ trigBits_

TrigCodes::TrigBitSet egHLT::OffPho::trigBits_
private

Definition at line 79 of file EgHLTOffPho.h.

Referenced by setTrigBits(), and trigBits().

◆ trigCutsCutCodes_

std::vector<std::pair<TrigCodes::TrigBitSet, int> > egHLT::OffPho::trigCutsCutCodes_
private

Definition at line 74 of file EgHLTOffPho.h.

Referenced by setTrigCutsCutCodes(), and trigCutsCutCode().