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 27 of file EgHLTOffPho.h.

Constructor & Destructor Documentation

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

Definition at line 85 of file EgHLTOffPho.h.

References ~OffPho().

85  :
86  pho_(&pho),clusShapeData_(shapeData),isolData_(isolData),hltData_(hltData),
ClusShapeData clusShapeData_
Definition: EgHLTOffPho.h:66
const reco::Photon * pho_
Definition: EgHLTOffPho.h:64
IsolData isolData_
Definition: EgHLTOffPho.h:67
HLTData hltData_
Definition: EgHLTOffPho.h:68
egHLT::OffPho::~OffPho ( )
default

Referenced by OffPho().

Member Function Documentation

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

Definition at line 144 of file EgHLTOffPho.h.

References energy(), and hltEnergy().

Referenced by egHLT::MonElemFuncs::initStdPhoHists().

144 {return (hltEnergy() - energy());}
float energy() const
Definition: EgHLTOffPho.h:103
float hltEnergy() const
Definition: EgHLTOffPho.h:142
float egHLT::OffPho::detEta ( ) const
inline

Definition at line 108 of file EgHLTOffPho.h.

References etaSC().

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

108 {return etaSC();}
float etaSC() const
Definition: EgHLTOffPho.h:107
float egHLT::OffPho::e1x5Over5x5 ( ) const
inline
float egHLT::OffPho::e2x5MaxOver5x5 ( ) const
inline
float egHLT::OffPho::energy ( ) const
inline

Definition at line 103 of file EgHLTOffPho.h.

References reco::LeafCandidate::energy().

Referenced by DeltaE(), etSC(), egHLT::OffEgSel::getCutCode(), egHLT::MonElemFuncs::initStdPhoHists(), and Jet.Jet::rawEnergy().

103 {return pho_->energy();}
const reco::Photon * pho_
Definition: EgHLTOffPho.h:64
virtual double energy() const final
energy
float egHLT::OffPho::et ( ) const
inline

Definition at line 101 of file EgHLTOffPho.h.

References reco::LeafCandidate::et().

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

101 {return pho_->et();}
const reco::Photon * pho_
Definition: EgHLTOffPho.h:64
virtual double et() const final
transverse energy
float egHLT::OffPho::eta ( ) const
inline

Definition at line 104 of file EgHLTOffPho.h.

References reco::LeafCandidate::eta().

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

104 {return pho_->eta();}
virtual double eta() const final
momentum pseudorapidity
const reco::Photon * pho_
Definition: EgHLTOffPho.h:64
float egHLT::OffPho::etaSC ( ) const
inline

Definition at line 107 of file EgHLTOffPho.h.

References reco::Photon::superCluster().

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

107 {return pho_->superCluster()->eta();}
reco::SuperClusterRef superCluster() const
Ref to SuperCluster.
const reco::Photon * pho_
Definition: EgHLTOffPho.h:64
float egHLT::OffPho::etSC ( ) const
inline

Definition at line 106 of file EgHLTOffPho.h.

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

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

106 {return pho_->superCluster()->position().rho()/pho_->superCluster()->position().r()*energy();}
reco::SuperClusterRef superCluster() const
Ref to SuperCluster.
const reco::Photon * pho_
Definition: EgHLTOffPho.h:64
float energy() const
Definition: EgHLTOffPho.h:103
float egHLT::OffPho::hltEnergy ( ) const
inline

Definition at line 142 of file EgHLTOffPho.h.

References egHLT::OffPho::HLTData::HLTenergy.

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

142 {return hltData_.HLTenergy;}
HLTData hltData_
Definition: EgHLTOffPho.h:68
float egHLT::OffPho::hltEta ( ) const
inline

Definition at line 141 of file EgHLTOffPho.h.

References egHLT::OffPho::HLTData::HLTeta.

Referenced by egHLT::MonElemFuncs::initStdPhoHists().

