CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
reco::SoftLeptonProperties Class Reference

#include <TemplatedSoftLeptonTagInfo.h>

Classes

struct  Quality
 

Public Member Functions

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

Public Attributes

int charge
 
float deltaR
 
float elec_mva
 
float etaRel
 
float p0Par
 
float ptRel
 
float ratio
 
float ratioRel
 
float sip2d
 
float sip2dsig
 
float sip3d
 
float sip3dsig
 

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 15 of file TemplatedSoftLeptonTagInfo.h.

Constructor & Destructor Documentation

◆ SoftLeptonProperties()

reco::SoftLeptonProperties::SoftLeptonProperties ( )
inline

Definition at line 17 of file TemplatedSoftLeptonTagInfo.h.

18  : sip2dsig(std::numeric_limits<float>::quiet_NaN()),
19  sip3dsig(std::numeric_limits<float>::quiet_NaN()),
20  sip2d(std::numeric_limits<float>::quiet_NaN()),
21  sip3d(std::numeric_limits<float>::quiet_NaN()),
22  ptRel(std::numeric_limits<float>::quiet_NaN()),
23  p0Par(std::numeric_limits<float>::quiet_NaN()),
24  etaRel(std::numeric_limits<float>::quiet_NaN()),
25  deltaR(std::numeric_limits<float>::quiet_NaN()),
26  ratio(std::numeric_limits<float>::quiet_NaN()),
27  ratioRel(std::numeric_limits<float>::quiet_NaN()),
28  elec_mva(std::numeric_limits<float>::quiet_NaN()),
29  charge(-10) {}

Member Function Documentation

◆ hasQuality() [1/4]

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

Definition at line 70 of file TemplatedSoftLeptonTagInfo.h.

70 { return quality() != Quality::undef; }

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

◆ hasQuality() [2/4]

float reco::SoftLeptonProperties::hasQuality ( Quality::Electron  qual) const
inline

Definition at line 75 of file TemplatedSoftLeptonTagInfo.h.

75  {
76  return quality((unsigned int)qual, false) != Quality::undef;
77  }

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

◆ hasQuality() [3/4]

float reco::SoftLeptonProperties::hasQuality ( Quality::Generic  qual) const
inline

Definition at line 71 of file TemplatedSoftLeptonTagInfo.h.

71  {
72  return quality((unsigned int)qual, false) != Quality::undef;
73  }

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

◆ hasQuality() [4/4]

float reco::SoftLeptonProperties::hasQuality ( Quality::Muon  qual) const
inline

Definition at line 74 of file TemplatedSoftLeptonTagInfo.h.

74 { return quality((unsigned int)qual, false) != Quality::undef; }

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

◆ quality() [1/5]

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

Definition at line 92 of file TemplatedSoftLeptonTagInfo.h.

92 { return quality(0, false); }

References quality().

Referenced by hasQuality(), and quality().

◆ quality() [2/5]

float reco::SoftLeptonProperties::quality ( Quality::Electron  qual,
bool  throwIfUndefined = true 
) const
inline

Definition at line 87 of file TemplatedSoftLeptonTagInfo.h.

87  {
88  return quality((unsigned int)qual, throwIfUndefined);
89  }

References quality().

◆ quality() [3/5]

float reco::SoftLeptonProperties::quality ( Quality::Generic  qual,
bool  throwIfUndefined = true 
) const
inline

Definition at line 81 of file TemplatedSoftLeptonTagInfo.h.

81  {
82  return quality((unsigned int)qual, throwIfUndefined);
83  }

References quality().

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

◆ quality() [4/5]

float reco::SoftLeptonProperties::quality ( Quality::Muon  qual,
bool  throwIfUndefined = true 
) const
inline

Definition at line 84 of file TemplatedSoftLeptonTagInfo.h.

84  {
85  return quality((unsigned int)qual, throwIfUndefined);
86  }

References quality().

◆ quality() [5/5]

float reco::SoftLeptonProperties::quality ( unsigned int  index,
bool  throwIfUndefined 
) const
private

Definition at line 38 of file TemplatedSoftLeptonTagInfo.cc.

38  {
39  float qual = Quality::undef;
40  if (index < qualities_.size())
41  qual = qualities_[index];
42 
43  if (qual == Quality::undef && throwIfUndefined)
45  << "Requested lepton quality not found in SoftLeptonProperties::Quality" << std::endl;
46 
47  return qual;
48  }

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

◆ setQuality() [1/4]

void reco::SoftLeptonProperties::setQuality ( Quality::Electron  qual,
float  value 
)
inline

