CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
reco::SoftLeptonProperties Class Reference

#include <SoftLeptonTagInfo.h>

Classes

struct  Quality
 

Public Member Functions

float hasQuality () const
 
float hasQuality (Quality::Generic qual) const
 
float hasQuality (Quality::Muon qual) const
 
float hasQuality (Quality::Electron qual) const
 
float quality (Quality::Generic qual, bool throwIfUndefined=true) const
 
float quality (Quality::Muon qual, bool throwIfUndefined=true) const
 
float quality (Quality::Electron qual, bool throwIfUndefined=true) const
 
float quality () const
 
void setQuality (Quality::Generic qual, float value)
 
void setQuality (Quality::Muon qual, float value)
 
void setQuality (Quality::Electron qual, float value)
 
 SoftLeptonProperties ()
 

Public Attributes

float deltaR
 
float etaRel
 
float p0Par
 
float ptRel
 
float ratio
 
float ratioRel
 
float sip2d
 
float sip3d
 

Private Member Functions

float quality (unsigned int index, bool throwIfUndefined) const
 
void setQuality (unsigned int index, float value)
 

Private Attributes

std::vector< float > qualities_
 

Detailed Description

Definition at line 14 of file SoftLeptonTagInfo.h.

Constructor & Destructor Documentation

reco::SoftLeptonProperties::SoftLeptonProperties ( )
inline

Definition at line 16 of file SoftLeptonTagInfo.h.

16  :
17  sip2d( std::numeric_limits<float>::quiet_NaN() ),
18  sip3d( std::numeric_limits<float>::quiet_NaN() ),
19  ptRel( std::numeric_limits<float>::quiet_NaN() ),
20  p0Par( std::numeric_limits<float>::quiet_NaN() ),
21  etaRel( std::numeric_limits<float>::quiet_NaN() ),
22  deltaR( std::numeric_limits<float>::quiet_NaN() ),
23  ratio( std::numeric_limits<float>::quiet_NaN() ),
24  ratioRel( std::numeric_limits<float>::quiet_NaN() )
25  { }

Member Function Documentation

float reco::SoftLeptonProperties::hasQuality ( ) const
inline

Definition at line 68 of file SoftLeptonTagInfo.h.

References quality(), and reco::SoftLeptonProperties::Quality::undef.

69  { return quality() != Quality::undef; }
float reco::SoftLeptonProperties::hasQuality ( Quality::Generic  qual) const
inline

Definition at line 70 of file SoftLeptonTagInfo.h.

References quality(), and reco::SoftLeptonProperties::Quality::undef.

71  { return quality((unsigned int)qual, false) != Quality::undef; }
float reco::SoftLeptonProperties::hasQuality ( Quality::Muon  qual) const
inline

Definition at line 72 of file SoftLeptonTagInfo.h.

References quality(), and reco::SoftLeptonProperties::Quality::undef.

73  { return quality((unsigned int)qual, false) != Quality::undef; }
float reco::SoftLeptonProperties::hasQuality ( Quality::Electron  qual) const
inline

Definition at line 74 of file SoftLeptonTagInfo.h.

References quality(), and reco::SoftLeptonProperties::Quality::undef.

75  { return quality((unsigned int)qual, false) != Quality::undef; }
float reco::SoftLeptonProperties::quality ( Quality::Generic  qual,
bool  throwIfUndefined = true 
) const
inline

Definition at line 79 of file SoftLeptonTagInfo.h.

References quality().

Referenced by SoftLeptonTagPlotter::analyzeTag(), btag::LeptonSelector::operator()(), and reco::SoftLeptonTagInfo::taggingVariables().

80  { return quality((unsigned int)qual, throwIfUndefined); }
float reco::SoftLeptonProperties::quality ( Quality::Muon  qual,
bool  throwIfUndefined = true 
) const
inline

Definition at line 81 of file SoftLeptonTagInfo.h.

References quality().

82  { return quality((unsigned int)qual, throwIfUndefined); }
float reco::SoftLeptonProperties::quality ( Quality::Electron  qual,
bool  throwIfUndefined = true 
) const
inline

Definition at line 83 of file SoftLeptonTagInfo.h.

References quality().

84  { return quality((unsigned int)qual, throwIfUndefined); }
float reco::SoftLeptonProperties::quality ( ) const
inline

Definition at line 87 of file SoftLeptonTagInfo.h.

References quality().

Referenced by hasQuality(), and quality().

87 { return quality(0, false); }
float reco::SoftLeptonProperties::quality ( unsigned int  index,
bool  throwIfUndefined 
) const
private

Definition at line 42 of file SoftLeptonTagInfo.cc.

References edm::hlt::Exception, edm::errors::InvalidReference, and trackerHitRTTI::undef.

43 {
44  float qual = Quality::undef;
45  if (index < qualities_.size())
46  qual = qualities_[index];
47 
48  if (qual == Quality::undef && throwIfUndefined)
50  << "Requested lepton quality not found in SoftLeptonProperties::Quality"
51  << std::endl;
52 
53  return qual;
54 }
std::vector< float > qualities_
void reco::SoftLeptonProperties::setQuality ( Quality::Generic  qual,
float  value 
)
inline

Definition at line 91 of file SoftLeptonTagInfo.h.

Referenced by setQuality(), and SoftLepton::tag().

92  { setQuality((unsigned int)qual, value); }
void setQuality(Quality::Generic qual, float value)
void reco::SoftLeptonProperties::setQuality ( Quality::Muon  qual,
float  value 
)
inline

Definition at line 93 of file SoftLeptonTagInfo.h.

References setQuality().

94  { setQuality((unsigned int)qual, value); }
void setQuality(Quality::Generic qual, float value)
void reco::SoftLeptonProperties::setQuality ( Quality::Electron  qual,
float  value 
)
inline

Definition at line 95 of file SoftLeptonTagInfo.h.

References setQuality().

96  { setQuality((unsigned int)qual, value); }
void setQuality(Quality::Generic qual, float value)
void reco::SoftLeptonProperties::setQuality ( unsigned int  index,
float  value 
)
private

Definition at line 56 of file SoftLeptonTagInfo.cc.

References cmsHarvester::index, and trackerHitRTTI::undef.

57 {
58  if (qualities_.size() <= index)
59  qualities_.resize(index + 1, Quality::undef);
60 
61  qualities_[index] = qual;
62 }
std::vector< float > qualities_

Member Data Documentation

float reco::SoftLeptonProperties::deltaR
float reco::SoftLeptonProperties::etaRel
float reco::SoftLeptonProperties::p0Par

Definition at line 30 of file SoftLeptonTagInfo.h.

Referenced by SoftLeptonTagPlotter::analyzeTag(), and SoftLepton::tag().

float reco::SoftLeptonProperties::ptRel
std::vector<float> reco::SoftLeptonProperties::qualities_
private

Definition at line 102 of file SoftLeptonTagInfo.h.

float reco::SoftLeptonProperties::ratio
float reco::SoftLeptonProperties::ratioRel
float reco::SoftLeptonProperties::sip2d
float reco::SoftLeptonProperties::sip3d