CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes | Static Private Attributes
GsfEleFull5x5SigmaIEtaIEtaCut Class Reference
Inheritance diagram for GsfEleFull5x5SigmaIEtaIEtaCut:
CutApplicatorWithEventContentBase CutApplicatorBase candidate_functions::CandidateCut

Public Member Functions

CandidateType candidateType () const overridefinal
 
void getEventContent (const edm::EventBase &) overridefinal
 
 GsfEleFull5x5SigmaIEtaIEtaCut (const edm::ParameterSet &c)
 
result_type operator() (const reco::GsfElectronPtr &) const overridefinal
 
void setConsumes (edm::ConsumesCollector &) overridefinal
 
- Public Member Functions inherited from CutApplicatorWithEventContentBase
 CutApplicatorWithEventContentBase (const edm::ParameterSet &c)
 
 CutApplicatorWithEventContentBase (const CutApplicatorWithEventContentBase &)=delete
 
CutApplicatorWithEventContentBaseoperator= (const CutApplicatorWithEventContentBase &)=delete
 
virtual ~CutApplicatorWithEventContentBase ()
 Destructor. More...
 
- Public Member Functions inherited from CutApplicatorBase
virtual result_type asCandidate (const argument_type &) const
 
 CutApplicatorBase (const edm::ParameterSet &c)
 
 CutApplicatorBase (const CutApplicatorBase &)=delete
 
const std::string & name () const
 
virtual result_type operator() (const argument_type &) const final
 
virtual result_type operator() (const pat::ElectronPtr &) const
 
virtual result_type operator() (const reco::PhotonPtr &) const
 
virtual result_type operator() (const pat::PhotonPtr &) const
 
virtual result_type operator() (const reco::MuonPtr &) const
 
virtual result_type operator() (const pat::MuonPtr &) const
 
virtual result_type operator() (const reco::PFTauPtr &) const
 
virtual result_type operator() (const pat::TauPtr &) const
 
CutApplicatorBaseoperator= (const CutApplicatorBase &)=delete
 
virtual ~CutApplicatorBase ()
 Destructor. More...
 
- Public Member Functions inherited from candidate_functions::CandidateCut
virtual ~CandidateCut ()
 

Private Attributes

float _barrelCutOff
 
float _full5x5SigmaIEtaIEtaCutValueEB
 
float _full5x5SigmaIEtaIEtaCutValueEE
 
edm::Handle< edm::ValueMap
< float > > 
_full5x5SigmaIEtaIEtaMap
 

Static Private Attributes

static constexpr char full5x5SigmaIEtaIEta_ [] = "full5x5SigmaIEtaIEta"
 

Additional Inherited Members

- Public Types inherited from CutApplicatorBase
enum  CandidateType {
  NONE, ELECTRON, MUON, PHOTON,
  TAU, PATELECTRON, PATMUON, PATPHOTON,
  PATTAU
}
 
- Protected Attributes inherited from CutApplicatorWithEventContentBase
std::unordered_map
< std::string, edm::InputTag
contentTags_
 
std::unordered_map
< std::string, edm::EDGetToken
contentTokens_
 

Detailed Description

Definition at line 4 of file GsfEleFull5x5SigmaIEtaIEtaCut.cc.

Constructor & Destructor Documentation

GsfEleFull5x5SigmaIEtaIEtaCut::GsfEleFull5x5SigmaIEtaIEtaCut ( const edm::ParameterSet c)

Definition at line 32 of file GsfEleFull5x5SigmaIEtaIEtaCut.cc.

References CutApplicatorWithEventContentBase::contentTags_, full5x5SigmaIEtaIEta_, and edm::ParameterSet::getParameter().

