test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 48 of file TemplatedSoftLeptonTagInfo.h.

Member Enumeration Documentation

Member Function Documentation

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

Definition at line 70 of file TemplatedSoftLeptonTagInfo.h.

References internalByName().

71  { return static_cast<T>(internalByName(name)); }
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_25ns10e33_v2_cff::leptonId.

Referenced by byName().

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

Member Data Documentation

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