CMS 3D CMS Logo

Classes | Public Member Functions | Private Attributes

egHLT::OffEle Class Reference

#include <EgHLTOffEle.h>

List of all members.

Classes

struct  ClusShapeData
struct  EventData
struct  HLTData
struct  IsolData

Public Member Functions

float bremFrac () const
float caloEnergy () const
int charge () const
int classification () const
reco::TrackRef ctfTrack () const
float ctfTrkChi2 () const
float ctfTrkEta () const
int ctfTrkHitsFound () const
int ctfTrkHitsLost () const
float ctfTrkInnerRadius () const
float ctfTrkNDof () const
int ctfTrkNrHits () const
float ctfTrkOuterRadius () const
float ctfTrkP () const
float ctfTrkPt () const
float ctfTrkPtInner () const
float ctfTrkPtOuter () const
int cutCode () const
float DeltaE () const
float dEtaIn () const
float dEtaOut () const
float detEta () const
float dPhiIn () const
float dPhiOut () const
float e1x5Over5x5 () const
float e2x5MaxOver5x5 () const
float energy () const
float epIn () const
float epOut () const
float et () const
float eta () const
float etaSC () const
float etSC () const
const reco::GsfElectrongsfEle () const
float hltDEtaIn () const
float hltDPhiIn () const
float hltEnergy () const
float hltEta () const
float hltInvEInvP () const
float hltIsolEm () const
float hltIsolHad () const
float hltIsolTrksEle () const
float hltIsolTrksPho () const
float hltPhi () const
float hOverE () const
float invEInvP () const
bool isGap () const
float isolEm () const
float isolHad () const
float isolHadDepth1 () const
float isolHadDepth2 () const
int isolNrTrks () const
float isolPtTrks () const
int looseCutCode () const
int NVertex () const
 OffEle (const reco::GsfElectron &ele, const ClusShapeData &shapeData, const IsolData &isolData, const HLTData &hltData, const EventData &eventData)
const math::XYZTLorentzVectorp4 () const
float pCalo () const
float phi () const
float phiSC () const
float ptCalo () const
float ptVtx () const
float pVtx () const
float r9 () 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 sigmaPhiPhi () const
TrigCodes::TrigBitSet trigBits () const
int trigCutsCutCode (const TrigCodes::TrigBitSet &trigger) const
bool validCTFTrack () const
float zVtx () const
 ~OffEle ()

Private Attributes

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

Detailed Description

Definition at line 30 of file EgHLTOffEle.h.


Constructor & Destructor Documentation

egHLT::OffEle::OffEle ( const reco::GsfElectron ele,
const ClusShapeData shapeData,
const IsolData isolData,
const HLTData hltData,
const EventData eventData 
) [inline]

Definition at line 100 of file EgHLTOffEle.h.

                                                                                                                                                :
      gsfEle_(&ele),clusShapeData_(shapeData),isolData_(isolData),hltData_(hltData),eventData_(eventData),
      cutCode_(int(EgCutCodes::INVALID)),looseCutCode_(int(EgCutCodes::INVALID)){}
egHLT::OffEle::~OffEle ( ) [inline]

Definition at line 103 of file EgHLTOffEle.h.

{}

Member Function Documentation

float egHLT::OffEle::bremFrac ( ) const [inline]

Definition at line 162 of file EgHLTOffEle.h.

References pCalo(), and pVtx().

{return (pVtx()-pCalo())/pVtx();}
float egHLT::OffEle::caloEnergy ( ) const [inline]

Definition at line 123 of file EgHLTOffEle.h.

References reco::GsfElectron::caloEnergy(), and gsfEle_.

Referenced by DeltaE(), etSC(), and egHLT::OffEgSel::getCutCode().

{return gsfEle_->caloEnergy();}
int egHLT::OffEle::charge ( ) const [inline]

Definition at line 135 of file EgHLTOffEle.h.

References reco::LeafCandidate::charge(), and gsfEle_.

{return gsfEle_->charge();}
int egHLT::OffEle::classification ( ) const [inline]

Definition at line 131 of file EgHLTOffEle.h.

References reco::GsfElectron::classification(), and gsfEle_.

{return gsfEle_->classification();}
reco::TrackRef egHLT::OffEle::ctfTrack ( ) const [inline]
float egHLT::OffEle::ctfTrkChi2 ( ) const [inline]

Definition at line 200 of file EgHLTOffEle.h.

References ctfTrack(), and validCTFTrack().

{return validCTFTrack() ? ctfTrack()->chi2() : 999.;}
float egHLT::OffEle::ctfTrkEta ( ) const [inline]

Definition at line 199 of file EgHLTOffEle.h.

References ctfTrack(), and validCTFTrack().

