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),

◆ ~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.

147 { return (hltEnergy() - energy()); }

References energy(), and hltEnergy().

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

◆ 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

◆ etaSC()

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

Definition at line 112 of file EgHLTOffPho.h.

112 { return pho_->superCluster()->eta(); }

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

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

◆ etSC()

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

◆ 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.

139 { return isolData_.hltEm; }

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

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

◆ hltIsolHad()

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

Definition at line 137 of file EgHLTOffPho.h.

137 { return isolData_.hltHad; }

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

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

◆ hltIsolTrks()

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

Definition at line 138 of file EgHLTOffPho.h.

138 { return isolData_.hltTrks; }

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

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

◆ hltPhi()

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

◆ hOverE()

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

◆ isGap()

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

Definition at line 118 of file EgHLTOffPho.h.

118 { return pho_->isEBGap() || pho_->isEEGap() || pho_->isEBEEGap(); }

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

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

◆ 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.

151 { return looseCutCode_; }

References looseCutCode_.

◆ p4()

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

Definition at line 116 of file EgHLTOffPho.h.

116 { return pho_->p4(); }

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

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

◆ phi()

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

◆ phiSC()

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

Definition at line 114 of file EgHLTOffPho.h.

114 { return pho_->superCluster()->phi(); }

References pho_, and reco::Photon::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.

101 { return pho_; }

References pho_.

◆ setCutCode()

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

Definition at line 92 of file EgHLTOffPho.h.

92 { cutCode_ = code; }

References cutCode_.

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

◆ setLooseCutCode()

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

Definition at line 93 of file EgHLTOffPho.h.

93 { looseCutCode_ = code; }

References looseCutCode_.

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

◆ setTrigBits()

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

Definition at line 99 of file EgHLTOffPho.h.

99 { trigBits_ = bits; }

References trigBits_.

◆ setTrigCutsCutCodes()

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

Definition at line 96 of file EgHLTOffPho.h.

96  {
97  trigCutsCutCodes_ = trigCutsCutCodes;
98  }

References trigCutsCutCodes_.

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

◆ sigmaEtaEta()

float OffPho::sigmaEtaEta ( ) const

Definition at line 7 of file EgHLTOffPho.cc.

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 }

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

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

◆ sigmaEtaEtaUnCorr()

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

Definition at line 124 of file EgHLTOffPho.h.

124 { return clusShapeData_.sigmaEtaEta; }

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

◆ sigmaIEtaIEta()

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

◆ sigmaIPhiIPhi()

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

Definition at line 127 of file EgHLTOffPho.h.

127 { return clusShapeData_.sigmaIPhiIPhi; }

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

◆ sigmaPhiPhi()

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

Definition at line 126 of file EgHLTOffPho.h.

126 { return clusShapeData_.sigmaPhiPhi; }

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

◆ trigBits()

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

Definition at line 158 of file EgHLTOffPho.h.

158 { return trigBits_; }

References trigBits_.

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

◆ trigCutsCutCode()

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

Definition at line 15 of file EgHLTOffPho.cc.

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 }

References trigCutsCutCodes_.

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

◆ zVtx()

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

Definition at line 115 of file EgHLTOffPho.h.

115 { return pho_->vz(); }

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

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().

