CMS 3D CMS Logo

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

#include <TemplatedSoftLeptonTagInfo.h>

Public Types

enum  Electron { pfElectronId = 0, btagElectronCands, egammaElectronId }
 
enum  Generic { leptonId = 0, btagLeptonCands }
 
enum  Muon { muonId = 0, btagMuonCands }
 

Static Public Member Functions

template<typename T >
static T byName (const char *name)
 

Static Public Attributes

static const float undef = -999.0
 

Static Private Member Functions

static unsigned int internalByName (const char *name)
 

Detailed Description

Definition at line 47 of file TemplatedSoftLeptonTagInfo.h.

Member Enumeration Documentation

enum reco::SoftLeptonProperties::Quality::Electron
enum reco::SoftLeptonProperties::Quality::Generic
enum reco::SoftLeptonProperties::Quality::Muon

Member Function Documentation

template<typename T >
static T reco::SoftLeptonProperties::Quality::byName ( const char *  name)
inlinestatic

Definition at line 60 of file TemplatedSoftLeptonTagInfo.h.

References internalByName().

60  {
61  return static_cast<T>(internalByName(name));
62  }
static unsigned int internalByName(const char *name)
long double T
unsigned int reco::SoftLeptonProperties::Quality::internalByName ( const char *  name)
staticprivate

Definition at line 14 of file TemplatedSoftLeptonTagInfo.cc.

References edm::errors::Configuration, Exception, and HLT_FULL_cff::leptonId.

Referenced by byName().

14  {
15  if (std::strcmp(name, "") == 0)
16  return 0;
17 
18  if (std::strcmp(name, "leptonId") == 0)
19  return leptonId;
20  else if (std::strcmp(name, "btagLeptonCands") == 0)
21  return btagLeptonCands;
22 
23  if (std::strcmp(name, "pfElectronId") == 0)
24  return pfElectronId;
25  else if (std::strcmp(name, "btagElectronCands") == 0)
26  return btagElectronCands;
27 
28  if (std::strcmp(name, "muonId") == 0)
29  return muonId;
30  else if (std::strcmp(name, "btagMuonCands") == 0)
31  return btagMuonCands;
32 
34  << "Requested lepton quality \"" << name << "\" not found in SoftLeptonProperties::Quality::byName"
35  << std::endl;
36  }

Member Data Documentation

const float reco::SoftLeptonProperties::Quality::undef = -999.0
static