32  :
34  _full5x5SigmaIEtaIEtaCutValueEB(c.getParameter<double>("full5x5SigmaIEtaIEtaCutValueEB")),
35  _full5x5SigmaIEtaIEtaCutValueEE(c.getParameter<double>("full5x5SigmaIEtaIEtaCutValueEE")),
36  _barrelCutOff(c.getParameter<double>("barrelCutOff")) {
37 
38  edm::InputTag maptag = c.getParameter<edm::InputTag>("full5x5SigmaIEtaIEtaMap");
39  contentTags_.emplace(full5x5SigmaIEtaIEta_,maptag);
40 }
T getParameter(std::string const &) const
CutApplicatorWithEventContentBase(const edm::ParameterSet &c)
std::unordered_map< std::string, edm::InputTag > contentTags_

Member Function Documentation

CandidateType GsfEleFull5x5SigmaIEtaIEtaCut::candidateType ( ) const
inlinefinaloverridevirtual

Reimplemented from CutApplicatorBase.

Definition at line 13 of file GsfEleFull5x5SigmaIEtaIEtaCut.cc.

References CutApplicatorBase::ELECTRON.

13  {
14  return ELECTRON;
15  }
void GsfEleFull5x5SigmaIEtaIEtaCut::getEventContent ( const edm::EventBase ev)
finaloverridevirtual
CutApplicatorBase::result_type GsfEleFull5x5SigmaIEtaIEtaCut::operator() ( const reco::GsfElectronPtr cand) const
finaloverridevirtual

Reimplemented from CutApplicatorBase.

Definition at line 54 of file GsfEleFull5x5SigmaIEtaIEtaCut.cc.

References _barrelCutOff, _full5x5SigmaIEtaIEtaCutValueEB, _full5x5SigmaIEtaIEtaCutValueEE, and funct::abs().

54  {
55 
56  // Figure out the cut value
57  const float full5x5SigmaIEtaIEtaCutValue =
58  ( std::abs(cand->superCluster()->position().eta()) < _barrelCutOff ?
60 
61  // Retrieve the variable value for this particle
62  const float full5x5SigmaIEtaIEta = (*_full5x5SigmaIEtaIEtaMap)[cand];
63 
64  // Apply the cut and return the result
65  return full5x5SigmaIEtaIEta < full5x5SigmaIEtaIEtaCutValue;
66 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
void GsfEleFull5x5SigmaIEtaIEtaCut::setConsumes ( edm::ConsumesCollector cc)
finaloverridevirtual

Implements CutApplicatorWithEventContentBase.

Definition at line 42 of file GsfEleFull5x5SigmaIEtaIEtaCut.cc.

References edm::ConsumesCollector::consumes(), CutApplicatorWithEventContentBase::contentTags_, CutApplicatorWithEventContentBase::contentTokens_, and full5x5SigmaIEtaIEta_.

42  {
43  auto full5x5SigmaIEtaIEta =
45  contentTokens_.emplace(full5x5SigmaIEtaIEta_,full5x5SigmaIEtaIEta);
46 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
std::unordered_map< std::string, edm::EDGetToken > contentTokens_
std::unordered_map< std::string, edm::InputTag > contentTags_

Member Data Documentation

float GsfEleFull5x5SigmaIEtaIEtaCut::_barrelCutOff
private

Definition at line 20 of file GsfEleFull5x5SigmaIEtaIEtaCut.cc.

Referenced by operator()().

float GsfEleFull5x5SigmaIEtaIEtaCut::_full5x5SigmaIEtaIEtaCutValueEB
private

Definition at line 18 of file GsfEleFull5x5SigmaIEtaIEtaCut.cc.

Referenced by operator()().

float GsfEleFull5x5SigmaIEtaIEtaCut::_full5x5SigmaIEtaIEtaCutValueEE
private

Definition at line 19 of file GsfEleFull5x5SigmaIEtaIEtaCut.cc.

Referenced by operator()().

edm::Handle<edm::ValueMap<float> > GsfEleFull5x5SigmaIEtaIEtaCut::_full5x5SigmaIEtaIEtaMap
private

Definition at line 21 of file GsfEleFull5x5SigmaIEtaIEtaCut.cc.

Referenced by getEventContent().

constexpr char GsfEleFull5x5SigmaIEtaIEtaCut::full5x5SigmaIEtaIEta_ = "full5x5SigmaIEtaIEta"
staticprivate