egHLT::OffPho::IsolData::nrTrks
int nrTrks
Definition: EgHLTOffPho.h:30
reco::Photon::superCluster
reco::SuperClusterRef superCluster() const override
Ref to SuperCluster.
egHLT::OffPho::energy
float energy() const
Definition: EgHLTOffPho.h:106
egHLT::OffPho::ClusShapeData::sigmaPhiPhi
float sigmaPhiPhi
Definition: EgHLTOffPho.h:46
reco::Photon::p4
const LorentzVector & p4(P4type type) const
egHLT::OffPho::IsolData::hltHad
float hltHad
Definition: EgHLTOffPho.h:34
reco::LeafCandidate::vz
double vz() const override
z coordinate of vertex position
Definition: LeafCandidate.h:171
egHLT::OffPho::trigCutsCutCode
int trigCutsCutCode(const TrigCodes::TrigBitSet &trigger) const
Definition: EgHLTOffPho.cc:15
egHLT::OffPho::trigCutsCutCodes_
std::vector< std::pair< TrigCodes::TrigBitSet, int > > trigCutsCutCodes_
Definition: EgHLTOffPho.h:74
reco::LeafCandidate::pt
double pt() const final
transverse momentum
Definition: LeafCandidate.h:146
egHLT::OffPho::etaSC
float etaSC() const
Definition: EgHLTOffPho.h:112
egHLT::OffPho::ClusShapeData::sigmaIEtaIEta
float sigmaIEtaIEta
Definition: EgHLTOffPho.h:43
egHLT::OffPho::isolData_
IsolData isolData_
Definition: EgHLTOffPho.h:64
egHLT::OffPho::HLTData::HLTeta
float HLTeta
Definition: EgHLTOffPho.h:55
egHLT::OffPho::trigBits_
TrigCodes::TrigBitSet trigBits_
Definition: EgHLTOffPho.h:79
egHLT::OffPho::ClusShapeData::e1x5Over5x5
float e1x5Over5x5
Definition: EgHLTOffPho.h:45
egHLT::OffPho::cutCode_
int cutCode_
Definition: EgHLTOffPho.h:68
egHLT::OffPho::IsolData::hltEm
float hltEm
Definition: EgHLTOffPho.h:36
egHLT::OffPho::IsolData::had
float had
Definition: EgHLTOffPho.h:33
egHLT::OffPho::clusShapeData_
ClusShapeData clusShapeData_
Definition: EgHLTOffPho.h:63
egHLT::OffPho::hltEnergy
float hltEnergy() const
Definition: EgHLTOffPho.h:145
reco::LeafCandidate::eta
double eta() const final
momentum pseudorapidity
Definition: LeafCandidate.h:152
reco::Photon::isEEGap
bool isEEGap() const
true if photon is in EE, and inside the boundaries in supercrystal/D
Definition: Photon.h:127
egHLT::OffPho::ClusShapeData::sigmaIPhiIPhi
float sigmaIPhiIPhi
Definition: EgHLTOffPho.h:47
egHLT::OffPho::HLTData::HLTenergy
float HLTenergy
Definition: EgHLTOffPho.h:57
egHLT::OffPho::IsolData::em
float em
Definition: EgHLTOffPho.h:32
reco::LeafCandidate::et
double et() const final
transverse energy
Definition: LeafCandidate.h:127
egHLT::OffPho::pho_
const reco::Photon * pho_
Definition: EgHLTOffPho.h:61
reco::Photon::hadronicOverEm
float hadronicOverEm() const
the total hadronic over electromagnetic fraction
Definition: Photon.h:208
reco::LeafCandidate::phi
double phi() const final
momentum azimuthal angle
Definition: LeafCandidate.h:148
egHLT::OffPho::ClusShapeData::sigmaEtaEta
float sigmaEtaEta
Definition: EgHLTOffPho.h:42
egHLT::OffPho::IsolData::hltTrks
float hltTrks
Definition: EgHLTOffPho.h:35
egHLT::OffPho::hltData_
HLTData hltData_
Definition: EgHLTOffPho.h:65
reco::LeafCandidate::energy
double energy() const final
energy
Definition: LeafCandidate.h:125
trigger
Definition: HLTPrescaleTableCond.h:8
egHLT::OffPho::IsolData::ptTrks
float ptTrks
Definition: EgHLTOffPho.h:31
egHLT::OffPho::HLTData::HLTphi
float HLTphi
Definition: EgHLTOffPho.h:56
egHLT::OffPho::looseCutCode_
int looseCutCode_
Definition: EgHLTOffPho.h:69
reco::Photon::isEBEEGap
bool isEBEEGap() const
true if photon is in boundary between EB and EE
Definition: Photon.h:131
egHLT::OffPho::ClusShapeData::e2x5MaxOver5x5
float e2x5MaxOver5x5
Definition: EgHLTOffPho.h:44
egHLT::EgCutCodes::INVALID
Definition: EgHLTEgCutCodes.h:53
egHLT::OffPho::ClusShapeData::r9
float r9
Definition: EgHLTOffPho.h:48
reco::Photon::isEBGap
bool isEBGap() const
true if photon is in EB, and inside the boundaries in super crystals/modules
Definition: Photon.h:123