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
GsfEleFull5x5E2x5OverE5x5Cut Class Reference
Inheritance diagram for GsfEleFull5x5E2x5OverE5x5Cut:
CutApplicatorWithEventContentBase CutApplicatorBase candidate_functions::CandidateCut

Public Member Functions

CandidateType candidateType () const overridefinal
 
void getEventContent (const edm::EventBase &) overridefinal
 
 GsfEleFull5x5E2x5OverE5x5Cut (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

edm::Handle< edm::ValueMap
< float > > 
e1x5Handle_
 
edm::Handle< edm::ValueMap
< float > > 
e2x5Handle_
 
edm::Handle< edm::ValueMap
< float > > 
e5x5Handle_
 
EBEECutValues minE1x5OverE5x5Cut_
 
EBEECutValues minE2x5OverE5x5Cut_
 

Static Private Attributes

static constexpr char e1x5_ [] = "e1x5"
 
static constexpr char e2x5_ [] = "e2x5"
 
static constexpr char e5x5_ [] = "e5x5"
 

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 9 of file GsfEleFull5x5E2x5OverE5x5Cut.cc.

Constructor & Destructor Documentation

GsfEleFull5x5E2x5OverE5x5Cut::GsfEleFull5x5E2x5OverE5x5Cut ( const edm::ParameterSet c)

Definition at line 44 of file GsfEleFull5x5E2x5OverE5x5Cut.cc.

References CutApplicatorWithEventContentBase::contentTags_, e1x5_, e2x5_, e5x5_, and edm::ParameterSet::getParameter().

44  :
46  minE1x5OverE5x5Cut_(params,"minE1x5OverE5x5"),
47  minE2x5OverE5x5Cut_(params,"minE2x5OverE5x5"){
48  edm::InputTag e5x5Tag = params.getParameter<edm::InputTag>(e5x5_);
49  edm::InputTag e2x5Tag = params.getParameter<edm::InputTag>(e2x5_);
50  edm::InputTag e1x5Tag = params.getParameter<edm::InputTag>(e1x5_);
51  contentTags_.emplace(e5x5_,e5x5Tag);
52  contentTags_.emplace(e2x5_,e2x5Tag);
53  contentTags_.emplace(e1x5_,e1x5Tag);
54 }
CutApplicatorWithEventContentBase(const edm::ParameterSet &c)
std::unordered_map< std::string, edm::InputTag > contentTags_

Member Function Documentation

CandidateType GsfEleFull5x5E2x5OverE5x5Cut::candidateType ( ) const
inlinefinaloverridevirtual

Reimplemented from CutApplicatorBase.

Definition at line 18 of file GsfEleFull5x5E2x5OverE5x5Cut.cc.

References CutApplicatorBase::ELECTRON.

18  {
19  return ELECTRON;
20  }
void GsfEleFull5x5E2x5OverE5x5Cut::getEventContent ( const edm::EventBase ev)
finaloverridevirtual

Implements CutApplicatorWithEventContentBase.

Definition at line 65 of file GsfEleFull5x5E2x5OverE5x5Cut.cc.

References CutApplicatorWithEventContentBase::contentTags_, e1x5_, e1x5Handle_, e2x5_, e2x5Handle_, e5x5_, e5x5Handle_, and edm::EventBase::getByLabel().

65  {
69 }
edm::Handle< edm::ValueMap< float > > e1x5Handle_
edm::Handle< edm::ValueMap< float > > e5x5Handle_
std::unordered_map< std::string, edm::InputTag > contentTags_
edm::Handle< edm::ValueMap< float > > e2x5Handle_
bool getByLabel(InputTag const &, Handle< T > &) const
Definition: EventBase.h:87
CutApplicatorBase::result_type GsfEleFull5x5E2x5OverE5x5Cut::operator() ( const reco::GsfElectronPtr cand) const
finaloverridevirtual

Reimplemented from CutApplicatorBase.

Definition at line 73 of file GsfEleFull5x5E2x5OverE5x5Cut.cc.

References minE1x5OverE5x5Cut_, and minE2x5OverE5x5Cut_.

73  {
74 
75  const double e5x5 = (*e5x5Handle_)[cand];
76  const double e1x5OverE5x5 = e5x5!=0 ? (*e1x5Handle_)[cand]/e5x5 : 0;
77  const double e2x5OverE5x5 = e5x5!=0 ? (*e2x5Handle_)[cand]/e5x5 : 0;
78 
79  return e1x5OverE5x5 > minE1x5OverE5x5Cut_(cand) || e2x5OverE5x5 > minE2x5OverE5x5Cut_(cand);
80 
81 }
void GsfEleFull5x5E2x5OverE5x5Cut::setConsumes ( edm::ConsumesCollector cc)
finaloverridevirtual

Implements CutApplicatorWithEventContentBase.

Definition at line 56 of file GsfEleFull5x5E2x5OverE5x5Cut.cc.

References edm::ConsumesCollector::consumes(), CutApplicatorWithEventContentBase::contentTags_, CutApplicatorWithEventContentBase::contentTokens_, e1x5_, e2x5_, and e5x5_.

56  {
57  auto e5x5 = cc.consumes<double>(contentTags_[e5x5_]);
58  contentTokens_.emplace(e5x5_,e5x5);
59  auto e2x5 = cc.consumes<double>(contentTags_[e2x5_]);
60  contentTokens_.emplace(e2x5_,e2x5);
61  auto e1x5 = cc.consumes<double>(contentTags_[e1x5_]);
62  contentTokens_.emplace(e1x5_,e1x5);
63 }
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

constexpr char GsfEleFull5x5E2x5OverE5x5Cut::e1x5_ = "e1x5"
staticprivate
edm::Handle<edm::ValueMap<float> > GsfEleFull5x5E2x5OverE5x5Cut::e1x5Handle_
private

Definition at line 27 of file GsfEleFull5x5E2x5OverE5x5Cut.cc.

Referenced by getEventContent().

constexpr char GsfEleFull5x5E2x5OverE5x5Cut::e2x5_ = "e2x5"
staticprivate
edm::Handle<edm::ValueMap<float> > GsfEleFull5x5E2x5OverE5x5Cut::e2x5Handle_
private

Definition at line 28 of file GsfEleFull5x5E2x5OverE5x5Cut.cc.

Referenced by getEventContent().

constexpr char GsfEleFull5x5E2x5OverE5x5Cut::e5x5_ = "e5x5"
staticprivate
edm::Handle<edm::ValueMap<float> > GsfEleFull5x5E2x5OverE5x5Cut::e5x5Handle_
private

Definition at line 29 of file GsfEleFull5x5E2x5OverE5x5Cut.cc.

Referenced by getEventContent().

EBEECutValues GsfEleFull5x5E2x5OverE5x5Cut::minE1x5OverE5x5Cut_
private

Definition at line 23 of file GsfEleFull5x5E2x5OverE5x5Cut.cc.

Referenced by operator()().

EBEECutValues GsfEleFull5x5E2x5OverE5x5Cut::minE2x5OverE5x5Cut_
private

Definition at line 24 of file GsfEleFull5x5E2x5OverE5x5Cut.cc.

Referenced by operator()().