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 getHLTprescales::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
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