CMS 3D CMS Logo

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

◆ Electron

enum reco::SoftLeptonProperties::Quality::Electron
Enumerator
pfElectronId 
btagElectronCands 
egammaElectronId 

Definition at line 55 of file TemplatedSoftLeptonTagInfo.h.

◆ Generic

enum reco::SoftLeptonProperties::Quality::Generic
Enumerator
leptonId 
btagLeptonCands 

Definition at line 53 of file TemplatedSoftLeptonTagInfo.h.

53 { leptonId = 0, btagLeptonCands };

◆ Muon

enum reco::SoftLeptonProperties::Quality::Muon
Enumerator
muonId 
btagMuonCands 

Definition at line 57 of file TemplatedSoftLeptonTagInfo.h.

57 { muonId = 0, btagMuonCands };

Member Function Documentation

◆ byName()

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

Definition at line 60 of file TemplatedSoftLeptonTagInfo.h.

60  {
61  return static_cast<T>(internalByName(name));
62  }

References internalByName(), and Skims_PA_cff::name.

◆ internalByName()

unsigned int reco::SoftLeptonProperties::Quality::internalByName ( const char *  name)
staticprivate

Definition at line 14 of file TemplatedSoftLeptonTagInfo.cc.

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  }

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

Referenced by byName().

Member Data Documentation

◆ undef

const float reco::SoftLeptonProperties::Quality::undef = -999.0
static
reco::SoftLeptonProperties::Quality::btagLeptonCands
Definition: TemplatedSoftLeptonTagInfo.h:53
reco::SoftLeptonProperties::Quality::pfElectronId
Definition: TemplatedSoftLeptonTagInfo.h:55
reco::SoftLeptonProperties::Quality::leptonId
Definition: TemplatedSoftLeptonTagInfo.h:53
reco::SoftLeptonProperties::Quality::btagMuonCands
Definition: TemplatedSoftLeptonTagInfo.h:57
reco::SoftLeptonProperties::Quality::muonId
Definition: TemplatedSoftLeptonTagInfo.h:57
reco::SoftLeptonProperties::Quality::internalByName
static unsigned int internalByName(const char *name)
Definition: TemplatedSoftLeptonTagInfo.cc:14
Exception
Definition: hltDiff.cc:245
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
reco::SoftLeptonProperties::Quality::btagElectronCands
Definition: TemplatedSoftLeptonTagInfo.h:55
edm::errors::Configuration
Definition: EDMException.h:36
reco::SoftLeptonProperties::Quality::egammaElectronId
Definition: TemplatedSoftLeptonTagInfo.h:55