CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GsfEleHadronicOverEMLinearCut.cc
Go to the documentation of this file.
5 public:
7  CutApplicatorBase(params),
8  slopeTerm_(params,"slopeTerm"),
9  slopeStart_(params,"slopeStart"),
10  constTerm_(params,"constTerm"){}
11 
12  result_type operator()(const reco::GsfElectronPtr&) const override final;
13 
14  double value(const reco::CandidatePtr& cand) const override final;
15 
16  CandidateType candidateType() const override final {
17  return ELECTRON;
18  }
19 
20 private:
24 
25 };
26 
29  "GsfEleHadronicOverEMLinearCut");
30 
31 CutApplicatorBase::result_type
34 
35  const float energy = cand->superCluster()->energy();
36  const float cutValue = energy > slopeStart_(cand) ? slopeTerm_(cand)*(energy-slopeStart_(cand)) + constTerm_(cand) : constTerm_(cand);
37 
38  return cand->hadronicOverEm()*energy < cutValue;
39 }
40 
42 value(const reco::CandidatePtr& cand) const {
43  reco::GsfElectronPtr ele(cand);
44  const float energy = ele->superCluster()->energy();
45  return ele->hadronicOverEm()*energy;
46 }
result_type operator()(const reco::GsfElectronPtr &) const override final
CandidateType candidateType() const override final
GsfEleHadronicOverEMLinearCut(const edm::ParameterSet &params)
float hadronicOverEm() const
Definition: GsfElectron.h:487
virtual SuperClusterRef superCluster() const
reference to a SuperCluster
Definition: GsfElectron.h:184
#define DEFINE_EDM_PLUGIN(factory, type, name)
double value(const reco::CandidatePtr &cand) const override final