Definition at line 98 of file TemplatedSoftLeptonTagInfo.h.

98 { setQuality((unsigned int)qual, value); }

References setQuality().

Referenced by setQuality().

◆ setQuality() [2/4]

void reco::SoftLeptonProperties::setQuality ( Quality::Generic  qual,
float  value 
)
inline

Definition at line 96 of file TemplatedSoftLeptonTagInfo.h.

96 { setQuality((unsigned int)qual, value); }

References setQuality().

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

◆ setQuality() [3/4]

void reco::SoftLeptonProperties::setQuality ( Quality::Muon  qual,
float  value 
)
inline

Definition at line 97 of file TemplatedSoftLeptonTagInfo.h.

97 { setQuality((unsigned int)qual, value); }

References setQuality().

Referenced by setQuality().

◆ setQuality() [4/4]

void reco::SoftLeptonProperties::setQuality ( unsigned int  index,
float  value 
)
private

Definition at line 50 of file TemplatedSoftLeptonTagInfo.cc.

50  {
51  if (qualities_.size() <= index)
52  qualities_.resize(index + 1, Quality::undef);
53 
54  qualities_[index] = qual;
55  }

References trackerHitRTTI::undef.

Member Data Documentation

◆ charge

int reco::SoftLeptonProperties::charge

Definition at line 45 of file TemplatedSoftLeptonTagInfo.h.

Referenced by SoftPFElectronTagInfoProducer::produce().

◆ deltaR

float reco::SoftLeptonProperties::deltaR

◆ elec_mva

float reco::SoftLeptonProperties::elec_mva

◆ etaRel

float reco::SoftLeptonProperties::etaRel

◆ p0Par

float reco::SoftLeptonProperties::p0Par

◆ ptRel

float reco::SoftLeptonProperties::ptRel

◆ qualities_

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

Definition at line 104 of file TemplatedSoftLeptonTagInfo.h.

◆ ratio

float reco::SoftLeptonProperties::ratio

◆ ratioRel

float reco::SoftLeptonProperties::ratioRel

◆ sip2d

float reco::SoftLeptonProperties::sip2d

◆ sip2dsig

float reco::SoftLeptonProperties::sip2dsig

◆ sip3d

float reco::SoftLeptonProperties::sip3d

◆ sip3dsig

float reco::SoftLeptonProperties::sip3dsig
reco::SoftLeptonProperties::elec_mva
float elec_mva
Definition: TemplatedSoftLeptonTagInfo.h:43
reco::SoftLeptonProperties::qualities_
std::vector< float > qualities_
Definition: TemplatedSoftLeptonTagInfo.h:104
reco::SoftLeptonProperties::sip3d
float sip3d
Definition: TemplatedSoftLeptonTagInfo.h:34
edm::errors::InvalidReference
Definition: EDMException.h:39
reco::SoftLeptonProperties::p0Par
float p0Par
Definition: TemplatedSoftLeptonTagInfo.h:36
reco::SoftLeptonProperties::quality
float quality() const
Definition: TemplatedSoftLeptonTagInfo.h:92
reco::SoftLeptonProperties::sip2dsig
float sip2dsig
Definition: TemplatedSoftLeptonTagInfo.h:31
reco::SoftLeptonProperties::sip3dsig
float sip3dsig
Definition: TemplatedSoftLeptonTagInfo.h:32
reco::SoftLeptonProperties::Quality::undef
static const float undef
Definition: TemplatedSoftLeptonTagInfo.h:48
reco::SoftLeptonProperties::etaRel
float etaRel
Definition: TemplatedSoftLeptonTagInfo.h:38
reco::SoftLeptonProperties::ratio
float ratio
Definition: TemplatedSoftLeptonTagInfo.h:40
reco::SoftLeptonProperties::ptRel
float ptRel
Definition: TemplatedSoftLeptonTagInfo.h:35
reco::SoftLeptonProperties::sip2d
float sip2d
Definition: TemplatedSoftLeptonTagInfo.h:33
value
Definition: value.py:1
reco::SoftLeptonProperties::deltaR
float deltaR
Definition: TemplatedSoftLeptonTagInfo.h:39
reco::SoftLeptonProperties::charge
int charge
Definition: TemplatedSoftLeptonTagInfo.h:45
Exception
Definition: hltDiff.cc:246
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
reco::SoftLeptonProperties::setQuality
void setQuality(Quality::Generic qual, float value)
Definition: TemplatedSoftLeptonTagInfo.h:96
reco::SoftLeptonProperties::ratioRel
float ratioRel
Definition: TemplatedSoftLeptonTagInfo.h:41