{return validCTFTrack() ? ctfTrack()->eta() : -999.;}
int egHLT::OffEle::ctfTrkHitsFound ( ) const [inline]

Definition at line 206 of file EgHLTOffEle.h.

References ctfTrack(), and validCTFTrack().

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

{return validCTFTrack() ? static_cast<int>(ctfTrack()->found()) : -999;}
int egHLT::OffEle::ctfTrkHitsLost ( ) const [inline]

Definition at line 207 of file EgHLTOffEle.h.

References ctfTrack(), and validCTFTrack().

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

{return validCTFTrack() ? static_cast<int>(ctfTrack()->lost()) : -999;}
float egHLT::OffEle::ctfTrkInnerRadius ( ) const [inline]

Definition at line 204 of file EgHLTOffEle.h.

References ctfTrack(), and validCTFTrack().

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

{return validCTFTrack() ? ctfTrack()->innerPosition().Rho() : 999.;}
float egHLT::OffEle::ctfTrkNDof ( ) const [inline]

Definition at line 201 of file EgHLTOffEle.h.

References ctfTrack(), and validCTFTrack().

{return validCTFTrack() ? ctfTrack()->ndof() : 999.;} //this will give chi2/ndof a valid value, perhaps rethink
int egHLT::OffEle::ctfTrkNrHits ( ) const [inline]

Definition at line 208 of file EgHLTOffEle.h.

References ctfTrack(), and validCTFTrack().

{return validCTFTrack() ? static_cast<int>(ctfTrack()->recHitsSize()) : -999;}
float egHLT::OffEle::ctfTrkOuterRadius ( ) const [inline]

Definition at line 205 of file EgHLTOffEle.h.

References ctfTrack(), and validCTFTrack().

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

{return validCTFTrack() ? ctfTrack()->outerPosition().Rho() : -999.;}
float egHLT::OffEle::ctfTrkP ( ) const [inline]

Definition at line 197 of file EgHLTOffEle.h.

References ctfTrack(), and validCTFTrack().

{return validCTFTrack() ? ctfTrack()->p() : -999.;}
float egHLT::OffEle::ctfTrkPt ( ) const [inline]

Definition at line 198 of file EgHLTOffEle.h.

References ctfTrack(), and validCTFTrack().

{return validCTFTrack() ? ctfTrack()->pt() : -999.;}
float egHLT::OffEle::ctfTrkPtInner ( ) const [inline]

Definition at line 203 of file EgHLTOffEle.h.

References ctfTrack(), and validCTFTrack().

{return validCTFTrack() ?  ctfTrack()->innerMomentum().Perp2() : -999.;}
float egHLT::OffEle::ctfTrkPtOuter ( ) const [inline]

Definition at line 202 of file EgHLTOffEle.h.

References ctfTrack(), and validCTFTrack().

{return validCTFTrack() ?  ctfTrack()->outerMomentum().Perp2() : -999.;}
int egHLT::OffEle::cutCode ( ) const [inline]
float egHLT::OffEle::DeltaE ( ) const [inline]

Definition at line 188 of file EgHLTOffEle.h.

References caloEnergy(), and hltEnergy().

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

{return (hltEnergy() - caloEnergy());}
float egHLT::OffEle::dEtaIn ( ) const [inline]
float egHLT::OffEle::dEtaOut ( ) const [inline]
float egHLT::OffEle::detEta ( ) const [inline]
float egHLT::OffEle::dPhiIn ( ) const [inline]
float egHLT::OffEle::dPhiOut ( ) const [inline]
float egHLT::OffEle::e1x5Over5x5 ( ) const [inline]
float egHLT::OffEle::e2x5MaxOver5x5 ( ) const [inline]
float egHLT::OffEle::energy ( ) const [inline]

Definition at line 119 of file EgHLTOffEle.h.

References reco::LeafCandidate::energy(), and gsfEle_.

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

{return gsfEle_->energy();}
float egHLT::OffEle::epIn ( ) const [inline]
float egHLT::OffEle::epOut ( ) const [inline]
float egHLT::OffEle::et ( ) const [inline]
float egHLT::OffEle::eta ( ) const [inline]
float egHLT::OffEle::etaSC ( ) const [inline]

Definition at line 124 of file EgHLTOffEle.h.

References gsfEle_, and reco::GsfElectron::superCluster().

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

{return gsfEle_->superCluster()->eta();}
float egHLT::OffEle::etSC ( ) const [inline]
const reco::GsfElectron* egHLT::OffEle::gsfEle ( ) const [inline]

Definition at line 114 of file EgHLTOffEle.h.

References gsfEle_.

{return gsfEle_;}
float egHLT::OffEle::hltDEtaIn ( ) const [inline]

Definition at line 179 of file EgHLTOffEle.h.

References egHLT::OffEle::HLTData::dEtaIn, and hltData_.

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