141 {return hltData_.HLTeta;}
HLTData hltData_
Definition: EgHLTOffPho.h:68
float egHLT::OffPho::hltIsolEm ( ) const
inline

Definition at line 136 of file EgHLTOffPho.h.

References egHLT::OffPho::IsolData::hltEm.

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

136 {return isolData_.hltEm;}
IsolData isolData_
Definition: EgHLTOffPho.h:67
float egHLT::OffPho::hltIsolHad ( ) const
inline

Definition at line 134 of file EgHLTOffPho.h.

References egHLT::OffPho::IsolData::hltHad.

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

134 {return isolData_.hltHad;}
IsolData isolData_
Definition: EgHLTOffPho.h:67
float egHLT::OffPho::hltIsolTrks ( ) const
inline

Definition at line 135 of file EgHLTOffPho.h.

References egHLT::OffPho::IsolData::hltTrks.

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

135 {return isolData_.hltTrks;}
IsolData isolData_
Definition: EgHLTOffPho.h:67
float egHLT::OffPho::hltPhi ( ) const
inline

Definition at line 140 of file EgHLTOffPho.h.

References egHLT::OffPho::HLTData::HLTphi.

Referenced by egHLT::MonElemFuncs::initStdPhoHists().

140 {return hltData_.HLTphi;}
HLTData hltData_
Definition: EgHLTOffPho.h:68
float egHLT::OffPho::hOverE ( ) const
inline

Definition at line 116 of file EgHLTOffPho.h.

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

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

116 {return pho_->hadronicOverEm();}
const reco::Photon * pho_
Definition: EgHLTOffPho.h:64
float hadronicOverEm() const
the total hadronic over electromagnetic fraction
Definition: Photon.h:204
bool egHLT::OffPho::isGap ( ) const
inline

Definition at line 113 of file EgHLTOffPho.h.

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

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

113 {return pho_->isEBGap() || pho_->isEEGap() || pho_->isEBEEGap();}
bool isEBGap() const
true if photon is in EB, and inside the boundaries in super crystals/modules
Definition: Photon.h:125
bool isEBEEGap() const
true if photon is in boundary between EB and EE
Definition: Photon.h:133
const reco::Photon * pho_
Definition: EgHLTOffPho.h:64
bool isEEGap() const
true if photon is in EE, and inside the boundaries in supercrystal/D
Definition: Photon.h:129
float egHLT::OffPho::isolEm ( ) const
inline
float egHLT::OffPho::isolHad ( ) const
inline
int egHLT::OffPho::isolNrTrks ( ) const
inline
float egHLT::OffPho::isolPtTrks ( ) const
inline
int egHLT::OffPho::looseCutCode ( ) const
inline

Definition at line 148 of file EgHLTOffPho.h.

References looseCutCode_, and trigCutsCutCode().

148 {return looseCutCode_;}
const math::XYZTLorentzVector& egHLT::OffPho::p4 ( ) const
inline

Definition at line 111 of file EgHLTOffPho.h.

References reco::Photon::p4().

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

111 {return pho_->p4();}
const reco::Photon * pho_
Definition: EgHLTOffPho.h:64
const LorentzVector & p4(P4type type) const
float egHLT::OffPho::phi ( void  ) const
inline
float egHLT::OffPho::phiSC ( ) const
inline

Definition at line 109 of file EgHLTOffPho.h.

References reco::Photon::superCluster().

109 {return pho_->superCluster()->phi();}
reco::SuperClusterRef superCluster() const
Ref to SuperCluster.
const reco::Photon * pho_
Definition: EgHLTOffPho.h:64
float egHLT::OffPho::pt ( ) const
inline
float egHLT::OffPho::r9 ( ) const
inline
const reco::Photon* egHLT::OffPho::recoPho ( ) const
inline

Definition at line 98 of file EgHLTOffPho.h.

References pho_.

98 {return pho_;}
const reco::Photon * pho_
Definition: EgHLTOffPho.h:64
void egHLT::OffPho::setCutCode ( int  code)
inline

