CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GsfEleFull5x5SigmaIEtaIEtaCut.cc
Go to the documentation of this file.
3 
5 public:
7 
8  result_type operator()(const reco::GsfElectronPtr&) const override final;
9 
10  void setConsumes(edm::ConsumesCollector&) override final;
11  void getEventContent(const edm::EventBase&) override final;
12 
13  CandidateType candidateType() const override final {
14  return ELECTRON;
15  }
16 
17 private:
22 
23  constexpr static char full5x5SigmaIEtaIEta_[] = "full5x5SigmaIEtaIEta";
24 };
25 
27 
30  "GsfEleFull5x5SigmaIEtaIEtaCut");
31 
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 }
41 
43  auto full5x5SigmaIEtaIEta =
45  contentTokens_.emplace(full5x5SigmaIEtaIEta_,full5x5SigmaIEtaIEta);
46 }
47 
50 }
51 
52 CutApplicatorBase::result_type
54 operator()(const reco::GsfElectronPtr& cand) const{
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 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
std::unordered_map< std::string, edm::EDGetToken > contentTokens_
bool ev
#define constexpr
std::unordered_map< std::string, edm::InputTag > contentTags_
result_type operator()(const reco::GsfElectronPtr &) const overridefinal
void getEventContent(const edm::EventBase &) overridefinal
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
CandidateType candidateType() const overridefinal
edm::Handle< edm::ValueMap< float > > _full5x5SigmaIEtaIEtaMap
string const
Definition: compareJSON.py:14
void setConsumes(edm::ConsumesCollector &) overridefinal
bool getByLabel(InputTag const &, Handle< T > &) const
Definition: EventBase.h:87
#define DEFINE_EDM_PLUGIN(factory, type, name)
GsfEleFull5x5SigmaIEtaIEtaCut(const edm::ParameterSet &c)