{return hltData_.dEtaIn;}
float egHLT::OffEle::hltDPhiIn ( ) const [inline]

Definition at line 180 of file EgHLTOffEle.h.

References egHLT::OffEle::HLTData::dPhiIn, and hltData_.

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

{return hltData_.dPhiIn;}
float egHLT::OffEle::hltEnergy ( ) const [inline]

Definition at line 186 of file EgHLTOffEle.h.

References hltData_, and egHLT::OffEle::HLTData::HLTenergy.

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

{return hltData_.HLTenergy;}
float egHLT::OffEle::hltEta ( ) const [inline]

Definition at line 185 of file EgHLTOffEle.h.

References hltData_, and egHLT::OffEle::HLTData::HLTeta.

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

{return hltData_.HLTeta;}
float egHLT::OffEle::hltInvEInvP ( ) const [inline]

Definition at line 181 of file EgHLTOffEle.h.

References hltData_, and egHLT::OffEle::HLTData::invEInvP.

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

{return hltData_.invEInvP;}
float egHLT::OffEle::hltIsolEm ( ) const [inline]
float egHLT::OffEle::hltIsolHad ( ) const [inline]
float egHLT::OffEle::hltIsolTrksEle ( ) const [inline]
float egHLT::OffEle::hltIsolTrksPho ( ) const [inline]

Definition at line 174 of file EgHLTOffEle.h.

References egHLT::OffEle::IsolData::hltTrksPho, and isolData_.

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

float egHLT::OffEle::hltPhi ( ) const [inline]

Definition at line 184 of file EgHLTOffEle.h.

References hltData_, and egHLT::OffEle::HLTData::HLTphi.

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

{return hltData_.HLTphi;}
float egHLT::OffEle::hOverE ( ) const [inline]
float egHLT::OffEle::invEInvP ( ) const [inline]
bool egHLT::OffEle::isGap ( ) const [inline]
float egHLT::OffEle::isolEm ( ) const [inline]

Definition at line 167 of file EgHLTOffEle.h.

References egHLT::OffEle::IsolData::em, and isolData_.

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

{return isolData_.em;}
float egHLT::OffEle::isolHad ( ) const [inline]

Definition at line 168 of file EgHLTOffEle.h.

References isolHadDepth1(), and isolHadDepth2().

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

float egHLT::OffEle::isolHadDepth1 ( ) const [inline]

Definition at line 169 of file EgHLTOffEle.h.

References egHLT::OffEle::IsolData::hadDepth1, and isolData_.

Referenced by isolHad().

{return isolData_.hadDepth1;}
float egHLT::OffEle::isolHadDepth2 ( ) const [inline]

Definition at line 170 of file EgHLTOffEle.h.

References egHLT::OffEle::IsolData::hadDepth2, and isolData_.

Referenced by isolHad().

{return isolData_.hadDepth2;}
int egHLT::OffEle::isolNrTrks ( ) const [inline]

Definition at line 172 of file EgHLTOffEle.h.

References isolData_, and egHLT::OffEle::IsolData::nrTrks.

{return isolData_.nrTrks;}
float egHLT::OffEle::isolPtTrks ( ) const [inline]

Definition at line 171 of file EgHLTOffEle.h.

References isolData_, and egHLT::OffEle::IsolData::ptTrks.

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

{return isolData_.ptTrks;}
int egHLT::OffEle::looseCutCode ( ) const [inline]

Definition at line 212 of file EgHLTOffEle.h.

References looseCutCode_.

Referenced by egHLT::EleHLTFilterMon::EleHLTFilterMon().

{return looseCutCode_;}
int egHLT::OffEle::NVertex ( ) const [inline]

Definition at line 107 of file EgHLTOffEle.h.

References eventData_, and egHLT::OffEle::EventData::NVertex.

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

{return eventData_.NVertex;}
const math::XYZTLorentzVector& egHLT::OffEle::p4 ( ) const [inline]
float egHLT::OffEle::pCalo ( ) const [inline]

Definition at line 137 of file EgHLTOffEle.h.

References gsfEle_, and reco::GsfElectron::trackMomentumAtCalo().

Referenced by bremFrac().

{return gsfEle_->trackMomentumAtCalo().R();}
float egHLT::OffEle::phi ( void  ) const [inline]
float egHLT::OffEle::phiSC ( ) const [inline]

Definition at line 126 of file EgHLTOffEle.h.

References gsfEle_, and reco::GsfElectron::superCluster().

{return gsfEle_->superCluster()->phi();}
float egHLT::OffEle::ptCalo ( ) const [inline]

Definition at line 139 of file EgHLTOffEle.h.

References gsfEle_, and reco::GsfElectron::trackMomentumAtCalo().

