CMS 3D CMS Logo

Public Types | Static Public Member Functions | Static Public Attributes | Static Private Member Functions

reco::SoftLeptonProperties::quality Struct Reference

#include <SoftLeptonTagInfo.h>

List of all members.

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 37 of file SoftLeptonTagInfo.h.


Member Enumeration Documentation

Enumerator:
pfElectronId 
btagElectronCands 
egammaElectronId 

Definition at line 48 of file SoftLeptonTagInfo.h.

Enumerator:
leptonId 
btagLeptonCands 

Definition at line 43 of file SoftLeptonTagInfo.h.

Enumerator:
muonId 
btagMuonCands 

Definition at line 54 of file SoftLeptonTagInfo.h.

                  {
            muonId = 0,
            btagMuonCands
        };

Member Function Documentation

template<typename T >
static T reco::SoftLeptonProperties::quality::byName ( const char *  name) [inline, static]

Definition at line 59 of file SoftLeptonTagInfo.h.

References internalByName().

        { return static_cast<T>(internalByName(name)); }
unsigned int reco::SoftLeptonProperties::quality::internalByName ( const char *  name) [static, private]

Definition at line 16 of file SoftLeptonTagInfo.cc.

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

Referenced by byName().

{
  if (std::strcmp(name, "") == 0)
    return 0;

  if (std::strcmp(name, "leptonId") == 0)
    return leptonId;
  else if (std::strcmp(name, "btagLeptonCands") == 0)
    return btagLeptonCands;

  if (std::strcmp(name, "pfElectronId") == 0)
    return pfElectronId;
  else if (std::strcmp(name, "btagElectronCands") == 0)
    return btagElectronCands;

  if (std::strcmp(name, "muonId") == 0)
    return muonId;
  else if (std::strcmp(name, "btagMuonCands") == 0)
    return btagMuonCands;

  throw edm::Exception(edm::errors::Configuration) 
    << "Requested lepton quality \"" << name
    << "\" not found in SoftLeptonProperties::quality:byName"
    << std::endl;
}

Member Data Documentation

const float reco::SoftLeptonProperties::quality::undef = -999.0 [static]