test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GsfEleDEtaInLinearCut.cc
Go to the documentation of this file.
4 
6 public:
8  CutApplicatorBase(param),
9  slopeTerm_(param,"slopeTerm"),
10  constTerm_(param,"constTerm"),
11  minValue_(param,"minValue")
12  {
13  }
14 
15  result_type operator()(const reco::GsfElectronPtr&) const override final;
16 
17  double value(const reco::CandidatePtr& cand) const override final;
18 
19  CandidateType candidateType() const override final {
20  return ELECTRON;
21  }
22 
23 private:
27 };
28 
31  "GsfEleDEtaInLinearCut");
32 
33 CutApplicatorBase::result_type
35 operator()(const reco::GsfElectronPtr& cand) const
36 {
37  float et = cand->energy()!=0. ? cand->et()/cand->energy()*cand->caloEnergy() : 0.;
38  double cutValue = std::max(constTerm_(cand)+slopeTerm_(cand)*et,minValue_(cand));
39  return std::abs(cand->deltaEtaSuperClusterTrackAtVtx())<cutValue;
40 
41 }
42 
44  reco::GsfElectronPtr ele(cand);
45  return std::abs(ele->deltaEtaSuperClusterTrackAtVtx());
46 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double value(const reco::CandidatePtr &cand) const overridefinal
const EBEECutValues constTerm_
edm::Ptr< Candidate > CandidatePtr
persistent reference to an object in a collection of Candidate objects
Definition: CandidateFwd.h:25
result_type operator()(const reco::GsfElectronPtr &) const overridefinal
const EBEECutValues minValue_
string const
Definition: compareJSON.py:14
GsfEleDEtaInLinearCut(const edm::ParameterSet &param)
#define DEFINE_EDM_PLUGIN(factory, type, name)
const EBEECutValues slopeTerm_
CandidateType candidateType() const overridefinal