{return gsfEle_->trackMomentumAtCalo().rho();}
float egHLT::OffEle::ptVtx ( ) const [inline]

Definition at line 138 of file EgHLTOffEle.h.

References gsfEle_, and reco::GsfElectron::trackMomentumAtVtx().

{return gsfEle_->trackMomentumAtVtx().rho();}
float egHLT::OffEle::pVtx ( ) const [inline]

Definition at line 136 of file EgHLTOffEle.h.

References gsfEle_, and reco::GsfElectron::trackMomentumAtVtx().

Referenced by bremFrac().

{return gsfEle_->trackMomentumAtVtx().R();}
float egHLT::OffEle::r9 ( ) const [inline]
void egHLT::OffEle::setCutCode ( int  code) [inline]

Definition at line 108 of file EgHLTOffEle.h.

References cutCode_.

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

{cutCode_=code;}
void egHLT::OffEle::setLooseCutCode ( int  code) [inline]

Definition at line 109 of file EgHLTOffEle.h.

References looseCutCode_.

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

{looseCutCode_=code;} 
void egHLT::OffEle::setTrigBits ( TrigCodes::TrigBitSet  bits) [inline]

Definition at line 112 of file EgHLTOffEle.h.

References bits, and trigBits_.

void egHLT::OffEle::setTrigCutsCutCodes ( const std::vector< std::pair< TrigCodes::TrigBitSet, int > >  trigCutsCutCodes) [inline]

Definition at line 111 of file EgHLTOffEle.h.

References trigCutsCutCodes_.

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

{trigCutsCutCodes_=trigCutsCutCodes;}
float OffEle::sigmaEtaEta ( ) const

Definition at line 5 of file EgHLTOffEle.cc.

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

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

{
  if(fabs(etaSC())<1.479) return clusShapeData_.sigmaEtaEta; //barrel case, no correction
  else{ //endcap, need to apply eta correction
    return clusShapeData_.sigmaEtaEta - 0.02*( fabs(etaSC()) - 2.3);
  } 

}
float egHLT::OffEle::sigmaEtaEtaUnCorr ( ) const [inline]
float egHLT::OffEle::sigmaIEtaIEta ( ) const [inline]
float egHLT::OffEle::sigmaPhiPhi ( ) const [inline]
TrigCodes::TrigBitSet egHLT::OffEle::trigBits ( ) const [inline]

Definition at line 219 of file EgHLTOffEle.h.

References trigBits_.

Referenced by egHLT::EleHLTFilterMon::fill(), and egHLT::EgTrigTagProbeCut_New::pass().

{return trigBits_;}
int OffEle::trigCutsCutCode ( const TrigCodes::TrigBitSet trigger) const

Definition at line 18 of file EgHLTOffEle.cc.

References first, i, and trigCutsCutCodes_.

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

{
  //yes maybe a sorted vector might be better but 1) its small and 2) bitset doesnt support < operator
  //okay laugh, for some reason I cant overload the == operator (brain just not working), hence the non stl'y way
  //std::vector<std::pair<TrigCodes::TrigBitSet,int> >::const_iterator it;
  //it = std::find(trigCutsCodes_.begin(),trigCutsCodes_.end(),trigger);
  //if(it!=trigCutsCodes_.end()) return it->second;
  //else return 0; //defaults to passing

  for(size_t i=0;i<trigCutsCutCodes_.size();i++) if(trigger==trigCutsCutCodes_[i].first) return trigCutsCutCodes_[i].second;
  return 0; //defaults to passing
}
bool egHLT::OffEle::validCTFTrack ( ) const [inline]
float egHLT::OffEle::zVtx ( ) const [inline]

Definition at line 127 of file EgHLTOffEle.h.

References gsfEle_, and reco::GsfElectron::TrackPositionAtVtx().

{return gsfEle_->TrackPositionAtVtx().z();}

Member Data Documentation

int egHLT::OffEle::cutCode_ [private]

Definition at line 87 of file EgHLTOffEle.h.

Referenced by cutCode(), and setCutCode().

Definition at line 84 of file EgHLTOffEle.h.

Referenced by NVertex().

Definition at line 83 of file EgHLTOffEle.h.

Referenced by hltDEtaIn(), hltDPhiIn(), hltEnergy(), hltEta(), hltInvEInvP(), and hltPhi().

Definition at line 88 of file EgHLTOffEle.h.

Referenced by looseCutCode(), and setLooseCutCode().

Definition at line 96 of file EgHLTOffEle.h.

Referenced by setTrigBits(), and trigBits().

std::vector<std::pair<TrigCodes::TrigBitSet,int> > egHLT::OffEle::trigCutsCutCodes_ [private]

Definition at line 91 of file EgHLTOffEle.h.

Referenced by setTrigCutsCutCodes(), and trigCutsCutCode().