Definition at line 91 of file EgHLTOffPho.h.

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

91 {cutCode_=code;}
void egHLT::OffPho::setLooseCutCode ( int  code)
inline

Definition at line 92 of file EgHLTOffPho.h.

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

92 {looseCutCode_=code;}
void egHLT::OffPho::setTrigBits ( TrigCodes::TrigBitSet  bits)
inline

Definition at line 96 of file EgHLTOffPho.h.

References bits.

96 {trigBits_=bits;}
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision bits
TrigCodes::TrigBitSet trigBits_
Definition: EgHLTOffPho.h:81
void egHLT::OffPho::setTrigCutsCutCodes ( const std::vector< std::pair< TrigCodes::TrigBitSet, int > > &  trigCutsCutCodes)
inline

Definition at line 95 of file EgHLTOffPho.h.

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

95 {trigCutsCutCodes_=trigCutsCutCodes;}
std::vector< std::pair< TrigCodes::TrigBitSet, int > > trigCutsCutCodes_
Definition: EgHLTOffPho.h:76
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(), and hOverE().

8 {
9  if(std::fabs(etaSC())<1.479) 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 
14 }
ClusShapeData clusShapeData_
Definition: EgHLTOffPho.h:66
float etaSC() const
Definition: EgHLTOffPho.h:107
float egHLT::OffPho::sigmaEtaEtaUnCorr ( ) const
inline

Definition at line 121 of file EgHLTOffPho.h.

References egHLT::OffPho::ClusShapeData::sigmaEtaEta.

121 {return clusShapeData_.sigmaEtaEta;}
ClusShapeData clusShapeData_
Definition: EgHLTOffPho.h:66
float egHLT::OffPho::sigmaIEtaIEta ( ) const
inline
float egHLT::OffPho::sigmaIPhiIPhi ( ) const
inline

Definition at line 124 of file EgHLTOffPho.h.

References egHLT::OffPho::ClusShapeData::sigmaIPhiIPhi.

ClusShapeData clusShapeData_
Definition: EgHLTOffPho.h:66
float egHLT::OffPho::sigmaPhiPhi ( ) const
inline

Definition at line 123 of file EgHLTOffPho.h.

References egHLT::OffPho::ClusShapeData::sigmaPhiPhi.

123 {return clusShapeData_.sigmaPhiPhi;}
ClusShapeData clusShapeData_
Definition: EgHLTOffPho.h:66
TrigCodes::TrigBitSet egHLT::OffPho::trigBits ( ) const
inline

Definition at line 155 of file EgHLTOffPho.h.

References trigBits_.

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

155 {return trigBits_;}
TrigCodes::TrigBitSet trigBits_
Definition: EgHLTOffPho.h:81
int OffPho::trigCutsCutCode ( const TrigCodes::TrigBitSet trigger) const

Definition at line 16 of file EgHLTOffPho.cc.

References trigCutsCutCodes_.

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

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

Definition at line 110 of file EgHLTOffPho.h.

References reco::LeafCandidate::vz().

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

Member Data Documentation

ClusShapeData egHLT::OffPho::clusShapeData_
private

Definition at line 66 of file EgHLTOffPho.h.

Referenced by sigmaEtaEta().

int egHLT::OffPho::cutCode_
private

Definition at line 71 of file EgHLTOffPho.h.

Referenced by cutCode().

HLTData egHLT::OffPho::hltData_
private

Definition at line 68 of file EgHLTOffPho.h.

IsolData egHLT::OffPho::isolData_
private

Definition at line 67 of file EgHLTOffPho.h.

int egHLT::OffPho::looseCutCode_
private

Definition at line 72 of file EgHLTOffPho.h.

Referenced by looseCutCode().

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

Definition at line 64 of file EgHLTOffPho.h.

Referenced by recoPho().

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

Definition at line 81 of file EgHLTOffPho.h.

Referenced by trigBits().

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

Definition at line 76 of file EgHLTOffPho.h.

Referenced by trigCutsCutCode().